Skip to content

ResponseFunctionCallArgumentsDoneEvent.name is marked required but not sent by the API #545

Description

@nezhyborets

The ResponseFunctionCallArgumentsDoneEvent schema has name listed in its required array, but the API does not include it in the actual streaming event payload.

Spec:

ResponseFunctionCallArgumentsDoneEvent:
  properties:
    name:
      type: string
      description: The name of the function that was called.
  required:
    - type
    - item_id
    - name        # ← present here
    - output_index
    - arguments
    - sequence_number

Actual payload received from the API:

{
  "type": "response.function_call_arguments.done",
  "arguments": "{\"location\":\"Kyiv\",\"unit\":\"celsius\"}",
  "item_id": "fc_09038a97a2687827006a10d056419c819c809e74e8d15a7858",
  "output_index": 0,
  "sequence_number": 14
}

name is absent. This causes strict decoders (e.g. generated Swift clients via swift-openapi-generator) to fail with a keyNotFound error.

Expected: name should be removed from required since it is not present in API responses. The function name is already available from the preceding response.output_item.added event.

Observed error (Swift):

DecodingError.keyNotFound: Key 'name' not found in keyed decoding container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions