Skip to content

feat(minimax): prefer M3.1 Flash and preserve reasoning history - #2171

Draft
octo-patch wants to merge 1 commit into
org2AI:developfrom
octo-patch:fix/org2-minimax-m31-flash
Draft

octo-patch wants to merge 1 commit into
org2AI:developfrom
octo-patch:fix/org2-minimax-m31-flash

Conversation

@octo-patch

Copy link
Copy Markdown
Contributor

Problem

ORG2's direct MiniMax fallback still selects M3 for Git AI and M2 models for auxiliary work. Dynamic discovery exposes obsolete text models as ordinary choices. The native Anthropic transport also drops unsigned thinking before a tool call, which loses MiniMax reasoning on the next turn.

Solution

  • Prefer MiniMax-M3.1-Flash, followed by MiniMax-M3, in direct discovery and account projections. Keep enabled legacy IDs, explicit aliases, unrelated providers and non-text models; do not mutate stored selections. Gateway discovery preserves its actual IDs and only prioritizes discovered :free / -free Flash routes.
  • Use Flash for the Git AI fallback and preferred auxiliary model. Allow 8,192 output tokens for Flash commit messages because reasoning shares the output budget.
  • Resolve Flash to adaptive thinking and low/medium/high/xhigh/max effort (default max) in both HTTP protocols. A saved -none variant uses max instead of sending unsupported disabled/none. M3 and legacy requests keep their existing defaults. Direct M3/Flash context metadata is 1,000,000; gateway limits are not inferred.
  • Preserve unsigned Anthropic reasoning alongside tool calls and replay it on the next turn; keep signed history intact.
  • Add local HTTP fixtures using the actual clients for streaming/nonstreaming text-only calls, tools and tool-result history, reasoning, data-URL/remote images, efforts, M3 and saved M2.7 IDs.

Protocol references: OpenAI compatibility, Anthropic compatibility.

Potential risks

Draft: the new provider HTTP fixtures have not executed. The required shared build guard stopped the pinned Rust run at 99.24 GiB free disk, below its 100 GiB floor. Compilation and integration failures remain possible. No paid inference, live gateway entitlement or desktop UI validation was performed. Shared Anthropic history handling needs the existing regression suite run before marking this ready.

Existing pricing was deliberately preserved; no new unverified price is introduced. No dependencies or lockfiles changed. Performance scope: bounded catalog projection at existing discovery boundaries and request-local parameter/history handling, with no new poller, IPC fan-out or background scan. AI-assisted implementation and review.

Verification

  • rustc --edition=2021 --test src-tauri/crates/key-vault/src/model_catalog.rs -o <evidence>/catalog-tests && <evidence>/catalog-tests: 3 passed, covering catalog order, saved/custom/non-text preservation and gateway IDs.
  • cargo metadata --locked --offline --format-version 1 --no-deps: passed.
  • rustfmt --edition 2021 on touched Rust files and git diff --check: passed.
  • cargo test --locked --offline -p agent_core minimax --no-default-features --no-run: blocked by missing cached rust_xlsxwriter.
  • cargo test --locked -p agent_core minimax --no-default-features -- --test-threads=2: not executed after lock acquisition, resource guard exit 75 (disk_available_kb=104059680). GTK 3 / WebKitGTK 4.1 prerequisites are installed.
  • Full workspace lint, formatting, desktop build and CI suites: not run. No frontend source changed.

Submit checklist

  • I read and followed .github/PR_RULES.md.
  • The PR is focused and has a scoped Conventional Commit title.
  • I ran the relevant checks, or explained why they were not run.
  • No secrets, private config, generated output, or unrelated formatting changes are included.
  • Docs, screenshots, and locale updates are included when the change needs them (backend-only; none needed).

This branch has not been deployed

No deployments
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