Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
…n seed an effort An ACP agent without per-model effort metadata (OMP) only reports the running session's thought_level menu. Every other model was recorded with efforts: [], which admission reads as 'offers no effort', so a new chat seeded with that model plus an effort was refused with optionRejected. Mark those rows effortsKnown: false instead.
6ec0c15 to
d59d1eb
Compare
…ort in new chats (#33646) OMP native chats keep a remembered or explicit effort on models other than OMP's current one: for dialects that clamp unlisted efforts themselves (OMP only, via clampsUnlistedEffort), non-current models' efforts are recorded as unknown instead of "admits none"; catalog merges keep an older explicit empty list. OpenCode keeps main's behaviour. Fixes #31995 Supersedes #31998 Co-authored-by: Pandu dwi Putra <218730385+pandudpn@users.noreply.github.com>
ELI5
When you open a new OMP chat on a model other than OMP's starting model, Orca sends that model plus your thinking level. Orca's saved model list said that model had no thinking levels at all, so it refused to create the chat and the desktop showed "Chat connection could not be confirmed." OMP never said that; it only lists thinking levels for the model a session is running. Orca now records "unknown" for the other models and lets the agent decide.
What Changed
Before:
AcpStructuredOptions.read()gave every model except the session's current oneefforts: []when the dialect has no per-model menu (OMP has nomodelEfforts). The catalog stored those rows, andassertAgentSessionOptionsAdmittedreads an explicit empty menu as "admits none" (agentSessionEffortLevels). A new chat seeded with{model: 'omniroute/coding-max', effort: 'xhigh'}was refused withagent_session_operation_invalid/optionRejected, before any session record was written.After: when the agent reports a
thought_leveloption but no per-model menu, models other than the current one get{ efforts: [], effortsKnown: false }.agentSessionEffortLevelsreturnsnullfor those rows, so admission lets the effort through. Catalog persistence already keepseffortsKnown: false(agent-model-catalog-persistence.ts).Unchanged:
thought_leveloption keepsefforts: [], so an effort is still refused there.This PR first carried the send-path guard fix. #32004 shipped that fix upstream, so I rebased onto
mainand replaced the old commit with this one.Why
#32004 fixed sending a message after a model-only change. The same report shows up again on 1.4.239 one step earlier, at chat creation, because the composer seeds an effort (OMP's
defaultThinkingLevel) and the catalog row for the seeded model claims no efforts.Alternative considered: copying the session's effort menu onto every model. Rejected, because Orca would then claim menus OMP never reported for those models.
Linked Issue
Fixes #31995
Visual Proof
N/A. No interface changes. The difference is that the create request is accepted instead of failing behind the "Chat connection could not be confirmed." banner.
Testing
Throwaway check (not committed): an OMP-shaped session (
model+thought_levelconfig options, current modelomniroute/chat) fed intoassertAgentSessionOptionsAdmitted('omp', models, { model: 'omniroute/coding-max', effort: 'xhigh' }). It throws onmainand passes on this branch. An unlisted effort on the current model is still refused.tsc -p config/tsconfig.node.jsonreports two errors insrc/main/git/command-runner/exec-file-capture.ts. They come frommainand have nothing to do with this change.AI Disclosure
The patch and tests were drafted with an AI coding agent (OMP, running an OmniRoute-hosted model), then reviewed and verified on macOS by the reporter.
Review
Agent skill upstream boundary
Notes
Cross-platform: main-process TypeScript only, no paths or platform APIs.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred). Targeted vitest, oxlint and oxfmt ran locally; the rest is left to CI.