diff --git a/CHANGELOG.md b/CHANGELOG.md index 14a5072aeca..eae13cae49d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- **Codex computer control:** publish fixed-length coordinate pairs as homogeneous array schemas so Codex app-server can start threads with the `computer` tool instead of rejecting tuple-valued `items`. - **Google Chat request deadlines:** bound control calls to 30 seconds while giving media transfers size-aware total budgets and a separate 30-second stalled-body guard, preventing hung Chat API requests without breaking large attachment uploads. (#102227) Thanks @hugenshen. - **Google Gemini prefixed model IDs:** recognize `google/gemini-*` and `models/gemini-*` when selecting multimodal function-response behavior, preserving the Gemini 2 image fallback without regressing Gemini 3 inline image responses. (#102382) Thanks @LiLan0125. - **Generated provider model catalogs:** keep MiniMax and NVIDIA catalog rows when they advertise audio or video metadata while projecting runtime model inputs to text/image, preventing configured multimodal primaries from being dropped and falling back. (#97858, #97048) Thanks @ly-wang19 and @zackchiutw. diff --git a/src/agents/tools/computer-tool.test.ts b/src/agents/tools/computer-tool.test.ts index 61d4f551d72..508fd633208 100644 --- a/src/agents/tools/computer-tool.test.ts +++ b/src/agents/tools/computer-tool.test.ts @@ -125,6 +125,31 @@ describe("buildComputerActParams", () => { }); }); +describe("createComputerTool schema", () => { + it("publishes Codex-compatible fixed-size coordinate arrays", () => { + const properties = ( + createComputerTool().parameters as { + properties?: Record>; + } + ).properties; + + for (const key of ["coordinate", "startCoordinate"] as const) { + const schema = properties?.[key]; + if (!schema) { + throw new Error(`missing ${key} schema`); + } + expect(schema).toMatchObject({ + type: "array", + items: { type: "number" }, + minItems: 2, + maxItems: 2, + }); + expect(Array.isArray(schema.items)).toBe(false); + expect(schema).not.toHaveProperty("additionalItems"); + } + }); +}); + describe("createComputerTool node resolution", () => { beforeEach(() => { listNodesMock.mockReset(); diff --git a/src/agents/tools/computer-tool.ts b/src/agents/tools/computer-tool.ts index 95a5a8ddf75..b05bcff6cc9 100644 --- a/src/agents/tools/computer-tool.ts +++ b/src/agents/tools/computer-tool.ts @@ -123,13 +123,19 @@ const ComputerToolSchema = Type.Object({ "Paired node id or display name. Omit when exactly one connected computer-capable node exists.", }), ), + // Codex accepts a single schema in array `items`, not tuple item arrays. + // Fixed bounds preserve the coordinate-pair contract across runtimes. coordinate: Type.Optional( - Type.Tuple([Type.Number(), Type.Number()], { + Type.Array(Type.Number(), { + minItems: 2, + maxItems: 2, description: "[x, y] target in pixels of the most recent screenshot.", }), ), startCoordinate: Type.Optional( - Type.Tuple([Type.Number(), Type.Number()], { + Type.Array(Type.Number(), { + minItems: 2, + maxItems: 2, description: "left_click_drag: [x, y] drag origin in screenshot pixels.", }), ),