Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

Add Claude Sonnet 4 as default, replacing 3.7, introduce strong-opus model pack, rename opus-4-planner, and fix streaming/retry issues

Dane Schneider3b4e911e1da4
diff --git a/app/cli/cmd/set_model.go b/app/cli/cmd/set_model.go
index c222e45c..2a40769a 100644
--- a/app/cli/cmd/set_model.go
+++ b/app/cli/cmd/set_model.go
@@ -142,6 +142,9 @@ func updateModelSettings(args []string, originalSettings *shared.PlanSettings) *
if compare == "daily" {
compare = "daily-driver"
}
+ if compare == "opus-4-planner" {
+ compare = "opus-planner"
+ }
for _, ms := range shared.BuiltInModelPacks {
if strings.EqualFold(ms.Name, compare) {
modelPack = ms
diff --git a/app/cli/plan_exec/tell.go b/app/cli/plan_exec/tell.go
index e7a82a28..fa4e0bb4 100644
--- a/app/cli/plan_exec/tell.go
+++ b/app/cli/plan_exec/tell.go
@@ -12,6 +12,7 @@ import (
"plandex-cli/term"
"plandex-cli/types"
"plandex-cli/ui"
+ "time"
shared "plandex-shared"
@@ -237,6 +238,8 @@ func TellPlan(
// do nothing, allow auto apply to run
} else {
term.StartSpinner("")
+ // sleep a little to prevent lock contention on server
+ time.Sleep(500 * time.Millisecond)
diffs, apiErr := getDiffs(params)
term.StopSpinner()
if apiErr != nil {
diff --git a/app/server/model/client.go b/app/server/model/client.go
index a3c80bff..2f57c563 100644
--- a/app/server/model/client.go
+++ b/app/server/model/client.go
@@ -28,7 +28,7 @@ const (
ACTIVE_STREAM_CHUNK_TIMEOUT = time.Duration(60) * time.Second
USAGE_CHUNK_TIMEOUT = time.Duration(10) * time.Second
MAX_ADDITIONAL_RETRIES_WITH_FALLBACK = 1
- MAX_RETRIES_WITHOUT_FALLBACK = 2
+ MAX_RETRIES_WITHOUT_FALLBACK = 3
MAX_RETRY_DELAY_SECONDS = 10
)
@@ -122,8 +122,20 @@ func CreateChatCompletionStream(
req.Model += ":nitro"
}
- if modelConfig.BaseModelConfig.IncludeReasoning {
- req.IncludeReasoning = true
+ if modelConfig.BaseModelConfig.ReasoningBudgetEnabled {
+ req.ReasoningConfig = &types.ReasoningConfig{
+ MaxTokens: modelConfig.BaseModelConfig.ReasoningBudget,
+ Exclude: !modelConfig.BaseModelConfig.IncludeReasoning,
+ }
+ } else if modelConfig.BaseModelConfig.ReasoningEffortEnabled {
+ req.ReasoningConfig = &types.ReasoningConfig{
+ Effort: shared.ReasoningEffort(modelConfig.BaseModelConfig.ReasoningEffort),
+ Exclude: !modelConfig.BaseModelConfig.IncludeReasoning,
+ }
+ } else if modelConfig.BaseModelConfig.IncludeReasoning {
+ req.ReasoningConfig = &types.ReasoningConfig{
+ Exclude: false,
+ }
}
return withStreamingRetries(ctx, func(numTotalRetry int, modelErr *shared.ModelError, stripCacheControl bool) (*ExtendedChatCompletionStream, shared.FallbackResult, error) {
diff --git a/app/server/model/model_error.go b/app/server/model/model_error.go
index bcc33de9..770f5526 100644
--- a/app/server/model/model_error.go
+++ b/app/server/model/model_error.go
@@ -82,6 +82,16 @@ func ClassifyErrMsg(msg string) *shared.ModelError {
}
}
+ // openrouter specific error — can be 'non-retriable status code' but really it should still be retried since OpenRouter may switch to a different provider
+ if strings.Contains(msg, "provider returned error") {
+ log.Printf("Provider returned error: %s", msg)
+ return &shared.ModelError{
+ Kind: shared.ErrOther,
+ Retriable: true,
+ RetryAfterSeconds: 0,
+ }
+ }
+
log.Println("No error classification based on message")
return nil
diff --git a/app/server/model/plan/tell_stream_main.go b/app/server/model/plan/tell_stream_main.go
index 9b9c344d..6621645a 100644
--- a/app/server/model/plan/tell_stream_main.go
+++ b/app/server/model/plan/tell_stream_main.go
@@ -1,6 +1,7 @@
package plan
import (
+ "errors"
"fmt"
"log"
"net/http"
@@ -128,7 +129,7 @@ mainLoop:
msg = fmt.Sprintf("The AI model (%s/%s) stopped responding: %v", modelProvider, modelName, err)
}
state.onError(onErrorParams{
- streamErr: fmt.Errorf(msg, err),
+ streamErr: errors.New(msg),
storeDesc: true,
canRetry: active.CurrentReplyContent == "", // if there was no output yet, we can retry
})
diff --git a/app/server/types/message.go b/app/server/types/message.go
index 36afd9b5..0e75523b 100644
--- a/app/server/types/message.go
+++ b/app/server/types/message.go
@@ -61,9 +61,19 @@ type OpenAIPrediction struct {
Content string `json:"content"`
}
+type ReasoningConfig struct {
+ Effort shared.ReasoningEffort `json:"effort,omitempty"` // "high" | "medium" | "low"
+ MaxTokens int `json:"max_tokens,omitempty"` // Anthropic-style budget
+ Exclude bool `json:"exclude,omitempty"` // don’t echo reasoning in the response
+}
+
type OpenRouterProviderConfig struct {
- Order []string `json:"order"`
- AllowFallbacks bool `json:"allow_fallbacks"`
+ Order []string `json:"order"`
+ AllowFallbacks bool `json:"allow_fallbacks"`
+ RequireParamters bool `json:"require_paramters"`
+ DataCollection bool `json:"data_collection"`
+ Only []string `json:"only"`
+ Ignore []string `json:"ignore"`
}
type ExtendedChatCompletionRequest struct {
@@ -117,10 +127,14 @@ type ExtendedChatCompletionRequest struct {
// Metadata to store with the completion.
Metadata map[string]string `json:"metadata,omitempty"`
- Prediction *OpenAIPrediction `json:"prediction,omitempty"`
- Provider *OpenRouterProviderConfig `json:"provider,omitempty"`
- ReasoningEffort *shared.ReasoningEffort `json:"reasoning_effort,omitempty"`
- IncludeReasoning bool `json:"include_reasoning,omitempty"`
+ Prediction *OpenAIPrediction `json:"prediction,omitempty"`
+ Provider *OpenRouterProviderConfig `json:"provider,omitempty"`
+
+ // Openrouter/LiteLLM reasoning
+ ReasoningConfig *ReasoningConfig `json:"reasoning,omitempty"`
+
+ // Openrouter ignore providers
+
}
// for properties that OpenAI direct api calls support but aren't included in https://github.com/sashabaranov/go-openai
@@ -137,6 +151,11 @@ func (req *ExtendedChatCompletionRequest) ToOpenAI() *ExtendedOpenAIChatCompleti
openaiMessages[i] = *msg.ToOpenAI()
}
+ var reasoningEffort *shared.ReasoningEffort
+ if req.ReasoningConfig != nil && req.ReasoningConfig.Effort != "" {
+ reasoningEffort = &req.ReasoningConfig.Effort
+ }
+
return &ExtendedOpenAIChatCompletionRequest{
ChatCompletionRequest: openai.ChatCompletionRequest{
Model: string(req.Model),
@@ -166,7 +185,7 @@ func (req *ExtendedChatCompletionRequest) ToOpenAI() *ExtendedOpenAIChatCompleti
Metadata: req.Metadata,
},
Prediction: req.Prediction,
- ReasoningEffort: req.ReasoningEffort,
+ ReasoningEffort: reasoningEffort,
}
}
diff --git a/app/shared/ai_models_available.go b/app/shared/ai_models_available.go
index f584c745..ab29ca2d 100644
--- a/app/shared/ai_models_available.go
+++ b/app/shared/ai_models_available.go
@@ -253,6 +253,47 @@ var AvailableModels = []*AvailableModel{
ModelId: "anthropic/claude-opus-4",
MaxTokens: 200000,
MaxOutputTokens: 128000,
+ ReservedOutputTokens: 40000,
+ SupportsCacheControl: true,
+ ApiKeyEnvVar: ApiKeyByProvider[ModelProviderOpenRouter],
+ ModelCompatibility: fullCompatibility,
+ BaseUrl: BaseUrlByProvider[ModelProviderOpenRouter],
+ PreferredModelOutputFormat: ModelOutputFormatXml,
+ SingleMessageNoSystemPrompt: true,
+ TokenEstimatePaddingPct: 0.10,
+ },
+ },
+ {
+ Description: "Anthropic Claude 4 Sonnet (thinking—includes reasoning) via OpenRouter",
+ DefaultMaxConvoTokens: 15000,
+ BaseModelConfig: BaseModelConfig{
+ Provider: ModelProviderOpenRouter,
+ ModelName: "anthropic/claude-sonnet-4",
+ ModelId: "anthropic/claude-sonnet-4:thinking",
+ MaxTokens: 200000,
+ MaxOutputTokens: 128000,
+ ReservedOutputTokens: 40000,
+ SupportsCacheControl: true,
+ ApiKeyEnvVar: ApiKeyByProvider[ModelProviderOpenRouter],
+ ModelCompatibility: fullCompatibility,
+ BaseUrl: BaseUrlByProvider[ModelProviderOpenRouter],
+ PreferredModelOutputFormat: ModelOutputFormatXml,
+ SingleMessageNoSystemPrompt: true,
+ TokenEstimatePaddingPct: 0.10,
+ ReasoningBudgetEnabled: true,
+ ReasoningBudget: AnthropicMaxReasoningBudget,
+ IncludeReasoning: true,
+ },
+ },
+ {
+ Description: "Anthropic Claude 4 Sonnet (thinking-reasoning hidden) via OpenRouter",
+ DefaultMaxConvoTokens: 15000,
+ BaseModelConfig: BaseModelConfig{
+ Provider: ModelProviderOpenRouter,
+ ModelName: "anthropic/claude-sonnet-4",
+ ModelId: "anthropic/claude-sonnet-4:thinking-hidden",
+ MaxTokens: 200000,
+ MaxOutputTokens: 128000,
ReservedOutputTokens: 20000,
SupportsCacheControl: true,
ApiKeyEnvVar: ApiKeyByProvider[ModelProviderOpenRouter],
@@ -261,6 +302,9 @@ var AvailableModels = []*AvailableModel{
PreferredModelOutputFormat: ModelOutputFormatXml,
SingleMessageNoSystemPrompt: true,
TokenEstimatePaddingPct: 0.10,
+ ReasoningBudgetEnabled: true,
+ ReasoningBudget: AnthropicMaxReasoningBudget,
+ IncludeReasoning: false,
},
},
{
@@ -431,7 +475,7 @@ var AvailableModels = []*AvailableModel{
},
{
- Description: "Google Gemini Flash 2.5 Preview (thinking) via OpenRouter",
+ Description: "Google Gemini Flash 2.5 Preview (thinking-includes reasoning) via OpenRouter",
DefaultMaxConvoTokens: 75000,
BaseModelConfig: BaseModelConfig{
Provider: ModelProviderOpenRouter,
@@ -445,6 +489,30 @@ var AvailableModels = []*AvailableModel{
BaseUrl: BaseUrlByProvider[ModelProviderOpenRouter],
PreferredModelOutputFormat: ModelOutputFormatXml,
SupportsCacheControl: true,
+ ReasoningBudgetEnabled: true,
+ ReasoningBudget: GoogleMaxReasoningBudget,
+ IncludeReasoning: true,
+ },
+ },
+
+ {
+ Description: "Google Gemini Flash 2.5 Preview (thinking-reasoning hidden) via OpenRouter",
+ DefaultMaxConvoTokens: 75000,
+ BaseModelConfig: BaseModelConfig{
+ Provider: ModelProviderOpenRouter,
+ ModelName: "google/gemini-2.5-flash-preview-05-20:thinking",
+ ModelId: "google/gemini-2.5-flash-preview-05-20:thinking-hidden",
+ MaxTokens: 1048576,
+ MaxOutputTokens: 65535,
+ ReservedOutputTokens: 65535,
+ ApiKeyEnvVar: ApiKeyByProvider[ModelProviderOpenRouter],
+ ModelCompatibility: fullCompatibility,
+ BaseUrl: BaseUrlByProvider[ModelProviderOpenRouter],
+ PreferredModelOutputFormat: ModelOutputFormatXml,
+ SupportsCacheControl: true,
+ ReasoningBudgetEnabled: true,
+ ReasoningBudget: GoogleMaxReasoningBudget,
+ IncludeReasoning: false,
},
},
diff --git a/app/shared/ai_models_data_models.go b/app/shared/ai_models_data_models.go
index 08791f47..a95a3d15 100644
--- a/app/shared/ai_models_data_models.go
+++ b/app/shared/ai_models_data_models.go
@@ -18,6 +18,9 @@ const (
ModelOutputFormatXml ModelOutputFormat = "xml"
)
+const AnthropicMaxReasoningBudget = 32000
+const GoogleMaxReasoningBudget = 32000
+
// to help avoid confusion between the model name and the model id
type ModelName string
type ModelId string
@@ -40,7 +43,11 @@ type BaseModelConfig struct {
ReasoningEffortEnabled bool `json:"reasoningEffortEnabled"`
ReasoningEffort ReasoningEffort `json:"reasoningEffort"`
IncludeReasoning bool `json:"includeReasoning"`
- SupportsCacheControl bool `json:"supportsCacheControl"`
+
+ ReasoningBudgetEnabled bool `json:"reasoningBudgetEnabled"`
+ ReasoningBudget int `json:"reasoningBudget"`
+
+ SupportsCacheControl bool `json:"supportsCacheControl"`
// for openai responses API, not fully implemented yet
UsesOpenAIResponsesAPI bool `json:"usesOpenAIResponsesAPI"`
diff --git a/app/shared/ai_models_packs.go b/app/shared/ai_models_packs.go
index a49ea27c..8709dcc5 100644
--- a/app/shared/ai_models_packs.go
+++ b/app/shared/ai_models_packs.go
@@ -3,12 +3,12 @@ package shared
var DailyDriverModelPack ModelPack
var ReasoningModelPack ModelPack
var StrongModelPack ModelPack
-
-var Sonnet4ModelPack ModelPack
-var Opus4PlannerModelPack ModelPack
-
var OSSModelPack ModelPack
var CheapModelPack ModelPack
+
+var OpusPlannerModelPack ModelPack
+var StrongModelOpus ModelPack
+
var AnthropicModelPack ModelPack
var OpenAIModelPack ModelPack
@@ -24,8 +24,8 @@ var BuiltInModelPacks = []*ModelPack{
&CheapModelPack,
&OSSModelPack,
- &Sonnet4ModelPack,
- &Opus4PlannerModelPack,
+ &OpusPlannerModelPack,
+ &StrongModelOpus,
&AnthropicModelPack,
&OpenAIModelPack,
@@ -44,7 +44,7 @@ func init() {
Name: "daily-driver",
Description: "A mix of models from Anthropic, OpenAI, and Google that balances speed, quality, and cost. Supports up to 2M context. Plandex prompts are especially tested and optimized for this pack.",
Planner: PlannerRoleConfig{
- ModelRoleConfig: *claude37Sonnet(ModelRolePlanner, &modelConfig{
+ ModelRoleConfig: *claudeSonnet4(ModelRolePlanner, &modelConfig{
largeContextFallback: geminipro25preview(ModelRolePlanner, &modelConfig{
largeContextFallback: gemini15pro(ModelRolePlanner, nil),
}),
@@ -69,62 +69,14 @@ func init() {
ExecStatus: *openaio4miniLow(ModelRoleExecStatus, nil),
}
- Sonnet4ModelPack = ModelPack{
- Name: "sonnet-4-daily",
- Description: "Same as daily driver, but uses newly released Claude Sonnet 4 in place of 3.7",
- Planner: PlannerRoleConfig{
- ModelRoleConfig: *claudeSonnet4(ModelRolePlanner, &modelConfig{
- largeContextFallback: geminipro25preview(ModelRolePlanner, &modelConfig{
- largeContextFallback: gemini15pro(ModelRolePlanner, nil),
- }),
- }),
- PlannerModelConfig: getPlannerModelConfig(ModelProviderOpenRouter, "anthropic/claude-sonnet-4"),
- },
- Coder: claudeSonnet4(ModelRoleCoder, &modelConfig{
- largeContextFallback: openaigpt41(ModelRoleCoder, nil),
- }),
- Architect: claudeSonnet4(ModelRoleArchitect, &modelConfig{
- largeContextFallback: geminipro25preview(ModelRolePlanner, &modelConfig{
- largeContextFallback: gemini15pro(ModelRolePlanner, nil),
- }),
- }),
- PlanSummary: *openaio4miniLow(ModelRolePlanSummary, nil),
- Builder: *openaio4miniMedium(ModelRoleBuilder, &modelConfig{
- strongModel: openaio4miniHigh(ModelRoleBuilder, nil),
- }),
- WholeFileBuilder: openaio4miniMedium(ModelRoleWholeFileBuilder, nil),
- Namer: *openaigpt41mini(ModelRoleName, nil),
- CommitMsg: *openaigpt41mini(ModelRoleCommitMsg, nil),
- ExecStatus: *openaio4miniLow(ModelRoleExecStatus, nil),
- }
-
- Opus4PlannerModelPack = ModelPack{
- Name: "opus-4-planner",
- Description: "Like daily driver, but uses newly released Claude Opus 4 for planning, and Sonnet 4 for coding. Supports up to 160k input context.",
- Planner: PlannerRoleConfig{
- ModelRoleConfig: *claudeOpus4(ModelRolePlanner, nil),
- PlannerModelConfig: getPlannerModelConfig(ModelProviderOpenRouter, "anthropic/claude-opus-4"),
- },
- Coder: claudeSonnet4(ModelRoleCoder, nil),
- Architect: claudeOpus4(ModelRoleArchitect, nil),
- PlanSummary: *openaio4miniLow(ModelRolePlanSummary, nil),
- Builder: *openaio4miniMedium(ModelRoleBuilder, &modelConfig{
- strongModel: openaio4miniHigh(ModelRoleBuilder, nil),
- }),
- WholeFileBuilder: openaio4miniMedium(ModelRoleWholeFileBuilder, nil),
- Namer: *openaigpt41mini(ModelRoleName, nil),
- CommitMsg: *openaigpt41mini(ModelRoleCommitMsg, nil),
- ExecStatus: *openaio4miniLow(ModelRoleExecStatus, nil),
- }
-
ReasoningModelPack = ModelPack{
Name: "reasoning",
- Description: "Like the daily driver, but uses 3.7-sonnet:thinking with reasoning enabled for planning and coding. Supports up to 160k input context.",
+ Description: "Like the daily driver, but uses sonnet-4 with reasoning enabled for planning and coding. Supports up to 160k input context.",
Planner: PlannerRoleConfig{
- ModelRoleConfig: *claude37SonnetThinkingHidden(ModelRolePlanner, nil),
- PlannerModelConfig: getPlannerModelConfig(ModelProviderOpenRouter, "anthropic/claude-3.7-sonnet:thinking-hidden"),
+ ModelRoleConfig: *claudeSonnet4ThinkingHidden(ModelRolePlanner, nil),
+ PlannerModelConfig: getPlannerModelConfig(ModelProviderOpenRouter, "anthropic/claude-sonnet-4:thinking-hidden"),
},
- Coder: claude37SonnetThinkingHidden(ModelRoleCoder, nil),
+ Coder: claudeSonnet4ThinkingHidden(ModelRoleCoder, nil),
PlanSummary: *openaio4miniLow(ModelRolePlanSummary, nil),
Builder: *openaio4miniMedium(ModelRoleBuilder, &modelConfig{
strongModel: openaio4miniHigh(ModelRoleBuilder, nil),
@@ -138,13 +90,30 @@ func init() {
StrongModelPack = ModelPack{
Name: "strong",
- Description: "For difficult tasks where slower responses and builds are ok. Uses o3-high for architecture and planning, claude-3.7-sonnet thinking for implementation, prioritizes reliability over speed for builds. Supports up to 160k input context.",
+ Description: "For difficult tasks where slower responses and builds are ok. Uses o3-high for architecture and planning, claude-sonnet-4 thinking for implementation, prioritizes reliability over speed for builds. Supports up to 160k input context.",
Planner: PlannerRoleConfig{
ModelRoleConfig: *openaio3high(ModelRolePlanner, nil),
PlannerModelConfig: getPlannerModelConfig(ModelProviderOpenAI, "openai/o3-high"),
},
Architect: openaio3high(ModelRoleArchitect, nil),
- Coder: claude37SonnetThinkingHidden(ModelRoleCoder, nil),
+ Coder: claudeSonnet4Thinking(ModelRoleCoder, nil),
+ PlanSummary: *openaio4miniLow(ModelRolePlanSummary, nil),
+ Builder: *openaio4miniHigh(ModelRoleBuilder, nil),
+ WholeFileBuilder: openaio4miniHigh(ModelRoleWholeFileBuilder, nil),
+ Namer: *openaigpt41mini(ModelRoleName, nil),
+ CommitMsg: *openaigpt41mini(ModelRoleCommitMsg, nil),
+ ExecStatus: *openaio4miniMedium(ModelRoleExecStatus, nil),
+ }
+
+ StrongModelOpus = ModelPack{
+ Name: "strong-opus",
+ Description: "Like the strong pack, but uses Claude Opus 4 thinking for planning and coding. Supports up to 160k input context.",
+ Planner: PlannerRoleConfig{
+ ModelRoleConfig: *claudeOpus4(ModelRolePlanner, nil),
+ PlannerModelConfig: getPlannerModelConfig(ModelProviderOpenRouter, "anthropic/claude-opus-4"),
+ },
+ Architect: claudeOpus4(ModelRoleArchitect, nil),
+ Coder: claudeOpus4(ModelRoleCoder, nil),
PlanSummary: *openaio4miniLow(ModelRolePlanSummary, nil),
Builder: *openaio4miniHigh(ModelRoleBuilder, nil),
WholeFileBuilder: openaio4miniHigh(ModelRoleWholeFileBuilder, nil),
@@ -187,6 +156,25 @@ func init() {
ExecStatus: *deepseekr1NoReasoning(ModelRoleExecStatus, nil),
}
+ OpusPlannerModelPack = ModelPack{
+ Name: "opus-planner",
+ Description: "Like daily driver, but uses Claude Opus 4 for planning. Supports up to 160k input context.",
+ Planner: PlannerRoleConfig{
+ ModelRoleConfig: *claudeOpus4(ModelRolePlanner, nil),
+ PlannerModelConfig: getPlannerModelConfig(ModelProviderOpenRouter, "anthropic/claude-opus-4"),
+ },
+ Coder: claudeSonnet4(ModelRoleCoder, nil),
+ Architect: claudeOpus4(ModelRoleArchitect, nil),
+ PlanSummary: *openaio4miniLow(ModelRolePlanSummary, nil),
+ Builder: *openaio4miniMedium(ModelRoleBuilder, &modelConfig{
+ strongModel: openaio4miniHigh(ModelRoleBuilder, nil),
+ }),
+ WholeFileBuilder: openaio4miniMedium(ModelRoleWholeFileBuilder, nil),
+ Namer: *openaigpt41mini(ModelRoleName, nil),
+ CommitMsg: *openaigpt41mini(ModelRoleCommitMsg, nil),
+ ExecStatus: *openaio4miniLow(ModelRoleExecStatus, nil),
+ }
+
OpenAIModelPack = ModelPack{
Name: "openai",
Description: "OpenAI blend. Supports up to 1M context. Uses OpenAI's GPT-4.1 model for heavy lifting, GPT-4.1 Mini for lighter tasks.",
@@ -206,17 +194,17 @@ func init() {
AnthropicModelPack = ModelPack{
Name: "anthropic",
- Description: "Anthropic blend. Supports up to 180k context. Uses Claude 3.5 Sonnet for heavy lifting, Claude 3 Haiku for lighter tasks.",
+ Description: "Anthropic blend. Supports up to 180k context. Uses Claude Sonnet 4 for heavy lifting, Claude 3.5 Haiku for lighter tasks.",
Planner: PlannerRoleConfig{
- ModelRoleConfig: *claude37Sonnet(ModelRolePlanner, nil),
- PlannerModelConfig: getPlannerModelConfig(ModelProviderOpenRouter, "anthropic/claude-3.7-sonnet"),
+ ModelRoleConfig: *claudeSonnet4(ModelRolePlanner, nil),
+ PlannerModelConfig: getPlannerModelConfig(ModelProviderOpenRouter, "anthropic/claude-sonnet-4"),
},
PlanSummary: *claude35haiku(ModelRolePlanSummary, nil),
- Builder: *claude37Sonnet(ModelRoleBuilder, nil),
- WholeFileBuilder: claude37Sonnet(ModelRoleWholeFileBuilder, nil),
+ Builder: *claudeSonnet4(ModelRoleBuilder, nil),
+ WholeFileBuilder: claudeSonnet4(ModelRoleWholeFileBuilder, nil),
Namer: *claude35haiku(ModelRoleName, nil),
CommitMsg: *claude35haiku(ModelRoleCommitMsg, nil),
- ExecStatus: *claude37Sonnet(ModelRoleExecStatus, nil),
+ ExecStatus: *claudeSonnet4(ModelRoleExecStatus, nil),
}
GeminiPreviewModelPack = ModelPack{
@@ -324,6 +312,14 @@ func claudeSonnet4(role ModelRole, fallbacks *modelConfig) *ModelRoleConfig {
return getModelConfig(role, ModelProviderOpenRouter, "anthropic/claude-sonnet-4", fallbacks)
}
+func claudeSonnet4Thinking(role ModelRole, fallbacks *modelConfig) *ModelRoleConfig {
+ return getModelConfig(role, ModelProviderOpenRouter, "anthropic/claude-sonnet-4:thinking", fallbacks)
+}
+
+func claudeSonnet4ThinkingHidden(role ModelRole, fallbacks *modelConfig) *ModelRoleConfig {
+ return getModelConfig(role, ModelProviderOpenRouter, "anthropic/claude-sonnet-4:thinking-hidden", fallbacks)
+}
+
func claudeOpus4(role ModelRole, fallbacks *modelConfig) *ModelRoleConfig {
return getModelConfig(role, ModelProviderOpenRouter, "anthropic/claude-opus-4", fallbacks)
}
diff --git a/releases/cli/versions/2.1.6.md b/releases/cli/versions/2.1.6.md
new file mode 100644
index 00000000..df119358
--- /dev/null
+++ b/releases/cli/versions/2.1.6.md
@@ -0,0 +1,6 @@
+- The newly released Claude Sonnet 4 is now stable in testing, so it now replaces Sonnet 3.7 as the default model for context sizes under 200k across all model packs where 3.7 was previously used.
+- A new `strong-opus` model pack is now available. It uses Claude Opus 4 for planning and coding, and is otherwise the same as the 'strong' pack. Use it with `\set-model strong-opus` to try it out.
+- The `opus-4-planner` model pack that was introduced in 2.1.5 has been renamed to `opus-planner`, but the old name is still supported. This model pack uses Claude Opus 4 for planning, and the default models for other roles.
+- Fix for occasional garbled error message when the model is unresponsive.
+- Fix for occasional 'couldn't aquire lock' error after stream finishes.
+- Additional retry when model is unresponsive or hits provider rate limits—helps particularly with new Opus 4 model on OpenRouter.
\ No newline at end of file
diff --git a/releases/server/versions/2.1.6.md b/releases/server/versions/2.1.6.md
new file mode 100644
index 00000000..59e3469c
--- /dev/null
+++ b/releases/server/versions/2.1.6.md
@@ -0,0 +1 @@
+See CLI 2.1.6 release notes.
\ No newline at end of file