Skip to content

feat(minimax): prefer Flash and enforce direct request defaults - #26

Open
octo-patch wants to merge 6 commits into
ChinaSiro:mainfrom
octo-patch:octo/20260801-provider-add-recvqHdpWz1yol
Open

octo-patch wants to merge 6 commits into
ChinaSiro:mainfrom
octo-patch:octo/20260801-provider-add-recvqHdpWz1yol

Conversation

@octo-patch

@octo-patch octo-patch commented Aug 1, 2026 •

Copy link
Copy Markdown

Reason: Make MiniMax-M3.1-Flash the default and fast model, with MiniMax-M3 as the other ordinary choice, and apply their Anthropic-compatible request contracts.

Changes

  • Prefer Flash in the provider aliases and model picker. Ignore stale ordinary discovery entries for this provider while retaining explicit saved, session, environment, custom and legacy selections.
  • Adapt the serialized message request at the shared SDK fetch boundary for the two direct regional endpoints. Flash always uses adaptive thinking, defaults to max effort, accepts low/medium/high/xhigh/max and rejects unsupported effort values; it omits service_tier. M3 preserves disabled/adaptive thinking, converts fixed-budget thinking to adaptive and omits ignored effort.
  • Preserve message history, tool arguments/results, media blocks and unrelated/custom request payloads. Keep existing routes and endpoint detection.
  • Reuse the existing context work from fix(context): resolve MiniMax Flash context and output limits #27 and share its follow-up: precise direct model IDs, 1,000,000-token Flash context, a 524,288-token output ceiling, and existing legacy/admin limits.
  • Leave extraction provenance, the published package artifacts and media PR Support MiniMax video URL inputs #28 unchanged. No code from the separate restoration PR is used.

Validation

  • PASS: six focused tests on Node 22.23.2 with SDK 0.74.0, the version recorded in the recovered source. Run: MINIMAX_TEST_SDK=/path/to/@anthropic-ai/sdk/index.mjs node --test --test-concurrency=1 tests/minimax-context.test.mjs tests/minimax.test.mjs.
  • PASS: supplemental run of the same six tests against SDK 0.73.0.
  • PASS: syntax checks of seven changed TypeScript modules, git diff --check, and archive/extraction artifact preservation checks.

The tests import the actual model resolver, picker, capability, context and client modules, and exercise the real SDK's serialized streaming/nonstreaming HTTP boundary through offline mocked fetch. They cover both regions, Flash defaults/effort, M3 thinking modes, saved/custom/legacy choices, tool/history/media preservation and unrelated routes. Tests run without credentials; unrelated application services are isolated explicitly. The main-loop source call path was inspected, but the complete query loop is not executed by this harness.

The recovered tree has no root/recovered-source build manifest, TypeScript configuration or application test command. Its recovered SDK also lacks resources/shared.mjs, so the HTTP tests use a separately installed copy of the exact SDK version. This is not a full CLI build or end-to-end application validation, and no paid inference is performed.

References

Add MiniMax-M3 (1,000,000) and MiniMax-M2.7 (204,800) context windows to
getContextWindowForModel so auto-compact thresholds and token warnings use
the real window instead of the 200K default, and mark MiniMax-M3 as 1M
capable in modelSupports1M.
@octo-patch octo-patch changed the title Add MiniMax provider support feat(minimax): prefer Flash and enforce direct request defaults Oct 20, 2026
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