fix(tests): add app_config kwarg to _fake_create_chat_model mocks

The P2-7 commit threaded app_config=app_config into create_chat_model
invocations inside make_lead_agent. Two test mocks in
test_lead_agent_model_resolution.py intercept create_chat_model with a
fake that listed the old kwarg set; they needed app_config=None added to
their signature or pytest fails with TypeError on unexpected kwarg.

Surfaced by CI in https://github.com/bytedance/deer-flow/actions/runs/24522129902.
This commit is contained in:
greatmengqi 2026-04-17 00:40:45 +08:00
parent 6e3350e315
commit cbe8b12744

View File

@ -81,7 +81,7 @@ def test_make_lead_agent_disables_thinking_when_model_does_not_support_it(monkey
captured: dict[str, object] = {}
def _fake_create_chat_model(*, name, thinking_enabled, reasoning_effort=None):
def _fake_create_chat_model(*, name, thinking_enabled, reasoning_effort=None, app_config=None):
captured["name"] = name
captured["thinking_enabled"] = thinking_enabled
captured["reasoning_effort"] = reasoning_effort
@ -146,7 +146,7 @@ def test_create_summarization_middleware_uses_configured_model_alias(monkeypatch
fake_model = MagicMock()
fake_model.with_config.return_value = fake_model
def _fake_create_chat_model(*, name=None, thinking_enabled, reasoning_effort=None):
def _fake_create_chat_model(*, name=None, thinking_enabled, reasoning_effort=None, app_config=None):
captured["name"] = name
captured["thinking_enabled"] = thinking_enabled
captured["reasoning_effort"] = reasoning_effort