Skip to content

Commit 66b32d0

Browse files
committed
fix: keep fast tier native-only
1 parent efa3379 commit 66b32d0

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

devlog/90_service-tier-fast/00_investigation.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- opencodex was rewriting catalog service tier ids from `priority` to `fast`, which made Codex's support check fail because it now checks for `priority`.
1313
- The local config had `service_tier = "fast"` but no `fast_mode = true`, so current Codex would also drop the tier through the fast-mode feature gate.
1414
- The TUI status-line fast badge also requires `has_chatgpt_account`. App-server account state derives that from the active model provider's `requires_openai_auth`; opencodex must set it to `true` so Codex treats the proxy like the built-in OpenAI provider for ChatGPT-auth features.
15+
- Routed models were cloned from a native GPT catalog template, so they accidentally inherited `additional_speed_tiers`, `service_tiers`, and default service-tier fields. That exposed `/fast` for non-OpenAI providers even though the priority tier is only valid for OpenAI native passthrough.
1516

1617
## Decision
1718

@@ -22,6 +23,7 @@ Use Codex's current split semantics:
2223
- legacy catalog compatibility: normalize `fast` catalog ids back to `priority`
2324
- opencodex injection must ensure `[features].fast_mode = true`
2425
- opencodex provider injection must set `requires_openai_auth = true`
26+
- native OpenAI passthrough models keep fast tier metadata; routed provider models must strip all service-tier/speed-tier metadata
2527

2628
Do not rewrite outbound passthrough request bodies from `priority` to `fast`; `priority` is the current OpenAI request value for priority processing.
2729

@@ -31,3 +33,4 @@ Do not rewrite outbound passthrough request bodies from `priority` to `fast`; `p
3133
- Existing legacy entries with `service_tiers[].id = "fast"` should be upgraded to `priority`.
3234
- `service_tier = "fast"` in Codex config should remain unchanged, with `[features].fast_mode = true` present.
3335
- `[model_providers.opencodex]` should include `requires_openai_auth = true` so Codex App/TUI can expose ChatGPT-account-gated fast UI.
36+
- `opencode-go/*`, `xai/*`, `anthropic/*`, and all other routed models should have no `service_tiers`, no `additional_speed_tiers`, and no default service tier.

src/codex-catalog.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ function deriveEntry(template: RawEntry | null, slug: string, desc: string, prio
132132
);
133133
e.supported_reasoning_levels = ROUTED_REASONING_LEVELS.map(l => byEffort.get(l.effort) ?? { ...l });
134134
e.default_reasoning_level = "medium";
135+
delete e.additional_speed_tiers;
136+
delete e.service_tier;
137+
delete e.service_tiers;
138+
delete e.default_service_tier;
135139
}
136140
return normalizeServiceTiers(e);
137141
}

0 commit comments

Comments
 (0)