Repository navigation
fix: close three v0.9.24 regressions before v0.9.25 (#778 #775 #783) - #791
Conversation
Bundles three independent bug fixes that block the v0.9.25 release. fix(providers): fallback chain resolves its OWN model, not the primary's (#778) createFallbackProvider copied config.model from the primary into every fallback. With OpenAI primary + Gemini fallback, Gemini was called with 'gpt-4o-mini' and 404'd on every call, which tripped the circuit breaker and blocked downstream LLM ops entirely. New defaultModelFor() resolves each provider's env-driven default (OPENAI_MODEL, GEMINI_MODEL, ANTHROPIC_MODEL, MINIMAX_MODEL, OPENROUTER_MODEL) so a fallback config now does what it advertises. fix(replay): import-jsonl re-keys on parsed.sessionId, not existing.id (#775) The existing-session branch wrote kv.set(KV.sessions, existing.id, ...) but legacy session rows can be missing the 'id' field. existing.id was then undefined, JSON.stringify dropped the key from the state::set payload, and the engine rejected the call with 'missing field key'. The rejection aborted the whole handler — a single legacy row killed the entire import. Now re-keys on parsed.sessionId (always populated by parseJsonlText's three-level fallback) and backfills missing existing.id so future reads stay clean. fix(summarize): strip markdown fences + retry final parse on failure (#783) parseSummaryXml passed the raw LLM payload to the tag regex. DeepSeek, GPT, and others wrap XML in fences or prepend a conversational sentence, which caused a silent parse_failed and the session was never summarized. Added stripXmlWrappers() that peels markdown fences and a surrounding pre/postamble before the regex runs. Also extended the chunk-level 2-attempt retry pattern to the final summarize merge so a flaky wrap on the first attempt doesn't drop the summary. Tests (10 new total) test/fallback-model-resolution.test.ts (5): primary/fallback model separation across OpenAI/Gemini/Anthropic/Minimax/OpenRouter, env override precedence, duplicate-provider skip. test/replay-import-key.test.ts (2): id-less existing row no longer aborts the import; fresh import path unchanged. test/summarize.test.ts (3): markdown-fenced XML parses cleanly, final retry recovers on first-attempt parse failure, double-fail still surfaces parse_failed. Full suite: 125 files / 1379 tests pass. Closes #778, closes #775, closes #783.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR fixes three unrelated bugs affecting fallback provider failover, session import batch failures, and summary XML parsing robustness. Each fix includes corresponding test coverage for the corrected behavior. ChangesFallback Provider Model Resolution
Session ID Re-keying in Imports
Summary XML Parsing Resilience
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bump to 0.9.25 across 9 files + CHANGELOG. Closes #778 #775 #783 (PR #791), #758 #726 (PR #773), #759 (PR #772), #752 (PR #774), #729 (PR #780), #781 (PR #782), #753 (PR #789), #771 (PR #786), #762 (PR #764). Files bumped: - package.json - packages/mcp/package.json - plugin/.claude-plugin/plugin.json - plugin/.codex-plugin/plugin.json - plugin/plugin.json - src/version.ts - src/types.ts (ExportData.version union) - src/functions/export-import.ts (supportedVersions Set) - test/export-import.test.ts (assertion) 125 test files / 1379 tests pass. npm audit (root + website): 0 vulns.
…resolution fix: close three v0.9.24 regressions before v0.9.25 (rohitg00#778 rohitg00#775 rohitg00#783)
Bump to 0.9.25 across 9 files + CHANGELOG. Closes rohitg00#778 rohitg00#775 rohitg00#783 (PR rohitg00#791), rohitg00#758 rohitg00#726 (PR rohitg00#773), rohitg00#759 (PR rohitg00#772), rohitg00#752 (PR rohitg00#774), rohitg00#729 (PR rohitg00#780), rohitg00#781 (PR rohitg00#782), rohitg00#753 (PR rohitg00#789), rohitg00#771 (PR rohitg00#786), rohitg00#762 (PR rohitg00#764). Files bumped: - package.json - packages/mcp/package.json - plugin/.claude-plugin/plugin.json - plugin/.codex-plugin/plugin.json - plugin/plugin.json - src/version.ts - src/types.ts (ExportData.version union) - src/functions/export-import.ts (supportedVersions Set) - test/export-import.test.ts (assertion) 125 test files / 1379 tests pass. npm audit (root + website): 0 vulns.
Three independent v0.9.24 bug fixes bundled for the v0.9.25 release.
#778 fallback chain inherits primary's model
createFallbackProvidercopiedconfig.modelfrom the primary into every fallback. With OpenAI primary + Gemini fallback, Gemini was called withgpt-4o-miniand 404'd on every call, which tripped the circuit breaker and blocked downstream LLM ops. NewdefaultModelFor()resolves each provider's env-driven default (OPENAI_MODEL/GEMINI_MODEL/ANTHROPIC_MODEL/MINIMAX_MODEL/OPENROUTER_MODEL).#775 import-jsonl aborts on legacy session row missing
idExisting-session branch did
kv.set(KV.sessions, existing.id, ...)but legacy rows can lackid.existing.id === undefined→ JSON.stringify drops thekey→ engine returnsmissing field \key`→ whole handler aborts → entire import dies. One bad row killed the batch. Now re-keys onparsed.sessionId(always populated) + backfillsexisting.id`.#783 parseSummaryXml fails on markdown fences
Many LLMs wrap structured XML in
\``xml ... ```fences or add conversational text around it. The raw payload went straight to the tag regex, returningparse_failedsilently. AddedstripXmlWrappers()` to peel fences + pre/postamble before regex. Also extended the chunk-level 2-attempt retry pattern to the final-summarize merge so one flaky wrap doesn't drop the summary.Tests
10 new across 3 files. Full suite: 125 files / 1379 tests pass.
Closes #778, closes #775, closes #783.
Summary by CodeRabbit
Bug Fixes
Tests