fix(coder): provider-aware model fallback in subtask recovery - #334
Conversation
Live-build finding (2026-06-12): when a gpt-5.2 coder session failed and the recovery manager recommended model fallback, the inline fallback block guessed a Claude shorthand from the model name and defaulted ANY non-Claude model to "sonnet". The chain then yielded "haiku", resolve_model_id() expanded it to claude-haiku-4-5-20251001, and the retry sent a Claude model id to the OpenAI provider — 404 model_not_found, fatal for the whole build. Use core.model_fallback.get_fallback_model() instead: it looks up the ACTUAL current model and returns its same-provider fallback (gpt-5.2 -> gpt-5, claude-sonnet-4-5 -> claude-haiku-4-5, gemini-2.5-flash -> gemini-2.0-flash). This is the same helper the QA fixer already uses for its retry parity (#316), so coder recovery now matches that behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
|
Warning Review limit reached
More reviews will be available in 15 minutes and 46 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 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 |
|



Находка живой сборки №6 (фатальная для direct-провайдеров)
Recovery после падения gpt-5.2-сессии рекомендовал model fallback, а inline-блок в
agents/coder.pyугадывал Claude-шортхенд по имени модели с дефолтом"sonnet"для любого не-Claude id → чейн далhaiku→resolve_model_id()развернул вclaude-haiku-4-5-20251001→ ретрай отправил Claude-модель в OpenAI-провайдера → 404model_not_found→ сборка умерла.Фикс
Заменён на существующий provider-aware
core.model_fallback.get_fallback_model()(его же использует qa_fixer с #316):gpt-5.2 → gpt-5,claude-sonnet-4-5 → claude-haiku-4-5,gemini-2.5-flash → gemini-2.0-flash. Падение в том же провайдере, как и задумано чейном.Проверено:
resolve_model_id("gpt-5")— passthrough; 240 passed (agent_runtime), ruff clean.🤖 Generated with Claude Code