fix: update conversation manager tests for auto-generated system message (#9687)

fix: update Anthropic mock to match real SDK's sync list() signature

The real Anthropic SDK's models.list() is a regular (non-async) method
that returns an AsyncPaginator (async-iterable). The mock used async def,
causing `async for model in client.models.list()` to iterate over a
coroutine instead of the page, silently failing with 0 models synced.
This commit is contained in:
jnjpng
2026-02-26 11:42:18 -08:00
committed by Caren Thomas
parent 28a66fa9d7
commit 750b83a2ea

View File

@@ -880,6 +880,8 @@ async def test_server_startup_handles_api_errors_gracefully(default_user, defaul
for item in self._items:
yield item
# NOTE: The real SDK's models.list() is a regular (non-async) method that
# returns an AsyncPaginator (which is async-iterable).
class MockAnthropicModels:
def list(self):
return MockAnthropicAsyncPage(mock_anthropic_data)