configuration.ts
6.37 KB
-
fix(ai-script): qwen3.7-max 结构化输出修复 + gemini 撤回关思考 + 超时兜底 + TTFT/latency 落账 + 价格表修正 · 70b70ce0
- qwen3.7-max:DashScope 不强制 json_schema → 改 supportsStructuredOutputs:false + fetch 中间件强制 response_format:json_object + enable_thinking:false;runner 从 outputSchema 自动注入英文 key 骨架 (withQwenStructuredHint),否则模型自编 key 必 fail。 - 三档 schema 去掉 .min/.max/.length/.int 硬约束(对中文偏严,qwen 简洁输出被打回 too_small)→ 改 describe 软引导。 - gemini-3.5-flash 撤回 thinkingBudget:0(关思考会致结构化输出偶发 parse 失败);慢/卡由超时+重试+兜底兜住。 - 给 generateObject/streamObject 接 180s 超时(AI_REQUEST_TIMEOUT_SEC,原 60→180)防永久挂起。 - agent_invocations 加 ttft_ms / latency_ms(+migration),流式记首字、收尾记总耗时(对齐 Dify usage)。 - 价格表按官方页修正(¥/M):deepseek-v4-pro 0.03/3.13/6.26、flash 0.02/1.01/2.02、 gemini-3.5-flash 1.08/10.8/64.8、qwen3.7-max 1.2/12/36(旗舰价,之前低估 5x)。 - 三档 promptVersion 随 schema 变更 bump。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
luoqi committed