Capabilities
STT
Not supported
LLM
Full Claude model family via the Messages API
TTS
Not supported
Realtime
Not supported
"groq" or "openai") and TTS provider (e.g. "elevenlabs" or "openai") to build a complete voice pipeline.
API Key
SetANTHROPIC_API_KEY as an environment variable or pass it inline under api_keys in config.json.
Get your key at console.anthropic.com.
Quick Config
- config.json
- Environment variable
Available Models
| Model | Speed | Cost | Best For |
|---|---|---|---|
claude-haiku-4-5-20251001 | Fastest | Lowest | High-throughput voice agents, short-answer tasks, latency-sensitive workflows |
claude-sonnet-4-6 | Balanced | Medium | General-purpose voice agents, customer support, nuanced reasoning |
claude-opus-4-6 | Slowest | Highest | Complex multi-step reasoning, analysis tasks where accuracy outweighs latency |
model is empty is claude-3-sonnet-20240229 (defined as DefaultLLMModel in pkg/services/anthropic/llm.go).
API Details
| Property | Value |
|---|---|
| Endpoint | https://api.anthropic.com/v1/messages |
| Version header | anthropic-version: 2023-06-01 |
| Auth header | x-api-key: <your-key> |
| Timeout | 60 seconds per request |
| Max tokens | 1024 per response (hardcoded default) |
| Transport | Shared http.Transport with 10 idle connections per host, 90 s idle timeout |
Configuration Reference
| Key | Type | Description |
|---|---|---|
llm_provider | string | Set to "anthropic" |
model | string | Claude model ID (e.g. "claude-haiku-4-5-20251001"); defaults to "claude-3-sonnet-20240229" |
api_keys.anthropic | string | Anthropic API key (falls back to ANTHROPIC_API_KEY) |
stt_provider | string | Required — Anthropic does not provide STT; use "groq", "openai", etc. |
tts_provider | string | Required — Anthropic does not provide TTS; use "elevenlabs", "openai", etc. |
Latency Consideration
Tool Calling
The Anthropic provider does not implementLLMServiceWithTools. MCP tool integration is not available with this provider. To use MCP tools, switch llm_provider to "openai" (the other provider that implements the tools interface).
Notes and Limitations
- System messages in the conversation are concatenated and sent as the top-level
systemfield in the Anthropic request; they are not included in themessagesarray. - Messages with empty
contentare silently dropped before the request is sent. - The
max_tokenslimit is hardcoded to 1024. Very long model outputs will be truncated. If your use case requires longer responses, this requires a code-level change inpkg/services/anthropic/llm.go. - Only
"user"and"assistant"roles are forwarded to Anthropic. Any message with a role other than"system"or"assistant"is treated as a user message.