qwen-code/packages/core
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
..
scripts
src fix(core): stringify const-derived enums in toOpenAPI30 (#7547) 2026-07-25 09:25:15 +00:00
vendor feat test tool permissions 2026-03-10 16:30:22 +08:00
index.ts fix: Remove remaining ClearcutLogger export from packages/core/index.ts 2026-02-01 14:52:14 +08:00
package.json chore(release): v0.21.0 (#7675) 2026-07-24 13:47:34 +00:00
test-setup.ts feat(memory): managed auto-memory and auto-dream system (#3087) 2026-04-16 20:05:45 +08:00
tsconfig.json fix: upgrade @lydell/node-pty to 1.2.0-beta.10 to fix PTY FD leak 2026-04-01 07:55:56 +08:00
vitest.config.ts test: raise timeout ceiling for I/O-bound tests flaky under CI contention (#7230) 2026-07-19 12:03:48 +00:00