import type { OpenAIMessage } from './langchain-adapter'; import type { ChatCompletionTool, ChatCompletionToolChoice } from './provider'; import type { ChatAnthropic } from '@langchain/anthropic'; import type { BaseMessage } from '@langchain/core/messages'; export default class AnthropicAdapter { static convertMessages(messages: OpenAIMessage[]): BaseMessage[]; /** Cast `as string` works around LangChain's AnthropicToolChoice missing `disable_parallel_tool_use`. */ static bindTools(model: ChatAnthropic, tools: ChatCompletionTool[], { toolChoice, parallelToolCalls, }: { toolChoice?: ChatCompletionToolChoice; parallelToolCalls?: boolean; }): ChatAnthropic; /** * Convert OpenAI tool_choice to Anthropic format, applying parallel tool restriction. * * Converts to LangChain format first, then applies `disable_parallel_tool_use` * when `parallelToolCalls` is explicitly `false` (not just falsy — `undefined` means * no restriction). */ private static convertToolChoice; /** * Merge all system messages into a single one placed first. * * Anthropic only allows a single system message at the beginning of the conversation. */ private static mergeSystemMessages; } //# sourceMappingURL=anthropic-adapter.d.ts.map