← Back to Pull requests

fix(desktop): guide model selection when changing the default connection #5866

Closed
unknown closed this pull request without merging on Oct 05, 2026 19:09 UTC
View on GitHub
unknown unknown commented on Sep 30, 2026 04:40 UTC
Author

Summary

Fixes #5865

Setting a custom relay with no enabled chat model as default currently produces a generic error. The action now guides the user through choosing a model:

  • Switch directly when one chat model is enabled; prompt when several are enabled.

  • When none are enabled, explicitly select a model and confirm Enable and set as default. An empty inventory offers discovery or manual entry without silently enabling the first result.

  • Enable the selected model and change the default in one catalog commit. Cancellation or a rejected commit retains the original default, with actionable errors for stale or unavailable selections.
  • Production components/styles rendered in Chromium with a synthetic connection and stubbed bridge:

    | Before | After |
    | --- | --- |
    | !Generic failure when no model is enabled | !Explicitly enable Model Beta and set the connection as default |

    <details>
    <summary>Empty model inventory</summary>

    !Fetch models or add one manually

    </details>

    Verification

  • Hosted CI for 8223aeba7 passed, including full Storybook smoke, Desktop e2e, Runtime Host tests, geometry checks, and CLI package validation.

  • After merging main d6876d708: npm run build, npm run typecheck, affected Desktop/Host/storage suites (178 passed), renderer architecture and protocol-epoch checks passed.

  • Global lint passed; changed-file Biome checks and Desktop/UI Knip checks passed. Repository-wide format checking reports existing untracked local research files outside this PR.

  • Chromium checks reproduced the original error and verified explicit Model Beta selection, successful default update, and empty-inventory guidance.

  • Astryx surface inventory and its 23 tests passed. Storybook typecheck/build and all 63 settings-page render scenarios passed, including the default-badge typography play assertions.

  • Earlier full npm test run was not fully green: the remaining Host implementation-child-patch timeout also reproduced on the unmodified baseline. Python eval tests passed under Python 3.12 (94 run, 13 skipped).
  • Compatibility

    Bump Runtime Host compatibility epoch 199 → 200 for atomic enable/default selection and discovery that preserves the enabled-model selection. Desktop and Runtime Host must be upgraded together.

    AI use

  • No generative tool made a substantive contribution

  • Generative tooling made a substantive contribution
  • Tool(s) and scope: Codex assisted with diagnosis, implementation, tests, visual verification, and this submission on behalf of @liuxiaocs7. The implementation commit includes Generated-by: Codex; retain it when squashing.

    Checklist

  • Tests cover the change and fail without it

  • Lint, format, typecheck and the affected suites pass locally — affected checks pass; the repository-wide format limitation is noted above.
  • Does this PR entail a change in behavior?

  • Yes — described under Summary above

  • No
  • Diff: 414 lines (+310 / -104) across 5 files Reviewer: hqhq1025 Review duration: 8069m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.45) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 414 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    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.361
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5866"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 44.9% (MEDIUM) · Higher = larger blast radius
    44.9%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 19.4% · Safe to merge
    19.4%
    Repository