fix(provider): drop top-level schema composition for Anthropic MCP tools - #39826
fix(provider): drop top-level schema composition for Anthropic MCP tools#39826vrutkovs wants to merge 1 commit into
Conversation
|
Dropping the keywords fixes the API error but leaves some tools undocumented to the model. The real-world case that led me here is the hosted Notion MCP, whose Suggestion: merge the branches instead of dropping them.
I run this as a local sanitizing proxy today and the merged schema works well with Anthropic models; the description line is enough for the model to pick a valid branch. I can send the merge logic as a follow-up if this PR wants to stay minimal. |
Iiuc this needs to be applied to every provider as well? That would be a change of scope in this PR, so I'd prefer this to be implemented in a separate PR |
|
Totally valid. |
Issue for this PR
Closes #37916
Type of change
What does this PR do?
Applies the same approach as in #32489 to Anthropic models.
How did you verify your code works?
bun test test/provider/transform.test.ts --timeout 30000bun run typecheckbun turbo typechecksuccessfullyScreenshots / recordings
Non-UI change
Checklist