feat: add OpenCode provider support (#387)
Adds OpenCode (https://github.com/opencode-ai/opencode) as a supported provider. OpenCode is an open-source terminal AI coding assistant with an OpenAI-compatible API running locally. Changes: - open-sse/config/providers.js: add opencode baseUrl (localhost:4096) with openai format (fully compatible, no custom headers needed) - open-sse/services/model.js: add 'oc' alias → opencode - src/shared/constants/providers.js: add opencode to subscription providers with alias 'oc', icon 'terminal', color #E87040 Usage after setup: use model prefix 'oc/<model>' to route through a running OpenCode instance (e.g. oc/claude-sonnet-4-5). Closes #378
This commit is contained in:
parent
3f47038933
commit
fcc8320753
3 changed files with 7 additions and 0 deletions
|
|
@ -208,6 +208,11 @@ export const PROVIDERS = {
|
|||
format: "openai",
|
||||
headers: {}
|
||||
},
|
||||
opencode: {
|
||||
baseUrl: "http://localhost:4096/v1/chat/completions",
|
||||
format: "openai",
|
||||
headers: {}
|
||||
},
|
||||
cline: {
|
||||
baseUrl: "https://api.cline.bot/api/v1/chat/completions",
|
||||
format: "openai",
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ const ALIAS_TO_PROVIDER_ID = {
|
|||
kc: "kilocode",
|
||||
kmc: "kimi-coding",
|
||||
cl: "cline",
|
||||
oc: "opencode",
|
||||
// API Key providers
|
||||
openai: "openai",
|
||||
anthropic: "anthropic",
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export const OAUTH_PROVIDERS = {
|
|||
// "kimi-coding": { id: "kimi-coding", alias: "kmc", name: "Kimi Coding", icon: "psychology", color: "#1E40AF", textIcon: "KC" },
|
||||
kilocode: { id: "kilocode", alias: "kc", name: "Kilo Code", icon: "code", color: "#FF6B35", textIcon: "KC" },
|
||||
cline: { id: "cline", alias: "cl", name: "Cline", icon: "smart_toy", color: "#5B9BD5", textIcon: "CL" },
|
||||
opencode: { id: "opencode", alias: "oc", name: "OpenCode", icon: "terminal", color: "#E87040", textIcon: "OC" },
|
||||
};
|
||||
|
||||
export const APIKEY_PROVIDERS = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue