mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-06-10 09:25:57 +00:00
feat(provider) Add patched MiMo reasoning content support (#3298)
* Add patched MiMo reasoning content support * Clarify MiMo patched model coverage * Remove unused MiMo payload index * Address MiMo review nits
This commit is contained in:
@@ -995,6 +995,41 @@ def test_openai_responses_api_settings_are_passed_to_chatopenai(monkeypatch):
|
||||
assert captured.get("output_version") == "responses/v1"
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Provider class path resolution
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@pytest.mark.parametrize("model_id", ["mimo-v2.5-pro", "mimo-v2.5", "mimo-v2-flash"])
|
||||
def test_create_chat_model_resolves_patched_mimo_provider(model_id):
|
||||
from deerflow.models.patched_mimo import PatchedChatMiMo
|
||||
|
||||
model = ModelConfig(
|
||||
name=f"{model_id}-thinking",
|
||||
display_name=f"{model_id} Thinking",
|
||||
description=None,
|
||||
use="deerflow.models.patched_mimo:PatchedChatMiMo",
|
||||
model=model_id,
|
||||
api_key="test-key",
|
||||
base_url="https://api.xiaomimimo.com/v1",
|
||||
supports_thinking=True,
|
||||
when_thinking_enabled={"extra_body": {"thinking": {"type": "enabled"}}},
|
||||
supports_vision=False,
|
||||
)
|
||||
cfg = _make_app_config([model])
|
||||
|
||||
chat_model = factory_module.create_chat_model(
|
||||
name=f"{model_id}-thinking",
|
||||
thinking_enabled=True,
|
||||
app_config=cfg,
|
||||
attach_tracing=False,
|
||||
)
|
||||
|
||||
assert isinstance(chat_model, PatchedChatMiMo)
|
||||
assert chat_model.model_name == model_id
|
||||
assert chat_model.extra_body["thinking"]["type"] == "enabled"
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Duplicate keyword argument collision (issue #1977)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user