Skip to content

fix(native-chat): preserve models missing from provider listings - #35266

Merged
brennanb2025 merged 68 commits into
mainfrom
brennanb2025/chat-model-keep
Oct 29, 2026
Merged

brennanb2025 merged 68 commits into
mainfrom
brennanb2025/chat-model-keep

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

A chat could switch models after Claude rejected its saved choice, and discovery could delete the remembered Grok/OMP model when a refreshed list omitted it.

Claude now keeps the chosen model after a model-not-found response and shows one failed-turn notice. Repeated sends keep that choice; explicitly picking another model allows the next send. Discovery refreshes update menus without deleting remembered preferences. New chats display the literal saved model ID when the host inventory does not name it, including IDs that collide with built-in labels.

ACP model errors retain the existing generic provider-rejection display and actual diagnostic. Authentication, temporary errors and lost sessions retain their own failure cause. Existing clients can classify and acknowledge the failed request, and the desktop keeps its localized error lead. Terminal launches continue passing the remembered model flag and displaying the CLI's own output.

The legacy clear-model-if-missing request remains valid and is ignored by an upgraded owning host. Older owning hosts retain their own behavior. No saved field, settings migration, new refusal gate or new RPC was added.

Based on main after #31927 landed. tracked in STA-10947; tracked in STA-11527.

Plan and review path

Full path: this changes provider-error recovery and settings/read consumers across client versions. Remove observation-driven model writes and reuse the existing failure, explicit-pick and settings mechanisms. Two correctness review rounds are complete with no open findings. Final reference, performance and readiness reviews pass; real Claude/Codex upgrade and recovery QA passed.

Common pattern and compatibility

  • Provider rejection remains an error and does not change the chosen model. Refreshing a model menu does not delete a remembered preference.
  • Intended: keep the old clearing request as a host no-op and keep ACP's generic failure representation so released clients retain error text, latest status and read acknowledgement.
  • Intended: the remembered choice remains effective even when the advertised list suggests a default. The provider decides whether the chosen ID works; replacement always requires an explicit pick.
  • Intended: terminal output remains owned by the CLI; the existing model picker saves explicit picks for later launches.

Validation

Targeted host/runtime, translator, settings, desktop-hook, shared-status and notification-read tests passed. Review fixes cover optional assistant/result correlation metadata, authentication/internal/lost-session ACP errors, current rejection classification and old-client read acknowledgement. The normal pre-commit hooks passed.

Recorded fixtures and provider-source response shapes cover model refusals. The original unit replay combines a captured assistant frame with a recorded result envelope. QA also captured a separate real Claude assistant/result pair for the same invalid ID; native UI error/recovery was exercised independently.

CI is green on merged head6860e68a, including all five root test shards, typecheck/static checks, mobile verification, cross-version wire contracts, packages and persistence. CI executed the mobile omission/pick hook tests; no local dependency install was needed. The required production UUID-list operation contract runs at64/640 inputs and checks bounded work and cleanup.

The one main sync preserves the reviewed model mechanism and incoming startup changes; eight named files passed109 tests plus one paired-settings compatibility case. On the admitted M4Air, previous-main-created chats survived a graceful upgrade. Claude rejected the saved invalid ID twice without changing it, then returned two real replies after an explicit valid pick. Codex returned two real replies on its original restored thread, retaining its selected model. Its first hung request was a QA transport configuration issue reproduced outside Orca; enabling WebSocket support in the isolated provider config repaired it. Passed Claude flows were not rerun. Whole-window main/branch, recovery, Codex and unlisted-picker screenshots are in the review comment.

Deferred cosmetic P2: if Claude provides no model ID, Chinese notices contain the English fallback “this model.” No delivery, selection or recovery behavior is affected. The picker screenshot uses a disclosed unlisted saved-model fixture; provider responses and successful replies are real.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 28, 2026 19:19
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with a non-blocking error-message issue.

Findings

  1. P2 Notice blames the replacement model ▶

Summary

The PR preserves saved models when provider listings omit them and stops Claude from silently switching after a model error.

  • Saved model choices stay in place when provider lists leave them out.
  • Claude keeps the chosen model after a model-not-found reply.
  • ACP option failures keep their provider details in the existing rejection flow.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Saved model choice] --> B[Launch or send]
  B --> C{Provider accepts?}
  C -->|Yes| D[Run turn]
  C -->|No| E[Show failure]
  E --> F[Keep saved choice]
  F --> B
  F --> G[User picks another model]
  G --> B
  H[Refresh model listing] --> I[Update menu]
  I --> F
Loading

Reviews (5) · Last reviewed commit: "Merge main into chat model preservation ..." · Reviewed by Greptile

@brennanb2025
brennanb2025 changed the base branch from brennanb2025/chat-option-action-build to main October 28, 2026 23:08
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The changes keep saved model selections when discovery omits them and remove automatic settings writes that cleared those selections. Structured option views and launch requests retain literal model IDs. Unavailable-model rejections gain a failure kind, user-facing wording, and updated submission and attention projections. Claude session state removes launched- and retired-model tracking, while Claude journaling adds model-not-found failure handling and result deduplication.

Priority: Normal

Merge Risk: Low · up to 6860e

Legacy Fast selection can use the default tier, and launch-only models can widen shared catalogs. Translated errors may also contain English fallback text. These bounded issues merit owner awareness before merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: preserving models that are missing from provider listings.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description provides a clear summary, rationale, compatibility details, testing evidence, visual-proof references, deferred work, and linked issue identifiers. It does not reproduce the template h…
Full details: Description check

Explanation

The description provides a clear summary, rationale, compatibility details, testing evidence, visual-proof references, deferred work, and linked issue identifiers. It does not reproduce the template headings or checklist, and the issue identifiers are not explicit links, but the substantive information is mostly complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 13 functions across 25 files. (4 skipped: 4 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Nitpick comments: 1
src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.ts: 1

206-209: Trivial · Data Integrity & Integration · Low value

Remove the obsolete launchOnlyModelId fields and comments.

The live-listing path now intentionally saves all listing.models. The changed ACP test expects a newly reported model to enter the saved catalog. No repository code produces or consumes launchOnlyModelId, so the remaining fields describe a filter that no longer exists.

🧹 Remove the obsolete fields
   configured?: { model?: string; effort?: string }
-  /** Launch-injected rows require independent account-catalog membership. */
-  launchOnlyModelId?: string
   /** Successful model listings can still report that chats cannot start. */
   unavailable?: AgentSessionUnavailable
 }
@@
   models: AgentSessionModelOption[]
   fastModeSupport?: AgentSessionFastModeSupport
-  /** Launch-injected rows require independent account-catalog membership. */
-  launchOnlyModelId?: string
   /** null invalidates a stale default; absent means the session cannot resolve one. */
   configuredDefault?: AgentModelCatalogConfiguredChoice | null
 }

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1c046150-0ac7-464b-afa6-863a55b0596b
Commits

Reviewing files that changed from the base of the PR and between 78ad9f4 and 5481d96.

Files selected for processing: 255
  • config/scripts/build-mobile-web-app-bundle.test.mjs
  • config/scripts/verify-mobile-web-app-bundle.mjs
  • mobile/src/session/native-chat/input/use-mobile-native-chat-session-options.test.ts
  • mobile/src/session/native-chat/input/use-mobile-native-chat-session-options.ts
  • mobile/src/session/use-mobile-native-chat-model-discovery.test.ts
  • mobile/src/session/use-mobile-structured-agent-options.test.ts
  • mobile/src/session/use-mobile-structured-agent-options.ts
  • src/main/acp/acp-dialects/acp-dialect.ts
  • src/main/acp/acp-dialects/opencode-dialect.ts
  • src/main/acp/acp-message-execution-options.ts
  • src/main/acp/acp-model-catalog-probe.ts
  • src/main/acp/acp-session-option-write.ts
  • src/main/acp/acp-structured-acquire.ts
  • src/main/acp/acp-structured-host-configured-default.test.ts
  • src/main/acp/acp-structured-host-live-listing.test.ts
  • src/main/acp/acp-structured-host-option-hang.test.ts
  • src/main/acp/acp-structured-launch-resolution.ts
  • src/main/acp/acp-structured-model-unavailable.test.ts
  • src/main/acp/acp-structured-options.ts
  • src/main/acp/acp-structured-session-adapter.test.ts
  • src/main/antigravity/antigravity-chat-sign-in.test.ts
  • src/main/antigravity/antigravity-chat-sign-in.ts
  • src/main/antigravity/antigravity-sign-in-models.ts
  • src/main/claude/claude-assistant-failures.ts
  • src/main/claude/claude-authentication-failures.ts
  • src/main/claude/claude-journal-translator-contract.ts
  • src/main/claude/claude-message-journaling.ts
  • src/main/claude/claude-model-catalog-probe.ts
  • src/main/claude/claude-result-journaling.ts
  • src/main/claude/claude-structured-applied-options.test.ts
  • src/main/claude/claude-structured-child-env.ts
  • src/main/claude/claude-structured-dispatch-test-support.ts
  • src/main/claude/claude-structured-dispatch.ts
  • src/main/claude/claude-structured-effort-default-at-rest.test.ts
  • src/main/claude/claude-structured-effort-reporting.test.ts
  • src/main/claude/claude-structured-event-delivery.ts
  • src/main/claude/claude-structured-execution-recording.test.ts
  • src/main/claude/claude-structured-journal-translation.ts
  • src/main/claude/claude-structured-launch-resolution.ts
  • src/main/claude/claude-structured-message-options.test.ts
  • src/main/claude/claude-structured-message-options.ts
  • src/main/claude/claude-structured-model-confirmation.test.ts
  • src/main/claude/claude-structured-option-confirmation.test.ts
  • src/main/claude/claude-structured-options.test.ts
  • src/main/claude/claude-structured-options.ts
  • src/main/claude/claude-structured-result-control-overlap.test.ts
  • src/main/claude/claude-structured-retired-model.test.ts
  • src/main/claude/claude-structured-retired-model.ts
  • src/main/claude/claude-structured-session-adapter.ts
  • src/main/claude/claude-structured-session-journal-control.ts
  • src/main/claude/claude-structured-session-options.ts
  • src/main/claude/claude-structured-sign-in.test.ts
  • src/main/claude/claude-structured-spawn-options.ts
  • src/main/claude/structured/claude-structured-session-acquisition.ts
  • src/main/claude/structured/claude-structured-session-publication.ts
  • src/main/claude/structured/claude-structured-session-startup.test.ts
  • src/main/claude/structured/claude-structured-session-startup.ts
  • src/main/claude/structured/claude-structured-session-state.ts
  • src/main/codex/codex-model-catalog-probe.ts
  • src/main/codex/codex-model-catalog-retirement.test.ts
  • src/main/codex/codex-structured-applied-settings.ts
  • src/main/codex/codex-structured-catalog-entry.ts
  • src/main/codex/codex-structured-launch-resolution.ts
  • src/main/codex/codex-structured-message-options.test.ts
  • src/main/codex/codex-structured-message-options.ts
  • src/main/codex/codex-structured-model-catalog.ts
  • src/main/codex/codex-structured-option-session.test-fixture.ts
  • src/main/codex/codex-structured-service-tier-shown.test.ts
  • src/main/codex/codex-structured-service-tier.test.ts
  • src/main/codex/codex-structured-service-tier.ts
  • src/main/codex/codex-structured-session-adapter.test.ts
  • src/main/codex/codex-structured-session-adapter.ts
  • src/main/codex/codex-structured-session-options-catalog.test.ts
  • src/main/codex/codex-structured-session-options.test.ts
  • src/main/codex/codex-structured-session-options.ts
  • src/main/codex/codex-structured-session-start.ts
  • src/main/codex/codex-structured-session-state.ts
  • src/main/codex/codex-structured-thread-goal.test.ts
  • src/main/codex/codex-structured-thread-goal.ts
  • src/main/codex/codex-structured-turn-permission.test.ts
  • src/main/codex/codex-structured-turn-start.ts
  • src/main/ipc/preflight-agent-refresh.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-account-expiry.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-discovery-freshness.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-discovery.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry-lifetime.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-failures.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-independent-discovery.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-learned-default.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-lister.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-listing-waiters.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-live-listings.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-persistence.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-persistence.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-prewarm.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-prewarm.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-saved-only-read.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-scaling.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-scope.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-scope.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service-contract.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-service.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-snapshot.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-store.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-store.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-unavailable.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-workspace.ts
  • src/main/native-chat/agent-session-wire/at-rest-command-context.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter-router.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-attach-context.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-attach-orchestration.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-attach-publish.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-codex-applied-inputs.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-codex-input-admission.spec.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-codex-input-finalization.spec.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-codex-input-host.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-delivery-loop.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-goal-steering.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-handover.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-test-data.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host-types.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-launch-permission.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-message-choices.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-message-options.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-option-error.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-option-intent.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-deadline.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-permission-mode.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-child.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-provider-started.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-queued-message-rig-provider.test-fixture.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-queued-message-rig.test-fixture.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-ran-options.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-resting-options.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-start-failure-row.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-start-listing.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-host-test-support.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-startup-attempt-reports.test.ts
  • src/main/native-chat/structured-agent-command-resolution.test.ts
  • src/main/native-chat/structured-agent-command-resolution.ts
  • src/main/persistence/applying-settings/settings-update-effects.ts
  • src/main/persistence/applying-settings/settings-update-normalization.test.ts
  • src/main/persistence/applying-settings/settings-update.ts
  • src/main/persistence/loading-store/durable-settings-write.spec.ts
  • src/main/persistence/loading-store/profile-preferences.ts
  • src/main/pi/rpc-idle-check.ts
  • src/main/pi/rpc-launch-resolution.ts
  • src/main/pi/rpc-message-dispatch.ts
  • src/main/pi/rpc-model-catalog-probe.ts
  • src/main/pi/rpc-options.ts
  • src/main/pi/rpc-session-adapter.test.ts
  • src/main/pi/rpc-session-startup.test.ts
  • src/main/pi/rpc-session-startup.ts
  • src/main/pi/rpc-session.ts
  • src/main/pi/rpc-turns.ts
  • src/main/preflight/workspace-agent-detection.ts
  • src/main/pty/windows-environment-path.ts
  • src/main/runtime/agent-session-record-options.ts
  • src/main/runtime/agent-session/ownership/agent-session-reservation-admission.ts
  • src/main/runtime/claude-structured-retired-saved-model.test.ts
  • src/main/runtime/orca-runtime-core.ts
  • src/main/runtime/orca-runtime-get-status.ts
  • src/main/runtime/orca-runtime-tests/paired-settings.spec.ts
  • src/main/runtime/repo-worktree-row-resolution.test.ts
  • src/main/runtime/repo-worktree-row-resolution.ts
  • src/main/runtime/rpc/methods/antigravity-accounts.ts
  • src/main/runtime/rpc/methods/orchestration/worker/structured-worker-launch-seed-options.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-create-seed-admission.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-create.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-read.test.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-read.ts
  • src/main/runtime/rpc/methods/structured-agent-session-options-workspace-scope.test.ts
  • src/main/runtime/rpc/methods/usage-credentials.test.ts
  • src/main/runtime/runtime-account-controller.ts
  • src/main/runtime/runtime-resolved-worktree-cache.ts
  • src/main/runtime/runtime-worktree-filesystem.ts
  • src/main/runtime/session-tabs/structured-launch-seed-listing.ts
  • src/main/runtime/session-tabs/structured-session-catalog-workspace.test.ts
  • src/main/runtime/session-tabs/structured-session-create-support.ts
  • src/main/runtime/session-tabs/structured-session-workspace-scope.ts
  • src/main/runtime/structured-agent-launch-support.test.ts
  • src/main/runtime/structured-agent-launch-support.ts
  • src/main/runtime/structured-agent-model-catalog-discovery.test.ts
  • src/main/runtime/structured-agent-model-catalog-first-frame.test.ts
  • src/main/runtime/structured-agent-model-catalog-wiring.ts
  • src/main/runtime/structured-agent-new-chat-effort-at-rest.test.ts
  • src/main/runtime/structured-agent-runtime-registrations.ts
  • src/main/runtime/structured-agent-session-codex-turn-end-settlement.test.ts
  • src/main/runtime/structured-agent-session-host-assembly.ts
  • src/main/runtime/structured-agent-session-integration.test.ts
  • src/main/runtime/structured-agent-session-pi-startup.test.ts
  • src/main/runtime/structured-agent-session-runtime-contract.ts
  • src/main/runtime/structured-agent-session-runtime-model-catalog-lifetime.test.ts
  • src/main/runtime/structured-agent-session-runtime.ts
  • src/main/runtime/structured-agent-shell-environment-catalog.test.ts
  • src/main/runtime/structured-agent-shell-environment.ts
  • src/main/runtime/structured-codex-child-work-runtime.test.ts
  • src/main/runtime/workspaces/resolved-worktree-scan-join.ts
  • src/main/runtime/workspaces/workspace-catalog.ts
  • src/main/runtime/workspaces/workspace-file-session-targets.ts
  • src/main/runtime/workspaces/workspace-repo-scan-refresh.ts
  • src/main/runtime/workspaces/workspace-selectors.ts
  • src/main/startup/main-process-account-services.ts
  • src/renderer/src/components/native-chat/StructuredAgentSessionAttentionBridge.test.tsx
  • src/renderer/src/components/native-chat/agent-session-availability-words-text.ts
  • src/renderer/src/components/native-chat/agent-session-failure-words-text.ts
  • src/renderer/src/components/native-chat/native-chat-pty-retired-model.test.ts
  • src/renderer/src/components/native-chat/native-chat-retire-persisted-model.test.ts
  • src/renderer/src/components/native-chat/native-chat-session-option-enrichment.test.ts
  • src/renderer/src/components/native-chat/native-chat-session-option-enrichment.ts
  • src/renderer/src/components/native-chat/structured-agent-session-options-contract.ts
  • src/renderer/src/components/native-chat/structured-model-refusal.test-fixture.ts
  • src/renderer/src/components/native-chat/use-native-chat-session-options.test.ts
  • src/renderer/src/components/native-chat/use-native-chat-session-options.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.first-frame.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/structured-agent-session-launch-create-message.test.ts
  • src/renderer/src/lib/structured-agent-session-launch-options.test.ts
  • src/renderer/src/lib/structured-agent-session-launch-options.ts
  • src/renderer/src/runtime/host-model-catalog-snapshots.test.ts
  • src/renderer/src/runtime/host-model-catalog-snapshots.ts
  • src/shared/agent-session-failure-copy.ts
  • src/shared/agent-session-failure-words.test.ts
  • src/shared/agent-session-failure-words.ts
  • src/shared/agent-session-failure.ts
  • src/shared/agent-session-option-catalog-grok.test.ts
  • src/shared/agent-session-option-catalog-omp.ts
  • src/shared/native-chat-discovered-catalog-models.ts
  • src/shared/native-chat-pty-session-options.ts
  • src/shared/native-chat/input/native-chat-session-option-defaults.test.ts
  • src/shared/native-chat/input/native-chat-session-option-defaults.ts
  • src/shared/structured-agent-session-composer.ts
  • src/shared/structured-agent-session-dispatch-rejection.ts
  • src/shared/structured-agent-session-first-frame-picker.spec.ts
  • src/shared/structured-agent-session-latest-request.test.ts
  • src/shared/structured-agent-session-option-snapshot.ts
  • src/shared/structured-agent-session-option-state.ts
  • src/shared/structured-agent-session-option-view.test.ts
  • src/shared/structured-agent-session-option-view.ts
  • src/shared/structured-agent-session-options.test.ts
  • src/shared/structured-agent-session-options.ts
  • tests/e2e/claude-auto-mode-host-catalog.unit.test.ts
  • tests/e2e/cross-version-wire/host-model-catalog-released-phone.unit.test.ts
  • tests/e2e/cross-version-wire/structured-agent-session-host-fixture.ts
  • tests/e2e/structured-permission-report-publication.unit.test.ts
Files with no reviewable changes: 12
  • src/main/claude/claude-structured-dispatch-test-support.ts
  • src/main/claude/claude-structured-retired-model.test.ts
  • src/main/claude/claude-structured-event-delivery.ts
  • mobile/src/session/native-chat/input/use-mobile-native-chat-session-options.ts
  • src/main/claude/structured/claude-structured-session-startup.test.ts
  • src/renderer/src/components/native-chat/native-chat-session-option-enrichment.test.ts
  • src/renderer/src/components/native-chat/native-chat-retire-persisted-model.test.ts
  • src/shared/native-chat-pty-session-options.ts
  • src/main/claude/claude-authentication-failures.ts
  • src/main/runtime/session-tabs/structured-launch-seed-listing.ts
  • src/main/claude/claude-structured-retired-model.ts
  • src/renderer/src/components/native-chat/native-chat-session-option-enrichment.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a864b42d-73dd-4987-8176-86b9448ddd4c
Commits

Reviewing files that changed from the base of the PR and between 5481d96 and 6860e68.

Files selected for processing: 22
  • src/main/acp/acp-message-execution-options.ts
  • src/main/claude/claude-structured-options.test.ts
  • src/main/claude/claude-structured-retired-model.ts
  • src/main/claude/claude-structured-session-adapter.ts
  • src/main/claude/structured/claude-structured-session-acquisition.ts
  • src/main/claude/structured/claude-structured-session-publication.ts
  • src/main/claude/structured/claude-structured-session-state.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-option-error.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-options-read.ts
  • src/main/runtime/orca-runtime-tests/paired-settings.spec.ts
  • src/renderer/src/components/native-chat/native-chat-pty-retired-model.test.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/agent-session-failure-copy.ts
  • src/shared/agent-session-failure-words.ts
  • src/shared/agent-session-failure.ts
  • src/shared/native-chat/input/native-chat-session-option-defaults.ts
  • src/shared/structured-agent-session-dispatch-rejection.ts
Files with no reviewable changes: 5
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter.ts
  • src/main/claude/structured/claude-structured-session-publication.ts
  • src/main/claude/claude-structured-session-adapter.ts
  • src/main/claude/structured/claude-structured-session-state.ts
  • src/main/claude/claude-structured-retired-model.ts
Files skipped from review as they are similar to previous changes: 5
  • src/renderer/src/i18n/en-runtime-required.json
  • src/shared/agent-session-failure-copy.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/zh-Hant.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

A chat could silently change models after Claude rejected its saved choice, while refreshed provider lists could delete remembered defaults. The chat now keeps the chosen model until the user explicitly picks another. Claude shows one failed-turn notice; an unlisted model stays visible by its literal ID.

The full review completed in two correctness rounds. Fixes preserve actual ACP authentication/internal/lost-session causes, correlate Claude assistant/result failures with optional IDs, and preserve current and released-client failed-request/read acknowledgement. Fresh architecture, reference, performance and final readiness reviews found no open P0/P1. Intended: the explicit choice stays effective even if inventory suggests a different default; provider acceptance decides whether it works. Existing clearing requests remain accepted as a no-op on upgraded hosts; older owning hosts retain their own behavior.

Verified on 6860e68a5e60638dc474ef009ade3cf70fbebcd6:

  • CI and mobile verification are green, including all five root test shards, static/type checks, cross-version contracts and packaging. The mobile omission/pick hook actually ran; the UUID-list contract checks production work at64/640 inputs. The one main merge preserves the reviewed mechanism and incoming startup changes.
  • Previous-main-created chats survived a graceful upgrade on the admitted M4Air. Claude failed twice while retaining the invalid model, then returned two real replies after an explicit Sonnet pick. Codex returned two real replies on its original restored thread, retaining GPT-6.1-Sol. Its first hung request also reproduced outside Orca; enabling WebSocket support in the isolated QA provider config repaired it. The interrupted attempt and separate CLI diagnostic reply are excluded from the two successful UI replies. Passed Claude flows were not rerun.
  • ACP classification uses provider-source-shaped fixtures and old-reader/notification contracts; no live Grok/OMP model rejection is claimed. A separate real Claude CLI request captured the actual assistant/result pair; the native UI runs independently proved the error and recovery. The unlisted picker uses a disclosed saved-model fixture. All owned copies/probes stopped and the QA lease was released.

Deferred cosmetic P2: when Claude supplies no known model ID, Chinese notices contain the English fallback “this model.” Model choice, delivery and recovery are unaffected. No other unresolved finding remains.

For Brennan's review

Same rejected saved model on main and the branch:

Main: changes current model to Opus Branch: keeps the chosen ID after both attempts
Main rejected-model state Branch retained-model state

Explicit recovery, with two real Claude replies:

Claude recovered replies

Restored Codex thread, with two real shipping-composer replies:

Codex restored replies

Unlisted ID in the shipping picker:

Literal unlisted model

Judgment spots: literal unconfirmed seed, bounded failure correlation, legacy clearing no-op.

@brennanb2025
brennanb2025 merged commit 2926b6e into main Oct 29, 2026
44 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/chat-model-keep branch October 29, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant