Repository navigation
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
- Snapshot the active OpenAI credential with its transport\n- Route ChatGPT OAuth and OpenAI API keys to their respective endpoints Signed-off-by: Major Hayden <major@mhtx.net>
- Persist non-secret route provenance with assistant messages\n- Omit incompatible Codex state from OpenAI API requests Signed-off-by: Major Hayden <major@mhtx.net>
8fe33da to
3bea171
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #45334
Type of change
What does this PR do?
Resolve the active OpenAI credential and transport together for each model request instead of relying on asynchronously refreshed provider state. ChatGPT OAuth requests always use the Codex endpoint and headers, while OpenAI API-key requests use the normal configured API endpoint without Codex headers.
Persist non-secret route provenance with assistant messages so OpenAI item IDs and encrypted reasoning from ChatGPT Codex are not replayed to the OpenAI API after an account switch. Visible reasoning and tool content remain available.
How did you verify your code works?
bun test test/plugin/provider-openai.test.ts test/session-runner-message.test.ts test/session-message-update.test.tsfrompackages/core: 34 passed.bun typecheckfrompackages/core,packages/schema,packages/protocol, andpackages/client: passed.bun run buildfrompackages/core: passed.bun run generatefrompackages/client: passed.git diff --check: passed.v2.Screenshots / recordings
Not applicable.
Checklist