Skip to content

feat: ship model speeds by removing the model_speeds flag - #65877

Open
vimtor wants to merge 1 commit into
devfrom
ship-model-speeds
Open

vimtor wants to merge 1 commit into
devfrom
ship-model-speeds

Conversation

@vimtor

@vimtor vimtor commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Ships the model speeds from #65749 to everyone by deleting the model_speeds flag and the code that reads it. Releases now get the same behavior dev builds have had since #65749:

  • The model picker lists each model once, and its service tiers (Fast, Flex, Ultrafast) are speeds of it: /speed in the TUI and the speed dropdown in desktop.
  • Each tier a model lists in models.dev is a model of its own (gpt-5.5-fast), so typing or sending a -fast model ID keeps working everywhere.
  • Speeds are priced from the tier's multiplier or its own prices (fix(core): price a speed from its tier's own prices when it has no multiplier #65861).

What changes for release users: OpenCode Zen models get Fast, Flex and Ultrafast again (their models.dev modes were removed in favor of the tier lists), and the separate -fast entries in the picker become a speed of their model.

experimental.model_speeds in a config is now ignored, as with any removed flag. Model.Info.experimental.speed stays experimental.

How I verified it

  • bun run check passes. Tests pass in tui (1735), app (2876) and core (7961), apart from the three shell tests in core that fail on my machine's bash on dev too.
  • Regenerated packages/protocol/openapi.json, the client types and the cli-rs config types; the only change in each is the removed flag. I left out unrelated doc-comment drift the cli-rs generator also produced.
  • The tests that asserted the flag-off behavior are removed; the speed tests now run without passing the flag.
  • The feature itself was verified in feat: offer a model's service tiers as a speed in the TUI and desktop #65749 (recordings there).

Added by the opencode bot (AI-generated).

Related: #64968

Public API: removes the experimental.model_speeds config flag (backwards compatible: the key is now ignored)

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is sound: it ships the speeds behavior to releases as described.

I decoded the bundled models.dev snapshot with the defaults a release build uses, in both checkouts. On the base, no models are marked as speeds and OpenCode Zen has no Fast/Flex/Ultrafast entries. With this PR, 592 tier models are marked as speeds of their base model, and Zen has its -fast/-flex/-ultrafast speeds back. models.test.ts passes (31 tests) and tsc on packages/core reports no errors. I couldn't drive the TUI here (the CLI server fails to start on a missing react/jsx-dev-runtime), so I have no screenshots.

One side effect, and a good one: openai-subscription-models.ts now reads the same cached catalog as the models.dev plugin. On dev, while the flag was on, the two read separate copies.

Public API: removes the experimental.model_speeds config key from the config schema, the OpenAPI Config.Info, the client types and the cli-rs types. It's backwards compatible: configs that still set the key load fine and it is ignored. For release users, -fast/-flex models now show as speeds of their base model instead of separate picker entries, and those model IDs still resolve.

No blocking concerns.

Related: #64968

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant