Skip to content

Follow up fixes for reasoning params#350

Open
Ankur Goyal (ankrgyl) wants to merge 11 commits into
mainfrom
fix-reasoning-param
Open

Follow up fixes for reasoning params#350
Ankur Goyal (ankrgyl) wants to merge 11 commits into
mainfrom
fix-reasoning-param

Conversation

@ankrgyl

Copy link
Copy Markdown
Contributor

No description provided.

@ankrgyl

Copy link
Copy Markdown
Contributor Author

Once https://github.com/braintrustdata/braintrust/pull/17137 lands we should auto generate the streaming types

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

Copy link
Copy Markdown

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: f689c3b4db

ℹ️ 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 (@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 (@codex) address that feedback".


#[derive(Debug, Deserialize, Default)]
#[serde(tag = "type")]
enum ResponsesOutputItemAddedItem {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove the duplicate Responses output item type

This adds a new ResponsesOutputItemAddedItem, but the previous enum and impl are still present immediately below. Rust does not allow two items with the same name in one module, and the same duplicated block also leaves duplicate custom-tool test functions later in the file, so the crate will not compile until the stale definitions are removed instead of appended to.

Useful? React with 👍 / 👎.

Comment on lines +164 to +165
tool_call.sequence_number,
tool_call.item_id.as_deref(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Generate custom tool event metadata when absent

When the universal chunk was built outside the Responses stream parser, these fields are None (the new ..Default::default() additions do exactly that), so this call emits a response.custom_tool_call_input.delta without item_id or sequence_number. The same adapter now deserializes that event into ResponsesCustomToolCallInputDeltaEvent with required String/u32 fields, and StreamTransformSession expects correlated ctc_{output_index} plus monotonic sequence values, so converting custom tool calls to Responses now produces invalid/non-round-trippable stream events.

Useful? React with 👍 / 👎.

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.

1 participant