/** Auth configuration for Anthropic */ export interface AnthropicAuthConfig { apiKey: string; baseUrl: string; isOAuth: boolean; } /** * Resolve the Anthropic base URL from the environment. * * Trusted sources only: the result becomes the request URL that carries the * Anthropic API key / OAuth token, so whatever can set it can redirect * authenticated traffic. `$env` merges the caller's `cwd/.env`, so reading it * there would let repository content choose where credentials are sent. */ 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; /** * 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`. * * `isOAuth` is derived from the token prefix so the helper stays pure: callers * never have to thread the OAuth flag through their own resolution logic. */ export declare function buildAnthropicAuthConfig(apiKey: string, baseUrl?: string): AnthropicAuthConfig; /** * Builds HTTP headers for Anthropic API requests (search variant). */ export declare function buildAnthropicSearchHeaders(auth: AnthropicAuthConfig): Record; /** * Builds the full API URL for Anthropic messages endpoint. */ export declare function buildAnthropicUrl(auth: AnthropicAuthConfig): string;