Skip to main content
The Anthropic provider gives you access to Claude models, known for their strong reasoning capabilities and safety features.

Reasoning

Claude reasoning support in ai-query is intentionally provider-level, not model-version-gated. Examples:
Notes:
  • normalized effort maps to Anthropic’s output_config.effort
  • normalized budget maps to thinking.budget_tokens
  • if a specific Claude model rejects a combination, Anthropic returns the validation error directly
  • thinking visibility controls like summarized vs omitted remain provider-specific and should still be configured through provider_options["anthropic"]
For ai-query’s streaming thinking output model, see Thinking.

Setup

Set your API key as an environment variable:

Usage

Available Models

Provider Options

Customize Anthropic-specific parameters:

Supported Options

Tool Calling

Claude models support powerful tool calling:

Streaming

System Prompts

Claude responds well to detailed system prompts: