Skip to content

fix: default MiniMax configurations to M3.1 Flash - #2521

Open
octo-patch wants to merge 2 commits into
MemTensor:mainfrom
octo-patch:feat/minimax-m31-flash-default
Open

octo-patch wants to merge 2 commits into
MemTensor:mainfrom
octo-patch:feat/minimax-m31-flash-default

Conversation

@octo-patch

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

Copy link
Copy Markdown
Contributor

Reason: Use MiniMax-M3.1-Flash for new MiniMax configurations while preserving explicitly selected models.

Description

The unset MOS_CHAT_MODEL fallback still selects MiniMax-M2.7. Change that fallback to MiniMax-M3.1-Flash and refresh the ordinary example to list Flash first and MiniMax-M3 as the alternative. Explicit environment values, saved configurations, per-request model overrides, custom endpoints, legacy models, tools and message history remain unchanged. No dependencies or protocol routes change.

Related Issue: No matching open issue identified. Historical context: #1859 was automatically closed for inactivity. This is separate from the video-input work in #2452.

Model reference: https://platform.minimax.io/docs/guides/models-intro.md

The contribution guide names dev, but that branch currently returns 404; this PR targets the live default branch, main.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Unit tests added: tests/llms/test_minimax_requests.py contains 27 offline cases at the real SDK/HTTPX transport boundary, covering streaming and non-streaming defaults, saved M3/legacy/custom IDs, configured endpoints, request overrides, explicit thinking/effort, images, tools and reasoning/tool history.
  • Test script: all 27 cases pass in a supplemental source-isolated runner with the real SDK and HTTPX MockTransport. It executes the actual configuration and request/generation code while excluding eager package initialization and unrelated ML typing imports. This is not a full-package pytest pass. Regional and custom endpoint cases verify serialization only, not service availability. No paid inference was performed.
  • Exact lockfile Ruff 0.11.13: whole-tree ruff check --no-cache --no-fix and ruff format --no-cache --check pass. git diff --check passes.
  • Full repository pytest, OpenAPI export and pre-commit remain unverified. Normal pytest collection is blocked by missing environment dependencies. make format, make openapi and make pre_commit cannot run because Poetry is unavailable. Heavy dependency setup is paused under the workspace resource gate. The queued lightweight SDK setup was canceled before installing anything after remote CI became available. The equivalent pinned Ruff checks above ran directly. Current-head repository CI at https://github.com/MemTensor/MemOS/actions/runs/39422915565 has passed all four Linux Python versions (3.10–3.13) and macOS 14 Python 3.11/3.12, including the pytest-with-coverage steps. Ten remaining matrix jobs were queued or running at the latest check; the full matrix is not yet complete.

Checklist

  • I have performed a self-review of my own code.
  • Hard-to-understand areas are documented; the production change is a default/example update.
  • I have added regression tests.
  • Related documentation issue/PR: not applicable; the inline example is updated.
  • Related issue: no matching issue identified; historical PR context is linked above.
  • Reviewer assignment is left to the maintainers.

Reviewer Checklist

  • Confirm the target branch and review the default change.
  • Verify repository CI and full dependency-environment tests.
  • Tests have been provided.

@Memtensor-AI Memtensor-AI added area:api 云服务 / FastAPI / OpenAPI / MCP area:model llm + embedder + reranker status:in-progress Someone or AI is working on it | 人工或 AI 正在处理 labels Oct 20, 2026
@Memtensor-AI

Memtensor-AI commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 Open Code Review

Target: PR #2521
Task: a5487027d486bc4e
Base: main
Head: feat/minimax-m31-flash-default

🔍 OpenCodeReview found 2 issue(s) in this PR.


1. tests/llms/test_minimax_requests.py (L64-L65)

The variable transport is named misleadingly — it refers to an httpx.Client, not a transport. The actual mock transport is httpx.MockTransport(respond). Naming it mock_client (or similar) would avoid confusion for future contributors, since transport is a concept distinct from client in the httpx API.

💡 Suggested Change

Before:

    with httpx.Client(transport=httpx.MockTransport(respond)) as transport:
        llm.client = llm.client.with_options(http_client=transport)

After:

    with httpx.Client(transport=httpx.MockTransport(respond)) as mock_client:
        llm.client = llm.client.with_options(http_client=mock_client)

2. tests/llms/test_minimax_requests.py (L147-L149)

Same misleading variable name as in the parameterized test above: transport refers to an httpx.Client, not a transport. Prefer mock_client for clarity.

💡 Suggested Change

Before:

    with httpx.Client(transport=httpx.MockTransport(respond)) as transport:
        llm.client = llm.client.with_options(http_client=transport)
        assert llm.generate(messages, model_name_or_path=model, tools=tools) == "Done"

After:

    with httpx.Client(transport=httpx.MockTransport(respond)) as mock_client:
        llm.client = llm.client.with_options(http_client=mock_client)
        assert llm.generate(messages, model_name_or_path=model, tools=tools) == "Done"

Generated by cloud-assistant via Open Code Review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:api 云服务 / FastAPI / OpenAPI / MCP area:model llm + embedder + reranker status:in-progress Someone or AI is working on it | 人工或 AI 正在处理

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants