openai / openai/openai-java

Missing `name` field in Realtime function-call event in OpenAPI spec breaks generated SDK models

Open
#683 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug spec
Dominant language
Kotlin
Stars
1.5k
Forks
264
Avg merge
9h 46m
Merged PRs (30d)
96

Description

Summary

The Realtime API returns a name field in the response.function_call_arguments.done event payload, but this field is not documented and not present in the OpenAPI spec. Because the Java SDK is generated from the spec, the resulting model does not include the field, causing incomplete deserialization and forcing manual workarounds.

This is a Bug + Spec fix + Enhancement issue.


Impacted Endpoint / Event

response.function_call_arguments.done (Realtime API)

Docs reference:
https://platform.openai.com/docs/api-reference/realtime-server-events/response/function_call_arguments/done


Current Docs & Spec Behavior

Docs example (no name field):

{
  "event_id": "event_5556",
  "type": "response.function_call_arguments.done",
  "response_id": "resp_002",
  "item_id": "fc_001",
  "output_index": 0,
  "call_id": "call_001",
  "arguments": "{\"location\": \"San Francisco\"}"
}

Actual Server Behavior

Actual Realtime events include a name field, for example:

{
  "type": "response.function_call_arguments.done",
  "name": "getWeather",
  ...
}

Expectation

The OpenAPI spec and documentation should include the name field so that SDK models (including Java) correctly represent function-calling data.


Impact / Severity

Severity: B — Major (workaround possible but painful)

Consequences:

  • Generated models are incomplete

  • Function name context is lost

  • Cannot rely on strongly-typed SDK

  • Cannot round-trip Realtime function-calling data via SDK


Workaround

Currently working around this by parsing raw JSON event payloads.


Root Cause

Spec / docs mismatch → incorrect OpenAPI → incorrect SDK generation.


Proposed Fix

  • Add name: string to the response.function_call_arguments.* events in the OpenAPI specification and documentation

  • Regenerate affected SDKs (Java + others)


Environment

Component | Value -- | -- SDK | openai-java v4.16.1 Java | 21 OS | Windows 11

Type of Issue

  • Bug

  • Spec / Documentation

  • Enhancement (generated SDK)


Why Combined

Fixing the spec resolves the SDK issue automatically without needing separate work.


Closing Note

This issue makes Realtime function-calling harder to use via strongly-typed models. Aligning the spec/docs with server behavior would resolve the bug and improve developer ergonomics across generator-based SDKs.

Thanks! 🙏

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 with the OpenAPI schema and documentation for the response.function_call_arguments.done Realtime event, using the linked Realtime API reference as context. Confirm the event includes name as a string, then regenerate the affected Java SDK models and verify that the generated model represents the server payload.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.