qwen-code/packages
pomelo a76183f9c6
Some checks failed
Qwen Code CI / Classify PR (push) Waiting to run
Qwen Code CI / Lint (push) Blocked by required conditions
Qwen Code CI / Test (macos-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Test (ubuntu-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Test (windows-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Blocked by required conditions
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
Sync cua-driver to Aliyun OSS / Mirror cua-driver binaries to Aliyun OSS (push) Has been cancelled
fix(core): coerce numeric string params in SchemaValidator for MCP tools (#4967)
* fix(core): coerce numeric string params in SchemaValidator for MCP tools

LLMs frequently emit numeric parameters as strings (e.g. `{"depth": "3"}`
instead of `{"depth": 3}`), which strict MCP servers like Playwright reject
with schema validation errors ("params/depth must be number"). The
SchemaValidator already coerces boolean strings and stringified JSON but
was missing numeric coercion.

Add `fixNumericValues()` that converts string values to integers/numbers
when the schema expects integer/number but does not accept string,
consistent with the existing `fixBooleanValues` pattern.

Co-Authored-By: Qwen-Coder (Qwen Code) <noreply@qwen.ai>

* fix(core): prevent silent truncation in numeric string coercion

- Skip coercion for decimal strings when schema only accepts integer
- Prefer parseFloat when number type is accepted (fixes anyOf[integer, number])
- Add tests for integer-only decimal rejection, anyOf coercion, and array elements

Co-Authored-By: Qwen-Coder <noreply@qwen.ai>

* fix(core): coerce whole-number decimal strings for integer schemas

Replace the syntactic `hasDecimal` guard with a semantic `num % 1 !== 0`
check so whole-number decimal strings ("3.0", "-10.0") coerce to integers
while genuine non-integers ("5.5") are still left for the LLM to
self-correct. Python-based models commonly serialize float(3) as "3.0".

Co-Authored-By: Qwen-Coder <noreply@qwenlm.ai>

---------

Co-authored-by: Qwen-Coder (Qwen Code) <noreply@qwen.ai>
Co-authored-by: Qwen-Coder <noreply@qwenlm.ai>
2026-06-15 23:15:32 +08:00
..
acp-bridge chore(release): v0.18.1 [skip ci] 2026-06-15 21:43:22 +08:00
channels chore(release): v0.18.1 [skip ci] 2026-06-15 21:43:22 +08:00
cli fix(monitor): batch-drain notifications to reduce token waste (#5165) 2026-06-15 22:14:35 +08:00
core fix(core): coerce numeric string params in SchemaValidator for MCP tools (#4967) 2026-06-15 23:15:32 +08:00
desktop chore(release): desktop desktop-v0.0.4 [skip ci] 2026-06-15 21:43:07 +08:00
sdk-java feat(core): add NotebookEdit tool for Jupyter notebooks 2026-05-21 00:06:15 +08:00
sdk-python doc[sdk-python] Expand Python SDK usage documentation (#3995) 2026-05-12 15:27:00 +08:00
sdk-typescript feat(web-shell): per-turn time & tokens on the collapse seam, below the prompt (#5163) 2026-06-15 22:35:45 +08:00
vscode-ide-companion chore(release): v0.18.1 [skip ci] 2026-06-15 21:43:22 +08:00
web-shell feat(web-shell): per-turn time & tokens on the collapse seam, below the prompt (#5163) 2026-06-15 22:35:45 +08:00
web-templates chore(release): v0.18.1 [skip ci] 2026-06-15 21:43:22 +08:00
webui chore(release): v0.18.1 [skip ci] 2026-06-15 21:43:22 +08:00
zed-extension chore(deps): upgrade ink 6.2.3 → 7.0.2 + bump Node engine to 22 (#3860) 2026-05-11 17:29:50 +08:00