Release Notes: v0.18.0¶
Release Date: 2026-07-05
Highlights¶
- Reasoning & Extended Thinking: Unified
ReasoningEffortandThinkingConfigfields for controlling model reasoning depth across all providers
New Features¶
Reasoning Effort¶
Control how deeply models reason about problems using the unified ReasoningEffort field:
import omnillm "github.com/plexusone/omnillm-core"
effort := omnillm.ReasoningEffortHigh
response, err := client.CreateChatCompletion(ctx, &omnillm.ChatCompletionRequest{
Model: "o1-preview", // or any reasoning-capable model
ReasoningEffort: &effort,
Messages: messages,
})
Supported Values¶
| Constant | Value | Use Case |
|---|---|---|
ReasoningEffortNone |
"none" |
Disable reasoning, fastest responses |
ReasoningEffortLow |
"low" |
Light reasoning, quick analysis |
ReasoningEffortMedium |
"medium" |
Balanced reasoning (default for most tasks) |
ReasoningEffortHigh |
"high" |
Deep reasoning for complex problems |
Extended Thinking (Anthropic)¶
For fine-grained control over Anthropic's extended thinking feature:
budget := int64(10000)
response, err := client.CreateChatCompletion(ctx, &omnillm.ChatCompletionRequest{
Model: "claude-sonnet-4-6",
Thinking: &omnillm.ThinkingConfig{
Type: omnillm.ThinkingTypeEnabled,
BudgetTokens: &budget, // Max tokens for thinking
},
Messages: messages,
})
Thinking Types¶
| Constant | Behavior |
|---|---|
ThinkingTypeEnabled |
Always use extended thinking with specified budget |
ThinkingTypeDisabled |
Never use extended thinking |
ThinkingTypeAdaptive |
Let the model decide when thinking helps |
Provider Support Matrix¶
| Provider | ReasoningEffort | ThinkingConfig | Notes |
|---|---|---|---|
| OpenAI | Yes | - | Maps directly to reasoning_effort parameter |
| Anthropic | Yes | Yes | Maps to extended thinking; ThinkingConfig preferred |
| X.AI (Grok) | Yes | - | Native reasoning_effort support |
| GLM (Zhipu) | Yes | - | Native reasoning_effort support |
| Kimi (Moonshot) | Yes | - | Native reasoning_effort support |
| Qwen (Alibaba) | Yes | - | Native reasoning_effort support |
| Ollama | Yes | - | Passed through for compatible models |
Cross-Provider Mapping¶
When using ReasoningEffort with Anthropic (which natively uses ThinkingConfig), the values are automatically mapped:
| ReasoningEffort | Anthropic Thinking |
|---|---|
none |
Disabled |
low |
Adaptive |
medium |
Adaptive |
high |
Enabled (8192 token budget) |
Usage Examples¶
Basic Reasoning Control¶
// High reasoning for complex math
effort := omnillm.ReasoningEffortHigh
resp, _ := client.CreateChatCompletion(ctx, &omnillm.ChatCompletionRequest{
Model: "o1-preview",
ReasoningEffort: &effort,
Messages: []omnillm.Message{
{Role: omnillm.RoleUser, Content: "Prove that sqrt(2) is irrational"},
},
})
Anthropic Extended Thinking¶
// Explicit thinking budget
budget := int64(16000)
resp, _ := client.CreateChatCompletion(ctx, &omnillm.ChatCompletionRequest{
Model: "claude-sonnet-4-6",
Thinking: &omnillm.ThinkingConfig{
Type: omnillm.ThinkingTypeEnabled,
BudgetTokens: &budget,
},
Messages: messages,
})
Adaptive Thinking¶
// Let the model decide
resp, _ := client.CreateChatCompletion(ctx, &omnillm.ChatCompletionRequest{
Model: "claude-sonnet-4-6",
Thinking: &omnillm.ThinkingConfig{
Type: omnillm.ThinkingTypeAdaptive,
},
Messages: messages,
})
Installation¶
Documentation¶
Upgrade Notes¶
This is a backwards-compatible release. No breaking changes. The new ReasoningEffort and Thinking fields are optional and do not affect existing code.