openai / openai/openai-openapi
tool_calls in ChatCompletionRequestAssistantMessage cannot be null?
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 2.5k
- Forks
- 527
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 2
Description
According to the Typescript library, tool_calls is defined as tool_calls?: Array<ChatCompletionMessageToolCall> and the Python library allows tool_calls to be null - however, this OpenAPI spec defines tool_calls on ChatCompletionRequestAssistantMessage as a ref to ChatCompletionMessageToolCalls which is defined as an array of items who ref to ChatCompletionMessageToolCall
This causes tool_calls: null to fail validation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the OpenAPI definitions for ChatCompletionRequestAssistantMessage and ChatCompletionMessageToolCalls, starting with how the tool_calls reference is declared. Verify the validation behavior for tool_calls: null and confirm that the schema accepts the same value supported by the TypeScript and Python libraries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100