import type { Brain } from "../core/types.js";
import { type StreamEngineConfig } from "./stream-engine.js";
export interface AnthropicBrainConfig extends StreamEngineConfig {
    /** Base URL of the Anthropic(-compatible) API. Default {@link ANTHROPIC_DEFAULT_BASE_URL}. Overridden by model.baseUrl. */
    baseUrl?: string;
    /** API key (`x-api-key`). Overridden by per-call options.apiKey / getApiKeyAndHeaders. */
    apiKey?: string;
    /** `anthropic-version` header. Default `2023-06-01`. */
    version?: string;
    /** Extra headers merged into every request (e.g. `anthropic-beta`). */
    headers?: Record<string, string>;
    /** Custom fetch (tests / proxies); absent ⇒ the engine's default transport — see `resolveFetch`. */
    fetchImpl?: typeof fetch;
    /** `max_tokens` when the call/model doesn't specify one (Anthropic requires it). Default 4096. */
    defaultMaxTokens?: number;
    /**
     * Insert `cache_control: {type:"ephemeral"}` prompt-cache breakpoints on the last system block and
     * the last tool, so the (stable) system + tools prefix is cached across requests. Default true.
     */
    cacheBreakpoints?: boolean;
    /**
     * Detect **degenerate repetition** (the model looping on the same char/phrase forever) mid-stream
     * and cut it off — the turn ends `error` ("degenerate repetition"). Default true.
     */
    detectRepetition?: boolean;
    /**
     * Extended-thinking budget as a fraction of `max_tokens` when reasoning is on. Default 0.5.
     * The budget is always clamped to `[1024, max_tokens - 1]` (Anthropic requires it strictly below
     * `max_tokens`, ≥ 1024). Lower it to leave more room for the answer with verbose reasoning models.
     */
    thinkingBudgetShare?: number;
    /**
     * Fixed extended-thinking budget in tokens (overrides `thinkingBudgetShare`). Still clamped to
     * `[1024, max_tokens - 1]`. Use when you want a constant reasoning budget regardless of max_tokens.
     */
    thinkingBudgetTokens?: number;
}
/** This lane's own default endpoint: where a request goes when neither the entry nor the config names a root,
 *  and so the root a key on the config is paired with when the config declares none. Exported so that every place that
 *  names the Anthropic API's own root — the {@link fable5Model} preset, a host's disclosure of where a default request
 *  lands — reads this one spelling. */
export declare const ANTHROPIC_DEFAULT_BASE_URL = "https://api.anthropic.com";
/**
 * Create a Brain for the Anthropic Messages API (`/v1/messages`) with **prompt caching** and
 * **extended-thinking replay**. Translates the unified Context into an Anthropic request and the
 * streamed response back into the unified AssistantMessageEvent protocol. The connect/retry/timeout/
 * read-loop machinery lives in the shared {@link runStreamingBrain} engine (design/32); this adapter
 * owns the Anthropic request shaping + typed content-block SSE parsing + finalization.
 */
export declare function createAnthropicBrain(given?: AnthropicBrainConfig): Brain;
