Skip to content

fix(gen): add missing defaults in ReasoningBlock - #197

Open
mwien wants to merge 1 commit into
mainfrom
fix-reasoning-block-default
Open

mwien wants to merge 1 commit into
mainfrom
fix-reasoning-block-default

Conversation

@mwien

@mwien mwien commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does and why it is needed

There is a small gap to the orchestration spec due to missing defaults in ReasoningBlock. This PR adds the default values.

Comment on lines +70 to +71
content: str = ""
signature: str = ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't we define them as optional, if they're optional in the API spec?

@yamaceay yamaceay Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, introducing Optional[str] type would be different from the spec or not?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure what the advantage would be. Now we have the following behaviour for the attributes (if I understand correctly):

  • if we get a str, then the attribute is populated with that str
  • if we don't get a value for the attribute, it is set to the default value ""

If we define content: Optional[str] = "", then again:

  • if we get a str, then the attribute is populated with that str
  • if we don't get a value for the attribute, it is set to the default value ""
  • it could only be set to None if the response explicitly contains a null value which according to the spec cannot happen

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants