Description
A valid Responses API request using the shell tool can succeed on OpenAI's side, but the client throws while parsing the response instead of returning a result.
Two independent dispatch failures occur:
- tools[].type = shell:
UnhandledMatchError in Actions/Responses/ToolObjects.php.
- output[].type = shell_call or shell_call_output:
UnexpectedValueException in Actions/Responses/OutputObjects.php.
The client already forwards shell environment and skill attachment parameters. toArray() cannot work around this because parsing fails before the result object is constructed.
Steps To Reproduce
Call responses()->create() with a shell-capable model, tools containing type shell and environment type container_auto, and an input requesting execution of a simple shell command. Observe that the client throws when the response contains shell tool definitions or output items.
For an independent offline reproduction, use the existing CreateResponse fixture with output = [] and tools = [{type: shell, environment: {type: container_auto}}]. For the second failure, use tools = [] and a valid shell_call or shell_call_output item in output.
OpenAI PHP Client Version
v0.20.1
PHP Version
8.3.28
Notes
Proposed support: typed shell tools, environments and skill attachments; shell_call and shell_call_output; ordinary responses, streaming, stored input items, conversations and serialization. No changes to request parameter forwarding or a local command executor are needed.
Related Skills API implementation: #808
Shell documentation: https://developers.openai.com/api/docs/guides/tools-shell
Skills documentation: https://developers.openai.com/api/docs/guides/tools-skills
Description
A valid Responses API request using the shell tool can succeed on OpenAI's side, but the client throws while parsing the response instead of returning a result.
Two independent dispatch failures occur:
UnhandledMatchErrorin Actions/Responses/ToolObjects.php.UnexpectedValueExceptionin Actions/Responses/OutputObjects.php.The client already forwards shell environment and skill attachment parameters.
toArray()cannot work around this because parsing fails before the result object is constructed.Steps To Reproduce
Call
responses()->create()with a shell-capable model, tools containing type shell and environment typecontainer_auto, and an input requesting execution of a simple shell command. Observe that the client throws when the response contains shell tool definitions or output items.For an independent offline reproduction, use the existing
CreateResponsefixture withoutput = []andtools = [{type: shell, environment: {type: container_auto}}]. For the second failure, usetools = []and a validshell_callorshell_call_outputitem in output.OpenAI PHP Client Version
v0.20.1
PHP Version
8.3.28
Notes
Proposed support: typed shell tools, environments and skill attachments;
shell_callandshell_call_output; ordinary responses, streaming, stored input items, conversations and serialization. No changes to request parameter forwarding or a local command executor are needed.Related Skills API implementation: #808
Shell documentation: https://developers.openai.com/api/docs/guides/tools-shell
Skills documentation: https://developers.openai.com/api/docs/guides/tools-skills