Detect Google MAX_TOKENS responses and reject truncated tool calls
- Ngôn ngữ chính
- Rust
- Star
- 54.2k
- Fork
- 6.2k
- Merge trung bình
- 3 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 262
Mô tả
**What problem would this solve?**
PR #10831 detects output-token-limit stops for Anthropic and OpenAI-compatible formats. Other providers may expose this condition differently, causing truncated responses to be treated as complete.
**What would a good outcome look like?**
Audit the remaining providers and map their documented output-limit signals to `output_token_limit_reached`. Preserve partial responses and prevent truncated tool calls from executing.
**Possible approaches**
- Audit provider formats not covered by #10831.
- Detect documented output-limit signals.
- Preserve partial responses.
- Reject incomplete tool calls.
- Test streaming and non-streaming paths where applicable.
- Avoid heuristics when no reliable signal exists.
**Additional context**
Follow-up to #10831.
- [x] I have verified this does not duplicate an existing feature request
Do not begin implementation until the issue reaches **Ready** on the [Goose Issues board](https://github.com/orgs/aaif-goose/projects/1).
Hướng dẫn đóng góp
Hướng nghiên cứu
Review PR #10831 to understand the existing detection logic for Anthropic and OpenAI. Audit the code for other provider integrations (like Google's MAX_TOKENS) in the codebase, likely in a providers or clients module. Look for documented output-limit signals in provider APIs. The goal is to extend the `output_token_limit_reached` detection, preserve partial responses, and prevent execution of truncated tool calls. Test both streaming and non-streaming paths.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- ai-infra-agents
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100