Skip to content

fix(cli): respect explicit provider pins and hint --force in CI approval errors#335

Merged
OBenner merged 1 commit into
developfrom
fix/explicit-provider-ux
Jun 12, 2026
Merged

fix(cli): respect explicit provider pins and hint --force in CI approval errors#335
OBenner merged 1 commit into
developfrom
fix/explicit-provider-ux

Conversation

@OBenner

@OBenner OBenner commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Находки живой сборки №2 и №3 (CLI UX)

№3 — Smart routing молча перебивал AGENT_PROVIDER_CODER=openai и уводил сессию на claude. По precedence ADR-006 явный per-agent пин — сильнейшее намерение оператора: роутер теперь отступает при заданном AGENT_PROVIDER_<TYPE> (с info-строкой «Smart routing skipped: … pins the provider»). Глобальный AI_ENGINE_PROVIDER сохраняет текущее поведение — кост-роутинг по сложности остаётся фичей, когда оператор не пиновал роль.

№2 — review_required в CI давал только «This spec requires human approval before building» без выхода. Теперь сообщение подсказывает: одобрить в UI или --force для headless-прогонов.

Tests: 268 passed по затронутой поверхности; ruff clean. Поведенческая пара к #333/#334 — вместе они доводят прод-конвейер до состояния «AUTO_CODE_AUTONOMY=safe + AGENT_PROVIDER_CODER=openai работает из коробки».

🤖 Generated with Claude Code

…val errors

Two CLI UX findings from the 2026-06-12 live build:

1. Smart routing silently discarded AGENT_PROVIDER_CODER=openai and
   re-routed the session to claude. Per ADR-006 precedence an explicit
   per-agent provider pin is the strongest operator intent, so the
   complexity router now stands down when AGENT_PROVIDER_<TYPE> is set
   (with an info line explaining why). The global AI_ENGINE_PROVIDER
   keeps today's behavior: cost-based routing may still pick the tier.

2. In CI/JSON mode an unapproved spec failed with only
   "review_required: This spec requires human approval before building."
   The error now tells the operator what to do: approve in the UI or
   pass --force for headless runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@OBenner, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 8 minutes and 13 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: af3cd589-c566-49a7-9d08-87d8d4a684d2

📥 Commits

Reviewing files that changed from the base of the PR and between f960903 and e534c23.

📒 Files selected for processing (2)
  • apps/backend/agents/coder.py
  • apps/backend/cli/build_commands.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/explicit-provider-ux

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added area/backend bug Something isn't working size/S labels Jun 12, 2026
@sonarqubecloud

Copy link
Copy Markdown

@OBenner OBenner merged commit 1ef84db into develop Jun 12, 2026
20 checks passed
OBenner added a commit that referenced this pull request Jun 13, 2026
…wn model (#337)

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.

Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/backend bug Something isn't working size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant