discoverProviderModelsWithCache is the shared gate behind OpenAI-compatible, Codex, Bedrock, and LM Studio catalogs. These tests lock the fail-closed policy:
forceRefresh and ttlMs: 0 still verify the live source. A zero TTL does not leave an expiry that would make the next read look fresh.test/providers/model-discovery-service.test.tsCatalog callers already exercise a few provider paths, but the shared policy was untested on its own. A change that honored a fresh cache when TTL is zero, wiped a live catalog with a static or empty response, mixed endpoint scopes, or trusted a malformed cache file would ship the wrong models or reasoning efforts without a failing unit test.
bun run test -- test/providers/model-discovery-service.test.ts test/platform-boundary.test.ts (9 + 1 pass)bunx biome check test/providers/model-discovery-service.test.tsbun run typecheckSign in to comment.
Update README.md
#125 mobile-fixes ← main
Updated 4 months ago
test: cover model discovery cache fail-closed gates
#350 main ← cursor/missing-test-coverage-7b13
Updated 4 days ago