From 91af593bb2256f68e68996450a91a4d53e9af27a Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Sat, 16 May 2026 11:29:57 -0300 Subject: [PATCH] feat(dashboard,sse): add OpenCode Free provider (noAuth, public endpoint) Adds 'opencode' to FREE_PROVIDERS as a no-auth provider using the public OpenCode endpoint (https://opencode.ai/zen/v1). The existing OpencodeExecutor already skips the Authorization header when no API key is present. Registry entry reuses the opencode executor and shares models from the zen/v1 endpoint. --- open-sse/config/providerRegistry.ts | 24 ++++++++++++++++++++++++ src/shared/constants/providers.ts | 16 ++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/open-sse/config/providerRegistry.ts b/open-sse/config/providerRegistry.ts index 903057deb5..5fc4b2b494 100644 --- a/open-sse/config/providerRegistry.ts +++ b/open-sse/config/providerRegistry.ts @@ -1034,6 +1034,30 @@ export const REGISTRY: Record = { ], }, + opencode: { + id: "opencode", + alias: "oc", + format: "openai", + executor: "opencode", + baseUrl: "https://opencode.ai/zen/v1", + modelsUrl: "https://opencode.ai/zen/v1/models", + authType: "apikey", + authHeader: "Authorization", + authPrefix: "Bearer", + defaultContextLength: 200000, + models: [ + { id: "big-pickle", name: "Big Pickle" }, + { id: "minimax-m2.5-free", name: "MiniMax M2.5 Free", contextLength: 204800 }, + { id: "ling-2.6-1t-free", name: "Ling 2.6 Free", contextLength: 262000 }, + { + id: "trinity-large-preview-free", + name: "Trinity Large Preview Free", + contextLength: 131000, + }, + { id: "nemotron-3-super-free", name: "Nemotron 3 Super Free", contextLength: 1000000 }, + ], + }, + "opencode-go": { id: "opencode-go", alias: "opencode-go", diff --git a/src/shared/constants/providers.ts b/src/shared/constants/providers.ts index dd7bd785a7..2f091d04c5 100644 --- a/src/shared/constants/providers.ts +++ b/src/shared/constants/providers.ts @@ -34,6 +34,22 @@ export const FREE_PROVIDERS = { authHint: "Uses the same AWS Builder ID or imported refresh-token flow as Kiro, but keeps Amazon Q connections separate.", }, + opencode: { + id: "opencode", + alias: "oc", + name: "OpenCode Free", + icon: "terminal", + color: "#E87040", + textIcon: "OC", + website: "https://opencode.ai", + noAuth: true, + authHint: "No API key required — uses OpenCode's public free endpoint.", + freeNote: + "No API key required — public OpenCode endpoint with Kimi, GLM, Qwen, MiMo, MiniMax models.", + notice: { + text: "OpenCode Free uses the public OpenCode endpoint (https://opencode.ai/zen/v1). No signup or API key needed. Rate limits apply.", + }, + }, }; export const FREE_APIKEY_PROVIDER_IDS = new Set(["qoder"]);