Skip to content

Empty call IDs can't roundtrip #428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stephentoub opened this issue May 9, 2025 · 0 comments · May be fixed by #429
Open

Empty call IDs can't roundtrip #428

stephentoub opened this issue May 9, 2025 · 0 comments · May be fixed by #429
Labels
bug Something isn't working

Comments

@stephentoub
Copy link
Contributor

Service

OpenAI

Describe the bug

Tool call IDs are surfaced as part of ChatToolCall objects returned from ChatCompletion.ToolCalls. While the OpenAI service always provides non-empty IDs, some other endpoints, such as Gemini's "OpenAI compatible" endpoint, does not. The ChatToolCall.Id properties coming back from these calls is empty. That's fine, except that when you then try to use ChatToolCall.CreateFunctionToolCall to roundtrip the data from such a ChatToolCall, it fails with an argument exception about the ID being empty.

Steps to reproduce

Call ChatToolCall.CreateFunctionToolCall with string.Empty for the ID parameter.

Code snippets

OS

Windows

.NET version

.NET 9

Library version

2.2.0-beta.4

@stephentoub stephentoub added the bug Something isn't working label May 9, 2025
@stephentoub stephentoub linked a pull request May 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant