mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-08 00:02:20 +03:00
MiniMax-M3 had no MODEL_SPECS entry and capitalized MiniMax-M2.7 missed its lowercase spec (case-sensitive lookup) → both fell to the 8192 default cap. Add the M3 spec (512K output), alias the capitalized ids, and make getModelSpec lookups case-insensitive. Co-authored-by: totaltube <totaltube@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f8fb3d524d
commit
cb94bf695d
@@ -310,12 +310,24 @@ export const MODEL_SPECS: Record<string, ModelSpec> = {
|
||||
supportsTools: true,
|
||||
},
|
||||
|
||||
// ── MiniMax M3 (1M context, 512K max output) ─────────────────────
|
||||
// max output verified against MiniMax docs / OpenRouter / Artificial
|
||||
// Analysis (Nov 2025 launch): 1,048,576-token context, up to 512K output.
|
||||
"minimax-m3": {
|
||||
maxOutputTokens: 512000,
|
||||
contextWindow: 1048576,
|
||||
supportsThinking: true,
|
||||
supportsTools: true,
|
||||
aliases: ["MiniMax-M3", "MiniMaxAI/MiniMax-M3"],
|
||||
},
|
||||
|
||||
// ── MiniMax M2.x (200K context family) ───────────────────────────
|
||||
"minimax-m2.7": {
|
||||
maxOutputTokens: 131072,
|
||||
contextWindow: 204800,
|
||||
supportsThinking: true,
|
||||
supportsTools: true,
|
||||
aliases: ["MiniMax-M2.7", "MiniMaxAI/MiniMax-M2.7"],
|
||||
},
|
||||
"minimax-m2.5": {
|
||||
maxOutputTokens: 131072,
|
||||
@@ -356,14 +368,23 @@ export const MODEL_SPECS: Record<string, ModelSpec> = {
|
||||
export function getModelSpec(modelId: string): ModelSpec | undefined {
|
||||
if (MODEL_SPECS[modelId]) return MODEL_SPECS[modelId];
|
||||
|
||||
// Buscas por alias
|
||||
// Case-insensitive lookups: upstream model ids are often capitalized
|
||||
// (e.g. "MiniMax-M2.7") while specs/aliases use lowercase ids (#3141).
|
||||
const lower = modelId.toLowerCase();
|
||||
|
||||
// Exact match (case-insensitive)
|
||||
for (const [canonical, spec] of Object.entries(MODEL_SPECS)) {
|
||||
if (spec.aliases?.includes(modelId)) return spec;
|
||||
if (canonical.toLowerCase() === lower) return spec;
|
||||
}
|
||||
|
||||
// Prefix matching
|
||||
// Buscas por alias (case-insensitive)
|
||||
for (const [, spec] of Object.entries(MODEL_SPECS)) {
|
||||
if (spec.aliases?.some((alias) => alias.toLowerCase() === lower)) return spec;
|
||||
}
|
||||
|
||||
// Prefix matching (case-insensitive)
|
||||
for (const [key, spec] of Object.entries(MODEL_SPECS)) {
|
||||
if (key !== "__default__" && modelId.startsWith(key)) return spec;
|
||||
if (key !== "__default__" && lower.startsWith(key.toLowerCase())) return spec;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user