Forced submit tool_choice is rejected by Claude Opus 5.5 and Fable 5.2 (HTTP 400)
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- ai-infra-agents
Hướng nghiên cứu
Read src/llm/pi-runner.ts around line 1962 and the provider model lookup in src/provider/provider-services.ts around lines 491–506. Trace how tool_choice is selected for Anthropic requests, then inspect existing tests for request construction and error handling. Done means the two named models send an accepted choice by default, existing providers and older models retain forced-submit behavior, and validation, retry, and provenance remain unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
On the direct Anthropic provider, codegenie's default structured-submit calls force the submit tool (tool_choice of type tool or any) while adaptive thinking is on. Claude Opus 5.5 and Fable 5.2 reject that request:
HTTP 400 invalid_request_error: tool_choice: type "tool" and "any" are not supported for this model
so every review with these models fails. The default setup path picks one of them without the user typing its ID: with only Anthropic configured, codegenie provider use opus resolves to anthropic/claude-opus-5-5, and the post-login default goes through the same lookup (src/provider/provider-services.ts:491-506).
The forced choice is set at src/llm/pi-runner.ts:1962. Pi 1.5.2 passes it through unchanged and has no fallback for this error. The earlier "Anthropic falls back" behaviour (PR #38) concerns strict schema sampling, which is a different field.
Evidence
Live check on 2026-11-19, against Anthropic's token-count endpoint only (no generation calls), using the request shape codegenie 0.8.0 actually sends (the stage-5 submit_plan tool):
| model | tool_choice | thinking | result |
|---|---|---|---|
| claude-opus-5-5 | forced | adaptive | 400, as above |
| claude-opus-5-5 | auto | adaptive | 200 |
| claude-fable-5-2 | forced | adaptive | 400, as above |
| claude-fable-5-2 | auto | adaptive | 200 |
| claude-opus-5 | forced | disabled | 200 (the model CI uses, which is why CI passes) |
Vendor documentation: https://platform.claude.com/docs/en/models/opus-5-5/whats-new-opus-5-5 and https://platform.claude.com/docs/en/models/fable-5-2/whats-new-fable-5-2
Workaround for users today: [llm] forceSubmitToolChoice = false.
Acceptance criteria
- With default settings, reviews on
anthropic/claude-opus-5-5andanthropic/claude-fable-5-2send a tool_choice the model accepts. - Older Claude models (for example Opus 5) and other providers keep their current forced-submit behaviour.
- Submit validation, retry and provenance behaviour are unchanged.
- A test reproduces the 400 request shape for the new models and fails without the fix.
- Before merge, one live end-to-end review on a tiny diff with each of the two models succeeds (owner-approved cost).
Found during the #44 deep review.
- Ngôn ngữ chính
- TypeScript
- Star
- 8
- Fork
- 1
- Merge trung bình
- 5 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của 0xPolygon/codegenie
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Tất cả issue của 0xPolygon/codegenie
Issue tương tự
-
JSON parser fails on commentsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
AloisSeckar/elrh-cosca#36 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
cursor/community-plugins#572 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Plugin] calendarĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MUKE-coder/grit#228 ·
-
[BUG] Keyring unreachableĐang mởbug status:needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
dongdongbh/Mindwtr#1587 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
nuxt/icon#585 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày