[PR #12585] fix: generate fallback tool call IDs for providers missing id field #14281

Open
opened 2026-02-16 18:19:05 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12585

State: open
Merged: No


Fixes #6290
Fixes #1880
Fixes #10885
Fixes #10189

Adds fallback ID generation for tool calls when providers like NVIDIA NIM, GLM, AWS Bedrock, and Chutes omit the 'id' field in their streaming responses. Instead of throwing an error, we now generate a UUID using generateId() for these known non-compliant providers while maintaining strict validation for others.

This aligns with the existing pattern used elsewhere in the codebase (toolCall.id ?? generateId()).

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12585 **State:** open **Merged:** No --- Fixes #6290 Fixes #1880 Fixes #10885 Fixes #10189 Adds fallback ID generation for tool calls when providers like NVIDIA NIM, GLM, AWS Bedrock, and Chutes omit the 'id' field in their streaming responses. Instead of throwing an error, we now generate a UUID using generateId() for these known non-compliant providers while maintaining strict validation for others. This aligns with the existing pattern used elsewhere in the codebase (toolCall.id ?? generateId()).
yindo added the pull-request label 2026-02-16 18:19:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14281