/**
 * `api + anthropic` strategy: direct provider HTTP API call via the
 * official Anthropic SDK using the user's API key.
 *
 * Model neutrality (per `feedback_stop_haiku_drift`): NO vendor model
 * identifier appears in this file. `cfg.model` is the user-supplied id
 * passed through to the SDK; opensquid treats it as opaque. If the user
 * leaves `cfg.model` unset, we throw — the source code never picks a
 * default vendor model.
 *
 * Auth: API key resolved via `SecretResolver` (env / .env / op /
 * keychain — pluggable, see `src/secrets/`). The strategy reads
 * `env:ANTHROPIC_API_KEY` by default; the URI is a stable contract with
 * users — DO NOT bake the env var name into a vendor-coupled module.
 *
 * Rate-limit retry: exponential backoff (1s, 2s, 4s) on HTTP 429, max 3
 * retries, then propagate the underlying error. The Anthropic SDK throws
 * structured `APIError` instances with a `.status` field; we read that
 * to decide whether to retry. Other error classes fall through to the
 * caller untouched.
 *
 * Lazy load: `@anthropic-ai/sdk` is an OPTIONAL peer dep. Same rationale
 * as subscription_sdk.ts — startup pays nothing when the package isn't
 * installed; first `.call()` throws a useful pointer if it's missing.
 *
 * Test seam (`opts.sdkModule`): injects a stub Anthropic constructor so
 * tests can simulate happy path + 429 retry + missing-key without hitting
 * the network.
 *
 * Imports from: ../types.js, ../../secrets/types.js.
 * Imported by: models/dispatcher.ts.
 */
import type { SecretResolver } from '../../secrets/types.js';
import type { ModelAliasConfig, ModelStrategy } from '../types.js';
export interface AnthropicTextBlock {
    type: 'text';
    text: string;
}
export interface AnthropicMessageBlock {
    type: string;
    text?: string;
}
export interface AnthropicMessageResponse {
    content: AnthropicMessageBlock[];
}
export interface AnthropicClient {
    messages: {
        create: (req: {
            model: string;
            max_tokens: number;
            messages: {
                role: 'user';
                content: string;
            }[];
        }) => Promise<AnthropicMessageResponse>;
    };
}
export interface AnthropicSdkModule {
    default: new (opts: {
        apiKey: string;
    }) => AnthropicClient;
}
export interface ApiAnthropicOptions {
    /** Test seam: inject a stub Anthropic constructor module. */
    sdkModule?: AnthropicSdkModule;
}
export declare function apiAnthropicStrategy(cfg: ModelAliasConfig, secrets: SecretResolver, opts?: ApiAnthropicOptions): ModelStrategy;
//# sourceMappingURL=api_anthropic.d.ts.map