Skip to content

Conversation

@Maosghoul
Copy link
Contributor

@Maosghoul Maosghoul commented Nov 12, 2025

Related GitHub Issue

Issue: #9017

Description

Switch the MiniMax provider from the OAI format to the Anthropic format to better support the UI and reasoning callback.

Test Procedure

I have thoroughly tested this implementation:

  1. API Integration: Select MiniMax provider and added MiniMax API key and successfully connected to the service using anthropic endpoints
  2. Model Selection: MiniMax-M2 is selectable and functional
  3. Chat Functionality: Tested chat interactions with the model -it respond appropriately to coding requests and general queries
  4. UI Integration: Confirmed the MiniMax provider appears correctly in the provider dropdown with proper API key validation
  5. Build Validation: Full build passes (npm run package) with no errors or warnings
  6. Press F5 to start

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Clipboard_Screenshot_1762948828 Clipboard_Screenshot_1762948803 Clipboard_Screenshot_1762949318

Documentation Updates

No documentation updates are required.

Additional Notes

Get in Touch


Important

Switch MiniMax provider to Anthropic format with updated API handling, UI integration, and comprehensive testing.

  • Behavior:
    • Switch MiniMax provider to Anthropic format in provider-settings.ts and minimax.ts.
    • Update MiniMaxAnthropicHandler in minimax.ts to handle API requests using Anthropic endpoints.
    • Modify Task.ts to integrate new thinking and redacted thinking types.
  • UI:
    • Update MiniMax.tsx to reflect new Anthropic endpoints in dropdown options.
  • Testing:
    • Add tests in minimax.spec.ts for MiniMaxAnthropicHandler covering initialization, message streaming, and error handling.
  • Misc:
    • Rename MiniMaxHandler to MiniMaxAnthropicHandler in index.ts and providers/index.ts.
    • Add new stream chunk types in stream.ts for Anthropic thinking.

This description was created by Ellipsis for 6bdea5d. You can customize this summary. It will automatically update as commits are pushed.

@Maosghoul Maosghoul requested review from cte, jr and mrubens as code owners November 12, 2025 12:08
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Nov 12, 2025
@roomote
Copy link
Contributor

roomote bot commented Nov 12, 2025

Rooviewer Clock   See task on Roo Cloud

Reviewed the latest commit (c0fc50b). The commit removed the if (finalAssistantMessage) check, which actually worsens the previously identified issue. Both original issues remain unresolved:

  • Removed preserveReasoning property: The preserveReasoning: true property was removed from MiniMax model definitions, but Task.ts still checks for it at line 2425. This means reasoning won't be preserved in API history for MiniMax.
  • Potential empty text content: The code at Task.ts line 2429 now unconditionally creates assistant messages with text blocks, even when finalAssistantMessage is empty. This worsened from the previous version which had a safety check.
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

inputPrice: 0.3,
outputPrice: 1.2,
cacheWritesPrice: 0.375,
cacheReadsPrice: 0.03,
Copy link
Contributor

Choose a reason for hiding this comment

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

The preserveReasoning property was removed from both MiniMax model definitions, but the code in Task.ts (line 2425) still checks this.api.getModel().info.preserveReasoning to determine whether to preserve reasoning in the API history. Since MiniMax models no longer have this property, reasoning will not be preserved. If reasoning preservation is still desired for MiniMax (which now uses the Anthropic format and supports thinking blocks), you should either restore preserveReasoning: true or update the Task.ts logic to handle MiniMax's reasoning differently.

Fix it with Roo Code or mention @roomote and request a fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using ant_thinking and ant_redacted_thinking block types with the Anthropic API to preserve reasoning.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 12, 2025
@CyberRookie-X
Copy link

CyberRookie-X commented Nov 14, 2025

@mrubens
According to the official documentation of MinxMax, optimal model performance is achieved when using the Minimax m2 model via the Anthropic API. This friend's pull request was merged by Kilocode a few days ago. Could you please try merging this pull request? Thank you very much.
Kilo-Org/kilocode#3295
https://platform.minimax.io/docs/api-reference/text-anthropic-api

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

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

3 participants