fix(coder): replace claude-family phase default with the provider's own model#337
Conversation
…wn model Live-build finding (2026-06-12, run 7): with AGENT_PROVIDER_CODER=openai and no explicit model anywhere, the coder session was created with the phase-model DEFAULT — which phase_config resolves to a claude-* id — and the OpenAI provider 404'd on claude-sonnet-4-5-20250929. The smart router used to mask this by replacing the model on its own; once an explicit provider pin makes the router stand down (#335), the claude-centric default leaks straight into the direct provider session. After provider/runtime resolution (and only when nothing pinned a model: no --model, no smart route, no runner route, no task_metadata phase model), a claude-family phase model headed to a non-Claude provider is now replaced with that provider's configured model (AGENT_MODEL_<TYPE> / <PROVIDER>_MODEL / provider default), with an info line stating the substitution. 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 41 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 |
|
Live-build finding (2026-06-13, spec 901): with QA roles routed to a direct provider (qa_reviewer/qa_fixer on openai via the promotion gate, now that #317 dropped the opt-in), the QA runtime session was built with the QA phase-model DEFAULT — which phase_config resolves to a claude-* id — and OpenAI 404'd on claude-sonnet-4-5-20250929. This is the QA-path analog of the coder fix in #337: once routing correctly sends QA to the direct provider, the Claude-centric phase default leaks straight into the session. New ProviderConfig.coherent_session_model() returns the provider's own configured model when the requested model is a Claude-family id and the provider is non-Claude; otherwise it passes the request through unchanged. Both QA runtime shims (run_qa_reviewer_runtime_session, _build_qa_fixer_runtime_session) now route their model through it before create_session. The qa_fixer recovery loop already uses get_fallback_model() (#316 parity), so once the initial model is the provider's, the fallback chain (gpt-5.2 -> gpt-5 -> ...) stays coherent. Tests: 5 helper cases (claude->provider, explicit preserved, None, claude-provider unchanged, no-configured-model keeps request) + existing QA runtime / factory suites. 85 passed. Signed-off-by: Oleg Miagkov <mrobenner@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>



Находка живой сборки №7
Run 7 (после мержа #333/#335):
AGENT_PROVIDER_CODER=openai, модель нигде явно не задана →phase_modelостаётся Claude-дефолтом фазы (claude-sonnet-4-5-20250929) и уезжает в OpenAI-сессию → 404model_not_foundна первом же комплишене. Раньше это маскировал smart-роутер (он подменял модель своей) — но с #335 при явном пине провайдера роутер корректно отступает, и Claude-центричный дефолт протекает напрямую.Фикс
После резолва провайдера/рантайма (и только когда модель никто не пинил: ни
--model, ни smart route, ни runner route, ниtask_metadata) claude-familyphase_model, направляющийся в не-Claude провайдера, заменяется моделью самого провайдера (AGENT_MODEL_<TYPE>/<PROVIDER>_MODEL/ дефолт), с info-строкой о подмене.Явная (пусть и противоречивая) конфигурация «
--model claude-x+ provider=openai» тоже разрешается в пользу модели провайдера — с видимой пометкой в логе.Tests: 241 passed (runtime-сьюта), ruff clean. Пятый фикс серии живой сборки (#332–#336 → этот).
🤖 Generated with Claude Code