{"content":"fix(volc-ark-provider-compat) 2876c56a: REVISED root-cause fix for the Volcengine Ark glm-5.3-flash first-bubble failure (session 1ed5daec) — supersedes c6343da7, which the owner rightly rejected as overreach (it clamped auto-effort semantics and shipped a kernel patch; both reverted, branch reset to main before this commit).\n\nWhat the forensics actually showed: the effort chain (auto -> cerebellum verdict / assistant-mode conservative fallback) resolving to \"off\" is DESIGNED and unchanged. The real differentiator is per gateway: on the working GLM-5.3-flash routes, the wire shape \"off\" produces is TOLERATED — CommandCode and scnet (zai chat dialect) receive thinking:{type:'disabled'} and strip/ignore it; zhipu and z.ai (Responses default) receive reasoning:{effort:'none'} and accept it; OpenCode Go's reasoning_effort dialect sends nothing at all. Volcengine Ark is the only gateway that VALIDATES: chat-completions and anthropic both 400 InvalidParameter on thinking.type `disabled`, and on Responses it silently ignores effort 'none' while running unbounded default thinking that consumed the model row's max_output_tokens (turn ended \"Response incomplete: length\").\n\nSo the fix stays entirely in the app's declaration layer (dshModelReasoning.ts) — no kernel patch, no effort-ladder semantics change, cerebellum rungs untouched: (1) new dshRouteReasoningEffort re-spells ONLY the off value per wire at the single runner choke point dshTurnProviderFromRoute, with an INFO log; low/high/max and every non-GLM-5 family pass through byte-identical. (2) GLM declarations split by generation: GLM-5.x responses declares off:'low' so pi-ai answers an off turn with the MINIMAL reasoning:{effort:'low'} (bounded thinking, no summary/include surface — same rule the OpenAI-compat proxy already applies via responsesEffortForThinkingOff); GLM-5.x anthropic OMITS off so pi-ai pins thinkingLevelMap.off to null and, with the effort dropped, emits NO thinking control — provider default, exactly the tolerate-and-default treatment the working gateways give an off turn; GLM-5.x zai chat carries the lowest rung because that dialect hardcodes thinking:{type:'disabled'} whenever no effort rides (every rung is byte-identical on that wire). GLM-4.x keeps off:null everywhere (disable genuinely honored), OpenCode Go dialect unchanged, CommandCode/scnet/zhipu/z.ai now send shapes their upstreams accept by construction.\n\nVerification: tsc compile green; node --test 32/32 across dshModelReasoning (per-generation declaration shapes + 18 new helper cases), modelThinking, dshReasoningEffort, dshRuntimeConfigEfforts, coworkProxyGlmThinking. Live-wire shapes on Ark remain owner-acceptance (key sealed in app settings): expected now = chat thinking:{type:'enabled'}, responses reasoning:{effort:'low'}, anthropic no thinking control. Branch fix/volc-ark-provider-compat, not merged to main pending owner retest.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}