openai / openai/openai-openapi

tool_calls in ChatCompletionRequestAssistantMessage cannot be null?

Open
#348 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.