Skip to content

feat(minimax): refresh direct Flash catalog and thinking support - #5908

Merged
Astro-Han merged 3 commits into
apache:mainfrom
octo-patch:octo/20261001-parameter-refresh-recvwL2JqTEYoj
Oct 21, 2026
Merged

Astro-Han merged 3 commits into
apache:mainfrom
octo-patch:octo/20261001-parameter-refresh-recvwL2JqTEYoj

Conversation

@octo-patch

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

Copy link
Copy Markdown
Contributor

Reason: MiniMax's direct catalog and stale discovery still expose older text models and miss MiniMax-M3.1-Flash; M3 also needs explicit adaptive/disabled thinking on the Anthropic Messages path.

Summary

  • Put MiniMax-M3.1-Flash first, followed by MiniMax-M3, for the direct MiniMax and MiniMax-cn fallback catalogs, generated metadata, refreshed metadata, and normal model pickers. Preserve custom/non-text models, saved legacy selections, and unrelated providers. The coding-plan catalog is unchanged.
  • Apply the official 1,000,000-token context and 524,288-token output limits. Flash exposes low/medium/high/xhigh/max, defaults to max, and sends adaptive thinking plus output_config.effort through the existing Anthropic SDK. Stale off/on selections cannot disable Flash. M3 exposes on/off, sends adaptive/disabled, and does not send an effort.
  • Add direct Flash estimates of $0.15/$0.60/$0.015 per million input/output/cache-read tokens. Preserve M3 Standard base estimates of $0.30/$1.20/$0.06.
  • Merge current upstream main into this existing branch without rewriting its history and retain both previously conflicting test additions.

Official sources: models, Anthropic Messages, pricing.

Verification

Node 24.21.0 / npm 11.19.0, with credential-free build/test environments:

  • Core, MCP, storage, and runtime builds pass.
  • Model catalog, metadata, thinking, refresh, runtime thinking/SDK serialization, discovery, and generation suites: 156 tests passed.
  • Provider catalog, provider contract matrix, and cost suites: 145 tests passed.
  • npm run check:model-metadata, npm run lint, npm run format:check, npm run check:asf-headers, and git diff --check pass.
  • The generated MiniMax catalog regression fails with the old generator behavior and passes with the change restored.
  • Scoped secret scan passes.

Limits

Maka's pricing schema is flat: M3 estimates use Standard inputs <=512k; it cannot represent the >512k $0.60/$2.40/$0.12 rates or Priority's 1.5x multiplier. No service-tier UI is added. The direct provider adapters use Anthropic Messages; this change does not add an OpenAI protocol selector or assert Flash availability through coding plans or third-party providers.

npm ci installed package dependencies and applied repository patches but timed out retrying the Electron binary download (fetch failed). The affected builds and checks above ran successfully with those installed dependencies. Full desktop build/tests, live authenticated provider calls, and the full workspace typecheck were not run. An attempted protocol-epoch check referenced a script absent from this checkout and was not completed. Generated TypeScript modules are ignored build artifacts; the committed generator carries the release policy without replacing the upstream snapshot.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex implemented the catalog, runtime, pricing, and regression changes and prepared this description. The implementation commit includes a Generated-by trailer.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally (affected package builds, lint, format and suites pass; full workspace typecheck not run)

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Oct 1, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 02f3bfba65dcdc0db518874767d84c1d6a4a659c (2 files, +30/−0, one commit).

No P0–P3 findings.

What the change does. A MINIMAX_MODEL_OVERRIDES entry gives MiniMax-M3 the wire metadata for its thinking toggle — { toggle: true, offBehavior: 'anthropic-thinking-disabled' } — and registers it under both MiniMax and MiniMax-cn.

Why I checked the catalog before accepting the override. lookupModelMetadata merges a static override over the catalog with { ...providerMetadata, ...override }, so an override replaces thinkingOptions wholesale — only capabilities and modalities are deep-merged. An override that supplies a toggle would therefore silently drop an efforts list that the catalog declares. Here it does not, and I verified it against the projection snapshot rather than assuming:

  • scripts/model-metadata/models-dev-api.snapshot.json declares thinkingOptions: { toggle: true } with no efforts for MiniMax-M3 on both MiniMax and MiniMax-cn, so the override adds offBehavior without removing anything.
  • That also confirms the stated reason exactly: the catalog carries a toggle but no wire behaviour for turning thinking off, which is what the override supplies.
  • The two provider keys the override registers are precisely the two the catalog declares M3 under, so "both regions" is right and no further provider key is needed.
  • MiniMax-M2.7 and MiniMax-M2.1 declare no thinkingOptions at all in the same snapshot, which matches the second test's expectation that they stay always-on.

Consistency. The override reuses the exact shape that six existing entries in this file already use for Anthropic-compatible models (toggle: true plus anthropic-thinking-disabled), so it is the established pattern rather than a new mechanism.

Tests pin both halves that could drift apart: the variant list exposes off, and choosing it sends { anthropic: { thinking: { type: 'disabled' } } }, with the default and high sending no thinking payload, on both regional providers. That is the pair the declaration-to-wire contract cares about.

Gate on this head: test and label are green.

What I could not judge

  • I did not exercise a live MiniMax endpoint, so whether the provider actually honours the disabled-thinking payload is taken from the existing Anthropic-compatible path it shares with the six comparable overrides, not from a real call.
  • The catalog facts above come from the repository's snapshot; I did not re-fetch models.dev.

I did not approve, request changes, or merge.


Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

@octo-patch octo-patch changed the title fix(core): enable MiniMax-M3 thinking toggle for both regions feat(minimax): refresh direct Flash catalog and thinking support Oct 19, 2026

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.

Incremental review at ba048f846732c46d8570cfc30ce4f433b0a855a2, following 02f3bfba65dcdc0db518874767d84c1d6a4a659c. No verified P0–P2 findings. The earlier review had no outstanding findings, and the M3 disabled-thinking behavior remains covered. The original commit is retained; a merge incorporates main b0ed5707f, followed by the 11-file Flash update (+266/−7). I checked that the merge retains both previously conflicting test additions, then reviewed the catalog, refresh/generator, SDK options and pricing changes separately from main's changes.

The release metadata at packages/core/src/models-dev-projection.ts:42 agrees with the current official documentation: the direct catalog lists Flash followed by M3, both have a published 1M context window, and the Messages API specifies a maximum output of 524,288 tokens. Both support text/image/video input and tool use. The implementation applies these facts to the two direct regional providers while preserving saved selections, custom/non-text connection entries, unrelated providers and the coding-plan catalog. Sources: model catalog, Messages API, Chinese Messages API.

The thinking format is also consistent with those API specifications. packages/runtime/src/model-factory.ts:534 sends Flash adaptive thinking plus output_config.effort, using low/medium/high/xhigh/max and defaulting to max; stale off/on selections do not send disabled thinking. M3 on sends adaptive, off sends disabled, and omission retains the provider's off default, without an effort field. The new test exercises actual SDK serialization for all Flash variants on both routes. I additionally captured eight M3 SDK requests across both regional endpoints and confirmed the final thinking fields and absence of effort/service-tier fields.

The global USD estimates at packages/runtime/src/telemetry/builtin-pricing.ts:85 match the published pricing: Flash input/output/cache-read are $0.15/$0.60/$0.015 per million tokens; M3 retains $0.30/$1.20/$0.06 for Standard inputs up to 512k. The documented flat-price limitation remains: M3's longer-context rates and Priority multiplier are not represented. The same USD estimates are used for the China provider; regional pricing is published in RMB, so this is not validation of regional currency conversion or invoice amounts. User pricing overrides still take precedence.

294 tests passed across ten catalog, metadata, thinking, refresh, provider-contract, cost and generator test files, with no skips or cancellations. Keeping the new tests unchanged and loading only the preceding catalog, generator and model-factory implementations produces four expected failures: stale catalog ordering, missing offline Flash metadata, missing Flash adaptive thinking and missing M3 adaptive thinking. Fresh installation/patches, normal root build:test, all workspace typechecks including assistant web, metadata generation check, repository lint/format checks, ASF headers and the protocol guard passed. There is no protocol change; epoch remains 225.

CI 39272242044 succeeded at this exact head. The head is OPEN/MERGEABLE and a trial merge with current main was clean. I did not build a separate merged tree, run Electron/the complete local suite, or make authenticated MiniMax calls. The SDK requests above use a controlled response transport; they verify serialization, not live account availability, provider acceptance or billing.

@github-actions github-actions Bot added effort/M Under 500 readable lines and removed effort/S Under 100 readable lines labels Oct 20, 2026
@Astro-Han

Copy link
Copy Markdown
Contributor

Thanks for updating the MiniMax catalog and thinking configuration and for the regression coverage. The reviewed head ba048f846732c46d8570cfc30ce4f433b0a855a2 is unchanged, its test checks pass, and it merges cleanly with current main. I am proceeding with the merge at Astro-Han's explicit request.

Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at @Astro-Han's explicit request: merge the small-fix group in the October 21 09:00 report. The reviewed head is ba048f8, its test checks pass, and it has no merge conflict. This approval is submitted by an automated agent at that explicit request.

@Astro-Han
Astro-Han merged commit 76e5c4e into apache:main Oct 21, 2026
1 check passed
ggbdpq added a commit to ggbdpq/maka that referenced this pull request Nov 24, 2026
- apache#5447 rebase 700f4127e+am 树一致+帖 7080746644;apache#5908 series rebase+帖 7080771187(真机 log 闭合 accumulator 定位);apache#4505 按背书停用令零动作
- 编年 11-22 补节
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants