Skip to content

feat(provider): add MiniMax with Flash defaults and preserved tool history - #2120

Open
octo-patch wants to merge 2 commits into
FoundationAgents:mainfrom
octo-patch:octo/20260729-provider-add-recvq8LkkkBUKh
Open

octo-patch wants to merge 2 commits into
FoundationAgents:mainfrom
octo-patch:octo/20260729-provider-add-recvq8LkkkBUKh

Conversation

@octo-patch

@octo-patch octo-patch commented Jul 29, 2026 •

Copy link
Copy Markdown

Reason: Add MiniMax as a first-class text provider with MiniMax-M3.1-Flash as the real default, while preserving explicit model and endpoint configuration.

Features

  • Register the MiniMax provider and default omitted model/endpoint settings to MiniMax-M3.1-Flash and https://api.minimax.io/v1.
  • Recommend Flash first and MiniMax-M3 second in configuration examples, including the China endpoint. Explicit saved, legacy, and custom model IDs and URLs remain unchanged.
  • Preserve reasoning content, tool calls, tool results, and image content when replaying dictionary messages through the tool request path.
  • Add Flash's 1,000,000-token context and standard uncached token prices; correct M3's standard <=512k estimate. Keep legacy metadata for explicit configurations.

Feature Docs

Updated README and config/config2.example.yaml. The local flat cost estimate does not account for cache discounts, larger-input M3 tiers, or priority pricing. Model reference: https://platform.minimax.io/docs/guides/models-intro.md.

Influence

Defaults apply only to api_type: minimax. The existing Chat Completions transport is retained. Requests leave thinking and effort at API defaults unless effort is explicitly passed through the tool request API. No paid inference was performed.

Result

  • 16 focused tests passed using the real configuration loader, provider registry, SDK serializer, and an offline httpx.MockTransport: 45 HTTP requests covering default/saved/legacy/custom models, global/China/custom URLs, nonstreaming/streaming/tool calls, multimodal content, reasoning history, explicit effort, and unchanged generic defaults.
  • Cached Ruff 0.4.0, isort 6.0.1, and git diff --check passed for the follow-up. Cached Black 25.9.0 passed on the changed configuration/provider and new test. Its token-counter formatting failure also reproduces on unchanged upstream 11cdf466d042aece04fc6cfd13b28e1a70341b1f; no unrelated reformat was made.
  • Validation limitations: the cached run used Python 3.12.13, SDK 2.33.0, HTTPX 0.28.1, and Pydantic 2.14.1, rather than the repository's Python <3.12 and SDK ~=1.64.0 requirements. The focused runner bypassed eager imports of unrelated providers and the shared conftest; actual configuration, registry, provider, SDK, and HTTP serialization executed unmodified. The standard pytest entrypoint stops at missing google.generativeai in the cached environment. Full pinned tests/pre-commit remain unverified; heavy dependency setup is paused by available disk capacity.

Other

This updates the existing PR branch with a normal follow-up commit. No published history was rewritten.

Add MiniMax as an OpenAI-compatible LLM provider with its own provider
class (MiniMaxLLM), registered under the new LLMType.MINIMAX enum value.

- Add MINIMAX to LLMType and register MiniMaxLLM in the provider registry.
- MiniMaxLLM subclasses OpenAILLM and enforces the MiniMax temperature
  constraint (0.0, 1.0] on every request.
- Add MiniMax-M3 (1M context) and MiniMax-M2.7 (204800 context) pricing
  and context windows to token_counter.
- Document both the global (api.minimax.io) and China (api.minimaxi.com)
  endpoints in README and config2.example.yaml.
- Add a provider unit test.
@octo-patch octo-patch changed the title feat(provider): add MiniMax as a first-class LLM provider feat(provider): add MiniMax with Flash defaults and preserved tool history Oct 21, 2026

This branch had an error being deployed

1 failed deployment
unittest — 240eb03b Deployed Oct 21, 2026 by octo-patch via build (3.9) #1746
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