Skip to content

fix: ChatGPT OAuth gpt-5.5 tool support#315

Open
WqyJh wants to merge 1 commit into
mainfrom
mirror/pr-501
Open

fix: ChatGPT OAuth gpt-5.5 tool support#315
WqyJh wants to merge 1 commit into
mainfrom
mirror/pr-501

Conversation

@WqyJh

@WqyJh WqyJh commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Issue for this PR

Closes #275

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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, so gpt-5.5 was removed before users could select it. This moves subscription model filtering into the provider model hook, keeps API-key auth untouched, exposes gpt-5.5 for OAuth accounts, and applies subscription-backed cost/limit metadata there.

For request compatibility, this also avoids sending textVerbosity for gpt-5.5, includes encrypted reasoning content for GPT-5 reasoning requests, and flattens nested discriminated-union tool schemas for gpt-5.5 tool parameters.

How did you verify your code works?

  • git diff --check
  • npx --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.ts

I added focused regression tests for OAuth model exposure, gpt-5.5 request options, and nested tool schema flattening. In this fresh local clone, running Bun tests was blocked before assertions because dependencies were not installed, and bun install / bun install --frozen-lockfile --ignore-scripts stayed at Resolving dependencies. Running the tests from a directory without the package bunfig reached source loading but failed on missing effect.

Screenshots / recordings

Not applicable; this is not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Mirrored from XiaomiMiMo/MiMo-Code#501 — original author @LiWithDream.

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.

2 participants