openai / openai/openai-openapi

ChatCompletionMessageToolCallChunk is missing streamed custom tool calls

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

Nobody has claimed this yet.

bug documentation specification
Dominant language
No language data
Stars
2.5k
Forks
527
Avg merge
1h 46m
Merged PRs (30d)
2

Description

Source reports

Current specification gap

Affected surface: POST /chat/completions stream; ChatCompletionMessageToolCallChunk.

The source reports non-streaming custom-tool types but function-only streaming DeltaToolCall; its follow-up reports custom data arriving as an untyped dict. The current public chunk type enum contains only function and has no custom property. Please reconcile the stream schema with custom-tool deltas for models that support custom tools. The source discussion includes conflicting capability claims for different models; this report does not assert that every Chat Completions model supports custom tools.

Specification reviewed at b61ced9.

Minimal shape

{
  "index": 0,
  "id": "call_example",
  "type": "custom",
  "custom": {
    "name": "tool_name",
    "input": "partial input"
  }
}

This is a sanitized illustration of the reported shape, not a new live API capture.

Expected reconciliation

Represent streamed custom tool-call deltas with their discriminator and name/input fields while retaining function tool deltas and incremental field optionality.

Verification scope

Reviewed the source reports, relevant comments, and current published schema. No new live API request was made. This mirrors the specification gap and preserves the original reproduction; it does not claim that a fix has shipped.

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

Start in openapi.yaml around line 31160 and inspect the ChatCompletionMessageToolCallChunk and DeltaToolCall definitions, then compare them with the linked source reports. Done means the schema represents streamed custom tool-call discriminator, name, and input fields while retaining function deltas and optional incremental fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.