You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: support codex as a first-class provider (codex subscription rather than OpenAI api provider) #24134
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I would like OpenCode to support codex as a first-class provider for Codex-compatible Responses API endpoints. OpenCode already supports many providers through models.dev and generic SDK adapters. In this case, a models.dev entry alone is not enough because Codex-compatible gateways expect Codex CLI-style request construction, not only a model list:
POST <baseURL>/responses
top-level instructions and Responses API input
store: false by default
Codex compatibility headers such as x-client-request-id, x-codex-window-id, and installation metadata
Codex tool formats, especially apply_patch as a Responses API custom grammar tool
The goal is to let users configure a Codex-compatible API base and use models like:
opencode -m codex/gpt-5.4
without relying on provider-specific proxy hacks or MITM rewriting.
Proposed scope:
Add codex as a provider id available in auth/config flows.
Route codex/* models through a native Responses API transport.
Preserve configurable baseURL and API-key auth for user-specified Codex-compatible providers.
Translate OpenCode messages and tool calls to the Codex-compatible Responses protocol.
Add focused tests for provider loading, request construction, stream parsing, and tool-call handling.
I have a local proof of concept (here) that keeps the change focused on provider integration and includes tests, and I'm using my private build on codex subscription which works pretty good. If maintainers agree with this direction, I can open a PR linked to this issue.
changed the title [-][FEATURE]: support codex provider (codex subscription rather than OpenAI api provider)[/-][+][FEATURE]: support codex as a first-class provider (codex subscription rather than OpenAI api provider)[/+]on Apr 24, 2026
I implemented a first-class codex provider in my fork (https://github.com/PadishahIII/opencode) and I'm using my codex forwarding subscription in opencode pretty good. I've tested OmO and superpowers which works normally. I would like to turn my fork into a PR if maintainers are interested.
Activity
github-actions commentedon Apr 24, 2026
This issue might be a duplicate of existing issues. Please check:
Please review the above issues and consider whether this request can be addressed there or linked, to avoid fragmentation of the discussion.
[-][FEATURE]: support codex provider (codex subscription rather than OpenAI api provider)[/-][+][FEATURE]: support codex as a first-class provider (codex subscription rather than OpenAI api provider)[/+]PadishahIII commentedon Apr 24, 2026
I implemented a first-class
codexprovider in my fork (https://github.com/PadishahIII/opencode) and I'm using my codex forwarding subscription in opencode pretty good. I've tested OmO and superpowers which works normally. I would like to turn my fork into a PR if maintainers are interested.My fork: https://github.com/PadishahIII/opencode
About my private build: https://github.com/PadishahIII/opencode/blob/dev/docs/codex-private-build-guide.md
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.