fix(anthropic): respect disableParallelToolUse in jsonTool mode#15706
Open
SJvaca30 wants to merge 1 commit into
Open
fix(anthropic): respect disableParallelToolUse in jsonTool mode#15706SJvaca30 wants to merge 1 commit into
SJvaca30 wants to merge 1 commit into
Conversation
jsonTool 구조화 출력에서 disableParallelToolUse 값을 항상 true로 고정하던 문제를 바로잡았습니다. 옵션을 생략하면 기존처럼 병렬 도구 사용을 막고, false를 명시하면 그 값을 Anthropic 요청에 그대로 전달합니다. 기본값과 false 전달 경로를 확인하는 회귀 테스트와 changeset을 추가했습니다.
82399b8 to
08a3bc8
Compare
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
Closes #15652.
Respect explicit
disableParallelToolUseoverrides when Anthropic structured output uses thejsonToolfallback. The json tool path still defaults to disabling parallel tool use, but a user-providedfalseis now passed through to Anthropic instead of being overwritten.Details
jsonTooldefault ofdisable_parallel_tool_use: true.disableParallelToolUse: falsewhen users explicitly opt into parallel tool use with json tool responses and other tools.@ai-sdk/anthropic.Tests
pnpm --filter @ai-sdk/anthropic test:node -- anthropic-language-model.test.ts -t "disableParallelToolUse"pnpm exec oxfmt --check packages/anthropic/src/anthropic-language-model.ts packages/anthropic/src/anthropic-language-model.test.ts .changeset/sharp-ants-remember.mdpnpm exec ultracite fix packages/anthropic/src/anthropic-language-model.ts packages/anthropic/src/anthropic-language-model.test.tspnpm exec ultracite check packages/anthropic/src/anthropic-language-model.ts packages/anthropic/src/anthropic-language-model.test.tsgit diff --checkpnpm --filter @ai-sdk/anthropic testpnpm --filter @ai-sdk/anthropic type-checkpnpm --filter @ai-sdk/anthropic build