Commit Graph
1 Commits
Author SHA1 Message Date
yetone d05f55e7c9 commandcode 0.1.21: a Google model's tool schemas have nested $refs written out
kthink on Discord: dsh on google/gemini-3.8-flash was refused 400
AI_UnsupportedFunctionalityError "Google schema conversion only supports
references to direct children of root-level $defs or definitions ...
#/properties/func/properties/triggers/items". dsh reuses part of its own
schema by a pointer into properties. For a Google model (google/..., or an
id naming gemini) such a $ref is now written out in place, on the Provider
API and on Go's /alpha/generate; a ref to a direct child of $defs or
definitions goes as it came; a loop or 32 deep ends at the target's type.
Data named $ref (default, enum) and refs that name nothing are untouched.
Every other model's schema goes as it came.

Run (mote, HOME from mktemp -d): bun test in packages/commandcode, 94 pass;
bun scripts/check.mjs commandcode ok. google-schema.test.mjs against the old
index.mjs: 6 of 7 red, including both end-to-end tests (GOAT, Go) that
send the dsh-shaped schema to google/gemini-3.8-flash.

Not tried: a real request. Both Command Code keys in magpie's plugin-auth
answer 401, so the fix is not checked against Command Code's gateway.
Siblings (other plugins with Gemini models) are not checked: #557.
2026-10-31 18:04:23 +08:00