Unverified 提交 baee6f83 authored 作者: Octopus's avatar Octopus 提交者: GitHub

feat: upgrade MiniMax default model to M2.7 (#3038)

## Summary - Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to the model selection list (direct provider and OpenRouter) - Set MiniMax-M2.7 as the new default model - Retain all previous models (M2.5, M2.5-highspeed) as available alternatives - Update related unit tests ## Why MiniMax-M2.7 is the latest flagship model with enhanced reasoning and coding capabilities. ## Changes - `src/ipc/shared/language_model_constants.ts`: Added M2.7 and M2.7-highspeed models to the `minimax` provider section (before existing M2.5 models) and added M2.7 to the `openrouter` section - `src/__tests__/minimax_provider.test.ts`: Updated tests to verify all 4 models are present, M2.7 is default (first), and model ordering is correct ## Testing - Unit tests updated and passing - Integration tested with MiniMax API <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/3038" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> --------- Co-authored-by: 's avatarPR Bot <pr-bot@minimaxi.com>
上级 d9b6b548
......@@ -264,6 +264,16 @@ export const MODEL_OPTIONS: Record<string, ModelOption[]> = {
temperature: 1.0,
dollarSigns: 2,
},
// https://openrouter.ai/minimax/minimax-m2.7
{
name: "minimax/minimax-m2.7",
displayName: "MiniMax M2.7",
description: "Latest flagship model with enhanced reasoning and coding",
maxOutputTokens: 32_000,
contextWindow: 204_800,
temperature: 0,
dollarSigns: 1,
},
// https://openrouter.ai/minimax/minimax-m2.5
{
name: "minimax/minimax-m2.5",
......@@ -478,6 +488,46 @@ export const MODEL_OPTIONS: Record<string, ModelOption[]> = {
temperature: 0,
},
],
// https://platform.minimax.io/docs/api-reference/text-anthropic-api
minimax: [
{
name: "MiniMax-M2.7",
displayName: "MiniMax M2.7",
description: "Latest flagship model with enhanced reasoning and coding",
maxOutputTokens: 32_000,
contextWindow: 204_800,
temperature: 1.0,
dollarSigns: 1,
},
{
name: "MiniMax-M2.7-highspeed",
displayName: "MiniMax M2.7 High Speed",
description:
"High-speed version of M2.7 for low-latency scenarios",
maxOutputTokens: 32_000,
contextWindow: 204_800,
temperature: 1.0,
dollarSigns: 1,
},
{
name: "MiniMax-M2.5",
displayName: "MiniMax M2.5",
description: "Peak Performance. Ultimate Value. Master the Complex",
maxOutputTokens: 32_000,
contextWindow: 204_800,
temperature: 1.0,
dollarSigns: 1,
},
{
name: "MiniMax-M2.5-highspeed",
displayName: "MiniMax M2.5 High Speed",
description: "Same performance, faster and more agile",
maxOutputTokens: 32_000,
contextWindow: 204_800,
temperature: 1.0,
dollarSigns: 1,
},
],
};
export const TURBO_MODELS: LanguageModel[] = [
......@@ -517,6 +567,7 @@ export const PROVIDER_TO_ENV_VAR: Record<string, string> = {
azure: "AZURE_API_KEY",
xai: "XAI_API_KEY",
bedrock: "AWS_BEARER_TOKEN_BEDROCK",
minimax: "MINIMAX_API_KEY",
};
export const CLOUD_PROVIDERS: Record<
......@@ -587,6 +638,13 @@ export const CLOUD_PROVIDERS: Record<
gatewayPrefix: "bedrock/",
secondary: true,
},
minimax: {
displayName: "MiniMax",
hasFreeTier: false,
websiteUrl: "https://platform.minimax.io/",
gatewayPrefix: "minimax/",
secondary: true,
},
};
export const LOCAL_PROVIDERS: Record<
......
......@@ -476,6 +476,20 @@ function getRegularModelClient(
backupModelClients: [],
};
}
case "minimax": {
const provider = createOpenAICompatible({
name: "minimax",
baseURL: "https://api.minimax.io/v1",
apiKey,
});
return {
modelClient: {
model: provider(model.name),
builtinProviderId: providerId,
},
backupModelClients: [],
};
}
default: {
// Handle custom providers
if (providerConfig.type === "custom") {
......
......@@ -71,6 +71,7 @@ const providers = [
"azure",
"xai",
"bedrock",
"minimax",
] as const;
export const cloudProviders = providers.filter(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论