Skip to content

fix: allow empty content for assistant messages with tool_calls#33

Merged
DarshanHarihar1 merged 1 commit into
mainfrom
darshan/fix-tool-message-validation
May 27, 2026
Merged

fix: allow empty content for assistant messages with tool_calls#33
DarshanHarihar1 merged 1 commit into
mainfrom
darshan/fix-tool-message-validation

Conversation

@DarshanHarihar1
Copy link
Copy Markdown
Contributor

No description provided.

validate_messages incorrectly rejected multi-turn tool conversations
where assistant turns carry tool_calls with empty content, which is the
standard OpenAI/Anthropic format. Content is now optional when tool_calls
are present, while empty user/system messages remain invalid.

Co-authored-by: Darshan Harihar <DarshanHarihar1@users.noreply.github.com>
@github-actions github-actions Bot added bug Something isn't working size/S labels May 27, 2026
@DarshanHarihar1 DarshanHarihar1 merged commit b3669ac into main May 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants