fix(qa): use the provider's own model for direct-API QA sessions#338
Conversation
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. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR adds provider-model coherence checking to prevent Claude-family model IDs from being used with non-Claude providers. A new ChangesProvider-model coherence for QA sessions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
|



Находка живой сборки №8 (QA-аналог #337)
Финальный прогон (спек 901) — первый, где QA-роли реально дошли до прямого провайдера (после #317, удалившего опт-ин). Маршрутизация сработала:
qa_reviewerушёл на openai через гейт. Но QA-сессия собралась с дефолтом QA-фазы (phase_configотдаётclaude-*) → OpenAI 404 наclaude-sonnet-4-5-20250929.Это точный аналог #337, но в QA-пути: как только маршрут корректно отправляет QA на прямого провайдера, Claude-центричный дефолт фазы протекает в сессию.
Фикс
Новый
ProviderConfig.coherent_session_model()возвращает собственную модель провайдера, когда запрошенный id — claude-family, а провайдер не-Claude; иначе пропускает запрос как есть. Оба QA runtime-shim'а (run_qa_reviewer_runtime_session,_build_qa_fixer_runtime_session) прогоняют модель через него передcreate_session. Recovery-цикл fixer'а уже используетget_fallback_model()(паритет #316), так что при корректной начальной модели чейнgpt-5.2 → gpt-5 → …остаётся когерентным.Tests
5 кейсов хелпера (claude→провайдер, явная сохраняется, None, claude-провайдер без изменений, нет настроенной модели → запрос как есть) + существующие QA runtime / factory сьюты. 85 passed, ruff clean.
Восьмой фикс серии живой сборки (#332–#337 → этот). После него QA-фаза на прямом провайдере не падает на старте по 404.
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests