feat: parallel_tool_calls + tool-calling tests#244
Merged
Conversation
6acd081
into
bernardladenthin:main
15 of 25 checks passed
bernardladenthin
pushed a commit
that referenced
this pull request
Jun 20, 2026
…ble surfaces #244 made the chat core honor parallel_tool_calls, but only the OpenAI /v1/chat/completions surface forwarded it; the alternative protocol surfaces (which translate into that same chat core) silently dropped the equivalent flag. Close the gap: - Anthropic /v1/messages (AnthropicApiSupport.toOpenAiChatRequest): map tool_choice.disable_parallel_tool_use=true -> parallel_tool_calls=false (default stays parallel when unset/false). - OpenAI Responses /v1/responses (ResponsesApiSupport.toOpenAiChatRequest): forward parallel_tool_calls, and also forward tool_choice (string form), which was being dropped entirely — both now reach the shared OpenAiRequestMapper. Tests: - AnthropicApiSupportTest / ResponsesApiSupportTest: unit-cover the new mappings (set, and omitted-when-absent). - OpenAiServerToolCallingIntegrationTest (new): real-model end-to-end over HTTP using the Qwen2.5-1.5B tool model #244 wired into CI. tool_choice="required" forces a call, so it deterministically asserts the server returns a well-formed tool_calls array (arguments as a JSON string, llama.cpp #20198) and that parallel_tool_calls=false travels HTTP -> mapper -> native intact. Self-skips when the model is absent. Verified locally: spotless, compile, spotbugs clean; model-free translator tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JdLpWD8nedY7LwNnHefZLF
Owner
|
Thanks @vaiju1981 for landing PR #243 builds directly on it. Now that the chat core honors
Your groundwork made each of these a small, focused addition — much appreciated! 🚀 Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
Related issues / PRs
Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdSECURITY.md)