Can users customize the relay API server and model? #3847

Open
opened 2026-02-16 17:41:40 -05:00 by yindo · 5 comments
Owner

Originally created by @gearlam on GitHub (Dec 24, 2025).

Originally assigned to: @rekram1-node on GitHub.

Question

Why hasn't this important feature been developed yet? There are many casual users who need custom API interface services!

Originally created by @gearlam on GitHub (Dec 24, 2025). Originally assigned to: @rekram1-node on GitHub. ### Question Why hasn't this important feature been developed yet? There are many casual users who need custom API interface services!
Author
Owner

@github-actions[bot] commented on GitHub (Dec 24, 2025):

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

  • #5674: Custom OpenAI-compatible provider options not being passed to API calls
  • #5564: Does it support compatibility with OpenAI
  • #5210: Custom OpenAI-compatible provider returns no text content
  • #5812: [BUG] Bedrock provider: config options.region ignored for model ID prefixing
  • #971: Model options are not forwarded for openai-compatible providers unless provider.name option is given

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 24, 2025): This issue might be a duplicate of existing issues. Please check: - #5674: Custom OpenAI-compatible provider options not being passed to API calls - #5564: Does it support compatibility with OpenAI - #5210: Custom OpenAI-compatible provider returns no text content - #5812: [BUG] Bedrock provider: config options.region ignored for model ID prefixing - #971: Model options are not forwarded for openai-compatible providers unless provider.name option is given Feel free to ignore if none of these address your specific case.
Author
Owner

@gearlam commented on GitHub (Dec 24, 2025):

This issue might be a duplicate of existing issues. Please check:这个问题可能是现有问题的重复。请查看:

Feel free to ignore if none of these address your specific case.如果以上都不适用于您的具体情况,请忽略。

I've checked, and the problem remains unresolved! I especially want to mention that I suggest adding this feature to the desktop version; I know many people are using the API relay service! Please add a provider compatible with OpenAI!!! The user script configuration is too cumbersome!

@gearlam commented on GitHub (Dec 24, 2025): > This issue might be a duplicate of existing issues. Please check:这个问题可能是现有问题的重复。请查看: > > * [Custom OpenAI-compatible provider options not being passed to API calls #5674](https://github.com/sst/opencode/issues/5674): Custom OpenAI-compatible provider options not being passed to API calls [Custom OpenAI-compatible provider options not being passed to API calls #5674](https://github.com/sst/opencode/issues/5674) : 没有将兼容 OpenAI 的自定义提供者选项传递给 API 调用 > * [Does it support compatibility with OpenAI #5564](https://github.com/sst/opencode/issues/5564): Does it support compatibility with OpenAI [Does it support compatibility with OpenAI #5564](https://github.com/sst/opencode/issues/5564) : 是否支持与 OpenAI 兼容 > * [Custom OpenAI-compatible provider returns no text content #5210](https://github.com/sst/opencode/issues/5210): Custom OpenAI-compatible provider returns no text content [Custom OpenAI-compatible provider returns no text content #5210](https://github.com/sst/opencode/issues/5210) : 自定义兼容 OpenAI 的提供者返回无文本内容 > * [[BUG] Bedrock provider: config options.region ignored for model ID prefixing #5812](https://github.com/sst/opencode/issues/5812): [BUG] Bedrock provider: config options.region ignored for model ID prefixing [[BUG] Bedrock provider: config options.region ignored for model ID prefixing #5812](https://github.com/sst/opencode/issues/5812) : [BUG] Bedrock 提供者:config options.region 在模型 ID 前缀时被忽略 > * [Model options are not forwarded for openai-compatible providers unless provider.name option is given #971](https://github.com/sst/opencode/issues/971): Model options are not forwarded for openai-compatible providers unless provider.name option is given [Model options are not forwarded for openai-compatible providers unless provider.name option is given #971](https://github.com/sst/opencode/issues/971) : 对于 openai 兼容的提供者,除非提供者.name 选项被给出,否则模型选项不会被转发 > > Feel free to ignore if none of these address your specific case.如果以上都不适用于您的具体情况,请忽略。 I've checked, and the problem remains unresolved! I especially want to mention that I suggest adding this feature to the desktop version; I know many people are using the API relay service! Please add a provider compatible with OpenAI!!! The user script configuration is too cumbersome!
Author
Owner

@rekram1-node commented on GitHub (Dec 24, 2025):

What r u referring to?

@rekram1-node commented on GitHub (Dec 24, 2025): What r u referring to?
Author
Owner

@exAClior commented on GitHub (Dec 24, 2025):

The key is to specify baseURL in options and models. You can always follow instruction on https://opencode.ai/docs/providers/#custom-provider and do this

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "myprovider": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "My AI ProviderDisplay Name",
      "options": {
        "baseURL": "https://api.myprovider.com/v1"
      },
      "models": {
        "my-model-name": {
          "name": "My Model Display Name"
        }
      }
    }
  }
}
@exAClior commented on GitHub (Dec 24, 2025): The key is to specify `baseURL` in `options` and `models`. You can always follow instruction on https://opencode.ai/docs/providers/#custom-provider and do this ```json { "$schema": "https://opencode.ai/config.json", "provider": { "myprovider": { "npm": "@ai-sdk/openai-compatible", "name": "My AI ProviderDisplay Name", "options": { "baseURL": "https://api.myprovider.com/v1" }, "models": { "my-model-name": { "name": "My Model Display Name" } } } } } ```
Author
Owner

@tisDDM commented on GitHub (Dec 25, 2025):

The key is to specify baseURL in options and models. You can always follow instruction on https://opencode.ai/docs/providers/#custom-provider and do this

Completely agree. You only need to change the baseURL for the appropriate provider - I am using this for Anthropic over Azure on daily basis. Works like a charm.

@tisDDM commented on GitHub (Dec 25, 2025): > The key is to specify `baseURL` in `options` and `models`. You can always follow instruction on https://opencode.ai/docs/providers/#custom-provider and do this Completely agree. You only need to change the baseURL for the appropriate provider - I am using this for Anthropic over Azure on daily basis. Works like a charm.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3847