Skip to content

Add MiniMax-M3 and MiniMax-M2.7 to the LLM model picker - #285

Open
octo-patch wants to merge 1 commit into
zachlatta:mainfrom
octo-patch:octo/20260731-model-add-recvqgfdsDhfkP
Open

Add MiniMax-M3 and MiniMax-M2.7 to the LLM model picker#285
octo-patch wants to merge 1 commit into
zachlatta:mainfrom
octo-patch:octo/20260731-model-add-recvqgfdsDhfkP

Conversation

@octo-patch

@octo-patch octo-patch commented Jul 31, 2026

Copy link
Copy Markdown

Reason: Add MiniMax-M3 and MiniMax-M2.7 to the predefined LLM model picker.

Changes

  • Add MiniMax-M3 and MiniMax-M2.7 to ModelConfiguration.llmModels so they appear in the post-processing, fallback, and context model dropdowns instead of requiring manual entry.
  • Register per-model config entries for both models in ModelConfiguration.config(for:) with shouldStripThinkTags: true, so their reasoning/think blocks are stripped from cleaned transcripts the same way other reasoning models are handled.

Why strip think tags

Both models emit reasoning content (MiniMax-M3 adaptively, MiniMax-M2.7 always on). Without stripping, the reasoning text would leak into the pasted transcript. FreeFlow already strips think tags for other reasoning models via ModelConfiguration.stripThinkTags, so the new entries reuse that existing path.

Checks

The repo builds with swiftc on macOS (see Makefile); no Swift toolchain is available in this environment, so the change was validated by static checks: brace/paren balance, and the added test asserting the models are predefined and that think tags are stripped.

A new test testMiniMaxModelsArePredefinedAndStripThinkTags was added to Tests/AppContextServiceTests.swift covering:

  • both model IDs are present in ModelConfiguration.llmModels,
  • config(for:) returns shouldStripThinkTags == true for both,
  • a reasoning block is stripped from an MiniMax-M3 activity summary.

Summary by CodeRabbit

  • New Features

    • Added support for the MiniMax-M3 and MiniMax-M2.7 language models.
    • Enabled automatic removal of think tags from responses for these models.
    • Configured model behavior to preserve cleaned transcript text.
  • Tests

    • Added coverage validating model registration, configuration, and response cleanup.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds MiniMax-M3 and MiniMax-M2.7 to the supported model list. Both models disable explicit reasoning settings and strip think tags. Tests verify registration, configuration, cleaned summaries, and transcript preservation.

Changes

MiniMax model support

Layer / File(s) Summary
Model registration and configuration
Sources/ModelConfiguration.swift
Registers MiniMax-M3 and MiniMax-M2.7. Both models disable explicit reasoning settings and strip think tags.
Model validation tests
Tests/AppContextServiceTests.swift
Tests model registration, configuration, think-tag removal, summary output, and transcript preservation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: marcbodea

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the addition of MiniMax-M3 and MiniMax-M2.7 to the LLM model picker.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Tests/AppContextServiceTests.swift`:
- Around line 78-97: Update testMiniMaxModelsArePredefinedAndStripThinkTags to
run AppContextService.activitySummary for each MiniMax model, asserting hidden
reasoning is removed and cleaned transcript text remains for both MiniMax-M3 and
MiniMax-M2.7. Within the same model loop, also assert each configuration’s
reasoningEffort and includeReasoning are nil.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 70417265-ab57-47ac-8e37-aab73c0aedd1

📥 Commits

Reviewing files that changed from the base of the PR and between 1de2c2f and 2d5d97b.

📒 Files selected for processing (2)
  • Sources/ModelConfiguration.swift
  • Tests/AppContextServiceTests.swift

Comment on lines +78 to +97
private static func testMiniMaxModelsArePredefinedAndStripThinkTags() {
expect(ModelConfiguration.llmModels.contains("MiniMax-M3"), "MiniMax-M3 is missing from the picker")
expect(ModelConfiguration.llmModels.contains("MiniMax-M2.7"), "MiniMax-M2.7 is missing from the picker")

for model in ["MiniMax-M3", "MiniMax-M2.7"] {
let config = ModelConfiguration.config(for: model)
expect(config.shouldStripThinkTags, "MiniMax model should strip think tags: \(model)")
}

let reasoningOutput = """
<think>
Hidden reasoning should never reach the transcript.
</think>
Cleaned transcript text.
"""
let summary = AppContextService.activitySummary(from: reasoningOutput, model: "MiniMax-M3")
expect(summary?.contains("Hidden reasoning") == false, "MiniMax reasoning leaked into summary")
expect(summary?.contains("Cleaned transcript text.") == true, "MiniMax summary dropped the transcript text")
}

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Cover both MiniMax models in the cleanup assertions.

The loop checks shouldStripThinkTags for both models, but AppContextService.activitySummary runs only for MiniMax-M3. A MiniMax-M2.7 cleanup regression could pass the test. Also assert that reasoningEffort and includeReasoning are nil for both models, because those fields are part of the new configuration contract.

Proposed test adjustment
+        let reasoningOutput = """
+        <think>
+        Hidden reasoning should never reach the transcript.
+        </think>
+        Cleaned transcript text.
+        """
+
         for model in ["MiniMax-M3", "MiniMax-M2.7"] {
             let config = ModelConfiguration.config(for: model)
             expect(config.shouldStripThinkTags, "MiniMax model should strip think tags: \(model)")
-        }
-
-        let reasoningOutput = """
-        <think>
-        Hidden reasoning should never reach the transcript.
-        </think>
-        Cleaned transcript text.
-        """
-        let summary = AppContextService.activitySummary(from: reasoningOutput, model: "MiniMax-M3")
-        expect(summary?.contains("Hidden reasoning") == false, "MiniMax reasoning leaked into summary")
-        expect(summary?.contains("Cleaned transcript text.") == true, "MiniMax summary dropped the transcript text")
+            expect(config.reasoningEffort == nil, "MiniMax model should not set reasoning effort: \(model)")
+            expect(config.includeReasoning == nil, "MiniMax model should not include reasoning: \(model)")
+
+            let summary = AppContextService.activitySummary(from: reasoningOutput, model: model)
+            expect(summary?.contains("Hidden reasoning") == false, "MiniMax reasoning leaked into summary: \(model)")
+            expect(summary?.contains("Cleaned transcript text.") == true, "MiniMax summary dropped transcript text: \(model)")
+        }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
private static func testMiniMaxModelsArePredefinedAndStripThinkTags() {
expect(ModelConfiguration.llmModels.contains("MiniMax-M3"), "MiniMax-M3 is missing from the picker")
expect(ModelConfiguration.llmModels.contains("MiniMax-M2.7"), "MiniMax-M2.7 is missing from the picker")
for model in ["MiniMax-M3", "MiniMax-M2.7"] {
let config = ModelConfiguration.config(for: model)
expect(config.shouldStripThinkTags, "MiniMax model should strip think tags: \(model)")
}
let reasoningOutput = """
<think>
Hidden reasoning should never reach the transcript.
</think>
Cleaned transcript text.
"""
let summary = AppContextService.activitySummary(from: reasoningOutput, model: "MiniMax-M3")
expect(summary?.contains("Hidden reasoning") == false, "MiniMax reasoning leaked into summary")
expect(summary?.contains("Cleaned transcript text.") == true, "MiniMax summary dropped the transcript text")
}
private static func testMiniMaxModelsArePredefinedAndStripThinkTags() {
expect(ModelConfiguration.llmModels.contains("MiniMax-M3"), "MiniMax-M3 is missing from the picker")
expect(ModelConfiguration.llmModels.contains("MiniMax-M2.7"), "MiniMax-M2.7 is missing from the picker")
let reasoningOutput = """
<think>
Hidden reasoning should never reach the transcript.
</think>
Cleaned transcript text.
"""
for model in ["MiniMax-M3", "MiniMax-M2.7"] {
let config = ModelConfiguration.config(for: model)
expect(config.shouldStripThinkTags, "MiniMax model should strip think tags: \(model)")
expect(config.reasoningEffort == nil, "MiniMax model should not set reasoning effort: \(model)")
expect(config.includeReasoning == nil, "MiniMax model should not include reasoning: \(model)")
let summary = AppContextService.activitySummary(from: reasoningOutput, model: model)
expect(summary?.contains("Hidden reasoning") == false, "MiniMax reasoning leaked into summary: \(model)")
expect(summary?.contains("Cleaned transcript text.") == true, "MiniMax summary dropped transcript text: \(model)")
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Tests/AppContextServiceTests.swift` around lines 78 - 97, Update
testMiniMaxModelsArePredefinedAndStripThinkTags to run
AppContextService.activitySummary for each MiniMax model, asserting hidden
reasoning is removed and cleaned transcript text remains for both MiniMax-M3 and
MiniMax-M2.7. Within the same model loop, also assert each configuration’s
reasoningEffort and includeReasoning are nil.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant