Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork667
Fix #692 [Bug]: Passing invalid parameters to gemini throws Undefined…#693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
… Undefined array key "choices" /www/htdocs/vendor/openai-php/client/src/Responses/Chat/CreateResponse.php 54Change-Id: Ibbf64cc554ef68844fd8338583f3fc8ec5fde413
iBotPeaches left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could you add a test to confirm this? I think the HttpTransporter tests is the area to make a formulated Gemini exception to confirm this.
alxlab-zone66x commentedOct 2, 2025
Yeah sure. That would make sense. |
alxlab-zone66x commentedOct 3, 2025
Hmm for the
|
iBotPeaches commentedOct 3, 2025
Probably the message/status of the higher object. I think you can ignore inner details stuff. |
… Undefined array key "choices" /www/htdocs/vendor/openai-php/client/src/Responses/Chat/CreateResponse.php 54Add tests for gemini with invalid parameter.Set ErrorException type to return error status for invalid gemini parameter.Change-Id: I076016d0470eb3060d3f972702e4e3701b52207d
| if (!isset($data[0]['error']['type']) &&isset($data[0]['error']['status'])) { | ||
| $data[0]['error']['type'] =$data[0]['error']['status']; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This check is the only thing I'm iffy on right now. I'd rather the ErrorException class navigate the water of different error structures to normalize them. So the HTTPTransporter isn't required to formulate things perfectly for an exception class.
krowinski commentedDec 16, 2025
Hi! Any update on this? Maybe Google should fix it ? I suppose every SDK has issues with error payloads ? |
iBotPeaches commentedDec 16, 2025
I wish Google would fix it. If you are making a parity API for OpenAI, at least make it match. My last comment is still outstanding. |
… array key "choices" /www/htdocs/vendor/openai-php/client/src/Responses/Chat/CreateResponse.php 54
Change-Id: Ibbf64cc554ef68844fd8338583f3fc8ec5fde413
What:
Description:
Related:
Fix issue#692