/** Auth configuration for Anthropic */ export interface AnthropicAuthConfig { apiKey: string; baseUrl: string; isOAuth: boolean; } export declare function resolveAnthropicBaseUrlFromEnv(): string | undefined; /** * Checks if a token is an OAuth token by looking for sk-ant-oat prefix. */ export declare function isOAuthToken(apiKey: string): boolean; /** Optional request-shaping overrides for an already-resolved Anthropic credential. */ export interface AnthropicAuthOptions { /** Override token detection; false explicitly disables OAuth-style request shaping. */ isOAuth?: boolean; } /** * Build an {@link AnthropicAuthConfig} from an already-resolved API key. * * `apiKey` is whatever the caller chose for `Authorization`/`x-api-key` — * usually `authStorage.getApiKey("anthropic")`. `baseUrl` overrides the * env-derived base; pass `undefined` to fall back to FOUNDRY/ANTHROPIC env * resolution and finally `DEFAULT_BASE_URL`. * * `options.isOAuth` defaults to token detection. Pass the selected model's * `isOAuth` to match the streaming path, which lets the model override the * prefix (custom `anthropic-messages` providers default to OAuth shaping). */ export declare function buildAnthropicAuthConfig(apiKey: string, baseUrl?: string, options?: AnthropicAuthOptions): AnthropicAuthConfig; /** Configured headers and fingerprint override policy for Anthropic hosted web search. */ export interface AnthropicSearchHeaderOptions { /** The selected model's configured headers (`ModelRegistry.resolveModelHeaders`). */ modelHeaders?: Record; /** The selected model's `compat.allowAnthropicHeaderOverrides`. */ allowAnthropicHeaderOverrides?: boolean; } /** * Builds HTTP headers for Anthropic API requests (search variant). * * Model headers and `ANTHROPIC_CUSTOM_HEADERS` (when the resolver deems them * applicable: Foundry mode, or a non-Anthropic base URL such as an enterprise * gateway) go through the same case-insensitive merge and enforced-header * filtering as the streaming path, so web search behaves identically. */ export declare function buildAnthropicSearchHeaders(auth: AnthropicAuthConfig, options?: AnthropicSearchHeaderOptions): Record; /** * Builds the full API URL for Anthropic messages endpoint. */ export declare function buildAnthropicUrl(auth: AnthropicAuthConfig): string;