fix(ai-script): qwen3.7-max 结构化输出修复(DashScope 三件套)
接入后报错'No object generated: response did not match schema'。逐项查实 DashScope compatible-mode 三个前提: 1. supportsStructuredOutputs:true — SDK 才发 response_format=json_schema(DashScope 实测严格按 schema 返; 松散 json_object 不带 schema → qwen 乱返 → Zod 不符)。 2. prompt 含 'json' 字样 — DashScope 硬性校验(否则 400 InvalidParameter);runner 对 qwen 注入(withQwenJsonHint)。 3. enable_thinking:false — qwen3.7-max 是推理模型,流式下 thinking 污染 content 流 → JSON 解析碎; SDK 无此参数,用 createOpenAICompatible 的 fetch 中间件往 body 注入。关思考还顺带提速、降本(¥0.031→0.008)。 验证:standard 流式 source=agent、succeeded、¥0.0078。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Showing
Please
register
or
sign in
to comment