openai / openai/openai-openapi
Missing extra_content.google.thought_signature
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 2.5k
- Forks
- 527
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 2
Description
Gemini 3 API calls broken due to non-spec attribute
Currently, all API calls to Gemini 3 models are broken.
Google introduced an additional attribute that is not part of the OpenAPI spec, which causes incompatibilities for clients that strictly follow the spec.
I noticed that related issues were already opened and addressed in specific OpenAI SDKs, and the fix has been merged there. However, this was applied only to the Python SDK. I’m working with a Golang application, so this workaround does not help in my case.
This raises the question:
Should this attribute be added to the OpenAPI spec to keep it consistent with the patches already applied in the Python SDK?
Related issues:
- https://github.com/openai/openai-agents-python/issues/2137
- https://github.com/inference-gateway/inference-gateway/issues/229
I’m also not fully convinced this is the right long-term approach, and I’m open to suggestions.
At the moment, at least 9 providers successfully follow the spec, and only Google diverged by introducing this additional attribute. I could implement this directly in the Inference Gateway as an optional, Google-specific field and gate it behind provider detection - but that feels like papering over the problem.
From my perspective, this should either:
- be addressed in the official spec, or
- Google should make this attribute optional and avoid breaking OpenAI-compatible clients.
Happy to hear thoughts on the preferred direction here.
Current spec:
ChatCompletionStreamResponseDelta:
type: object
description: A chat completion delta generated by streamed model responses.
properties:
content:
anyOf:
- type: string
description: The contents of the chunk message.
- type: 'null'
function_call:
deprecated: true
type: object
description: >-
Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be
called, as generated by the model.
properties:
arguments:
type: string
description: >-
The arguments to call the function with, as generated by the model in JSON format. Note that
the model does not always generate valid JSON, and may hallucinate parameters not defined by
your function schema. Validate the arguments in your code before calling your function.
name:
type: string
description: The name of the function to call.
tool_calls:
type: array
items:
$ref: '#/components/schemas/ChatCompletionMessageToolCallChunk'
role:
type: string
enum:
- developer
- system
- user
- assistant
- tool
description: The role of the author of this message.
refusal:
anyOf:
- type: string
description: The refusal message generated by the model.
- type: 'null'
Note that there is nowhere an attribute reflecting on the SDK change extra_content.google.thought_signature nor there is an indication about extensions for a specific provider.
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
Start with the ChatCompletionStreamResponseDelta schema shown in the issue and compare it with the related Python SDK and inference-gateway issues. First establish whether the provider-specific thought_signature belongs in the official spec or requires an extension mechanism; done means the direction is agreed and the schema or documented handling is updated consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100