Skip to content

Conversation

@bbrala
Copy link
Contributor

@bbrala bbrala commented Jan 8, 2026

What:

  • Bug Fix
  • New Feature

Description:

When using LiteLLM to proxy requests i got a few errors while building the request. It seems a few of the nullable attributes are not handled properly. This means if they are missing the package crashed.

I'm fixing this in 2 commits. First off, adjust the array shape definition to make sure the properties are optoinal, this surfaces the errors in the from method. Which i will then properly handle.

Related:

bbrala added 2 commits January 8, 2026 11:02
…efinition to reflect the object properties.

This should surface the issues in the from() method implementation
…ature, and topP truly optional in CreateResponseType
@bbrala bbrala marked this pull request as ready for review January 8, 2026 10:09
Copy link
Collaborator

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

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

Could you apply the same patch to the Retrieve method? Its an odd amount of duplication that I never cleaned up

https://github.com/openai-php/client/blob/main/src/Responses/Responses/RetrieveResponse.php

…pe definition and make it mirror CreateRsponse again.
@bbrala
Copy link
Contributor Author

bbrala commented Jan 10, 2026

I've consolidated the two classes, i think there was another error where a specific tool was missing.

Copy link
Collaborator

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

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

thanks and good catch

@iBotPeaches iBotPeaches merged commit e388422 into openai-php:main Jan 12, 2026
14 checks passed
@iBotPeaches iBotPeaches added this to the v0.19.0 milestone Jan 12, 2026
@bbrala bbrala deleted the fix/createresponse-nullable-fixes branch January 12, 2026 23:18
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.

2 participants