Skip to content

fix: increase tool call ID max length from 64 to 256 chars - #364

Open
Henshin2021 wants to merge 1 commit into
leookun:mainfrom
Henshin2021:fix/increase-tool-call-id-limit
Open

fix: increase tool call ID max length from 64 to 256 chars#364
Henshin2021 wants to merge 1 commit into
leookun:mainfrom
Henshin2021:fix/increase-tool-call-id-limit

Conversation

@Henshin2021

Copy link
Copy Markdown

This fixes the issue where tool call IDs generated by proxy services (like NewAPI) that are longer than 64 characters get truncated, causing Anthropic API to fail with 'deliverToolResults: none of X result(s) matched'.

Changes:

  • Increased PROVIDER_TOOL_CALL_ID_MAX_CHARS from 64 to 256
  • Updated test cases to reflect the new limit

Fixes issue with Anthropic 500 errors when using reverse proxy services.

This fixes the issue where tool call IDs generated by proxy services
(like NewAPI) that are longer than 64 characters get truncated, causing
Anthropic API to fail with 'deliverToolResults: none of X result(s) matched'.

Changes:
- Increased PROVIDER_TOOL_CALL_ID_MAX_CHARS from 64 to 256
- Updated test cases to reflect the new limit

Fixes issue with Anthropic 500 errors when using reverse proxy services.
@leookun

leookun commented Aug 27, 2026

Copy link
Copy Markdown
Owner

这会导致openai出错误😂,某些provider校验了tools的最长为64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants