Model computer_call output actions as an actions[] array (breaking change)#759
Model computer_call output actions as an actions[] array (breaking change)#759
computer_call output actions as an actions[] array (breaking change)#759Conversation
Agent-Logs-Url: https://github.com/openai-php/client/sessions/18ddc838-e520-4048-879d-4a1218823f7a Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
Agent-Logs-Url: https://github.com/openai-php/client/sessions/18ddc838-e520-4048-879d-4a1218823f7a Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
computer_call outputs that return actions[] instead of action
|
I don't think this will work as it can return multiple actions and this code only accounts for a single action $actionAttributes = $attributes['actions'][0]; |
|
@copilot - It used to support 1, now its n. It appears we need a breaking change to turn this into an array of actions. If you get 1 action back, just map it to an array of 1. |
Agent-Logs-Url: https://github.com/openai-php/client/sessions/d9e38e52-5589-4ffb-9b6e-f0eab6a45a27 Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
Agent-Logs-Url: https://github.com/openai-php/client/sessions/d9e38e52-5589-4ffb-9b6e-f0eab6a45a27 Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
Updated in a66b2b9: |
computer_call outputs that return actions[] instead of actioncomputer_call output actions as an actions[] array (breaking change)
|
@copilot - fix tests (lint, type, pest) and also lets remove exception if no actions found. Lets make it an empty array if so |
Agent-Logs-Url: https://github.com/openai-php/client/sessions/92f1ec3d-14f5-4808-9a86-930d7f554d67 Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
Agent-Logs-Url: https://github.com/openai-php/client/sessions/92f1ec3d-14f5-4808-9a86-930d7f554d67 Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
Fixed in 4bec82a: no-actions payloads now return an empty Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot - my dood, you breaking |
Agent-Logs-Url: https://github.com/openai-php/client/sessions/17df9226-8c92-499d-999d-8ba247d09a12 Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
Fixed in 49c6c7c. I tightened the phpstan types in |
|
@copilot - this still fails - |
Agent-Logs-Url: https://github.com/openai-php/client/sessions/cbf38960-5239-47a6-bbd5-f926ace70703 Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
Patched in 08ac7b2. The failing Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot - you tried - tis really bad now. I should have done it myself at this point. All CI is failing. Last try or I move on to doing it myself. |
Agent-Logs-Url: https://github.com/openai-php/client/sessions/ea4389b8-7cdb-4060-85f4-45574148364e Co-authored-by: iBotPeaches <611784+iBotPeaches@users.noreply.github.com>
Fixed in 57e862e. I addressed the actual |
| /** | ||
| * @param array<string, mixed> $action | ||
| */ | ||
| private static function mapAction(array $action): Click|DoubleClick|Drag|KeyPress|Move|Screenshot|Scroll|Type|Wait |
There was a problem hiding this comment.
this seems unneeded. I'll take it from here. The AI got it like 90% right
OutputComputerToolCall::from()previously assumed a singleactionobject, but realcomputer_callpayloads can returnactions(array), causing undefined key errors. This PR updates the model to represent actions as an array and supports both input shapes.Breaking change: output model shape
OutputComputerToolCallnow exposesactions(array of typed computer actions) instead of a singleaction.toArray()now emitsactions(notaction).Parser compatibility update
actions(preferred/new shape), oraction(mapped toactionswith one element).Defensive handling
pending_safety_checksas an empty list.action/actionsas an emptyactionsarray (no exception).InvalidArgumentExceptionfor malformed actions with invalid/missing action type.Focused test coverage additions
action→ one-itemactionsmapping.actions.actionsbehavior whenactionsis empty or when bothactionandactionsare absent.actions[]and legacyaction.Warning
This PR intentionally changes the
OutputComputerToolCallpublic shape fromactiontoactionsand updates serialized output accordingly.