fix(ollama): disable thinking for deepseek call sites
All checks were successful
CD Pipeline / tests (push) Successful in 1m31s
Code Review / ai-code-review (push) Successful in 26s
CD Pipeline / build-and-deploy (push) Successful in 5m27s
CD Pipeline / post-deploy-checks (push) Successful in 1m40s

This commit is contained in:
Your Name
2026-05-25 23:19:14 +08:00
parent 6112fd07ae
commit 3953ef6d57
7 changed files with 28 additions and 2 deletions

View File

@@ -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:

View File

@@ -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