Skip to content

providers: add MiniMax preset - #166

Open
octo-patch wants to merge 7 commits into
ghostwright:mainfrom
octo-patch:octo/20260713-add-minimax-m3-recvoGXGuJwstq-clean
Open

octo-patch wants to merge 7 commits into
ghostwright:mainfrom
octo-patch:octo/20260713-add-minimax-m3-recvoGXGuJwstq-clean

Conversation

@octo-patch

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

Copy link
Copy Markdown

Reason: Phantom needs a usable MiniMax preset with current text defaults, protocol-specific endpoints, and preserved explicit model choices.

What Changed

  • Add the MiniMax provider preset and credential mapping for the default runtime and optional Murph runtime, including regional endpoint overrides.
  • Default the main agent and tier aliases to MiniMax-M3.1-Flash; document MiniMax-M3 as the other current model. Preserve explicit model IDs and saved partial mappings, including legacy and custom IDs.
  • Resolve MiniMax aliases before selecting thinking options, including reflection's Haiku tier. For Flash at max effort, use the API's documented default instead of the pinned Agent SDK's custom-model downgrade to high. Preserve explicit effort environment overrides and alternate runtimes.
  • Refresh current model examples, thinking behavior, and standard pricing. Add provider and actual SDK HTTP regression tests.

Why

The preset previously required manual model mappings and recommended a legacy model. Default aliases could reach MiniMax with an unsupported model or inappropriate thinking shape. HTTP capture also showed that the pinned SDK silently changed Flash's requested max effort to high.

How I Tested

  • bun install --frozen-lockfile --ignore-scripts with lifecycle scripts disabled.
  • bun test: 2,663 passed, 10 skipped, 1 todo, 0 failed.
  • bun run lint: passed (444 files).
  • bun run typecheck: passed.
  • bun run src/db/check-migrations.ts: passed.
  • Actual pinned Agent SDK 0.2.84 against a local HTTP fixture: Flash global and China configuration, M3, saved legacy model, saved mapping, and custom model. Each completed two requests with a tool call/result, preserved thinking text/signature, and preserved image content. Committed HTTP tests cover low/medium/high/max effort and adaptive thinking.
  • git diff --check: passed.

Limitations: no paid/live inference was performed, so fixture results do not assert service availability or legacy-model acceptance. Murph model resolution and environment generation are tested, but its actual HTTP transport is unverified: the optional @murph/anthropic-sdk-shim is not installed and returns npm 404. Chat UI build was not run; new heavy setup/builds are resource-paused below the workspace's 110 GiB free-disk threshold. This PR does not implement additional attachment capabilities.

Checklist

  • Tests pass (bun test)
  • Lint passes (bun run lint)
  • Typecheck passes (bun run typecheck)
  • No secrets or .env files included
  • Files stay under 300 lines (the existing provider module already exceeds this limit)
  • No Cardinal Rule violations (TypeScript does plumbing only, the Agent SDK does reasoning)
  • No default exports or barrel files added

@octo-patch

Copy link
Copy Markdown
Author

I added MiniMax to the README provider overview and updated the built-in provider count. I reran bun test, bun run lint, bun run typecheck, and an Agent SDK request capture that confirmed /anthropic/v1/messages.

@octo-patch

Copy link
Copy Markdown
Author

Updated the MiniMax pricing table to match the current target values and pushed a new commit. I ran bun test src/config/__tests__/providers.test.ts src/config/__tests__/loader.test.ts src/config/__tests__/loader-metadata.test.ts src/agent/__tests__/thinking-config.test.ts, bun run lint, and bun run typecheck.

@octo-patch

Copy link
Copy Markdown
Author

Updated MiniMax-M2.7 to use the enabled thinking request shape and corrected the provider documentation. I ran the focused provider and thinking test suite (95 tests) and Biome on the changed TypeScript files.

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