feat(model): add MiniMax provider prefix for cross-platform model normalization (#463)

This commit is contained in:
Octopus
2026-03-31 02:22:50 -05:00
committed by GitHub
parent 1962f546b5
commit e372b43d30
4 changed files with 38 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ export function resolveClaudeFamilyAlias(model: string): string {
* "claude-sonnet-4-6" -> "anthropic/claude-sonnet-4-6"
* "gpt-5.4" -> "openai/gpt-5.4"
* "gemini-2.0" -> "google/gemini-2.0"
* "minimax-m2.7" -> "minimax/minimax-m2.7"
* "anthropic/foo" -> "anthropic/foo" (unchanged)
*/
export function addProviderPrefix(model: string): string {
@@ -42,6 +43,7 @@ export function addProviderPrefix(model: string): string {
if (/^(gpt-|o1-|o3-)/.test(model)) return `openai/${model}`
if (/^gemini-/.test(model)) return `google/${model}`
if (/^qwen-/.test(model)) return `qwen/${model}`
if (/^minimax-/i.test(model)) return `minimax/${model}`
return `anthropic/${model}`
}