Skip to content

Conversation

RobertCraigie
Copy link
Collaborator

The current behaviour of defaulting to an empty array breaks sending the message back to the API

400 Invalid 'messages[1].tool_calls': empty array. Expected an array with minimum length 1, but got an empty array instead.

@RobertCraigie RobertCraigie requested a review from a team as a code owner February 20, 2025 10:58
@RobertCraigie RobertCraigie changed the base branch from master to next February 20, 2025 11:00
@stainless-bot stainless-bot force-pushed the robert/fix-parsing-multiturn branch from c2836d8 to cd197da Compare February 20, 2025 11:04
@RobertCraigie RobertCraigie changed the title fix(parsing): don't default to an empty fix(parsing): remove tool_calls default empty array Feb 20, 2025
@RobertCraigie RobertCraigie merged commit 2672160 into next Feb 20, 2025
4 checks passed
@RobertCraigie RobertCraigie deleted the robert/fix-parsing-multiturn branch February 20, 2025 11:09
@stainless-app stainless-app bot mentioned this pull request Feb 20, 2025
@stainless-app stainless-app bot mentioned this pull request May 29, 2025
SkinnnyJay pushed a commit to SkinnnyJay/openai-node that referenced this pull request Sep 13, 2025
SkinnnyJay pushed a commit to SkinnnyJay/openai-node that referenced this pull request Sep 13, 2025
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.

1 participant