Repository navigation
fix(streaming): omit payloads from invalid delta errors - #4375
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
No actionable findings in the static review, including an independent second review. All three invalid indexed-delta errors now omit payload contents while preserving exception types and the safe missing-index cause. Exact-message regression assertions cover each changed branch; valid accumulation behavior is unchanged. Reviewed the shared Chat Completions and Assistants call paths.
Hosted lint, build, type checks, breaking-change analysis, and CodeQL passed. Python 3.10/3.14 tests and OkTest are still running. No local code or tests were executed.
Automated Release PR --- ## [3.64.0](v3.63.0...v3.64.0) (2026-12-05) ### ⚠ BREAKING CHANGES * **api:** Type checkers can flag direct `provider.region` access even for bucket-only callers. At runtime, reading it on a custom endpoint raises `AttributeError`. Check `provider.type != "custom_endpoint"` first. ([#4374](#4374)) ### Features * **api:** add memory and history to beta agents ([#4372](#4372)) ([cc52701](cc52701)) * **api:** add model and token category to organization costs ([#4365](#4365)) ([43b6ff6](43b6ff6)) * **api:** add project API key status filters ([#4371](#4371)) ([7adbcba](7adbcba)) * **api:** support custom HTTPS providers for external storage ([#4374](#4374)) ([dfed070](dfed070)) ### Bug Fixes * **streaming:** omit payloads from invalid delta errors ([#4375](#4375)) ([ba6e577](ba6e577)) ### Chores * **api:** clarify agent session deletion ([#4368](#4368)) ([8f651c7](8f651c7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Changes being requested
When a streaming list entry has the wrong shape or its
indexis missing or invalid, report the expected structure and omit the received value from the exception message. The shared accumulator keeps the existing exception types and the missing key's cause. The three existing malformed-entry tests now assert the complete message.Additional context & links
Verified all three cases through sync and async
chat.completions.stream()using a mock transport. Valid tool arguments round-trip. The change covers the accumulator's exception text. Pydantic can separately emit serialization warnings for values of the wrong type.The three regression cases failed against the base revision and passed with this change. The focused delta, Chat Completions, and Assistants tests passed with Pydantic v2 (153 passed) and v1 (152 passed, 1 skipped). Ruff and ty passed.