Skip to content

fix: Exclude derived parsed field when reparsing merged continuation responses - #3351

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara/1018798936
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
copybara/1018798936

Conversation

@copybara-service

Copy link
Copy Markdown

fix: Exclude derived parsed field when reparsing merged continuation responses

fixes #3350

[
(
{'response_json_schema': {'type': 'object'}},
{'title': 'x'},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

π{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

π{
_/ _/ ": "∆"

@khalidkhadyrov-collab

Copy link
Copy Markdown

fix: Exclude derived parsed field when reparsing merged continuation responses

fixes #3350

1:1 [

@khalidkhadyrov-collab

Copy link
Copy Markdown

@maria

@kaulastudies kaulastudies 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.

One non-blocking regression-test suggestion: could we also cover a stale parsed value when the merged text cannot be parsed?

The new stale-hop test replaces an old value with valid merged JSON. Two useful companion cases would be malformed merged JSON, and valid JSON that fails _Summary validation (for example, a missing title). Seed an earlier hop with _Summary(title='stale'), then assert that the merged response follows the normal parse-failure behavior and does not retain that earlier value.

This would protect the failure path as well as successful reparsing. I reviewed the diff; I have not run these cases against the SDK.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Structured-output continuation merge raises AttributeError: __pydantic_generic_metadata__ when a hop has parsed JSON

3 participants