fix: extend isMinimaxVlmModel to support M2.5/M2.7/M2.7-highspeed#67105
fix: extend isMinimaxVlmModel to support M2.5/M2.7/M2.7-highspeed#67105zhengyuliu047-rgb wants to merge 1 commit into
Conversation
Greptile SummaryThis PR extends Confidence Score: 5/5Safe to merge; all findings are minor P2 suggestions that do not affect correctness on the M2.7 path being fixed. The core routing fix for M2.7/M2.7-highspeed is correct and matches the existing pattern for MiniMax-VL-01. Remaining findings are P2: a stale test description with missing coverage for the new IDs, and a question about whether M2.5-highspeed should be included alongside M2.5. src/agents/minimax-vlm.normalizes-api-key.test.ts — test description and assertions should be updated to cover the new model IDs.
|
| export function isMinimaxVlmModel(provider: string, modelId: string): boolean { | ||
| return isMinimaxVlmProvider(provider) && modelId.trim() === "MiniMax-VL-01"; | ||
| const id = modelId.trim(); | ||
| return ( | ||
| isMinimaxVlmProvider(provider) && | ||
| (id === "MiniMax-VL-01" || | ||
| id === "MiniMax-M2.5" || | ||
| id === "MiniMax-M2.7" || | ||
| id === "MiniMax-M2.7-highspeed") | ||
| ); | ||
| } |
There was a problem hiding this comment.
Missing
MiniMax-M2.5-highspeed if M2.5 is image-capable
The extension adds MiniMax-M2.5 to the VLM routing list, but the model-definitions file marks only MiniMax-M2.7 and models matching MiniMax-M2.7-* as image-capable (the isImageCapable flag in extensions/minimax/model-definitions.ts:74). M2.5 has no corresponding image-capability declaration there.
If M2.5 is genuinely image-capable via the VLM endpoint, its sibling MiniMax-M2.5-highspeed (which exists in the catalog and shares identical pricing) should be included here for parity. If M2.5 is not image-capable, its inclusion is dead scope that may silently route non-image requests through the VLM fallback path for error cases.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/minimax-vlm.ts
Line: 14-23
Comment:
**Missing `MiniMax-M2.5-highspeed` if M2.5 is image-capable**
The extension adds `MiniMax-M2.5` to the VLM routing list, but the model-definitions file marks only `MiniMax-M2.7` and models matching `MiniMax-M2.7-*` as image-capable (the `isImageCapable` flag in `extensions/minimax/model-definitions.ts:74`). M2.5 has no corresponding image-capability declaration there.
If M2.5 is genuinely image-capable via the VLM endpoint, its sibling `MiniMax-M2.5-highspeed` (which exists in the catalog and shares identical pricing) should be included here for parity. If M2.5 is not image-capable, its inclusion is dead scope that may silently route non-image requests through the VLM fallback path for error cases.
How can I resolve this? If you propose a fix, please make it concise.When MiniMax M2.7 is used as the primary model, the image tool would incorrectly send image requests directly to M2.7's chat endpoint, causing 400 errors. The image understanding for M2.7 models should be routed through the MiniMax-VL-01 plugin's /v1/coding_plan/vlm API. This fix extends isMinimaxVlmModel to recognize MiniMax-M2.5, MiniMax-M2.7, and MiniMax-M2.7-highspeed, allowing them to trigger the VL fallback path correctly. Fixes: openclaw#64244 Related: openclaw#54400, openclaw#53575 --- fix: debounce session.message reload to prevent webchat flicker When lossless-claw or other plugins fire session.message events rapidly, the webchat UI flickers because loadChatHistory sets chatLoading=true on every event, causing messages to disappear and reappear. This fix adds a 500ms debounce: instead of reloading immediately on each event, we wait 500ms after the last event before reloading. Multiple events within 500ms only trigger one reload. Fixes: openclaw#66274
f6e4ad1 to
45556df
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45556dfe96
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (host.sessionKey === sessionKey) { | ||
| void loadChatHistory(host as unknown as ChatState); |
There was a problem hiding this comment.
Guard deferred reload against starting a new chat run
Because this reload is delayed by 500ms, users can start a new run before the timer fires; the callback only checks sessionKey and still calls loadChatHistory. That reintroduces the mid-run race this handler was avoiding, since loadChatHistory clears streaming/tool state (ui/src/ui/controllers/chat.ts:182-186) and can hide/delay optimistic chat updates while the new run is active. Add a !host.chatRunId guard (or cancel this timer when a run begins) before reloading.
Useful? React with 👍 / 👎.
When MiniMax M2.7 is used as the primary model, the image tool would incorrectly send image requests directly to M2.7's chat endpoint, causing 400 errors. The image understanding for M2.7 models should be routed through the MiniMax-VL-01 plugin's /v1/coding_plan/vlm API.
This fix extends isMinimaxVlmModel to recognize MiniMax-M2.5, MiniMax-M2.7, and MiniMax-M2.7-highspeed, allowing them to trigger the VL fallback path correctly.
Fixes: #64244
Related: #54400, #53575
Summary
Describe the problem and fix in 2–5 bullets:
If this PR fixes a plugin beta-release blocker, title it
fix(<plugin-id>): beta blocker - <summary>and link the matchingBeta blocker: <plugin-name> - <summary>issue labeledbeta-blocker. Contributors cannot label PRs, so the title is the PR-side signal for maintainers and automation.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
For bug fixes or regressions, explain why this happened, not just what changed. Otherwise write
N/A. If the cause is unclear, writeUnknown.Regression Test Plan (if applicable)
For bug fixes or regressions, name the smallest reliable test coverage that should catch this. Otherwise write
N/A.User-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write
None.Diagram (if applicable)
For UI changes or non-trivial logic flows, include a small ASCII diagram reviewers can scan quickly. Otherwise write
N/A.Security Impact (required)
Yes/No)Yes/No)Yes/No)Yes/No)Yes/No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No)Yes/No)Yes/No)Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.