Add Claude Opus 4.6 model with adaptive thinking support#5686
Add Claude Opus 4.6 model with adaptive thinking support#5686kevinvandijk merged 2 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: e6c26b7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| promptCacheRetention: z.enum(["in_memory", "24h"]).optional(), | ||
| // Capability flag to indicate whether the model supports an output verbosity parameter | ||
| supportsVerbosity: z.boolean().optional(), | ||
| supportsVerbosity: z.union([z.boolean(), z.array(z.enum(verbosityLevels))]).optional(), // kilocode_change |
There was a problem hiding this comment.
WARNING: supportsVerbosity now allows boolean | VerbosityLevel[], but most call sites still treat it as a simple truthy flag
If supportsVerbosity is an array, consumers should validate that the requested verbosity is included (vs relying on truthiness), otherwise unsupported values (e.g. "max") can be propagated to providers that don’t actually accept them.
| if (shouldUseReasoningBudget({ model, settings })) { | ||
| // kilocode_change start | ||
| if (model.supportsAdaptiveThinking && settings.enableReasoningEffort !== false) { | ||
| temperature = 1.0 |
There was a problem hiding this comment.
WARNING: Adaptive thinking branch hard-overrides temperature to 1.0
This overrides a user-specified temperature (settings.modelTemperature) as well. If the API requires temperature = 1.0 only when adaptive thinking is actually used, consider scoping the override to that condition and/or documenting that temperature will be ignored for adaptive-thinking models.
| shouldUseReasoningBudget({ model, settings }) ? { type: "enabled", budget_tokens: reasoningBudget! } : undefined | ||
| }: GetModelReasoningOptions): AnthropicReasoningParams | undefined => { | ||
| // kilocode_change start | ||
| if (model.supportsAdaptiveThinking && settings?.enableReasoningEffort !== false) { |
There was a problem hiding this comment.
WARNING: Adaptive thinking is auto-enabled by default for any model with supportsAdaptiveThinking
Because the condition is supportsAdaptiveThinking && enableReasoningEffort !== false, users who haven’t explicitly opted into reasoning may still get adaptive thinking (cost/latency impact). If the intended behavior is opt-in, consider additionally gating on a user selection (e.g. reasoning effort/verbosity choice) rather than only the legacy boolean flag.
| max_tokens: maxTokens ?? ANTHROPIC_DEFAULT_MAX_TOKENS, | ||
| temperature, | ||
| thinking, | ||
| thinking: thinking as Anthropic.Messages.ThinkingConfigParam | undefined, // kilocode_change |
There was a problem hiding this comment.
WARNING: thinking is cast to Anthropic.Messages.ThinkingConfigParam
With thinking potentially being { type: "adaptive" }, this cast bypasses SDK type safety. If the SDK/API shape differs (or the beta flag set is incomplete), this will fail at runtime. Consider updating the SDK types/version or narrowing/validating thinking before sending.
| cacheWritesPrice: 6.25, | ||
| cacheReadsPrice: 0.5, | ||
| supportsAdaptiveThinking: true, | ||
| supportsVerbosity: ["low", "medium", "high", "max"], |
There was a problem hiding this comment.
SUGGESTION: supportsVerbosity is declared with explicit levels (including max)
Make sure the Vertex provider path actually applies verbosity to requests (or that the UI/CLI treats this as informational only). Otherwise users may see a verbosity control that has no effect for Vertex-backed Claude models.
Code Review SummaryStatus: 4 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (7 files)
|
|
@kevinvandijk it doesn't look like Opus 4.6 via Vertex AI is working, I'm getting: PS: I already enabled Opus 4.6 in my Vertex AI Model Garden |
|
Opened #5693 to have a dedicated tracking of the issue |
Summary
adaptive-thinking-2026-01-28,interleaved-thinking-2025-05-14,effort-2025-11-24,max-effort-2026-01-24)supportsVerbosityto accept an array of allowed levelssupportsAdaptiveThinkingmodel capability flag