[FEATURE]: opencode proxy #7004

Open
opened 2026-02-16 18:05:53 -05:00 by yindo · 3 comments
Owner

Originally created by @win-t on GitHub (Jan 20, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I'm amazed by how many providers are supported by opencode

So I'm thinking about adding opencode proxy --port 12345 feature

basically the opencode will run and listen provide OpenAI api compatible (especially http://localhost:12345/v1/chat/completions endpoint)

This proxy will use the authentication that is already configured for opencode (and ignore any auth sent to localhost:12345). The usage and cost tracking should also be reflected in opencode stats

Originally created by @win-t on GitHub (Jan 20, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I'm amazed by how many providers are supported by opencode So I'm thinking about adding `opencode proxy --port 12345` feature basically the opencode will run and listen provide OpenAI api compatible (especially `http://localhost:12345/v1/chat/completions` endpoint) This proxy will use the authentication that is already configured for opencode (and ignore any auth sent to `localhost:12345`). The usage and cost tracking should also be reflected in `opencode stats`
yindo added the discussion label 2026-02-16 18:05:53 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 20, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9247: [FEATURE]: Proxy for specific model - requests proxy support for individual model configurations
  • #7793: [Feature Request] Support traditional Chat Completions API for OpenAI provider - proposes OpenAI-compatible API endpoints that could be used as a proxy interface
  • #9628: [FEATURE]: enable responses API in openai compatible provider - related feature request for API format compatibility

Your proposal for an opencode proxy command that exposes an OpenAI-compatible endpoint is a complementary approach to these existing discussions. Feel free to ignore if your use case is distinct.

@github-actions[bot] commented on GitHub (Jan 20, 2026): This issue might be a duplicate of existing issues. Please check: - #9247: [FEATURE]: Proxy for specific model - requests proxy support for individual model configurations - #7793: [Feature Request] Support traditional Chat Completions API for OpenAI provider - proposes OpenAI-compatible API endpoints that could be used as a proxy interface - #9628: [FEATURE]: enable responses API in openai compatible provider - related feature request for API format compatibility Your proposal for an `opencode proxy` command that exposes an OpenAI-compatible endpoint is a complementary approach to these existing discussions. Feel free to ignore if your use case is distinct.
Author
Owner

@win-t commented on GitHub (Jan 20, 2026):

For future improvement, we can also provide server side tool call (where the tool call happens in the opencode proxy) for some common tool like web search and web fetch

@win-t commented on GitHub (Jan 20, 2026): For future improvement, we can also provide server side tool call (where the tool call happens in the opencode proxy) for some common tool like web search and web fetch
Author
Owner

@4rs3n commented on GitHub (Feb 11, 2026):

should the proxy be capable of doing OAuth2 client credentials flow? Im asking because im looking for a proxy that provides api-key auth to opencode and uses OAuth2 client credentials flow to access the LLM provider. (Not sure if something like this already exists)

@4rs3n commented on GitHub (Feb 11, 2026): should the proxy be capable of doing OAuth2 client credentials flow? Im asking because im looking for a proxy that provides api-key auth to opencode and uses OAuth2 client credentials flow to access the LLM provider. (Not sure if something like this already exists)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7004