Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@chrarnoldus
Copy link
Collaborator

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2026

🦋 Changeset detected

Latest commit: 9348a3d

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

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 20, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds a workaround for Haiku models when using the Anthropic provider. The change forces tool_choice: { type: "any" } for Haiku models (when extended thinking is not enabled) to prevent the model from forgetting to call tools and outputting random XML.

Key observations:

  • The isHaikuInstruct check correctly identifies Haiku models via case-insensitive string matching
  • The workaround is appropriately scoped to non-thinking mode only
  • The kilocode_change markers are properly placed for upstream merge tracking
  • The changeset is correctly formatted as a patch
Files Reviewed (2 files)
  • .changeset/twelve-yaks-tease.md - New changeset documenting the patch
  • src/api/providers/anthropic.ts - Haiku tool_choice workaround implementation

@chrarnoldus chrarnoldus force-pushed the christiaan/anthropic-tool-choice branch from 46029bd to 9348a3d Compare January 21, 2026 13:28
@chrarnoldus chrarnoldus changed the title Force tool use in the Anthropic provider when thinking is disabled to improve reliability of especially Haiku Force tool use when using Haiku with the Anthropic provider Jan 21, 2026
@chrarnoldus chrarnoldus merged commit c7fa146 into main Jan 21, 2026
12 checks passed
@chrarnoldus chrarnoldus deleted the christiaan/anthropic-tool-choice branch January 21, 2026 16:16
maywzh pushed a commit to maywzh/kilocode that referenced this pull request Jan 25, 2026
…ool-choice

Force tool use when using Haiku with the Anthropic provider
maywzh pushed a commit to maywzh/kilocode that referenced this pull request Jan 25, 2026
…ool-choice

Force tool use when using Haiku with the Anthropic provider
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