Repository navigation
feat(omp): offer OMP models and reasoning effort from its own listing - #29798
Circumsized wants to merge 6 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
e8b6b9d to
fc0c302
Compare
omp models --jsonfc0c302 to
8329cbc
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9c734322-4160-49e9-9ec7-5bd3c10bebb2
📒 Files selected for processing: 10
docs/site/content/docs/agents/native-chat.mdxsrc/cli/specs/orchestration-worker-specs.tssrc/main/acp/acp-launch-specs.tssrc/main/acp/acp-model-catalog-probe.test.tssrc/main/runtime/rpc/methods/orchestration/worker/worker-launch-preferences.test.tssrc/shared/agent-session-option-catalog-omp.test.tssrc/shared/agent-session-option-catalog-omp.tssrc/shared/automation-extra-agent-args.spec.tssrc/shared/automation-extra-agent-args.tssrc/shared/omp-model-list-probe.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
15d423e3-513a-432c-911b-d380d970fa89
📒 Files selected for processing: 8
src/cli/specs/orchestration-worker-specs.tssrc/main/acp/acp-launch-specs.tssrc/main/acp/acp-model-catalog-probe.test.tssrc/shared/agent-session-option-catalog-omp.test.tssrc/shared/agent-session-option-catalog-omp.tssrc/shared/automation-extra-agent-args.spec.tssrc/shared/automation-extra-agent-args.tssrc/shared/omp-model-list-probe.ts
🚧 Files skipped from review as they are similar to previous changes: 3
- src/shared/automation-extra-agent-args.spec.ts
- src/shared/automation-extra-agent-args.ts
- src/cli/specs/orchestration-worker-specs.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
ebb81d4 to
e038581
Compare
[Medium impact] The PR appears safe to merge; the requested merge tests are now present. SummaryThis PR carries OMP's listed thinking levels into model-specific menus and accepts
|
`omp models --json` states a `thinking` ladder per model, which the probe discarded. Fill `CommitMessageModel.thinkingLevels` from it so a listed model's effort menu stops at that model's ceiling instead of offering every level, the way Grok's effort already follows the selected model. Previously `parseOmpCatalogModels` gave every listed row `options: []`, so picking a discovered model dropped the effort picker entirely and only an unknown model id kept it through `unknownModelOptions`. Also allow `omp` to take `--thinking` in extra agent args, reusing the `values` allowlist main already built for Pi. A level the picker can send stays launchable; one OMP does not list is still refused. The listing names no default tier, so none is claimed: `defaultValue` stays empty and OMP's own config decides what a launch sending no tier runs. Dropped from the earlier attempt on this branch: switching OMP's `modelDiscovery` to `kind: 'command'`, which main deliberately changed to `kind: 'session'` because CLI listings include disabled models. Co-Authored-By: Claude Code <[email protected]>
`--thinking=high` was normalized to two tokens while `--model=acme/x` in the same agent was not, because only the new effort entry carried `separateValue`. OMP's help spells both flags `--flag=<value>`, and Pi — the same CLI family — already splits both. Give `omp`'s model entry the same treatment so the two flags behave alike. Pin `OMP_THINKING_LEVELS` to the set `omp --help` documents, verified against omp 18.12.2 on a real host, so a later edit cannot drift from what the CLI accepts. Co-Authored-By: Claude Code <[email protected]>
…e picker The per-model effort menu the previous commit builds never reached a picker. Two independent drops sat between the probe and the picker row, and both had to go for any agent other than claude: `catalogModelsFromModelDiscovery` read `thinkingLevels` only inside its claude arm and handed every other agent `options: []`, so the ladder was discarded on arrival. `mergeDiscoveredAuthoritativeModels` then replaced a discovered row's own menus with the seed's. OMP seeds no models, so its inherited options were empty and every row ended up bare. Grok survived only because its seed is non-empty; it has no listing-built menus either. Shared code now asks the agent's own catalog to build a row's menus through `modelOptionsFromListing`, and the merge keeps the menus a listing gave a row the seed does not carry. Both are no-ops for agents that do not opt in: grok's discovered rows still carry `[]` and still inherit its seed menus, and claude still returns before either function. Verified end to end against omp 18.12.2 on a real host: a 51-model listing yields 51 picker rows with an effort menu, 47 of them exactly their own ladder and none wider. Co-Authored-By: Claude Code <[email protected]>
…ed level A listing that repeats a level produced two identical picker choices, so `parseThinkingLevels` now keeps one entry per level the way the row loop already keeps one row per model id. Also cover the two shapes the earlier assertions left open: a row carrying both a context window and a ladder, and a level outside the set OMP documents, which the picker passes through with its own text. Co-Authored-By: Claude Code <[email protected]>
e038581 to
c836ca2
Compare
The repo's anti-slop gate rejects a parameter typed as the broad `object`. `parseThinkingLevels` took one, so it narrowed a row that its caller had already narrowed. Parse the row here instead: the helper accepts `unknown`, does its own shape check, and reads `thinking` off the narrowed value. The call site passes the raw row. Behaviour is unchanged — a real 51-model listing still yields 51 menus, 47 of them exactly their own ladder. Co-Authored-By: Claude Code <[email protected]>
`mergeExtraAgentArgs` had no test anywhere in the repo, and it is the function that produces the launch argv. This change is what first makes `--thinking` valid for OMP, so the replacement path needed a check: a default `--thinking low` plus a saved `--thinking high` must leave exactly one flag, with the model untouched, in both the separate and the equals spelling. Reverse-verified by disabling `removeDefaultsFor`, which turns the three exactly-one-flag assertions red. Co-Authored-By: Claude Code <[email protected]>
Summary
omp models --jsonstates athinkingladder per model. Orca discarded it, so OMP had no reasoning-effort control anywhere: the picker showed none, andorca orchestration worker-start --effortwas refused for every listed OMP model.This PR fills the ladder and carries it to the picker. Two controls come back: the model list a draft opens with, and an effort menu that stops at each model's own ceiling.
Measured against omp 18.12.2 on a real host: a 51-model listing, 47 of them carrying a ladder, across 8 distinct ladders. Every ladder value falls inside the set
omp --helpdocuments for--thinking.What actually changed
1. The probe fills the ladder
CommitMessageModelalready declaredthinkingLevels; the OMP parser never populated it.parseThinkingLevelsreads each row'sthinkingarray into that field, deduplicating repeated levels the way the row loop already deduplicates repeated model ids. A row that states no ladder gets none, which on a real listing is exactly the fourreasoning: falsemodels.2. A listed model carries its own effort menu
parseOmpCatalogModelspreviously gave every discovered rowoptions: []. It now builds the menu from the row's ladder, falling back to every level for a row that states none.3. The root cause: two drops between the probe and the picker
The menu above never reached a picker, because two things sat in the way and both had to go.
catalogModelsFromModelDiscoveryreadthinkingLevelsonly inside itsclaudearm and handed every other agentoptions: []. Shared code now asks the agent's own catalog to build a row's menus through a new optionalmodelOptionsFromListinghook.mergeDiscoveredAuthoritativeModelsthen replaced a discovered row's own menus with the seed's. OMP seeds no models, so its inherited options were empty and every row ended up bare. The merge now keeps the menus a listing gave a row the seed does not carry.Both changes are no-ops for agents that do not opt in. Grok's discovered rows still carry
[]and still inherit its seed menus, because its seed is non-empty. Claude returns before either function. Grok survives today only by having a seed; it has no listing-built menus either, and can adopt the hook without touching shared code.4.
--thinkingin extra agent argsEXTRA_AGENT_ARG_OPTIONS.ompgains an effort entry with avaluesallowlist, reusing the mechanism main already built for Pi.--modelgains theseparateValuePi already has, so the equals spelling splits for both of OMP's flags instead of only the new one.Deliberately not done
modelDiscoveryback tokind: 'command'. An earlier attempt on this branch flipped it. Main had already moved OMP tokind: 'session'on purpose, because CLI listings include disabled models and OMP cannot delete sessions. Left as main has it.defaultValuestays empty and OMP's own config decides what a launch sending no tier runs. An earlier attempt pickedhighor the closest lower listed tier; that clamp is not derivable from the listing, anddefaultIsCliDefaultwould claim a fact the listing never states.offandautofrom the menu. An earlier attempt offered only six tiers.omp --helpdocuments eight, andoffandautoare real values; main's menu already offered them.Performance
None, because the probe already runs on every draft open for the other command-based agents, and the added work is one linear pass over the listing rows that builds one option object per row. The merge change is a length check per row. No new process, network, timer, or allocation per keystroke.
Linked Issue
Fixes #23388
That issue asks for
--modeland--effortonorca orchestration worker-startfor OMP. The--modelhalf already passes on main. This PR adds the--efforthalf: the value becomes--thinking, the parser accepts the eight levels OMP documents, and a launch carries--model <id> --thinking <level>.Related and not closed here: #26191 (Android picker capability gap).
Evidence
omp models --jsonemits a per-modelthinkingarray"thinking":["low","medium","high"]omp --help:--thinking=<value> Set thinking level: off, minimal, low, medium, high, xhigh, max, autohighalone, another lists all six tiersthinkingarereasoning: falsegetAgentModelProbeSpec->catalogModelsFromModelDiscovery->mergeDiscoveredCatalogModels: 51 of 51 rows carry an effort menu, 47 exactly their own ladder, none widerChannel impact
--effortonorca orchestration worker-startnow resolves for OMP and maps to--thinking.--thinkingis accepted in extra agent args, bounded to the documented levels.Alternatives considered
omp --help.Upstream coordination
None. This PR touches no upstream skill-installer source, tests, fixtures, registry entries, path tables, or documentation.
Tests and docs
omp-model-list-probe.test.ts: ladder parsing, dedupe, non-array and non-string levels, context window beside a ladder, an undocumented level passing through with its own text, the documented level set, the extra-args allowlist, and the equals-spelling split.native-chat-discovered-catalog-models.test.ts: the delegation tomodelOptionsFromListing, the no-hook path, the claude path, the merge keeping a row's own menus, the merge still inheriting seed menus, the seed still winning for a row both carry, and the full OMP path end to end.docs/site/content/docs/agents/native-chat.mdxdocuments the control.Verification
tsc --noEmit -p config/tsconfig.node.json: 0 errors, afterpnpm run build:packagesas the repo's own typecheck script does.oxlinton the changed files: 0 warnings, 0 errors.vitestacrosssrc/shared/agent-session,src/shared/native-chat,src/shared/agent-launch: 55 files, 271 tests, 0 failures.pull_requestworkflow is waiting on a maintainer approval.Visual Proof
N/A. The change adds composer controls, and this environment has no GUI host for the desktop app. The picker outcome is asserted through the same functions the renderer calls, driven by real
omp models --jsonoutput.Testing
AI Disclosure
Authored with AI coding agents under human direction. The human chose the scope after real-machine testing showed the first attempt's headline change was unreachable, and reviewed the diff. The agents drafted the change, the tests, and the verification runs.
Review
Self-review covered correctness, security, and performance.
Correctness: per-model ladders, dedupe, the two discovery drops, and a merge that never carries two
--thinkingflags. Security: no new spawn surface. Every extra-args value validates against the eight documented levels before launch, and the per-model narrowing is picker-side only, so a launch naming a tier a model lacks still reaches OMP, which clamps it as it already does for Pi and Grok. Performance: one linear pass per draft open.An independent reviewer read the diff and found that the first attempt's catalog change was dead code; that finding is what produced section 3.
Agent skill upstream boundary
Notes
orca servehost fills the same catalog from the probe. The probe needs no renderer.--thinking; Orca refused--effortfor OMP before, and this PR accepts it. The catalog declares no live command: OMP added/effortin 18.5.0, past the 17.0.5 floor.Checklist
N/Awith reasonoxlintand targetedvitestruns pass locally; the fullpnpm lint/typecheck/test/buildrun in CI