import type { ReasoningEffort } from "../shared/reasoning-effort.js"; /** What the provider's own model list says about one model. */ export interface ProviderModelMetadata { id: string; /** `max_input_tokens`. */ contextWindow?: number; /** `max_tokens`. */ maxOutputTokens?: number; /** * Levels under `capabilities.effort` whose `supported` is true. Undefined * when the provider does not report effort for the model, which is not the * same as reporting that it supports none. */ efforts?: ReasoningEffort[]; /** Keys under `capabilities.thinking.types` whose `supported` is true. */ thinkingTypes?: string[]; } export type ProviderModelMetadataUnavailableReason = "missing-key" | "credential-unreadable" | "rejected" | "unreachable" | "provider-error"; export type ProviderModelMetadataResult = { state: "available"; fetchedAt: number; models: Readonly>; } | { state: "unavailable"; reason: ProviderModelMetadataUnavailableReason; status?: number; }; /** One `data[]` entry of `GET /v1/models`; exported for specs. */ export declare function parseAnthropicModelEntry(entry: unknown): ProviderModelMetadata | null; /** * The Anthropic model list for the key this request's chats use, cached per * credential for an hour. Never throws: an unreadable store, a missing key, * or a failed request is a typed `unavailable` result the caller reports * instead of filling in catalog values as if the provider had said them. */ export declare function readAnthropicModelMetadata(options?: { fetchImpl?: typeof fetch; now?: () => number; }): Promise; /** Engines whose picker rows can read live provider metadata. */ export declare const LIVE_METADATA_ENGINES: ReadonlySet; export declare function __resetProviderModelMetadataCache(): void;