qwen-code/packages
chinesepowered 5bb53eb645
fix(core): stringify const-derived enums in toOpenAPI30 (#7547)
toOpenAPI30 maps const to a single-value enum, then separately stringifies
enums because — per its own comment — Gemini strictly requires enums to be
strings. The two never met: the stringification keys off source['enum'],
which a const-only schema never sets, so the const value went through raw.

  { const: 5 }     -> { enum: [5] }        // number, breaks the rule
  { const: true }  -> { enum: [true] }     // boolean, likewise
  { enum: [1, 2] } -> { enum: ['1', '2'] } // the intended behavior

Build the const-derived enum with String() so both paths produce the same
kind of value.

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-07-25 09:25:15 +00:00
..
acp-bridge feat(serve): Hot-reload workspace trust changes (#7268) 2026-07-25 08:43:07 +00:00
audio-capture chore(release): v0.21.0 (#7675) 2026-07-24 13:47:34 +00:00
channels chore(release): v0.21.0 (#7675) 2026-07-24 13:47:34 +00:00
chrome-extension chore(release): v0.21.0 (#7675) 2026-07-24 13:47:34 +00:00
cli feat(stats): show generation timing metrics (#7677) 2026-07-25 09:06:33 +00:00
core fix(core): stringify const-derived enums in toOpenAPI30 (#7547) 2026-07-25 09:25:15 +00:00
cua-driver fix(mcp): add opt-in model payload filtering (#7413) 2026-07-21 09:49:04 +00:00
desktop fix(desktop): scale formatBytes past GB so terabyte sizes don't render as "undefined" (#7623) 2026-07-25 09:21:15 +00:00
mobile-mcp chore(release): v0.20.1 (#7461) 2026-07-22 02:00:22 +00:00
sdk-java fix(sdk-java): Harden daemon transport reliability (#7603) 2026-07-24 04:22:05 +00:00
sdk-python fix(sdk-python): validate max_tool_calls and max_subagent_depth as integers (#7548) 2026-07-23 08:45:13 +00:00
sdk-typescript feat(serve): Hot-reload workspace trust changes (#7268) 2026-07-25 08:43:07 +00:00
vscode-ide-companion feat(core): configure stream rate-limit retry delays (#7674) 2026-07-25 08:56:21 +00:00
web-shell perf(web-shell): paint the composer git chip before git status completes (#7680) 2026-07-25 07:05:52 +00:00
web-templates fix(cli): measure insight days and hours in local time everywhere (#7670) 2026-07-24 15:41:13 +00:00
webui perf(web-shell): paint the composer git chip before git status completes (#7680) 2026-07-25 07:05:52 +00:00
zed-extension