fix(ollama): disable thinking for deepseek call sites
This commit is contained in:
@@ -103,6 +103,7 @@ async def test_nemoclaw_chat_uses_resolved_interactive_lane(
|
||||
url, payload = _FakeAsyncClient.posted[0]
|
||||
assert url == "http://gcp-a:11435/api/chat"
|
||||
assert payload["model"] == "deepseek-r1:14b"
|
||||
assert payload["think"] is False
|
||||
|
||||
|
||||
def test_chat_manager_has_no_direct_gemini_generation_path() -> None:
|
||||
|
||||
@@ -22,6 +22,7 @@ class _FakeResponse:
|
||||
|
||||
class _FakeAsyncClient:
|
||||
posted_urls: list[str] = []
|
||||
posted_payloads: list[dict[str, Any]] = []
|
||||
fail_urls: set[str] = set()
|
||||
response: str = ""
|
||||
|
||||
@@ -37,6 +38,7 @@ class _FakeAsyncClient:
|
||||
|
||||
async def post(self, url: str, *, json: dict[str, Any]) -> _FakeResponse:
|
||||
self.posted_urls.append(url)
|
||||
self.posted_payloads.append(json)
|
||||
if url in self.fail_urls:
|
||||
raise RuntimeError("endpoint unavailable")
|
||||
return _FakeResponse(self.response)
|
||||
@@ -45,6 +47,7 @@ class _FakeAsyncClient:
|
||||
@pytest.fixture(autouse=True)
|
||||
def _reset_fake_client() -> None:
|
||||
_FakeAsyncClient.posted_urls = []
|
||||
_FakeAsyncClient.posted_payloads = []
|
||||
_FakeAsyncClient.fail_urls = set()
|
||||
_FakeAsyncClient.response = ""
|
||||
|
||||
@@ -115,6 +118,7 @@ async def test_nemoclaw_second_opinion_tries_gcp_b_after_gcp_a_failure(
|
||||
"http://gcp-a:11435/api/generate",
|
||||
"http://gcp-b:11436/api/generate",
|
||||
]
|
||||
assert all(payload["think"] is False for payload in _FakeAsyncClient.posted_payloads)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user