[WIP] Support tensorzero_extra_content for OpenAI-compatible endpoint#5992
[WIP] Support tensorzero_extra_content for OpenAI-compatible endpoint#5992GabrielBianconi wants to merge 9 commits intomainfrom
tensorzero_extra_content for OpenAI-compatible endpoint#5992Conversation
There was a problem hiding this comment.
💡 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".
tensorzero-core/src/endpoints/openai_compatible/types/streaming.rs
Outdated
Show resolved
Hide resolved
tensorzero-core/src/endpoints/openai_compatible/types/chat_completions.rs
Outdated
Show resolved
Hide resolved
tensorzero_reasoning_content for OpenAI-compatible endpointtensorzero_extra_content_experimental for OpenAI-compatible endpoint
tensorzero_extra_content_experimental for OpenAI-compatible endpointtensorzero_extra_content for OpenAI-compatible endpoint
There was a problem hiding this comment.
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.
tensorzero-core/src/endpoints/openai_compatible/types/chat_completions.rs
Show resolved
Hide resolved
|
/merge-queue |
|
🚀 Merge queue workflow triggered! View the run: https://github.com/tensorzero/tensorzero/actions/runs/21644834788 |
|
/merge-queue |
|
🚀 Merge queue workflow triggered! View the run: https://github.com/tensorzero/tensorzero/actions/runs/21732888299 |
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_contentsoThought/Unknowncontent blocks are returned on chat completion responses and can be sent back on assistant messages.Implements
insert_indexhandling for both non-streaming and streaming paths (including new streaming state to keep indices consistent across chunks) and updates serialization to omit emptytool_calls/tensorzero_extra_contentfields. 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 ofnull/empty arrays.Written by Cursor Bugbot for commit 2a1d88c. This will update automatically on new commits. Configure here.