Skip to content

Commit c839d41

Browse files
committed
Add opencode Minimax M2.7 model
1 parent 497cc4a commit c839d41

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

common/src/constants/model-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export type openrouterModel =
5555

5656
export const openCodeZenModels = {
5757
opencode_kimi_k2_6: 'opencode/kimi-k2.6',
58+
opencode_minimax_m2_7: 'opencode/minimax-m2.7',
5859
} as const
5960
export type OpenCodeZenModel =
6061
(typeof openCodeZenModels)[keyof typeof openCodeZenModels]

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,10 @@ describe('/api/v1/chat/completions POST endpoint', () => {
876876
codebuffModel: openCodeZenModels.opencode_kimi_k2_6,
877877
upstreamModel: 'kimi-k2.6',
878878
},
879+
{
880+
codebuffModel: openCodeZenModels.opencode_minimax_m2_7,
881+
upstreamModel: 'minimax-m2.7',
882+
},
879883
{
880884
codebuffModel: 'opencode/qwen3-coder',
881885
upstreamModel: 'qwen3-coder',

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ interface OpenCodeZenPricing {
3737
const OPENCODE_MODEL_PREFIX = 'opencode/'
3838
const MOONSHOT_KIMI_MODEL = 'moonshotai/kimi-k2.6'
3939
const KIMI_ZEN_MODEL = 'kimi-k2.6'
40+
const MINIMAX_M2_7_ZEN_MODEL = 'minimax-m2.7'
4041

4142
const OPENCODE_ZEN_MODEL_ALIASES: Record<string, string> = {
4243
[openCodeZenModels.opencode_kimi_k2_6]: KIMI_ZEN_MODEL,
44+
[openCodeZenModels.opencode_minimax_m2_7]: MINIMAX_M2_7_ZEN_MODEL,
4345
[MOONSHOT_KIMI_MODEL]: KIMI_ZEN_MODEL,
4446
}
4547

@@ -51,6 +53,11 @@ const KIMI_ZEN_PRICING: OpenCodeZenPricing = {
5153

5254
const OPENCODE_ZEN_PRICING: Record<string, OpenCodeZenPricing> = {
5355
[KIMI_ZEN_MODEL]: KIMI_ZEN_PRICING,
56+
[MINIMAX_M2_7_ZEN_MODEL]: {
57+
inputCostPerToken: 0.3 / 1_000_000,
58+
cachedInputCostPerToken: 0.06 / 1_000_000,
59+
outputCostPerToken: 1.2 / 1_000_000,
60+
},
5461
}
5562

5663
export function isOpenCodeZenModel(model: unknown): model is string {

0 commit comments

Comments
 (0)