ProtectedbaseProtectedcachedThe last successful discovery, while younger than modelCacheTtlMs (default 5 min; 0 disables).
ProtectedclassifyProvider-specific reading of an error body. Return the fields you can
tell from it (code, providerCode, hint, retryAfterMs); the status
code default fills the rest.
ProtectederrorA fresh AIError for a failure this provider detects itself (no key, no model, blocked answer).
ProtectederrorOptionalmodel: stringProtectedfailOptionalmodelUsed: stringProtectedhttpJSON request. Non-2xx throws [HttpError]; the JSON body (if any) is on .json.
ProtectedhttpJSON request with the reply's status and headers (request ids live there).
ProtectedhttpStreaming request: the body as an async iterable of bytes, idle-guarded. Non-2xx throws [HttpError].
ProtectedokMessages API event stream: message_start carries input tokens,
content_block_delta the text, message_delta the stop reason and
output tokens, error a failure mid-stream (overloaded, mostly).
ProtectedrequestThe per-request knobs (signal, timeouts) as http options.
ProtectedsetRecords what discovery found, keeping any seeded models first so the caller's chosen default stays the default.
Cheap by default: "up" means at least one model can be listed. No generation is sent.
ProtectedtoAny thrown value → AIError carrying this provider's classification.
Optionalmodel: string
Origin this provider talks to; shown in
PROVIDER_UNREACHABLEhints.