Repository navigation
fix: add Antigravity 'invalid argument' fallback + NVIDIA Minimax model family - #4926
KooshaPari wants to merge 1 commit into
Conversation
…el family (#1) - Add 'invalid argument' to MODEL_UNAVAILABLE_FRAGMENTS so Antigravity 400 errors on claude-opus-4-6-thinking trigger automatic fallback to claude-opus-4-6 or claude-opus-4-5-20251101 - Add NVIDIA Minimax model family for cross-model fallback when minimax-m2.7 or minimax-m2.5 returns model-unavailable errors (404 Function not found) (cherry picked from commit bc62557)
There was a problem hiding this comment.
Code Review
This pull request adds fallback mappings for the NVIDIA Minimax model family and registers 'invalid argument' as a model unavailable fragment in open-sse/services/modelFamilyFallback.ts. The review feedback identifies a correctness issue where the Minimax family keys and candidates are defined with provider prefixes (e.g., minimaxai/). Since the fallback system expects bare model names, this prefixing will cause lookup failures and duplicate prefixes. A suggestion is provided to use bare model names instead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| // NVIDIA Minimax family | ||
| "minimaxai/minimax-m2.7": ["minimaxai/minimax-m2.5", "minimax-m2.7", "minimax-m2.5"], | ||
| "minimaxai/minimax-m2.5": ["minimaxai/minimax-m2.7", "minimax-m2.5", "minimax-m2.7"], |
There was a problem hiding this comment.
There is a correctness issue with how the Minimax family is defined here. In this codebase, MODEL_FAMILIES keys and candidates must be bare model names (without the provider prefix like minimaxai/).
Why this is broken:
- Lookup Failure: When a request fails,
getNextFamilyFallbackcallsparseModel(currentModel)which extracts the bare model name (e.g.,"minimax-m2.7"). It then looks upMODEL_FAMILIESusing the bare model name or its hyphenated version ("minimax-m2-7"). Since your keys are prefixed with"minimaxai/", the lookup will returnundefinedand the fallback will never trigger. - Helper Failures:
isInModelFamilyandgetModelFamilyalso perform lookups using the bare model name, meaning they will fail to recognize Minimax models as belonging to any family. - Prefix Duplication: Even if the lookup succeeded,
getNextFamilyFallbackautomatically prepends the provider prefix to the candidate. If the candidate is"minimaxai/minimax-m2.5", the resolved fallback model would incorrectly become"minimaxai/minimaxai/minimax-m2.5".
Solution:
Define the keys and candidates using only the bare model names, matching the pattern used by all other families (Gemini, Claude, GPT-5) in this file.
| // NVIDIA Minimax family | |
| "minimaxai/minimax-m2.7": ["minimaxai/minimax-m2.5", "minimax-m2.7", "minimax-m2.5"], | |
| "minimaxai/minimax-m2.5": ["minimaxai/minimax-m2.7", "minimax-m2.5", "minimax-m2.7"], | |
| // NVIDIA Minimax family | |
| "minimax-m2.7": ["minimax-m2.5"], | |
| "minimax-m2.5": ["minimax-m2.7"], |
Summary
Cherry-picks a small, focused fix from the KooshaPari fork that broadens provider model-unavailable detection and adds a NVIDIA Minimax model family. The change is purely additive — no existing logic is altered, and all behaviour is gated on the existing
isModelUnavailableError()matcher plus theMODEL_FAMILIESlookup table.Why it matters
invalid argumentwhenclaude-opus-4-6-thinkingis not available on the current account. Without this fragment, the request fails hard instead of falling back toclaude-opus-4-6orclaude-opus-4-5-20251101.minimaxai/minimax-m2.7↔minimaxai/minimax-m2.5when one returns 404 Function not found.Files
Diff
Compatibility
isModelUnavailableError()path as every other provider.MODEL_FAMILIEStable andMODEL_UNAVAILABLE_FRAGMENTSarray.Test plan
modelFamilyFallback.tsshould pass unchanged.invalid argumentonclaude-opus-4-6-thinkingand verify fallback toclaude-opus-4-6.minimaxai/minimax-m2.7and verify fallback tominimaxai/minimax-m2.5.Refs
bc62557e047bc98ed559985c156fe4468f9a663egit cherry-pick -x(commit(cherry picked from commit bc62557e0))