mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-22 16:06:50 +00:00
feat(models): Provider for MindIE model engine (#2483)
* feat(models): 适配 MindIE引擎的模型 * test: add unit tests for MindIEChatModel adapter and fix PR review comments * chore: update uv.lock with pytest-asyncio * build: add pytest-asyncio to test dependencies * fix: address PR review comments (lazy import, cache clients, safe newline escape, strict xml regex) --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -131,6 +131,12 @@ def create_chat_model(name: str | None = None, thinking_enabled: bool = False, *
|
||||
elif "reasoning_effort" not in model_settings_from_config:
|
||||
model_settings_from_config["reasoning_effort"] = "medium"
|
||||
|
||||
# For MindIE models: enforce conservative retry defaults.
|
||||
# Timeout normalization is handled inside MindIEChatModel itself.
|
||||
if getattr(model_class, "__name__", "") == "MindIEChatModel":
|
||||
# Enforce max_retries constraint to prevent cascading timeouts.
|
||||
model_settings_from_config["max_retries"] = model_settings_from_config.get("max_retries", 1)
|
||||
|
||||
model_instance = model_class(**{**model_settings_from_config, **kwargs})
|
||||
|
||||
callbacks = build_tracing_callbacks()
|
||||
|
||||
Reference in New Issue
Block a user