Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions src/rotator_library/providers/iflow_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,30 @@
HARDCODED_MODELS = [
"glm-4.6",
"glm-4.7",
"minimax-m2",
"minimax-m2.1",
"qwen3-coder-plus",
"glm-5",
"iflow-rome-30ba3b",
"kimi-k2",
"kimi-k2-0905",
"kimi-k2-thinking", # Seems to not work, but should
"kimi-k2.5", # Seems to not work, but should
"minimax-m2",
"minimax-m2.1",
"minimax-m2.5",
"qwen3-32b",
"qwen3-235b",
"qwen3-235b-a22b-instruct",
"qwen3-235b-a22b-thinking-2507",
"qwen3-coder-plus",
"qwen3-max",
"qwen3-max-preview",
"qwen3-235b-a22b-thinking-2507",
"qwen3-vl-plus",
"deepseek-v3.2-reasoner",
Comment thread
MasuRii marked this conversation as resolved.
Outdated
"deepseek-v3.2-chat",
"deepseek-v3.2", # seems to not work, but should. Use above variants instead
"deepseek-v3.1",
"deepseek-v3",
"deepseek-r1",
"qwen3-vl-plus",
"qwen3-235b-a22b-instruct",
"qwen3-235b",
"tstars2.0",
]

# OpenAI-compatible parameters supported by iFlow API
Expand Down Expand Up @@ -83,20 +88,22 @@
ENABLE_THINKING_MODELS = {
"glm-4.6",
"glm-4.7",
"glm-5",
"qwen3-max-preview",
"qwen3-32b",
Comment thread
MasuRii marked this conversation as resolved.
"deepseek-v3.2",
"deepseek-v3.1",
}

# GLM models need additional clear_thinking=false when thinking is enabled
GLM_MODELS = {"glm-4.6", "glm-4.7"}
GLM_MODELS = {"glm-4.6", "glm-4.7", "glm-5"}

# Models using reasoning_split (boolean) instead of enable_thinking
REASONING_SPLIT_MODELS = {"minimax-m2", "minimax-m2.1"}
REASONING_SPLIT_MODELS = {"minimax-m2", "minimax-m2.1", "minimax-m2.5"}

# Models that benefit from reasoning_content preservation in message history
# (for multi-turn conversations)
REASONING_PRESERVATION_MODELS_PREFIXES = ("glm-4", "minimax-m2")
REASONING_PRESERVATION_MODELS_PREFIXES = ("glm-4", "glm-5", "minimax-m2", "tstars")
Comment thread
MasuRii marked this conversation as resolved.
Outdated

# Cache file path for reasoning content preservation
_REASONING_CACHE_FILE = (
Expand Down Expand Up @@ -1022,9 +1029,7 @@ async def stream_handler(response_stream, attempt=1):
else:
if not error_text:
content_type = response.headers.get("content-type", "")
error_text = (
f"(empty response body, content-type={content_type})"
)
error_text = f"(empty response body, content-type={content_type})"
error_msg = (
f"iFlow HTTP {response.status_code} error: {error_text}"
)
Expand Down
Loading