
import { CopilotRuntimeChatCompletionRequest, CopilotRuntimeChatCompletionResponse, CopilotServiceAdapter } from "../service-adapter.cjs";
import { LanguageModel } from "ai";
import Anthropic from "@anthropic-ai/sdk";

//#region src/service-adapters/anthropic/anthropic-adapter.d.ts
interface AnthropicPromptCachingConfig {
  /**
   * Whether to enable prompt caching.
   */
  enabled: boolean;
  /**
   * Whether to enable debug logging for cache operations.
   */
  debug?: boolean;
}
interface AnthropicAdapterParams {
  /**
   * An optional Anthropic instance to use.  If not provided, a new instance will be
   * created.
   */
  anthropic?: Anthropic;
  /**
   * The model to use.
   */
  model?: string;
  /**
   * Configuration for prompt caching.
   * See: https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
   */
  promptCaching?: AnthropicPromptCachingConfig;
  /**
   * Optional maximum input token limit. Overrides the default limit
   * used when trimming messages to fit the context window.
   */
  maxInputTokens?: number;
}
declare class AnthropicAdapter implements CopilotServiceAdapter {
  model: string;
  provider: string;
  private promptCaching;
  private maxInputTokens?;
  private _anthropic;
  get anthropic(): Anthropic;
  get name(): string;
  constructor(params?: AnthropicAdapterParams);
  getLanguageModel(): LanguageModel;
  private ensureAnthropic;
  /**
   * Adds cache control to system prompt
   */
  private addSystemPromptCaching;
  /**
   * Adds cache control to the final message
   */
  private addIncrementalMessageCaching;
  private shouldGenerateFallbackResponse;
  process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
}
//#endregion
export { AnthropicAdapter, AnthropicAdapterParams, AnthropicPromptCachingConfig };
//# sourceMappingURL=anthropic-adapter.d.cts.map