Skip to content

Commit aa4a956

Browse files
sahrizviclaude
andcommitted
docs(codex): correct loader comment (was still claiming shared policy)
Round 4 doc fix on #1133. My previous docstring fix on `shouldAllowOAuthModel` correctly noted that plugin/openai/codex.ts has its own separate filter, but the LOADER comment 5 lines below still said "this filter and the sibling in plugin/openai/codex.ts share one source of truth" — kilo + cubic both flagged the contradiction independently. Rewrote the loader comment to match the helper docstring: this file is the active plugin, the sibling is an unwired refactor with its own ALLOWED_MODELS + parseFloat > 5.4 fallback, they do NOT share a source of truth today. Doc-only. 26/26 tests pass; typecheck clean; marker guard clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 4abe6d5 commit aa4a956

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

packages/opencode/src/plugin/codex.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,15 @@ export async function CodexAuthPlugin(input: PluginInput): Promise<Hooks> {
429429
if (auth.type !== "oauth") return {}
430430

431431
// Filter models to only those the ChatGPT-subscription (Codex) tier
432-
// accepts. Delegates to ``shouldAllowOAuthModel`` (module-level, above)
433-
// so this filter and the sibling in plugin/openai/codex.ts share one
434-
// source of truth. See OAUTH_ALLOWED_MODELS + shouldAllowOAuthModel
435-
// for the criteria + how to add new gpt-5.N releases.
432+
// accepts. Delegates to ``shouldAllowOAuthModel`` (module-level,
433+
// above). See OAUTH_ALLOWED_MODELS + shouldAllowOAuthModel for the
434+
// criteria + how to add new gpt-5.N releases.
435+
//
436+
// NOTE: this file is the ACTIVE plugin (wired via plugin/index.ts).
437+
// The sibling plugin/openai/codex.ts is an unwired in-progress
438+
// refactor that keeps its OWN ALLOWED_MODELS + parseFloat > 5.4
439+
// fallback — this filter does NOT share a source of truth with it.
440+
// Adopting shouldAllowOAuthModel there is followup on that refactor.
436441
// (Closes #1132 — GPT 5.6 missing from picker.)
437442
for (const modelId of Object.keys(provider.models)) {
438443
if (!shouldAllowOAuthModel(modelId)) delete provider.models[modelId]

0 commit comments

Comments
 (0)