Provider metadata diagnostics
| Input | Returns | Log |
|---|---|---|
provider.json missing | existing missing-entry or alias fallback | none: some providers have no directory |
provider.json unreadable, invalid or not an object | empty endpoint; the caller's fallback continues | one warning |
models_dev.json missing | empty cache | none: expected before a first fetch |
models_dev.json unreadable, invalid or not an object | empty cache, short failure TTL | one warning |
| models.dev network failure | tries the disk cache | none: normal offline |
warning("provider metadata load failed", extra={
"source": "provider_json" | "models_dev_cache",
"path": str(path) | "<unresolved>",
"error_type": type(error).__name__,
})
<unresolved> only when computing the cache path fails. Never a traceback, exception message, file contents, credentials or response bodies. Corrupt files stay in place for inspection. Warnings change no fallback or return value.
| File | Function |
|---|---|
providers/catalog/metadata.py | Shared provider.json reader, used by _endpoints() and shipped_provider_ids() |
providers/catalog/sources/models_dev.py | _read_disk_cache() |
Last updated · 2026-11-25