Skip to content

feat(models): add MiniMax Flash-first text catalog - #1552

Open
octo-patch wants to merge 1 commit into
usestrix:mainfrom
octo-patch:m31-minimax-text-rollout
Open

octo-patch wants to merge 1 commit into
usestrix:mainfrom
octo-patch:m31-minimax-text-rollout

Conversation

@octo-patch

Copy link
Copy Markdown
Contributor

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

  • Add a small local MiniMax text catalog for direct Flash/M3 and verified gateway IDs.
  • Use native Responses for direct openai/MiniMax-M3.1-Flash; keep gateway routes on Chat Completions.
  • Apply the verified direct Flash 1,000,000 input / 524,288 output token limits while leaving gateway limits dynamic.
  • Document direct and gateway setup with the exact route IDs.

Changes

  • Add local model metadata used by API route, reasoning, image, and context-budget helpers.
  • Keep unknown and explicit custom model IDs on the existing LiteLLM/fallback path.
  • Add mocked SDK/HTTP boundary coverage for the serialized Flash Responses request and focused catalog/context tests.
  • Add MiniMax provider navigation and documentation.

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.py
  • ruff 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.py
  • git diff --check
  • Python 3.13 compileall on all changed Python files

The 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.

@mintlify

mintlify Bot commented Oct 21, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 5a2ae1b.

Approve preview

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[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

  1. P1 Known models gain image support ▶
  2. P2 M3 gateway limits stop updating ▶
  3. P2 Request test skips route selection ▶
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.

Summary

Adds a local MiniMax catalog, selects Responses for direct Flash requests, pins direct token limits, and documents direct and gateway setup.

  • Known MiniMax routes use Strix’s own model details.
  • Provider docs recommend MiniMax Flash and show its setup routes.

No runtime verification was performed.

Reviews (1) · Last reviewed commit: "feat(models): add MiniMax Flash-first te..." · Reviewed by Greptile

Comment thread strix/config/models.py
"""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"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Comment on lines +67 to +70
"openrouter/minimax/minimax-m3",
"opencode/minimax-m3",
),
_MINIMAX_M3,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Comment on lines +99 to +103
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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant