← Back to Pull requests

fix(doctor): recommend current Anthropic and Google models #1133

Merged
pcbeingused33 merged 4 files (32 lines) on Nov 02, 2026 16:53 UTC
View on GitHub
pcbeingused33 pcbeingused33 commented on Oct 27, 2026 14:58 UTC
Author

Summary

af doctor suggests an AI_MODEL for whichever provider key it finds, and for Anthropic and Google it suggested claude-3-5-sonnet-20241022 and gemini-1.5-pro. Both models are retired (claude-3-5-sonnet was retired on 2025-10-28 per Anthropic's model deprecations; no Gemini 1.5 model is listed any more on the Gemini API models page), so a scaffold that follows the recommendation fails on its first model call. The recommendation is now claude-sonnet-5-5 and gemini-3.8-flash (the current stable Flash model), and the commented examples in the docker .env template and the af init --default-model help text match.

The gpt-4o suggestion for OpenAI is left as it is.

Type of change

  • Bug fix
  • Test plan

  • cd control-plane && go test ./internal/cli ./internal/templates

  • New subtest recommended models are not retired ones in doctor_additional_test.go sets only the Anthropic (then only the Google) key and checks the recommended model. It fails on main with the retired IDs and passes with this change.
  • Test coverage

  • I ran tests for the surface(s) I changed locally.

  • New code paths are covered by tests in this PR (no bare additions).
  • Checklist

  • Commits are signed and follow conventional-commits style.
  • This change was prepared with Claude Code.

    Diff: 32 lines (+27 / -5) across 4 files Reviewer: AbirAbbas Review duration: 8755m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.33) × (1 − Review Confidence (0.85)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.33 · 32 lines diff across 4 files
    0.33
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.76 · 5 substantive comment(s)
    0.76
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    85%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.209
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    10 items
    CLAassistant CLAassistant commented on Oct 27, 2026 14:58 UTC
    Contributor
    santoshkumarradha santoshkumarradha commented on code on Oct 28, 2026 12:59 UTC
    Code Review
    control-plane/internal/cli/doctor.go:1
    @@ -74,9 +74,9 @@ var providerEnvVars = []struct {
     	Model  string // suggested default model when this provider is the chosen one
     }{
     	{Name: "openrouter", EnvVar: "OPENROUTER_API_KEY", Model: "openrouter/google/gemini-2.5-flash"},
    -	{Name: "anthropic", EnvVar: "ANTHROPIC_API_KEY", Model: "claude-3-5-sonnet-20241022"},
    +	{Name: "anthropic", EnvVar: "ANTHROPIC_API_KEY", Model: "claude-sonnet-5-5"},

    claude-sonnet-5-5 is not a published Anthropic API model ID. Please switch this to claude-sonnet-5 and update the matching test/template text so af doctor suggests a model users can call.

    santoshkumarradha santoshkumarradha commented on Oct 28, 2026 12:59 UTC
    Reviewer

    Thanks for updating these recommendations. The Google change is current, but the Anthropic model ID needs one small correction before this can land.

    pcbeingused33 pcbeingused33 commented on code on Oct 28, 2026 14:06 UTC
    Code Review
    control-plane/internal/cli/doctor.go:1
    @@ -74,9 +74,9 @@ var providerEnvVars = []struct {
     	Model  string // suggested default model when this provider is the chosen one
     }{
     	{Name: "openrouter", EnvVar: "OPENROUTER_API_KEY", Model: "openrouter/google/gemini-2.5-flash"},
    -	{Name: "anthropic", EnvVar: "ANTHROPIC_API_KEY", Model: "claude-3-5-sonnet-20241022"},
    +	{Name: "anthropic", EnvVar: "ANTHROPIC_API_KEY", Model: "claude-sonnet-5-5"},

    Thanks for checking this. I believe claude-sonnet-5-5 is a published API model ID: it is listed as the Claude API ID and alias for Claude Sonnet 5.5 in the Models overview, and the Model deprecations page lists it as Active and as the recommended replacement for claude-sonnet-4-5-20250929 (retiring November 30, 2026).

    claude-sonnet-5 is also still listed as active, so if you would rather af doctor suggest that one, I'm happy to switch it and update the matching test/template text. Just let me know which you prefer.

    This reply was drafted with the assistance of an AI coding agent (Claude).

    github-actions[bot] github-actions[bot] commented on Oct 30, 2026 13:21 UTC
    Bot

    📊 Coverage gate

    Thresholds from [.coverage-gate.toml](../../.coverage-gate.toml): per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

    | Surface | Current | Baseline | Δ | |
    | --- | ---: | ---: | ---: | :---: |
    | control-plane | 88.20% | 87.40% | ↑ +0.80 pp | 🟡 |
    | sdk-go | 93.70% | 92.00% | ↑ +1.70 pp | 🟢 |
    | sdk-python | 94.72% | 93.73% | ↑ +0.99 pp | 🟢 |
    | sdk-typescript | 92.50% | 90.42% | ↑ +2.08 pp | 🟢 |
    | web-ui | 84.90% | 84.79% | ↑ +0.11 pp | 🟡 |
    | aggregate | 86.12% | 85.75% | ↑ +0.37 pp | 🟡 |

    ✅ Gate passed

    No surface regressed past the allowed threshold and the aggregate stayed above the floor.

    <!-- Sticky Pull Request Commentcoverage-gate -->

    github-actions[bot] github-actions[bot] commented on Oct 30, 2026 13:21 UTC
    Bot

    📐 Patch coverage gate

    Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

    | Surface | Touched lines | Patch coverage | Status |
    | --- | ---: | ---: | :---: |
    | control-plane | 1 | 100.00% | ✅ |
    | sdk-go | 0 | — | ➖ no changes |
    | sdk-python | 0 | — | ➖ no changes |
    | sdk-typescript | 0 | — | ➖ no changes |
    | web-ui | 0 | — | ➖ no changes |

    ✅ Patch gate passed

    Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

    <!-- Sticky Pull Request Commentpatch-coverage-gate -->

    AbirAbbas AbirAbbas commented on code on Oct 30, 2026 13:27 UTC
    Code Review
    control-plane/internal/cli/doctor.go:1
    @@ -74,9 +74,9 @@ var providerEnvVars = []struct {
     	Model  string // suggested default model when this provider is the chosen one
     }{
     	{Name: "openrouter", EnvVar: "OPENROUTER_API_KEY", Model: "openrouter/google/gemini-2.5-flash"},
    -	{Name: "anthropic", EnvVar: "ANTHROPIC_API_KEY", Model: "claude-3-5-sonnet-20241022"},
    +	{Name: "anthropic", EnvVar: "ANTHROPIC_API_KEY", Model: "claude-sonnet-5-5"},

    Checked this one. claude-sonnet-5-5 is the published ID for Claude Sonnet 5.5, the current Sonnet, and claude-3-5-sonnet-20241022 was retired on 2025-10-28, so the value in the PR is right as written. gemini-3.8-flash is also listed as stable on Google's models page with no shutdown date. Resolving this and re-requesting your review.

    AbirAbbas AbirAbbas approved these changes on Oct 30, 2026 13:27 UTC
    Approved Reviewer

    Both suggested models check out (details in the doctor.go thread), the doctor tests pass, and CI is green. The one leftover retired-model mention is the claude-3-sonnet example in the Python AIConfig.model description, which is out of scope here.

    pcbeingused33 pcbeingused33 commented on Nov 02, 2026 14:17 UTC
    Author

    Hi @santoshkumarradha, the changes you requested on 10-28 are addressed and @AbirAbbas has approved since. Could you take another look when you have a moment, so the old review no longer blocks the merge?

    Reviewers
    Assignees
    pcbeingused33 pcbeingused33
    Labels
    risk: low confidence: 85.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 33.3% (LOW) · Higher = larger blast radius
    33.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 85.5% · Lower = rushed or shallow review
    85.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 4.8% · Safe to merge
    4.8%