fix: ChatGPT OAuth gpt-5.5 tool support#315
Open
WqyJh wants to merge 1 commit into
Open
Conversation
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.
Issue for this PR
Closes #275
Type of change
What does this PR do?
Fixes ChatGPT Plus/Pro OAuth handling for
openai/gpt-5.5.The OAuth loader was mutating the OpenAI provider model list with an allowlist that stopped at
gpt-5.4, sogpt-5.5was removed before users could select it. This moves subscription model filtering into the provider model hook, keeps API-key auth untouched, exposesgpt-5.5for OAuth accounts, and applies subscription-backed cost/limit metadata there.For request compatibility, this also avoids sending
textVerbosityforgpt-5.5, includes encrypted reasoning content for GPT-5 reasoning requests, and flattens nested discriminated-union tool schemas forgpt-5.5tool parameters.How did you verify your code works?
git diff --checknpx --yes prettier@3.6.2 --check packages/opencode/src/plugin/codex.ts packages/opencode/src/provider/transform.ts packages/opencode/test/plugin/codex.test.ts packages/opencode/test/provider/transform.test.tsI added focused regression tests for OAuth model exposure,
gpt-5.5request options, and nested tool schema flattening. In this fresh local clone, running Bun tests was blocked before assertions because dependencies were not installed, andbun install/bun install --frozen-lockfile --ignore-scriptsstayed atResolving dependencies. Running the tests from a directory without the package bunfig reached source loading but failed on missingeffect.Screenshots / recordings
Not applicable; this is not a UI change.
Checklist
Mirrored from XiaomiMiMo/MiMo-Code#501 — original author @LiWithDream.