Skip to content

Commit 3feed48

Browse files
jahoomaclaude
andauthored
Enable OpenCode Zen for minimax + kimi; add buffbench agents (#624)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 873c191 commit 3feed48

3 files changed

Lines changed: 4 additions & 19 deletions

File tree

common/src/constants/model-config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export type openrouterModel =
5454
(typeof openrouterModels)[keyof typeof openrouterModels]
5555

5656
export const openCodeZenModels = {
57-
opencode_minimax_m2_7: 'opencode/minimax-m2.7',
5857
opencode_kimi_k2_6: 'opencode/kimi-k2.6',
5958
} as const
6059
export type OpenCodeZenModel =

web/src/app/api/v1/chat/completions/__tests__/completions.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,10 +869,9 @@ describe('/api/v1/chat/completions POST endpoint', () => {
869869
)
870870

871871
it(
872-
'routes opencode/-prefixed models to the OpenCode Zen provider',
872+
'routes OpenCode Zen models to the direct OpenCode Zen provider',
873873
async () => {
874874
const expectedUpstreamModel: Record<string, string> = {
875-
'opencode/minimax-m2.7': 'minimax-m2.7',
876875
'opencode/kimi-k2.6': 'kimi-k2.6',
877876
}
878877

web/src/llm-api/opencode-zen.ts

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ const OPENCODE_ZEN_MODELS: Record<
3838
string,
3939
{ opencodeId: string; pricing: OpenCodeZenPricing }
4040
> = {
41-
[openCodeZenModels.opencode_minimax_m2_7]: {
42-
opencodeId: 'minimax-m2.7',
43-
pricing: {
44-
inputCostPerToken: 0.3 / 1_000_000,
45-
cachedInputCostPerToken: 0.06 / 1_000_000,
46-
outputCostPerToken: 1.2 / 1_000_000,
47-
},
48-
},
4941
[openCodeZenModels.opencode_kimi_k2_6]: {
5042
opencodeId: 'kimi-k2.6',
5143
pricing: {
@@ -56,17 +48,12 @@ const OPENCODE_ZEN_MODELS: Record<
5648
},
5749
}
5850

59-
const OPENCODE_ZEN_MODEL_PREFIX = 'opencode/'
60-
61-
export function isOpenCodeZenModel(model: unknown): model is string {
62-
return typeof model === 'string' && model.startsWith(OPENCODE_ZEN_MODEL_PREFIX)
51+
export function isOpenCodeZenModel(model: string): boolean {
52+
return model in OPENCODE_ZEN_MODELS
6353
}
6454

6555
function getOpenCodeZenModelId(model: string): string {
66-
return (
67-
OPENCODE_ZEN_MODELS[model]?.opencodeId ??
68-
model.slice(OPENCODE_ZEN_MODEL_PREFIX.length)
69-
)
56+
return OPENCODE_ZEN_MODELS[model]?.opencodeId ?? model
7057
}
7158

7259
function getOpenCodeZenPricing(model: string): OpenCodeZenPricing {

0 commit comments

Comments
 (0)