Skip to content

feat(omp): offer OMP models and reasoning effort from its own listing - #29798

Open
Circumsized wants to merge 6 commits into
stablyai:mainfrom
Circumsized:fix/omp-model-catalog-command-discovery
Open

Circumsized wants to merge 6 commits into
stablyai:mainfrom
Circumsized:fix/omp-model-catalog-command-discovery

Conversation

@Circumsized

@Circumsized Circumsized commented Oct 16, 2026 •

Copy link
Copy Markdown

Summary

omp models --json states a thinking ladder per model. Orca discarded it, so OMP had no reasoning-effort control anywhere: the picker showed none, and orca orchestration worker-start --effort was 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 --help documents for --thinking.

What actually changed

1. The probe fills the ladder

CommitMessageModel already declared thinkingLevels; the OMP parser never populated it. parseThinkingLevels reads each row's thinking array 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 four reasoning: false models.

2. A listed model carries its own effort menu

parseOmpCatalogModels previously gave every discovered row options: []. 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.

catalogModelsFromModelDiscovery read thinkingLevels only inside its claude arm and handed every other agent options: []. Shared code now asks the agent's own catalog to build a row's menus through a new optional modelOptionsFromListing hook.

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. 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. --thinking in extra agent args

EXTRA_AGENT_ARG_OPTIONS.omp gains an effort entry with a values allowlist, reusing the mechanism main already built for Pi. --model gains the separateValue Pi already has, so the equals spelling splits for both of OMP's flags instead of only the new one.

Deliberately not done

  • modelDiscovery back to kind: 'command'. An earlier attempt on this branch flipped it. Main had already moved OMP to kind: 'session' on purpose, because CLI listings include disabled models and OMP cannot delete sessions. Left as main has it.
  • A guessed default tier. The listing states no default, so defaultValue stays empty and OMP's own config decides what a launch sending no tier runs. An earlier attempt picked high or the closest lower listed tier; that clamp is not derivable from the listing, and defaultIsCliDefault would claim a fact the listing never states.
  • Dropping off and auto from the menu. An earlier attempt offered only six tiers. omp --help documents eight, and off and auto are 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 --model and --effort on orca orchestration worker-start for OMP. The --model half already passes on main. This PR adds the --effort half: 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

Fact Evidence
omp models --json emits a per-model thinking array omp 18.12.2 on this host; first row "thinking":["low","medium","high"]
The eight accepted levels omp --help: --thinking=<value> Set thinking level: off, minimal, low, medium, high, xhigh, max, auto
Ladder variety is real 8 distinct ladders over 47 models; one model lists high alone, another lists all six tiers
Ladder absence tracks non-reasoning models All 4 rows without thinking are reasoning: false
The menu now reaches the picker End-to-end through getAgentModelProbeSpec -> catalogModelsFromModelDiscovery -> mergeDiscoveredCatalogModels: 51 of 51 rows carry an effort menu, 47 exactly their own ladder, none wider
Before this change Same path, 0 of 51 rows carried an effort menu

Channel impact

  • CLI: --effort on orca orchestration worker-start now resolves for OMP and maps to --thinking.
  • Automations: --thinking is accepted in extra agent args, bounded to the documented levels.
  • Picker: a discovered OMP model gains a Thinking pill scoped to its own ladder.
  • Other agents: no change. Grok and Claude verified unchanged by tests that pass on both sides of the diff.

Alternatives considered

  • Fix only the merge, not the discovery arm. Would restore a menu for OMP but a single shared one, losing the per-model ceiling that the listing already states.
  • Seed one OMP model carrying the menu. Same outcome, one file touched, but it hardcodes a model row that discovery is meant to own, and the ladder still never reaches it.
  • Keep the six-tier subset. Contradicted by 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 to modelOptionsFromListing, 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.
  • Every new assertion was reverse-verified: reverting the corresponding source change turns it red.
  • docs/site/content/docs/agents/native-chat.mdx documents the control.

Verification

  • tsc --noEmit -p config/tsconfig.node.json: 0 errors, after pnpm run build:packages as the repo's own typecheck script does.
  • oxlint on the changed files: 0 warnings, 0 errors.
  • vitest across src/shared/agent-session, src/shared/native-chat, src/shared/agent-launch: 55 files, 271 tests, 0 failures.
  • Real host, omp 18.12.2, 51-model listing, end to end: 51 menus, 47 exact ladders, 0 overshoot.
  • CI has not run yet. This is a fork PR, so every pull_request workflow 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 --json output.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

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 --thinking flags. 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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Security: no new process, network, or credential surface. The probe runs the same command shape every other model probe runs.
  • Cross-platform: no platform-specific branch. The probe and the catalog run on Linux, Windows, and macOS through the same code paths.
  • Remote SSH: a headless orca serve host fills the same catalog from the probe. The probe needs no renderer.
  • Mobile: mobile reads the same catalog and snapshot. The Android capability gap in [Bug]: Android OMP chat model picker disables every choice in new and existing sessions #26191 stays open and separate.
  • Backwards compatibility: no settings-shape, wire-format, or recorded-argv change. A chosen tier adds --thinking; Orca refused --effort for OMP before, and this PR accepts it. The catalog declares no live command: OMP added /effort in 18.5.0, past the 17.0.5 floor.
  • The listing states no default tier, so no menu claims one. A live chat reports the configured effort.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • oxlint and targeted vitest runs pass locally; the full pnpm lint/typecheck/test/build run in CI

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Walkthrough

OMP model discovery now runs omp models --json and includes each model’s available thinking levels without assigning a default effort. OMP effort selections map to --thinking at launch. Extra OMP arguments and worker launch preferences validate supported effort values. Tests and documentation cover model discovery, effort selection, and validation.

Merge Risk: Minimal · previous review 81e26

OMP model and effort options now come from the model listing, and effort maps to --thinking at launch. No actionable merge-blocking risk remains from the supplied review.

Pre-merge checks: Passed 4

Check name Status Explanation
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.
Title check Passed The title "feat(omp): offer OMP models and reasoning effort from its own listing" matches the main change: OMP model discovery and reasoning-effort options now come from the omp models --json listin…
Description check Passed The description follows the repository template closely. It has a Summary, What Changed with mechanism detail, Why with alternatives considered, a Linked Issue (Fixes #23388), a Performance line, a Ri…
Full details: Title check

Explanation

The title "feat(omp): offer OMP models and reasoning effort from its own listing" matches the main change: OMP model discovery and reasoning-effort options now come from the omp models --json listing, with --thinking mapping for effort. It is specific and concise, and it names the agent and the feature. It does not mention the CLI, automation, or docs changes, which is expected for a title.

Full details: Description check

Explanation

The description follows the repository template closely. It has a Summary, What Changed with mechanism detail, Why with alternatives considered, a Linked Issue (Fixes #23388), a Performance line, a Risk discussion covering compatibility and rollback, a Testing section with checked boxes, Visual Proof marked N/A with a reason, an AI Disclosure, an upstream boundary statement, and a checklist. The ELI5 section is missing. The Risk section has no explicit 'Level:' value (Low, Medium, or High), and it does not describe how to back out the change (plain revert or what a revert would not undo). The Testing section lists no platforms actually tested (macOS, Linux, Windows, or SSH). These gaps are minor relative to the overall completeness.

Resolution

Add the missing ELI5 section, set the Risk level (Low, Medium, or High), state how to back out the change, and list the platforms actually tested under Testing.

  • 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

ℹ️ Recent review info

⚙️ Run configuration

  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7333d826-8934-40f4-b34f-e908f9b2a657
📥 Commits

Reviewing files that changed from the base of the PR and between 509c159 and 81e261b.

📒 Files selected for processing: 3

  • docs/site/content/docs/agents/native-chat.mdx
  • src/shared/agent-session-option-catalog-omp.test.ts
  • src/shared/agent-session-option-catalog-omp.ts
🚧 Files skipped from review as they are similar to previous changes: 3

  • docs/site/content/docs/agents/native-chat.mdx
  • src/shared/agent-session-option-catalog-omp.ts
  • src/shared/agent-session-option-catalog-omp.test.ts

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

@Circumsized
Circumsized force-pushed the fix/omp-model-catalog-command-discovery branch 3 times, most recently from e8b6b9d to fc0c302 Compare October 16, 2026 21:58
@Circumsized Circumsized changed the title fix(omp): list OMP models before a chat starts, from omp models --json feat(omp): offer OMP models and reasoning effort from its own listing Oct 16, 2026
@Circumsized
Circumsized force-pushed the fix/omp-model-catalog-command-discovery branch from fc0c302 to 8329cbc Compare October 16, 2026 22:03

@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: 4


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c734322-4160-49e9-9ec7-5bd3c10bebb2
📥 Commits

Reviewing files that changed from the base of the PR and between fcf194c and 8329cbc.

📒 Files selected for processing: 10
  • docs/site/content/docs/agents/native-chat.mdx
  • src/cli/specs/orchestration-worker-specs.ts
  • src/main/acp/acp-launch-specs.ts
  • src/main/acp/acp-model-catalog-probe.test.ts
  • src/main/runtime/rpc/methods/orchestration/worker/worker-launch-preferences.test.ts
  • src/shared/agent-session-option-catalog-omp.test.ts
  • src/shared/agent-session-option-catalog-omp.ts
  • src/shared/automation-extra-agent-args.spec.ts
  • src/shared/automation-extra-agent-args.ts
  • src/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.

Comment thread src/shared/omp-model-list-probe.ts Resolved

@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
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 15d423e3-513a-432c-911b-d380d970fa89
📥 Commits

Reviewing files that changed from the base of the PR and between 8329cbc and 509c159.

📒 Files selected for processing: 8
  • src/cli/specs/orchestration-worker-specs.ts
  • src/main/acp/acp-launch-specs.ts
  • src/main/acp/acp-model-catalog-probe.test.ts
  • src/shared/agent-session-option-catalog-omp.test.ts
  • src/shared/agent-session-option-catalog-omp.ts
  • src/shared/automation-extra-agent-args.spec.ts
  • src/shared/automation-extra-agent-args.ts
  • src/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.

@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; the requested merge tests are now present.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the requested merge tests are now present.

Summary

This PR carries OMP's listed thinking levels into model-specific menus and accepts --thinking in extra agent arguments.

  • OMP model menus follow each model's listed thinking levels.
  • OMP automation arguments can set a supported thinking level.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[OMP model listing] --> B[Read thinking levels]
  B --> C[Build each model's menu]
  C --> D[Keep menus during discovery merge]
  D --> E[Model picker]
Loading

Reviews (4) · Last reviewed commit: "test(omp): pin that a saved --thinking r..." · Reviewed by Greptile

Circumsized and others added 4 commits November 29, 2026 08:06
`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]>
@Circumsized
Circumsized force-pushed the fix/omp-model-catalog-command-discovery branch from e038581 to c836ca2 Compare November 29, 2026 09:13
Circumsized and others added 2 commits November 29, 2026 12:37
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]>

This branch has not been deployed

No deployments
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.

orchestration worker-start: accept --model (and --effort as --thinking) for the omp agent

1 participant