Skip to content

Add Claude Opus 4.6 model with adaptive thinking support#5686

Merged
kevinvandijk merged 2 commits intomainfrom
model-change
Feb 5, 2026
Merged

Add Claude Opus 4.6 model with adaptive thinking support#5686
kevinvandijk merged 2 commits intomainfrom
model-change

Conversation

@marius-kilocode
Copy link
Collaborator

Summary

  • Adds Claude Opus 4.6 model definition for Anthropic and Vertex providers
  • Implements adaptive thinking support with new beta flags (adaptive-thinking-2026-01-28, interleaved-thinking-2025-05-14, effort-2025-11-24, max-effort-2026-01-24)
  • Extends verbosity levels to include "max" and updates supportsVerbosity to accept an array of allowed levels
  • Adds supportsAdaptiveThinking model capability flag
  • Caps OpenRouter verbosity at "high" when "max" is selected
  • Adds "Max" verbosity label to all locale files

@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

🦋 Changeset detected

Latest commit: e6c26b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Feb 5, 2026

Code Review Summary

Status: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 4
SUGGESTION 1

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/types/src/model.ts 84 supportsVerbosity is now `boolean
src/api/transform/model-params.ts 105 Adaptive-thinking path hard-overrides temperature to 1.0, overriding user-provided temperature settings.
src/api/transform/reasoning.ts 116 Adaptive thinking auto-enables by default when enableReasoningEffort !== false (may be unexpected cost/latency impact).
src/api/providers/anthropic.ts 156 thinking is cast to ThinkingConfigParam even when { type: "adaptive" } (bypasses type safety; potential runtime mismatch).

SUGGESTION

File Line Issue
packages/types/src/providers/vertex.ts 22 Ensure Vertex request path actually applies verbosity, otherwise UI/CLI may expose a no-op setting.
Files Reviewed (7 files)
  • .changeset/bright-ants-wonder.md - 0 issues
  • cli/src/constants/providers/models.ts - 0 issues
  • packages/types/src/model.ts - 1 issue
  • packages/types/src/providers/anthropic.ts - 0 issues
  • packages/types/src/providers/vertex.ts - 1 issue
  • src/api/providers/anthropic.ts - 1 issue
  • src/api/transform/model-params.ts - 1 issue
  • src/api/transform/reasoning.ts - 1 issue
  • src/api/providers/openrouter.ts - 0 issues
  • src/api/providers/anthropic-vertex.ts - 0 issues

@kevinvandijk kevinvandijk merged commit 6fc1c85 into main Feb 5, 2026
12 checks passed
@kevinvandijk kevinvandijk deleted the model-change branch February 5, 2026 18:28
@github-actions github-actions bot mentioned this pull request Feb 5, 2026
@PoCk3T
Copy link

PoCk3T commented Feb 5, 2026

@kevinvandijk it doesn't look like Opus 4.6 via Vertex AI is working, I'm getting:

Date/time: 2026-02-05T21:20:20.219Z
Extension version: 5.4.0
Provider: vertex
Model: claude-opus-4-6@vertex

404
404 [{"error":{"code":404,"message":"Requested entity was not found.","status":"NOT_FOUND"}}]

PS: I already enabled Opus 4.6 in my Vertex AI Model Garden

@PoCk3T
Copy link

PoCk3T commented Feb 5, 2026

Opened #5693 to have a dedicated tracking of the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants