Skip to content

fix(agent): default MiniMax provider to anthropic_messages + correct base_url#18147

Open
nicoechaniz wants to merge 3 commits into
NousResearch:mainfrom
nicoechaniz:feat/minimax-defaults
Open

fix(agent): default MiniMax provider to anthropic_messages + correct base_url#18147
nicoechaniz wants to merge 3 commits into
NousResearch:mainfrom
nicoechaniz:feat/minimax-defaults

Conversation

@nicoechaniz

Copy link
Copy Markdown
Contributor

PR #17425 enabled prompt caching for MiniMax models on the transport, but users still had to manually configure both and to actually benefit from it.

This patch makes the defaults ergonomic:

  • now auto-detects / and defaults to + the correct base URL (global or China endpoint respectively).
  • suggests the endpoints instead of .
  • Explicit or are preserved when the user sets them.

Tests: 5 new cases covering both providers, explicit overrides, and prompt-caching flags.

Refs:

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent loop, run_agent.py, prompt builder provider/minimax MiniMax (Anthropic transport) labels May 1, 2026
@nicoechaniz nicoechaniz force-pushed the feat/minimax-defaults branch from 6e43238 to 1ab7705 Compare May 24, 2026 04:37
…base_url

PR NousResearch#17425 (merged) enabled prompt caching for MiniMax models on the
anthropic_messages transport, but users still had to manually configure
both api_mode and base_url to actually benefit from it.

This patch makes the defaults ergonomic:

- AIAgent.__init__ now auto-detects provider=minimax / minimax-cn and
  defaults to api_mode=anthropic_messages + the correct /anthropic base_url
  (global or China endpoint respectively).
- .env.example suggests the /anthropic endpoints instead of /v1.
- Explicit base_url or api_mode are preserved when the user sets them.

Tests: 5 new cases covering both providers, explicit overrides, and
prompt-caching flags.

Refs: NousResearch#17332, NousResearch#17333, NousResearch#17425
@nicoechaniz nicoechaniz force-pushed the feat/minimax-defaults branch from 1ab7705 to 6cc22c6 Compare June 1, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P3 Low — cosmetic, nice to have provider/minimax MiniMax (Anthropic transport) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Prompt caching silently disabled for MiniMax's own models (MiniMax-M2.7 etc.) on anthropic_messages transport

2 participants