Thick provider for OmniLLM using the official anthropic-sdk-go SDK.
go get github.com/plexusone/omnillm-anthropicimport (
omnillm "github.com/plexusone/omnillm-core"
_ "github.com/plexusone/omnillm-anthropic" // Auto-registers thick provider
)
client, _ := omnillm.NewClient(omnillm.ClientConfig{
Provider: omnillm.ProviderNameAnthropic,
APIKey: os.Getenv("ANTHROPIC_API_KEY"),
})| Feature | Supported |
|---|---|
| Chat Completion | Yes |
| Streaming | Yes |
| Tool Calling | Yes |
| System Messages | Yes |
| Extended Thinking | Yes |
| JSON Mode | No |
Anthropic Claude models support extended thinking for complex reasoning tasks:
import omnillm "github.com/plexusone/omnillm-core"
// Using Anthropic-style Thinking config (native)
budget := int64(8192)
response, err := client.CreateChatCompletion(ctx, &omnillm.ChatCompletionRequest{
Model: "claude-sonnet-4-20250514",
Thinking: &omnillm.ThinkingConfig{
Type: omnillm.ThinkingTypeEnabled,
BudgetTokens: &budget,
},
Messages: messages,
})
// Or use ReasoningEffort for cross-provider compatibility
effort := omnillm.ReasoningEffortHigh
response, err := client.CreateChatCompletion(ctx, &omnillm.ChatCompletionRequest{
Model: "claude-sonnet-4-20250514",
ReasoningEffort: &effort,
Messages: messages,
})| Value | Description |
|---|---|
omnillm.ThinkingTypeEnabled |
Enable thinking with explicit budget |
omnillm.ThinkingTypeDisabled |
Disable thinking |
omnillm.ThinkingTypeAdaptive |
Let the model decide |
| ReasoningEffort | Anthropic Behavior |
|---|---|
"none" |
Thinking disabled |
"low", "medium" |
Adaptive thinking |
"high" |
Enabled with budget from MaxTokens |
See Reasoning Feature Guide for details.
| Field | Required | Description |
|---|---|---|
APIKey |
Yes | Anthropic API key |
BaseURL |
No | Custom endpoint |
See OmniLLM Core for full API documentation.
MIT