Skip to content

feat(iflow): add support for glm-5, minimax-m2.5, qwen3-32b, tstars2.0, iflow-rome-30ba3b#130

Open
MasuRii wants to merge 3 commits intoMirrowel:devfrom
MasuRii:feat/iflow-new-models
Open

feat(iflow): add support for glm-5, minimax-m2.5, qwen3-32b, tstars2.0, iflow-rome-30ba3b#130
MasuRii wants to merge 3 commits intoMirrowel:devfrom
MasuRii:feat/iflow-new-models

Conversation

@MasuRii
Copy link
Contributor

@MasuRii MasuRii commented Feb 15, 2026

Summary

Add support for 5 new iFlow models to maintain feature parity: glm-5, minimax-m2.5, qwen3-32b, tstars2.0, and iflow-rome-30ba3b. Each model is registered with appropriate thinking, reasoning, and preservation configurations.

Changes

  • Add glm-5, minimax-m2.5, qwen3-32b, tstars2.0, and iflow-rome-30ba3b to HARDCODED_MODELS
  • Add glm-5 to ENABLE_THINKING_MODELS and GLM_MODELS sets
  • Add qwen3-32b to ENABLE_THINKING_MODELS set
  • Add minimax-m2.5 to REASONING_SPLIT_MODELS set
  • Update REASONING_PRESERVATION_MODELS_PREFIXES with glm-5 and tstars prefixes
  • Sort HARDCODED_MODELS list alphabetically by model family for consistency

Files Changed

File Type Impact
src/rotator_library/providers/iflow_provider.py Modified Register 5 new models with correct thinking/reasoning configurations

Testing Instructions

  1. Verify each new model appears in the model list endpoint
  2. Test glm-5 — should send enable_thinking + clear_thinking=false (GLM-style)
  3. Test minimax-m2.5 — should use reasoning_split instead of enable_thinking
  4. Test qwen3-32b — should send enable_thinking
  5. Test tstars2.0 and iflow-rome-30ba3b — standard chat completions

Tested right now:
image

Closes #129


Important

Add support for new iFlow models glm-5, minimax-m2.5, qwen3-32b, tstars2.0, and iflow-rome-30ba3b with appropriate configurations in iflow_provider.py.

  • Models:
    • Add glm-5, minimax-m2.5, qwen3-32b, tstars2.0, iflow-rome-30ba3b to HARDCODED_MODELS in iflow_provider.py.
    • Add glm-5 to ENABLE_THINKING_MODELS and GLM_MODELS.
    • Add qwen3-32b to ENABLE_THINKING_MODELS.
    • Add minimax-m2.5 to REASONING_SPLIT_MODELS.
    • Update REASONING_PRESERVATION_MODELS_PREFIXES with glm-5 and tstars prefixes.
  • Misc:
    • Sort HARDCODED_MODELS alphabetically by model family.

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

…0, iflow-rome-30ba3b

Add five new models to the iFlow provider to maintain feature parity
with the competitor repository (router-for-me/CLIProxyAPI):

- glm-5: Added to HARDCODED_MODELS, ENABLE_THINKING_MODELS, and
  GLM_MODELS (thinking support with GLM-style clear_thinking handling)
- minimax-m2.5: Added to HARDCODED_MODELS and REASONING_SPLIT_MODELS
  (thinking support via reasoning_split boolean)
- qwen3-32b: Added to HARDCODED_MODELS and ENABLE_THINKING_MODELS
  (thinking support)
- tstars2.0: Added to HARDCODED_MODELS (multimodal assistant)
- iflow-rome-30ba3b: Added to HARDCODED_MODELS (iFlow Rome model)

Also update REASONING_PRESERVATION_MODELS_PREFIXES to include "glm-5"
and "tstars" prefixes, and alphabetically sort the HARDCODED_MODELS
list for maintainability.

Closes: Mirrowel#129
@MasuRii MasuRii requested a review from Mirrowel as a code owner February 15, 2026 07:37
@mirrobot-agent
Copy link
Contributor

Starting my review of the iFlow provider updates. I'll be checking the configuration for the 5 new models (glm-5, minimax-m2.5, qwen3-32b, tstars2.0, and iflow-rome-30ba3b) to ensure they're correctly registered and integrated. 🔍

Copy link
Contributor

@mirrobot-agent mirrobot-agent bot left a comment

Choose a reason for hiding this comment

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

Overall Assessment

Nice work on expanding the iFlow model support! Adding these 5 new models (glm-5, minimax-m2.5, qwen3-32b, tstars2.0, and iflow-rome-30ba3b) with their specific thinking and reasoning configurations ensures the provider stays up-to-date with the latest offerings. The internal grouping of models by family in HARDCODED_MODELS is also a great improvement for maintainability.

Architectural Feedback

The approach of using specific sets for different thinking/reasoning behaviors (ENABLE_THINKING_MODELS, GLM_MODELS, REASONING_SPLIT_MODELS) is clean and matches the established patterns in the codebase.

Key Suggestions

  • Reasoning Preservation: I've noted that qwen3-32b (and some existing models like deepseek-v3.2) are missing from the REASONING_PRESERVATION_MODELS_PREFIXES list. If these models return reasoning_content, adding them to this list is necessary for coherent multi-turn conversations.
  • Prefix Simplification: Suggesting a move to more generic prefixes (e.g., glm- instead of version-specific ones) to reduce the need for future updates.

Nitpicks

  • Alphabetical Sorting: The deepseek family is currently slightly out of place in the family-sorted list.

Questions for the Author

  • Does iflow-rome-30ba3b also support any form of thinking or reasoning content, or is it strictly a standard completion model?
  • Are there specific reasons why deepseek and qwen models are excluded from the reasoning preservation cache?

This review was generated by an AI assistant.

Copilot AI review requested due to automatic review settings February 15, 2026 12:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for additional iFlow model IDs and updates model-specific “thinking/reasoning” handling, with substantial additional refactoring in the iFlow provider around payload shaping and streaming error handling.

Changes:

  • Register 5 new iFlow models and update model capability sets (thinking, GLM handling, reasoning_split, reasoning preservation prefixes).
  • Expand iFlow provider request/stream handling (suffix-based thinking config parsing, image normalization + fallback logic, gzip handling, token usage estimation).
  • Harden embedding cost calculation to handle missing usage/cost metadata.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
src/rotator_library/providers/iflow_provider.py Adds new model IDs and significantly refactors request building + streaming handling (thinking config, image handling, gzip, token estimation).
src/rotator_library/client/executor.py Makes embedding cost calculation resilient to usage=None and input_cost_per_token being None or 0.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MasuRii MasuRii force-pushed the feat/iflow-new-models branch from 9817625 to 87b894b Compare February 15, 2026 13:15
Sort HARDCODED_MODELS alphabetically (deepseek before glm).
Expand REASONING_PRESERVATION_MODELS_PREFIXES to include
deepseek, qwen, and use broader prefix matching.
Simplify _inject_reasoning_content docstring.

Refs: Mirrowel#130
Replace broad prefixes ("deepseek", "glm-", "minimax-", "qwen") with specific model identifiers ("glm-4", "glm-5", "minimax-m2", "qwen3-32b", "deepseek-v3.1", "deepseek-v3.2") in REASONING_PRESERVATION_MODELS_PREFIXES to prevent unintended matches on future models that may not support reasoning content preservation.
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

Comments