fix: normalize Xiaomi array tool schemas#82575
Merged
Merged
Conversation
Contributor
Author
|
Verification before merge:
Live proof:
Known gap:
|
steipete
force-pushed
the
fix/xiaomi-empty-array-items
branch
from
May 16, 2026 12:26
70f0041 to
7f9183a
Compare
steipete
force-pushed
the
fix/xiaomi-empty-array-items
branch
from
May 16, 2026 12:28
7f9183a to
1b5d5e9
Compare
Contributor
Author
|
Updated verification after rebase on latest
Live proof remains unchanged:
Known gap: Xiaomi Token Plan endpoints were not verified; the available standard-console key returned 401/no Token Plan subscription for |
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: normalize Xiaomi array tool schemas This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
This was referenced May 16, 2026
galiniliev
pushed a commit
to galiniliev/openclaw
that referenced
this pull request
May 20, 2026
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 24, 2026
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 24, 2026
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 24, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 24, 2026
galiniliev
pushed a commit
to galiniliev/openclaw
that referenced
this pull request
May 25, 2026
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 26, 2026
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 26, 2026
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 26, 2026
qiaokuan1992
pushed a commit
to qiaokuan1992/openclaw
that referenced
this pull request
Jun 2, 2026
jameslcowan
pushed a commit
to jameslcowan/openclaw
that referenced
this pull request
Jun 2, 2026
SYU8384
pushed a commit
to SYU8384/openclaw
that referenced
this pull request
Jun 3, 2026
sablehead
pushed a commit
to sablehead/openclaw
that referenced
this pull request
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
items: {}only at the final tool-schema normalization point, while preserving typed array items and annotation literals.__proto__property preservation, boolean/nullitems, and default/enum literal preservation.Verification
node scripts/run-vitest.mjs extensions/xiaomi/index.test.ts src/agents/pi-tools.schema.test.ts src/agents/openai-transport-stream.test.ts src/agents/openai-tool-schema.test.ts-> 6 files, 374 tests passed after rebase on latestorigin/main.node --import tsx scripts/generate-config-doc-baseline.ts --check-> OK docs/.generated/config-baseline.sha256.git diff --check-> passed./Users/steipete/Projects/agent-scripts/skills/codex-review/scripts/codex-review --parallel-tests "node scripts/run-vitest.mjs extensions/xiaomi/index.test.ts src/agents/pi-tools.schema.test.ts src/agents/openai-transport-stream.test.ts src/agents/openai-tool-schema.test.ts"-> clean, no accepted/actionable findings before the changelog-only rebase conflict resolution.Real behavior proof
Behavior addressed: Xiaomi MiMo/OpenAI-compatible tool schemas no longer include synthetic empty array
itemsobjects that strict providers can reject.Real environment tested: Local OpenClaw checkout on this branch plus Xiaomi standard OpenAI-compatible API at https://api.xiaomimimo.com/v1/chat/completions with model mimo-v2.5.
Exact steps or command run after this patch: Built the final OpenAI completions payload through OpenClaw's
buildOpenAICompletionsParamsregression, then sent the same omitted-empty-items tool schema shape to Xiaomi's live chat completions endpoint using the 1Password-storedXiaomi MiMo API Keyvalue without printing the secret.Evidence after fix: Live output copied from terminal: no-tools request returned
HTTP 200; live tool-schema request withparameters.properties.hintsas{ "type": "array" }and typed arrayitems: { "type": "string" }returnedHTTP 200; focused OpenClaw regression also asserted final payloadhintsequals{ type: "array" }andtypedHintskeepsitems: { type: "string" }.Observed result after fix: Xiaomi accepted the compatible payload shape; OpenClaw's final OpenAI completions tool payload omits empty array
itemswhile preserving typed arrayitems.What was not tested: Xiaomi Token Plan endpoints; the available standard-console key returned 401 invalid key/no Token Plan subscription for
token-plan-cn.xiaomimimo.com.Fixes #82447