diff --git a/common/src/constants/model-config.ts b/common/src/constants/model-config.ts index 1a6faadaf..494118b80 100644 --- a/common/src/constants/model-config.ts +++ b/common/src/constants/model-config.ts @@ -54,7 +54,6 @@ export type openrouterModel = (typeof openrouterModels)[keyof typeof openrouterModels] export const openCodeZenModels = { - opencode_minimax_m2_7: 'opencode/minimax-m2.7', opencode_kimi_k2_6: 'opencode/kimi-k2.6', } as const export type OpenCodeZenModel = diff --git a/web/src/app/api/v1/chat/completions/__tests__/completions.test.ts b/web/src/app/api/v1/chat/completions/__tests__/completions.test.ts index b72023e14..c1dd1e99f 100644 --- a/web/src/app/api/v1/chat/completions/__tests__/completions.test.ts +++ b/web/src/app/api/v1/chat/completions/__tests__/completions.test.ts @@ -869,10 +869,9 @@ describe('/api/v1/chat/completions POST endpoint', () => { ) it( - 'routes opencode/-prefixed models to the OpenCode Zen provider', + 'routes OpenCode Zen models to the direct OpenCode Zen provider', async () => { const expectedUpstreamModel: Record = { - 'opencode/minimax-m2.7': 'minimax-m2.7', 'opencode/kimi-k2.6': 'kimi-k2.6', } diff --git a/web/src/llm-api/opencode-zen.ts b/web/src/llm-api/opencode-zen.ts index d5417c4ed..699f5e5f5 100644 --- a/web/src/llm-api/opencode-zen.ts +++ b/web/src/llm-api/opencode-zen.ts @@ -38,14 +38,6 @@ const OPENCODE_ZEN_MODELS: Record< string, { opencodeId: string; pricing: OpenCodeZenPricing } > = { - [openCodeZenModels.opencode_minimax_m2_7]: { - opencodeId: 'minimax-m2.7', - pricing: { - inputCostPerToken: 0.3 / 1_000_000, - cachedInputCostPerToken: 0.06 / 1_000_000, - outputCostPerToken: 1.2 / 1_000_000, - }, - }, [openCodeZenModels.opencode_kimi_k2_6]: { opencodeId: 'kimi-k2.6', pricing: { @@ -56,17 +48,12 @@ const OPENCODE_ZEN_MODELS: Record< }, } -const OPENCODE_ZEN_MODEL_PREFIX = 'opencode/' - -export function isOpenCodeZenModel(model: unknown): model is string { - return typeof model === 'string' && model.startsWith(OPENCODE_ZEN_MODEL_PREFIX) +export function isOpenCodeZenModel(model: string): boolean { + return model in OPENCODE_ZEN_MODELS } function getOpenCodeZenModelId(model: string): string { - return ( - OPENCODE_ZEN_MODELS[model]?.opencodeId ?? - model.slice(OPENCODE_ZEN_MODEL_PREFIX.length) - ) + return OPENCODE_ZEN_MODELS[model]?.opencodeId ?? model } function getOpenCodeZenPricing(model: string): OpenCodeZenPricing {