Conversation
Author
|
@gold-silver-copper @joshua-mo-143 hi, could you please review? |
8 tasks
Contributor
|
Superseded by #2531 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2493.
When a dependency enables
serde_json/arbitrary_precision, Serde buffers a fractionaltop_pas a map through the flattened Responses metadata and the untagged streaming event. Decoding it directly asf64rejects otherwise valid responses, including the terminal frame carrying token usage.Deserialize
top_pthroughserde_json::Numberbefore converting it tof64. The public field and serialized request shape stay unchanged; missing/null values remain supported, and invalid types or numbers outside the f64 range still fail.Changelog
serde_json/arbitrary_precisionis enabled.Migration
None.
Type of change
Testing
cargo test --locked -p rig-core --lib providers::openai::responses_api::tests::— 92 passed.cargo test --locked -p rig-core --lib --features serde_json/arbitrary_precision providers::openai::responses_api::tests::— 92 passed.cargo clippy --locked -p rig-core --lib --tests --features serde_json/arbitrary_precision -- -D warnings— passed.cargo fmt --all -- --checkandgit diff --check— passed.No cassettes were recorded or changed. These tests reproduce a Serde feature-unification failure using raw JSON, without requiring a provider request. Independent full-diff review found no actionable issues. Comprehensive CI has not run on this branch yet.
Checklist