Repository navigation
fix: Hugging Face MCP calls are not dynamic - #305
Closed
cunninghamcard-bit wants to merge 1 commit into
Closed
cunninghamcard-bit wants to merge 1 commit into
cunninghamcard-bit wants to merge 1 commit into
Conversation
…ce@2.0.62 doGenerate pushes mcp_call and mcp_list_tools as provider-executed tool-calls and tool-results without a dynamic flag (huggingface-responses-language-model.ts:264-301). aimux set dynamic: true on all four parts. Without a local tool of that name, Core now returns the call marked invalid, as parseToolCall does. Tests: should_handle_mcp_tools_with_annotations (tests/huggingface_responses_test.rs) now expects the invalid call. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoxcKU4zBD64Lri3e4Lrq5
7 of 12 tasks
cunninghamcard-bit
added a commit
that referenced
this pull request
Oct 20, 2026
The three behaviour fixes now live in their own PRs (#305, #306, #307); this branch stacks on the last one. responses.rs and CHANGELOG.md are the same on both sides; the old test file keeps the markers and takes the two aimux tests the fix PRs added. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoxcKU4zBD64Lri3e4Lrq5
This was referenced Oct 20, 2026
cunninghamcard-bit
pushed a commit
that referenced
this pull request
Oct 20, 2026
The test branch now stacks on the fix PRs #305-#307, which add two aimux-own tests at the end of tests/huggingface_responses_test.rs. That file is already merged into src/huggingface/tests/responses/responses_language_model.rs, so the two tests land there at the same places. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0116HPMoqaLfFr1TyqDq1hrW
This was referenced Oct 20, 2026
Merged
Contributor
Author
|
Folded into #307 together with the other Hugging Face fixes, so each vendor has one fix PR. This change is commit 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
Before: Hugging Face
do_generatemarked everymcp_call/mcp_list_toolstool-call and tool-resultdynamic: true.@ai-sdk/huggingface2.0.62 sets no dynamic flag on them.After: the four parts carry no dynamic flag, as upstream. Without a local tool of that name,
generate_textnow returns the MCP call marked invalid (NoSuchTool), which is what the AI SDK'sparseToolCalldoes for a provider-executed call that is not dynamic.Found while porting the upstream Hugging Face tests (#303, case
doGenerate › basic text response › should handle MCP tools with annotations). Part of the #276 list. First of three stacked Hugging Face fixes; the next two are the tool-result and stream-error PRs.How it works today
What this PR changes
Tests:
should_handle_mcp_tools_with_annotations(tests/huggingface_responses_test.rs) asserted that the call passes Core validation without local tools; it now expects the invalid call. The full upstream case is in #303.Docs: CHANGELOG
Fixed.Type of change
Checklist
cargo +1.99 fmt -p aimux-providers -- --checkpassescargo +1.99 clippy -p aimux-providers --lib --tests -- -D warningspassescargo +1.99 test -p aimux-providers --test huggingface_responses_testpasses (32)scripts/check_provider_boundaries.shpassesNotes for reviewers
A caller that relied on the MCP call passing validation without a local tool now gets an invalid tool call, the same result the AI SDK gives.
🤖 Generated with Claude Code
https://claude.ai/code/session_01RoxcKU4zBD64Lri3e4Lrq5