fix(#100,#101,#102): cwd fallback + cascade timeout invalidation + kimi dialect (v2.0.38)
#100 (yunduobaba) — opus refused to read Windows path because the user's claudecode didn't emit a canonical <env> block, so cwd extraction got nothing and cascade's built-in /tmp/windsurf-workspace prior won. Added bare-path fallback in extractCallerEnvironment: when canonical extractors miss, scan the FIRST user message head for a leading absolute path (Windows / Unix / tilde). Conservative guards (first non-trivial token only, file-extension reject) avoid mis-attributing target paths as cwd. yunduobaba's Chinese-glued path "C:\Users\renfei\...分析下这个项目" now lifts cleanly. #101 (nalayahfowlkest-ship-it) — claude-opus-4.6-thinking "context deadline exceeded" mid-stream left the cascade trajectory half-broken, but proxy restored the entry to the reuse pool because reuseEntryDead was only set on explicit "cascade not_found" errors. Next request reused the broken trajectory and the model only saw the trailing tool_result. Fix: stream + non-stream catch blocks now also invalidate on timeout patterns (context deadline / context cancellation / Client.Timeout). Static-analysis regression test locks both code paths. #102 (cookire) — kimi-k2-6 hit cascade's "The model produced an invalid tool call". Cascade upstream's per-model parser only accepts the kimi_k2 vLLM dialect for the original kimi-k2 / kimi-k2-thinking SKUs; newer SKUs (kimi-k2.5, kimi-k2-6) need openai_json_xml. Tightened pickToolDialect accordingly. Tests: 403 -> 418 (+15: #100 fallback +9, #101 invalidation +4, #102 dialect +2).
D
dwgx committed
495367cd1ea42a72587e133582b820e2d613100d
Parent: fb61903