Repository navigation
feat(models): provider-neutral fastMode (MPE-02) - #2283
Merged
Merged
Conversation
Migration 0098 adds a nullable fast_mode column and backfills it from codex_fast_mode. Stable and nightly builds share one database, so codex_fast_mode stays. Two triggers copy writes from older builds, which only know codex_fast_mode, into fast_mode.
…are Fast Rename codexFastMode to fastMode on the wire, in the web stores, and on the thread row. Turn admission resolves Fast from the command, then the thread, then the Codex settings default, and adds it to providerOptions only when the catalog entry for the turn's model has supportsFastMode. Forks and provider switches follow the same rule. Older builds still read the legacy names: thread settings writes set both fast_mode and codex_fast_mode, and queued submissions store Fast under codexFastMode. Saved drafts and queued submissions with the old key keep their value. Closes #2227
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Before: Fast was a Codex-only setting named
codexFastMode, and the Codex adapter read the globalprovider.codex.fastModedefault itself.Now: Fast is a provider-neutral
fastModeon the wire, in the web stores, and on the thread row (fast_mode). Turn admission resolves it and sends it only to models whose catalog entry declaressupportsFastMode:Forks inherit the parent's
fast_mode. A provider switch drops Fast unless the target model declares it.Verified with targeted Vitest runs:
serviceTier: "priority"(codex-provider-first-turn)thread-creation-startup)database-migration-success)fastMode(turn-admission-fast-mode)bun run typecheck,bun run lintOut of scope: the Claude adapter, a Claude default, and lifting the web composer's
provider === "codex"gates belong to MPE-03 (#2229).Why
MPE-03 needs Fast for Claude models. Keying Fast on model capability instead of the provider name lets any adapter opt in by declaring
supportsFastMode. A model that can't take Fast never receives it.Closes #2227.
Review Notes
Database migration 0098 (compatible step). It adds nullable
threads.fast_mode, backfills it fromcodex_fast_mode, and adds two triggers. Stable and nightly share~/.mcode/mcode.db, so:codex_fast_mode. The triggers copy those writes intofast_mode.fast_modeis null, so a newer build's insert keeps its value.codex_fast_modeonce the compatibility floor passes 0098.Other legacy keys. Queued automatic-setup submissions are parsed strictly by older builds, so
submission_jsonkeeps storing Fast undercodexFastModeand accepts either key on read. Saved composer drafts with the old key keep their value.Catalog failure. If the model catalog can't be read, admission logs a warning and sends the turn at standard speed instead of failing it. A Codex user with Fast on would get a standard-tier turn during a catalog outage.
Global default.
provider.codex.fastModeis unchanged and still applies only to Codex threads.Need help on this PR? Tag
@codesmith-botwith what you need.