Repository navigation
feat(models): add MiniMax Flash-first text catalog - #1552
octo-patch wants to merge 1 commit into
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
[Medium impact] The changes affect model routing and token budgeting for MiniMax users. Fix the image-support behavior before merging; it contradicts the existing test and changes capability checks beyond MiniMax. Findings
Fix with agent prompt### Issue 1
strix/config/models.py:1007
`model_supports_images()` now returns `True` for a known catalog entry that omits `supports_vision`. This changes existing models, not just MiniMax, and breaks `test_image_support_follows_the_catalog`, which registers `acme-text` with `{}` and expects `False`. It also leaves `view_image` enabled for those entries. Preserve the existing LiteLLM behavior and handle incomplete local metadata separately.
### Issue 2
strix/config/model_catalog.py:67-70
The M3 gateway IDs share `_MINIMAX_M3`, so they inherit its fixed 1,000,000-token input limit. `local_model_info()` also supplies zero for the missing output limit, and `_model_info()` returns before reading gateway metadata. This contradicts the documented promise to keep gateway limits dynamic and prevents gateway updates from correcting either limit. Give these IDs a limit-free gateway entry, as the Flash gateway IDs already have, and cover both M3 gateways in the context tests.
### Issue 3
tests/test_llm_extra_body.py:99-103
This test constructs `OpenAIResponsesModel` directly, so it cannot catch a regression in the default MiniMax route or in how `StrixProvider` resolves the model name. It would still pass if the application selected Chat Completions. Build the model through `StrixProvider` after applying the MiniMax settings, inject the mock client there, and assert the resulting request. Keep the direct SDK test separately if useful.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds a local MiniMax catalog, selects Responses for direct Flash requests, pins direct token limits, and documents direct and gateway setup.
No runtime verification was performed. Reviews (1) · Last reviewed commit: "feat(models): add MiniMax Flash-first te..." · Reviewed by Greptile |
| """Return whether the model accepts image input. Assume yes until proven otherwise.""" | ||
| entry = _catalog_entry(model_name) | ||
| return entry is None or bool(entry.get("supports_vision")) | ||
| return entry is None or "supports_vision" not in entry or bool(entry.get("supports_vision")) |
There was a problem hiding this comment.
Known models gain image support
model_supports_images() now returns True for a known catalog entry that omits supports_vision. This changes existing models, not just MiniMax, and breaks test_image_support_follows_the_catalog, which registers acme-text with {} and expects False. It also leaves view_image enabled for those entries. Preserve the existing LiteLLM behavior and handle incomplete local metadata separately.
Prompt To Fix With AI
This is a comment left during a code review.
Path: strix/config/models.py
Line: 1007
Comment:
**Known models gain image support**
`model_supports_images()` now returns `True` for a known catalog entry that omits `supports_vision`. This changes existing models, not just MiniMax, and breaks `test_image_support_follows_the_catalog`, which registers `acme-text` with `{}` and expects `False`. It also leaves `view_image` enabled for those entries. Preserve the existing LiteLLM behavior and handle incomplete local metadata separately.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| "openrouter/minimax/minimax-m3", | ||
| "opencode/minimax-m3", | ||
| ), | ||
| _MINIMAX_M3, |
There was a problem hiding this comment.
M3 gateway limits stop updating
The M3 gateway IDs share _MINIMAX_M3, so they inherit its fixed 1,000,000-token input limit. local_model_info() also supplies zero for the missing output limit, and _model_info() returns before reading gateway metadata. This contradicts the documented promise to keep gateway limits dynamic and prevents gateway updates from correcting either limit. Give these IDs a limit-free gateway entry, as the Flash gateway IDs already have, and cover both M3 gateways in the context tests.
Knowledge Base Used: Context budgets and compaction
Prompt To Fix With AI
This is a comment left during a code review.
Path: strix/config/model_catalog.py
Line: 67-70
Comment:
**M3 gateway limits stop updating**
The M3 gateway IDs share `_MINIMAX_M3`, so they inherit its fixed 1,000,000-token input limit. `local_model_info()` also supplies zero for the missing output limit, and `_model_info()` returns before reading gateway metadata. This contradicts the documented promise to keep gateway limits dynamic and prevents gateway updates from correcting either limit. Give these IDs a limit-free gateway entry, as the Flash gateway IDs already have, and cover both M3 gateways in the context tests.
**Knowledge Base Used:** [Context budgets and compaction](https://app.greptile.com/strix-org-3/-/custom-context/knowledge-base/usestrix/strix/-/docs/context-budget-and-compaction.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| with pytest.raises(openai.BadRequestError): | ||
| await _send( | ||
| OpenAIResponsesModel(model="openai/MiniMax-M3.1-Flash", openai_client=client), | ||
| model_name="openai/MiniMax-M3.1-Flash", | ||
| reasoning_effort="max", |
There was a problem hiding this comment.
Request test skips route selection
This test constructs OpenAIResponsesModel directly, so it cannot catch a regression in the default MiniMax route or in how StrixProvider resolves the model name. It would still pass if the application selected Chat Completions. Build the model through StrixProvider after applying the MiniMax settings, inject the mock client there, and assert the resulting request. Keep the direct SDK test separately if useful.
Knowledge Base Used: Restore model-aware OpenAI API routing
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_llm_extra_body.py
Line: 99-103
Comment:
**Request test skips route selection**
This test constructs `OpenAIResponsesModel` directly, so it cannot catch a regression in the default MiniMax route or in how `StrixProvider` resolves the model name. It would still pass if the application selected Chat Completions. Build the model through `StrixProvider` after applying the MiniMax settings, inject the mock client there, and assert the resulting request. Keep the direct SDK test separately if useful.
**Knowledge Base Used:** [Restore model-aware OpenAI API routing](https://app.greptile.com/strix-org-3/-/custom-context/knowledge-base/usestrix/strix/-/reverts/rollback_1408-20261002-model-api-route-99c0711.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Reason: Make MiniMax-M3.1-Flash the first recommended MiniMax text route, keep MiniMax-M3 as the fallback, and pin verified direct API behavior without changing user-owned model selections.
Summary
openai/MiniMax-M3.1-Flash; keep gateway routes on Chat Completions.Changes
Validation
ruff check strix/config/model_catalog.py strix/config/models.py strix/llm/context_budget.py tests/test_models.py tests/test_context_budget.py tests/test_llm_extra_body.pyruff format --check strix/config/model_catalog.py strix/config/models.py strix/llm/context_budget.py tests/test_models.py tests/test_context_budget.py tests/test_llm_extra_body.pygit diff --checkcompileallon all changed Python filesThe repository's pinned test dependencies are not present in the available Python environments, and the offline uv cache lacks
pyinstaller-hooks-contrib; focused pytest execution therefore remains pending CI. No paid inference or provider credentials were used.