Repository navigation
Show OMP sign-in guidance when OMP reports no model selected - #26649
Conversation
…th-parity # Conflicts: # src/main/claude/claude-structured-session-journal-control.ts # src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx # src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
…d only its own rows
…th-parity # Conflicts: # mobile/src/session/mobile-structured-queued-message-cards.test.ts # mobile/src/session/mobile-structured-queued-message-cards.ts # mobile/src/session/use-mobile-native-chat-controller.ts # mobile/src/session/use-mobile-native-chat-send-error.test.ts # mobile/src/session/use-mobile-native-chat-send-error.ts # mobile/src/session/use-mobile-native-chat-session-lane.ts # mobile/src/session/use-mobile-structured-agent-session.ts # mobile/src/session/use-mobile-structured-queued-message-controls.ts # mobile/src/session/use-mobile-structured-send-with-outcome.ts # src/renderer/src/i18n/locales/en.json # src/renderer/src/i18n/locales/es.json # src/renderer/src/i18n/locales/fr.json # src/renderer/src/i18n/locales/ja.json # src/renderer/src/i18n/locales/ko.json # src/renderer/src/i18n/locales/zh.json
…, and skip the check during a Stop
# Conflicts: # src/main/acp/acp-dialects/omp-dialect.ts # src/main/acp/acp-structured-sign-in.test.ts
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe OMP authentication check still requires error code Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The change recognizes OMP’s login-guidance prompt while retaining its model-selection details. No concrete merge-blocking risk is established by the available evidence. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
ELI5
When OMP has no sign-in at all, it answers a message with "No model selected. Use /login…" instead of "No API key found…". Orca only recognized the second wording, so a fully signed-out OMP chat showed a generic failure line instead of the sign-in advice every other agent gets. Now both wordings count as "not signed in".
What Changed
Before: in a native chat with OMP 17.0.5 and nothing signed in, the chat opens normally, and the first message fails with OMP's own text ("No model selected. Use /login, set an API key environment variable, or create …/agent.db. Then use /model to select a model."). Orca treated it as an ordinary failure, without "Sign in to OMP." and with the generic retry wording.
After: the same failure is classified as not signed in, so the chat shows the same sign-in line as for OMP's missing-key case, with OMP's text kept as its detail. With #26544 underneath, the next send after signing in also starts a fresh OMP, which picks up the new login (a running OMP does not).
Mechanism: OMP's prompt check (
agent-session.tsaround line 8815 at tag v17.0.5) throws "No model selected." followed by "Use /login" when no model is usable, which is what happens with no credentials; it throws "No API key found for …" when the chosen model's provider has no key. Both reach Orca as an Agent Client Protocol internal error (-32603) with the text indata.details. The OMP check inomp-dialect.tsnow accepts either prefix. The bare "No model selected" (no period, no sign-in advice) that OMP raises during compaction is not matched.Why
The failure text is OMP's only signal; there is no typed error for it. Matching the full "No model selected.\n\nUse /login" prefix keeps it to OMP's sign-in branch and leaves the compaction error alone. This is the smallest change that gives a signed-out OMP user the right advice.
Limitation (intended): OMP also leaves no model selected when the user's own
enabledModelsallow-list excludes every model it has credentials for. Its prompt-time message is then the same "No model selected. Use /login…", so Orca's "Sign in to OMP." matches what OMP itself says, and OMP's text is shown beside it. With #26544, the next send starts a fresh OMP, which also picks up a corrected config. Orca cannot tell the two cases apart from the error alone.Linked Issue
Stacked on #26544 (the OMP sign-in check this extends exists only there). Requested by @BrennanKB5.
Visual Proof
N/A: no new wording or surface. The chat shows the existing OMP sign-in line from #26544, now for one more OMP failure text.
Testing
Real OMP 17.0.5 over Agent Client Protocol, in a throwaway home folder against a local fake model server, with no real account: fully signed out, the first prompt returns
{"code":-32603,"message":"Internal error","data":{"details":"No model selected.\n\nUse /login, set an API key environment variable, or create …/agent.db\n\nThen use /model to select a model."}}. That exact text is the new test case.src/main/acp/acp-structured-sign-in.test.tsadds the signed-out "No model selected" text (classified as not signed in) and the bare compaction "No model selected" (not classified); 12 of 12 pass. Ablation: with the dialect change reverted, exactly the new signed-out case fails.Agent skill upstream boundary
Notes
Host-side classification only: SSH and local chats use the same path, no wire change, no new user-facing strings.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)