diff --git a/libs/langchain-anthropic/src/chat_models.ts b/libs/langchain-anthropic/src/chat_models.ts index 5edc0497bced..1e8853ff5b8a 100644 --- a/libs/langchain-anthropic/src/chat_models.ts +++ b/libs/langchain-anthropic/src/chat_models.ts @@ -949,9 +949,6 @@ export class ChatAnthropicMessages< ): Promise { if (!this.batchClient) { const options = this.apiUrl ? { baseURL: this.apiUrl } : undefined; - if (!this.apiKey && !this.createClient) { - throw new Error("Missing Anthropic API key."); - } this.batchClient = this.createClient({ ...this.clientOptions, ...options,