import { BaseProvider, type ProviderInfo } from './base.js'; import type { ProviderCallContext } from '../types/lifecycle.js'; import type { CompletionRequest } from '../types/messages.js'; import type { NexusResponse, NexusStream } from '../types/response.js'; import type { AnthropicProviderConfig } from '../types/config.js'; /** Anthropic's Messages API. */ export declare class AnthropicProvider extends BaseProvider { /** Always `anthropic`, hosted. */ readonly info: ProviderInfo; private client?; private config; constructor(config: AnthropicProviderConfig); private getClient; private formatMessages; /** A message's parts as blocks. A tool reference is a block only where the model takes them. */ private formatBlocks; /** * The tools on the wire. With tool references, every tool is sent and a deferred one is marked * `defer_loading`, so it stays out of the model's context until a reference names it and the * tool list, the front of the cached prefix, never changes. */ private formatToolsAnthropic; /** Runs one completion. */ complete(request: CompletionRequest, context?: ProviderCallContext): Promise; /** Streams one completion. */ stream(request: CompletionRequest, context?: ProviderCallContext): NexusStream; private createParams; private textFromContent; private requestOptions; private withProviderModel; private stripConfiguredPrefix; }