fix(api): use the selected replica's tool capability for chat completions #6228
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 377 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.355
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6228"
general
weight: 0.35
Jackmeson1
Fixes #6227
What happens
After a catalog refresh, a newly launched model can accept plain chat but return HTTP 400 for a tool declaration or a tool-result continuation. A refresh between matching and subprocess startup can also leave a replica advertising tool support while its prompt omits the schema. A Qwen alias admitted with its parser unset can return raw
<tool_call>markup.Change
supports_chat_toolsvalue for both request forms, including an explicitFalse. Older descriptions use the API’s existing family check.Retry-After: 30when a routed tool request loses its selected replica. This also covers the interval after the Worker removes the description and before the Supervisor removes the route. Unsupported families and unrelated description errors keep their existing HTTP 400 responses.Tests
8015982d. Against7fbf1b31, three prompt checks found the schema missing, the admitted Qwen alias returned raw markup, and both Worker-first requests returned 400. The other 90 cases passed. The vLLM chat suite had the same seven failing test IDs on both revisions.b098c0bfon Ubuntu. The pushede54f9a20differs from it only by dropping a three-bytemodel.bintest artifact and by importing a helper lazily in the continuous-usage fixture; I ran that fixture on Windows Python 3.10 and 3.14 (48 passed). In my Ubuntu runs the changed tests had 607 passed, 6 skipped, and 2 pre-existing vLLM streaming failures in each run. These covered Python 3.12 with Transformers 5.24.1 and 4.57.6, plus Python 3.10. The passing cases included the repaired continuous-usage fixtures and the DeepSeek V4.1 alias test that checks schema and image-part delivery to the native tokenizer.b098c0bfmy run of the new tests against base production code stopped during collection because base production code lackedget_tool_parser_group; the lazy import ine54f9a20removes that, and the fixture collects and passes against7fbf1b31.AI disclosure: this was prepared with AI assistance (Claude Code with Claude Fable 5.2 and Claude Opus 5.5, and OpenAI Codex with GPT-6.2).
🤖 Generated with Claude Code