Skip to content

Resolve the -fast suffix without a model table - #14

Merged
mipsel64 merged 1 commit into
mainfrom
fast-suffix-without-model-table
Sep 14, 2026
Merged

mipsel64 merged 1 commit into
mainfrom
fast-suffix-without-model-table

Conversation

@mipsel64

Copy link
Copy Markdown
Owner

openai/gpt-5.6-luna-fast failed with:

API Error: 400 The 'gpt-5.6-luna-fast' model is not supported when using Codex with a ChatGPT account.

while the same account ran gpt-5.6-luna fine through the Codex CLI.

Model tables populate discovery and set request defaults; they are not an allowlist, and an unlisted native ID is forwarded upstream unchanged. The synthetic -fast suffix did not follow that rule: synthetic_fast_base required the base to be a configured key, so a -fast name whose base had no [providers.openai.models."..."] table fell through as a literal model name and Codex rejected a model nobody asked for.

Change

Dropped the contains_key(base) check. Any gpt--prefixed ID now resolves: the base goes upstream and the request takes the priority tier, configured or not.

Unchanged:

  • !contains_key(native) still wins, so an upstream ID that itself ends in -fast is sent verbatim once listed.
  • The suffix never stacks (gpt-5.4-fast-fast stays literal).
  • Non-gpt- IDs are untouched.
  • Discovery still lists a -fast name only for configured IDs, since that is what model tables are for.

A misspelled base now reaches the provider as the base rather than as a name with the suffix glued on — the same failure an unlisted ID already produces.

Tests

fast_suffix_resolves_gpt_models asserts an unconfigured base resolves; the effort/tier integration test routes gpt-9-fast to gpt-9 at priority. README and tinyllm.example.toml updated. cargo test 108 pass, clippy and fmt clean.

Model tables populate discovery and set request defaults; they are not an
allowlist, and an unlisted native ID is forwarded upstream unchanged. The
synthetic -fast suffix did not follow that rule. `synthetic_fast_base` required
the base to be a configured key, so `gpt-5.6-luna-fast` with no
`[providers.openai.models."gpt-5.6-luna"]` table fell through as a literal model
name. Codex answered `400 The 'gpt-5.6-luna-fast' model is not supported when
using Codex with a ChatGPT account`, naming a model nobody asked for, while the
same account ran the base model fine through the Codex CLI.

Dropping the `contains_key(base)` check resolves any `gpt-`-prefixed ID: the
base goes upstream and the request takes the priority tier, configured or not.
The `!contains_key(native)` guard stays, so an upstream ID that itself ends in
-fast is still sent verbatim once it is listed, and the suffix never stacks.

Discovery still lists a -fast name only for configured IDs, since that is what
model tables are for. A misspelled base now reaches the provider as the base
rather than as a name with the suffix glued on, which is the same failure an
unlisted ID already produces.
@mipsel64
mipsel64 merged commit 5131534 into main Sep 14, 2026
4 checks passed
@mipsel64
mipsel64 deleted the fast-suffix-without-model-table branch September 14, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant