Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ Cette conception permet également le **support multi-agent** avec une sélectio
| **Cerebras** | `cerebras/` | `https://api.cerebras.ai/v1` | OpenAI | [Obtenir Clé](https://cerebras.ai) |
| **Volcengine** | `volcengine/` | `https://ark.cn-beijing.volces.com/api/v3` | OpenAI | [Obtenir Clé](https://console.volcengine.com) |
| **ShengsuanYun** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | - |
| **OpenCode Zen** | `opencode/` | `https://opencode.ai/zen/v1` | OpenAI | [Obtenir Clé](https://opencode.ai/zen) |
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vendor-specific configuration example for OpenCode Zen is only included in README.md and README.zh.md, but is missing from this French variant. For consistency, the configuration example section should be added following the same pattern used in the English and Chinese versions (showing the JSON config and the note about getting API keys).

Copilot uses AI. Check for mistakes.
| **Antigravity** | `antigravity/` | Google Cloud | Custom | OAuth uniquement |
| **GitHub Copilot** | `github-copilot/` | `localhost:4321` | gRPC | - |

Expand Down
1 change: 1 addition & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ HEARTBEAT_OK 応答 ユーザーが直接結果を受け取る
| **Cerebras** | `cerebras/` | `https://api.cerebras.ai/v1` | OpenAI | [キーを取得](https://cerebras.ai) |
| **Volcengine** | `volcengine/` | `https://ark.cn-beijing.volces.com/api/v3` | OpenAI | [キーを取得](https://console.volcengine.com) |
| **ShengsuanYun** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | - |
| **OpenCode Zen** | `opencode/` | `https://opencode.ai/zen/v1` | OpenAI | [キーを取得](https://opencode.ai/zen) |
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vendor-specific configuration example for OpenCode Zen is only included in README.md and README.zh.md, but is missing from this Japanese variant. For consistency, the configuration example section should be added following the same pattern used in the English and Chinese versions (showing the JSON config and the note about getting API keys).

Copilot uses AI. Check for mistakes.
| **Antigravity** | `antigravity/` | Google Cloud | カスタム | OAuthのみ |
| **GitHub Copilot** | `github-copilot/` | `localhost:4321` | gRPC | - |

Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ This design also enables **multi-agent support** with flexible provider selectio
| **Cerebras** | `cerebras/` | `https://api.cerebras.ai/v1` | OpenAI | [Get Key](https://cerebras.ai) |
| **火山引擎** | `volcengine/` | `https://ark.cn-beijing.volces.com/api/v3` | OpenAI | [Get Key](https://console.volcengine.com) |
| **神算云** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | - |
| **OpenCode Zen** | `opencode/` | `https://opencode.ai/zen/v1` | OpenAI | [Get Key](https://opencode.ai/zen) |
| **Antigravity** | `antigravity/` | Google Cloud | Custom | OAuth only |
| **GitHub Copilot** | `github-copilot/` | `localhost:4321` | gRPC | - |

Expand Down Expand Up @@ -887,6 +888,18 @@ This design also enables **multi-agent support** with flexible provider selectio
}
```

**OpenCode Zen**

```json
{
"model_name": "opencode-zen",
"model": "opencode/claude-sonnet-4-5",
"api_key": "your-opencode-zen-api-key"
}
```

> Get your API key at [opencode.ai/zen](https://opencode.ai/zen). Supports 30+ models including GPT-5, Claude, and Gemini.

**Anthropic (with API key)**

```json
Expand Down
1 change: 1 addition & 0 deletions README.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ Este design também possibilita o **suporte multi-agent** com seleção flexíve
| **Cerebras** | `cerebras/` | `https://api.cerebras.ai/v1` | OpenAI | [Obter Chave](https://cerebras.ai) |
| **Volcengine** | `volcengine/` | `https://ark.cn-beijing.volces.com/api/v3` | OpenAI | [Obter Chave](https://console.volcengine.com) |
| **ShengsuanYun** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | - |
| **OpenCode Zen** | `opencode/` | `https://opencode.ai/zen/v1` | OpenAI | [Obter Chave](https://opencode.ai/zen) |
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vendor-specific configuration example for OpenCode Zen is only included in README.md and README.zh.md, but is missing from this Portuguese variant. For consistency, the configuration example section should be added following the same pattern used in the English and Chinese versions (showing the JSON config and the note about getting API keys).

Copilot uses AI. Check for mistakes.
| **Antigravity** | `antigravity/` | Google Cloud | Custom | Apenas OAuth |
| **GitHub Copilot** | `github-copilot/` | `localhost:4321` | gRPC | - |

Expand Down
1 change: 1 addition & 0 deletions README.vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,7 @@ Thiết kế này cũng cho phép **hỗ trợ đa tác nhân** với lựa ch
| **Cerebras** | `cerebras/` | `https://api.cerebras.ai/v1` | OpenAI | [Lấy Khóa](https://cerebras.ai) |
| **Volcengine** | `volcengine/` | `https://ark.cn-beijing.volces.com/api/v3` | OpenAI | [Lấy Khóa](https://console.volcengine.com) |
| **ShengsuanYun** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | - |
| **OpenCode Zen** | `opencode/` | `https://opencode.ai/zen/v1` | OpenAI | [Lấy Khóa](https://opencode.ai/zen) |
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vendor-specific configuration example for OpenCode Zen is only included in README.md and README.zh.md, but is missing from the other language variants (README.vi.md, README.pt-br.md, README.ja.md, and README.fr.md). For consistency, the configuration example section should be added to all README variants following the same pattern used in the English and Chinese versions.

Copilot uses AI. Check for mistakes.
| **Antigravity** | `antigravity/` | Google Cloud | Tùy chỉnh | Chỉ OAuth |
| **GitHub Copilot** | `github-copilot/` | `localhost:4321` | gRPC | - |

Expand Down
13 changes: 13 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ Agent 读取 HEARTBEAT.md
| **Cerebras** | `cerebras/` | `https://api.cerebras.ai/v1` | OpenAI | [获取密钥](https://cerebras.ai) |
| **火山引擎** | `volcengine/` | `https://ark.cn-beijing.volces.com/api/v3` | OpenAI | [获取密钥](https://console.volcengine.com) |
| **神算云** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | - |
| **OpenCode Zen** | `opencode/` | `https://opencode.ai/zen/v1` | OpenAI | [获取密钥](https://opencode.ai/zen) |
| **Antigravity** | `antigravity/` | Google Cloud | 自定义 | 仅 OAuth |
| **GitHub Copilot** | `github-copilot/` | `localhost:4321` | gRPC | - |

Expand Down Expand Up @@ -522,6 +523,18 @@ Agent 读取 HEARTBEAT.md
}
```

**OpenCode Zen**

```json
{
"model_name": "opencode-zen",
"model": "opencode/claude-sonnet-4-5",
"api_key": "your-opencode-zen-api-key"
}
```

> 在 [opencode.ai/zen](https://opencode.ai/zen) 获取 API Key,支持 GPT-5、Claude、Gemini 等 30+ 模型。

**Anthropic (使用 OAuth)**

```json
Expand Down
5 changes: 5 additions & 0 deletions config/config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"model": "deepseek/deepseek-chat",
"api_key": "sk-your-deepseek-key"
},
{
"model_name": "opencode-zen",
"model": "opencode/claude-sonnet-4-5",
"api_key": "your-opencode-zen-api-key"
},
{
"model_name": "loadbalanced-gpt4",
"model": "openai/gpt-5.2",
Expand Down
6 changes: 4 additions & 2 deletions pkg/providers/factory_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func ExtractProtocol(model string) (protocol, modelID string) {

// CreateProviderFromConfig creates a provider based on the ModelConfig.
// It uses the protocol prefix in the Model field to determine which provider to create.
// Supported protocols: openai, anthropic, antigravity, claude-cli, codex-cli, github-copilot
// Supported protocols: openai, anthropic, opencode, antigravity, claude-cli, codex-cli, github-copilot
// Returns the provider, the model ID (without protocol prefix), and any error.
func CreateProviderFromConfig(cfg *config.ModelConfig) (LLMProvider, string, error) {
if cfg == nil {
Expand Down Expand Up @@ -88,7 +88,7 @@ func CreateProviderFromConfig(cfg *config.ModelConfig) (LLMProvider, string, err

case "openrouter", "groq", "zhipu", "gemini", "nvidia",
"ollama", "moonshot", "shengsuanyun", "deepseek", "cerebras",
"volcengine", "vllm", "qwen", "mistral":
"volcengine", "vllm", "qwen", "mistral", "opencode":
// All other OpenAI-compatible HTTP providers
if cfg.APIKey == "" && cfg.APIBase == "" {
return nil, "", fmt.Errorf("api_key or api_base is required for HTTP-based protocol %q", protocol)
Expand Down Expand Up @@ -188,6 +188,8 @@ func getDefaultAPIBase(protocol string) string {
return "http://localhost:8000/v1"
case "mistral":
return "https://api.mistral.ai/v1"
case "opencode":
return "https://opencode.ai/zen/v1"
default:
return ""
}
Expand Down
1 change: 1 addition & 0 deletions pkg/providers/factory_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func TestCreateProviderFromConfig_DefaultAPIBase(t *testing.T) {
{"vllm", "vllm"},
{"deepseek", "deepseek"},
{"ollama", "ollama"},
{"opencode", "opencode"},
}

for _, tt := range tests {
Expand Down
Loading