/** * Per-(provider, model) capability lookup for Anthropic-family Claude models. * * Two layers: * * 1. Runtime cache populated from each provider's model-discovery endpoint: * - github-copilot: GET {baseUrl}/models (OpenAI-style with capabilities) * - anthropic: GET {baseUrl}/v1/models (Anthropic-native capabilities) * The discovery layer (see anthropic-discovery.ts) feeds this cache via * `setDiscoveredCapabilities`. Discovery is provider-aware because the * same conceptual model can have different capabilities on different * relays (e.g. claude-opus-4.6 caps at 200k on GitHub Copilot, but the * 1M tier on Copilot is exposed as a separate model id "claude-opus-4.6-1m"; * on the direct Anthropic API the 1M tier on opus-4.5 is gated by the * `context-1m-2025-08-07` beta header on the same id). * * 2. Static fallback table consulted only when discovery has not (yet) run * for the (provider, model) pair, or has failed (offline, 4xx, 5xx, or * the provider exposes no discovery endpoint — e.g. Bedrock, Vertex). * The static table is intentionally *conservative*: it only encodes * opt-ins we know to be safe on every relay we have tested. Anything * uncertain (xhighEffort, contextBeta) is left off and is only enabled * after discovery confirms it. * * The capability shape: * - thinkingSchema : which extended-thinking request shape the model * accepts. "legacy" -> {thinking:{type:"enabled", * budget_tokens:N}}. "adaptive" -> {thinking:{type: * "adaptive"}, output_config:{effort:...}}. * - contextBeta : optional `anthropic-beta` value to opt into a larger * context window via header (Anthropic-direct only). * - contextWindow : ceiling once contextBeta (if any) is applied. * When set, overrides models.generated.ts at registry * load time so the modeline/picker/compaction logic * see the real value. * - xhighEffort : true when "xhigh" thinking should map to adaptive * effort "max" instead of clamping to "high". * Only valid when the underlying account/relay exposes * effort=max for the model. */ export type AnthropicThinkingSchema = "legacy" | "adaptive"; export interface AnthropicModelCapabilities { thinkingSchema: AnthropicThinkingSchema; contextBeta?: string; contextWindow?: number; xhighEffort?: boolean; } export declare function setDiscoveredCapabilities(provider: string, modelId: string, caps: AnthropicModelCapabilities): void; export declare function getDiscoveredCapabilities(provider: string, modelId: string): AnthropicModelCapabilities | undefined; /** Clear the discovery cache. Test-only. */ export declare function _clearDiscoveredCapabilitiesForTests(): void; /** * Resolve capabilities for a Claude model. * * When `provider` is supplied, the runtime cache populated by discovery is * consulted first. Falls back to the static table otherwise. * * Backward-compatible signature: callers that do not have a provider id * (e.g. registry-load time, before any auth has happened) can omit it and * get the static fallback. */ export declare function getAnthropicCapabilities(modelId: string, provider?: string): AnthropicModelCapabilities; export declare function supportsAdaptiveThinking(modelId: string, provider?: string): boolean; export declare const CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07"; //# sourceMappingURL=anthropic-capabilities.d.ts.map