Skip to content

[WIP] Support tensorzero_extra_content for OpenAI-compatible endpoint#5992

Open
GabrielBianconi wants to merge 9 commits intomainfrom
gb/fix-5970
Open

[WIP] Support tensorzero_extra_content for OpenAI-compatible endpoint#5992
GabrielBianconi wants to merge 9 commits intomainfrom
gb/fix-5970

Conversation

@GabrielBianconi
Copy link
Member

@GabrielBianconi GabrielBianconi commented Jan 30, 2026

Fix #5970


Note

Medium Risk
Changes the OpenAI-compatible chat completion request/response and streaming serialization logic, which could affect downstream client parsing and content ordering. The surface area is moderated by comprehensive new unit and end-to-end tests across core and client SDKs.

Overview
Adds OpenAI-compatible API support for tensorzero_extra_content so Thought/Unknown content blocks are returned on chat completion responses and can be sent back on assistant messages.

Implements insert_index handling for both non-streaming and streaming paths (including new streaming state to keep indices consistent across chunks) and updates serialization to omit empty tool_calls/tensorzero_extra_content fields. Adds extensive unit/E2E coverage plus client-level round-trip tests in Go/Node/Python, and adjusts compatibility assertions to expect missing fields (undefined/absent) instead of null/empty arrays.

Written by Cursor Bugbot for commit 2a1d88c. This will update automatically on new commits. Configure here.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e02ab4728

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@GabrielBianconi GabrielBianconi self-assigned this Jan 30, 2026
@GabrielBianconi GabrielBianconi changed the title [WIP] Support tensorzero_reasoning_content for OpenAI-compatible endpoint [WIP] Support tensorzero_extra_content_experimental for OpenAI-compatible endpoint Jan 30, 2026
@GabrielBianconi GabrielBianconi changed the title [WIP] Support tensorzero_extra_content_experimental for OpenAI-compatible endpoint [WIP] Support tensorzero_extra_content for OpenAI-compatible endpoint Feb 2, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@GabrielBianconi
Copy link
Member Author

/merge-queue

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🚀 Merge queue workflow triggered!

View the run: https://github.com/tensorzero/tensorzero/actions/runs/21644834788

@GabrielBianconi
Copy link
Member Author

/merge-queue

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

🚀 Merge queue workflow triggered!

View the run: https://github.com/tensorzero/tensorzero/actions/runs/21732888299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add first-class support for reasoning_content in OpenAI-compatible inference endpoint

1 participant