Repository navigation
fix(provider): advertise forced tools for embedded-MTP Qwen3.8 - #1527
Conversation
The tool-constraint advertisement still matched only the original EigenLabs/Qwen3.8-27B-4bit id. The catalog now serves the embedded-MTP build (same target bytes), so no Mac advertised required/named tool_choice for Qwen3.8 and the coordinator could not route those requests to it. Forced calls on qwen3_5 also rejected the .qwen35 parser that the model type infers and the catalog sets as its default, so a routed request would have failed as an invalid request. Accept it as Qwen4 and Bonsai already do; calls stay withheld until schema validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDrGQJwa1LC3j4TE6Dvgmo
|
@javiech1 is attempting to deploy a commit to the EigenLabs Team on Vercel. A member of the Team first needs to authorize it. |
Threat model review — advisoryReviewed head Reviewers: anthropic/claude-sonnet-5.5: first pass completed; anthropic/claude-opus-5.5: not needed by escalation policy; openai/gpt-6.1-sol: not needed by escalation policy No actionable findings in the reviewed text. This is not a security approval. Models: budgeted Sonnet / selective Opus / selective Sol 6.1. Findings require human validation; this review never requests changes or blocks merging. Coverage: 25/25 source units; cross-file integration complete. 0 selected depth batch(es) pending. All threat definitions indexed; relevant full definitions selected. Unchanged callers are not scanned. Cost this run: $0.3678 reported, $0.0000 reserved with unknown cost; 5 paid request(s), 0 reused batch(es), 47084 provider cache-hit tokens. Saved findings and earlier report · Historical findings are not confirmed resolved. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDrGQJwa1LC3j4TE6Dvgmo
Summary
OpenRouter lists Darkbloom's Qwen3.8 27B endpoint with
supports_tool_choice: {required: false, function: false}, while 16 of the 20 providers for that model support both. Requests that force a tool (common in agent frameworks) therefore can't use Darkbloom. This covers the Qwen3.8 part of #759.The provider already enforces forced calls for Qwen3.8 (
structuredPostValidation), but two gates still assume the original build:ToolChoiceEnforcementPolicy.advertisesCapabilitymatched onlyEigenLabs/Qwen3.8-27B-4bit. Since feat(provider): MTP policy lives in the weights — auto activates embedded Qwen heads only #777 the catalog servesEigenLabs/Qwen3.8-27B-4bit-mtp(same target bytes, embedded head; it is the only active Qwen3.8 entry), so no Mac puts Qwen3.8 intool_constraint_models. It now usesModelRuntimeRequirements.qwen38ConcreteModelIDs, which already covers both builds.validateParseraccepted only.xmlFunction/.nemotronforqwen3_5, but the catalog's runtime default istool_call_parser: qwen3_5(.qwen35, also whatToolCallFormat.inferpicks for this model type). Once routed, a forced request would fail as an invalid request..qwen35is now accepted for the Qwen 3.5 family, as it already is for Qwen4 and Bonsai; calls remain withheld until name/schema/cardinality validation.Diff: 2 source lines changed, 1 constant removed, 2 test lines.
Before / After
flowchart LR classDef bad fill:#fde2e2,stroke:#c62828,color:#3b0d0d classDef good fill:#e3f4e8,stroke:#2e7d32,color:#0d2b14 classDef neutral fill:#e3ecfa,stroke:#1565c0,color:#0b2140 subgraph Before B0["Mac serving Qwen3.8-27B-4bit-mtp"]:::neutral --> B1["tool_constraint_models: []"]:::bad B2["tool_choice required/named<br/>parser qwen3_5 (catalog default)"]:::neutral --> B3["invalid request"]:::bad end subgraph After A0["Mac serving Qwen3.8-27B-4bit-mtp"]:::neutral --> A1["tool_constraint_models: [..-mtp]"]:::good A2["tool_choice required/named<br/>parser qwen3_5"]:::neutral --> A3["withheld, schema-validated call"]:::good endEvidence
M5 Max 128 GB,
EigenLabs/Qwen3.8-27B-4bit-mtp, temperature 0, two declared tools (get_weather,get_time), prompt "What is the weather in Boston?":tool_choice, parserqwen3_5requiredinvalidToolPayload(parser)get_weather({"city":"Boston"}){"function":{"name":"get_time"}}invalidToolPayload(parser)get_time({"city":"Boston"})Measured with a throwaway live test through
MLXOpenAIService+ production bundle (not committed). The same two requests against the released 0.9.22 provider's local endpoint succeed withtool_call_parser: qwen3_coderand fail withqwen3_5, which matches the parser gate.Validation
130 tests pass;
registrationAdvertisesNativeAndPreservesLegacyContractsandnativeQwenParserAcceptanceDoesNotBroadenOtherFamiliesfail on master with the updated fixtures.Known limitations
required/functionenabled.supportsForcedMediais unchanged).🤖 Generated with Claude Code
https://claude.ai/code/session_01CDrGQJwa1LC3j4TE6Dvgmo
Need help on this PR? Tag
@codesmith-botwith what you need.