Commit Graph
2 Commits
Author SHA1 Message Date
yetone fbee8a0abf devin 0.1.10: a tool's root union whose branches are unions themselves keeps their fields, so a model can create a Codex automation (yetone/magpie#1271)
objectRoot dropped any anyOf/oneOf branch that was itself a union. Codex
desktop's automation_update (zod 4: root anyOf of view, delete, and create
and update, each a union on kind) folded to only view's mode and id, both
required, so the model was offered a tool that could only view. Found
while fixing the same fold in magpie's built-in for #1271.

A nested union branch is now folded first (up to 8 deep); a field the
root doesn't define takes every distinct schema the branches give it, as
anyOf when they differ; a field every branch requires stays required.

Verified: schema.test.mjs's new test fails on 0.1.9 (no "name" among
[id mode]) and passes now; HOME=$(mktemp -d) bun test in packages/devin:
39 pass, 0 fail.
2026-10-08 16:51:46 +08:00
yetone c9b811d288 devin 0.1.9: a tool whose parameters have anyOf, oneOf or allOf at the root goes to Devin as a plain object (yetone/magpie#1196, iron-water) — Devin's Claude models answered every request offering one with 502 "There is an issue with this request, please try a different model" (in=0/out=0), so Codex desktop, whose codex_app automation_update has a root oneOf, hung on devin/claude-opus-5-5 while swe-2 and gpt-6-1-sol were fine. build() now folds the schema as magpie's built-in folds it for Anthropic (provider.ObjectRoot, #646): allOf's branches are all merged, properties and required alike; of anyOf's and oneOf's object branches the properties are merged, a field each requires stays required, the other branches go; local $refs into $defs/definitions are followed. A schema with no root combinator is sent as it came, and the caller's own is not changed. schema.test.mjs builds from the issue's literal parameters: its three build tests fail with the fold taken out of build() (the oneOf/anyOf/allOf arrives at Devin). HOME=$(mktemp -d) bun test packages/devin (37 pass, 0 fail) and bun scripts/check.mjs devin pass. Not tried against a real Devin account. 2026-10-08 05:19:57 +08:00