Skip to content

fix(providers): prefer current MiniMax text models - #1861

Open
octo-patch wants to merge 2 commits into
Nano-Collective:mainfrom
octo-patch:octo/minimax-m31-flash
Open

octo-patch wants to merge 2 commits into
Nano-Collective:mainfrom
octo-patch:octo/minimax-m31-flash

Conversation

@octo-patch

@octo-patch octo-patch commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Reason: New MiniMax configurations still suggest M3/M2.7, and model discovery can surface retired MiniMax text IDs. Default new configurations to M3.1 Flash with M3 as the alternative, and narrow discovery to current verified text routes.

Description

Update the MiniMax setup template and configuration example. Apply the same discovery policy in the setup wizard and model browser: use the exact official endpoint hosts and verified gateway IDs, retain only models actually returned by discovery, and prefer Flash over M3. Saved configurations and manually entered IDs remain valid; custom endpoints, media entries, and unrelated model choices retain their existing behavior.

The existing direct API serializer already omits unsupported thinking/effort overrides, so this change does not add a runtime adapter or alter request settings. Documentation distinguishes the international M Plan's documented Flash support from account-specific access to M3.

References: MiniMax Anthropic API, M Plan configuration.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changeset

  • Added a patch changeset describing the user-facing update.

Testing

Automated Tests

  • 99 focused AVA tests pass, including discovery, template preservation, and actual provider-factory/chat-handler/SDK HTTP serialization with a network-disabled mock transport.
  • Boundary cases cover both direct protocols and regions, default Flash, M3, saved legacy/custom IDs, verified gateway IDs, unchanged output-token settings, and image payload preservation.
  • Root and extension TypeScript checks, build, Knip, and dependency audit pass.
  • Repository format and lint commands exit 0. Both emit a UTF-8 diagnostic for untouched source/acp/acp-agent.ts; the same diagnostic reproduces on the unchanged base.
  • The complete AVA suite is not green in this environment. The stable targeted rerun has 37 failures, all reproduced on unchanged base: 34 CLI flag harness failures (ink has no Text export) and three terminal-width/file-timestamp assertions. The regular CLI integration tests pass after building. The stable full-suite rerun ends with those same 37 failures, 15 skipped tests, and 112 pending after timeouts in the metadata and plain-conversation suites. All 112 tests pass when those two suites are rerun alone; their unchanged-base counterparts also pass alone.

Manual Testing

No live inference was performed. Subscription entitlement and live gateway inference availability were not tested. A public gateway catalog refresh returned HTTP 403; the discovery filter only retains verified IDs when the configured gateway actually returns them.

Checklist

  • Code follows project style guidelines.
  • Self-review completed.
  • Documentation updated.
  • No breaking configuration migration.
  • Existing logging behavior is sufficient; no new runtime request path.

@github-actions

Copy link
Copy Markdown
Contributor

nc-review: comments — 1 important, 3 nits

@octo-patch — a few things worth a look, none blocking.

The PR changes the MiniMax wizard template default from MiniMax-M3,MiniMax-M2.7 to MiniMax-M3.1-Flash,MiniMax-M3 and adds a new filterMiniMaxModels helper applied to two discovery paths (setup wizard fetch and the OpenRouter model browser), plus docs and a correctly-named patch changeset. The implementation is correct as far as I could verify: the host allowlist is exact (lookalike hosts and unparseable URLs return the input untouched), the reorder preserves non-MiniMax ordering and object identity, and the change touches discovery only, never saved configs. Tests are real rather than nominal — I checked that the model-fetcher mock defaults supported_parameters: ['tools'] so isRelevantForCoding keeps the MiniMax entries and the new filter is what removes them — and the HTTP-boundary test drives the real provider factory, chat handler and SDK serializer behind a network-disabled MockAgent. The one substantive concern is that the deny-list-by-prefix policy silently hides any current MiniMax model the author did not enumerate, -Preview rollouts included, with no opt-out.

🟠 important · design · source/models/minimax-models.ts

The policy is hide everything matching a MiniMax text prefix that is not in the hardcoded current array, and the PR's own test asserts the consequence:

const output = filterMiniMaxModels(input, `https://${host}/anthropic/v1`);
// ... 'MiniMax-M3.1-Flash-Preview' is absent from the expected output

MiniMax gates new model rollouts behind -Preview IDs, so an account on that rollout loses those models from wizard discovery with no way to get them back short of manual entry, and the same happens to any model released after this PR is merged. An allow-list ("show only these, keep the rest") is the safer shape: it still puts Flash first and still surfaces M3, but it fails open when MiniMax ships something new, which is exactly the case a static list ages badly on. If the deny-list direction is deliberate, it is worth an explicit note in the docs page that -Preview and unlisted text models are hidden from discovery.

⚪ nit · correctness · source/models/minimax-models.ts

The opencode.ai branch is selected on bare hostname:

} else if (url.hostname === 'opencode.ai') {

so every opencode.ai URL gets MiniMax text IDs filtered, not just opencode.ai/zen/v1. There is also no Zen provider template anywhere in source/wizards (I searched), so this branch is hardcoding an integration the project does not otherwise model. Impact is small — the regex only matches minimax-* ids — but narrowing to url.hostname === 'opencode.ai' && url.pathname.startsWith('/zen') would keep the rule honest about what it claims to cover. Note also that this branch's regex omits the abab alternative the other two branches carry; harmless today, inconsistent tomorrow.

⚪ nit · completeness · source/wizards/utils/fetch-models.ts:114

filterMiniMaxModels can reduce a successful discovery to zero models (e.g. an official endpoint whose catalogue only lists MiniMax-M2.7 and MiniMax-Text-01), which makes fetchModels return {success: false, error: 'No models found'} for a provider that is up. I checked the caller in source/wizards/steps/provider-step.tsx and it does fall through to goToManualModelInput in that case, so this is not a block on setup — but the error text will read as 'No models found' when the truth is 'all models found were filtered as unverified', which is a confusing thing to show a user on a rollout or a region whose catalogue lags.

⚪ nit · scope

Scope is justified and there is no drive-by churn: the runtime request path is untouched (the serializer already omits unsupported thinking/effort overrides, as the author notes), the only production edits are the template default, the new filter, and the two call sites. Flagging only that roughly half the diff is the new minimax-request.spec.ts, which asserts pre-existing serializer behaviour (max_tokens, absent thinking/reasoning_effort, image payload round-trip) rather than anything this PR changed. That is defensible regression coverage for the default model reaching the wire, and I would take it — just noting the bulk of the diff is not new behaviour, so reviewers should focus on the 39-line filter.


🔴 blocking · 🟠 a reviewer would ask for a change · ⚪ optional

Automated code review — correctness, security, design, tests, plus duplicates and scope. A human still decides; this is not a substitute for review and is not exhaustive. The required status checks separately cover lint, formatting, types, unused dependencies, the test suite and the build. This bot never merges. Maintainers can rerun with /re-review.

@github-actions github-actions Bot added the agent:comments nc-review left non-blocking findings label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:comments nc-review left non-blocking findings area:docs Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant