mirror of
https://github.com/NCBM/plyngent.git
synced 2026-07-23 05:55:16 +08:00
core/cli: soft-fail GET /models cancel/timeout on provider switch
Map CancelledError and TimeoutError from models() to RuntimeError so merged_model_choices falls back to config/cache. Stub remote fetch in /provider unit tests so they never hit the network.
This commit is contained in:
@@ -67,7 +67,7 @@ async def test_fetch_remote_model_ids_timeout() -> None:
|
||||
await asyncio.sleep(10)
|
||||
return ["late"]
|
||||
|
||||
with pytest.raises(TimeoutError):
|
||||
with pytest.raises(RuntimeError, match="timed out"):
|
||||
_ = await fetch_remote_model_ids(Slow(), timeout_seconds=0.05)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user