Skip to content

Resting model catalog for registered structured agents from their model probe spec #79

Open

Description

@44madfire

Summary

Populate the pre-session model picker for registered structured agents (OMP, Grok) from the agent's existing model probe spec, so an OMP chat at rest lists the same models legacy chat lists today.

Context

  • 44madfire/orca#20 lists model/provider metadata and model switching as parity rows; v1 review finding "resting catalog is an existing guarantee" is confirmed.
  • Legacy: OMP_SESSION_OPTION_CATALOG.listModels runs omp models --json (src/shared/agent-session-option-catalog-omp.ts:28 @76d1b7b), enriched in the composer by ensureNativeChatModelEnrichment (src/renderer/src/components/native-chat/native-chat-session-option-enrichment.ts:87 @76d1b7b).
  • Structured: catalog probes exist only for Codex and Claude (src/main/runtime/structured-agent-model-catalog-wiring.ts:77-88 @76d1b7b); ACP agents fall back to fallbackModels: () => null (src/main/acp/acp-structured-agent-definitions.ts:35), so structured-agent-session-options-read.ts:47 yields no models at rest.
  • Probe specs already exist for OMP and Grok (src/shared/agent-model-probe-spec.ts:27 @76d1b7b). Ids agree: resting provider/model (src/shared/omp-model-list-probe.ts:30-35) equals OMP's config value ${provider}/${id} (packages/coding-agent/src/modes/acp/acp-agent.ts:1826 @53f253f).

Scope

  • Generic adapter from AgentModelProbeSpec to a model-catalog probe, run on the execution host with the agent's exact launch environment (for OMP the pass-through env of Register omp acp as an opt-in structured ACP agent behind the availability gate #68, so the list matches the profile/agent dir the chat will use) and the same command resolution as launches (bun shims, standalone dir); registered for every structured agent that has a spec.
  • Same refusal policy as the Codex probe (no catalog from doubt; failures suppress re-probe per store policy); context windows carried.
  • A pick made at rest is applied on first acquire through restoreAcpSessionOptions; a refused pick is reported once.

Non-goals

  • No effort/thinking at rest (expansion P-THNK-01). No static model lists. No change to commit-message model discovery.

Depends on

Parity rows owned

  • P-MSWC-01.

Acceptance criteria

  • A new OMP chat lists, before any child runs, the same models (ids, labels, provider descriptions, context windows) legacy chat lists.
  • A model picked at rest is the model of the first turn.
  • Probe failure shows the existing no-data state without retry loops.
  • Grok's resting picker populates through the same path.
  • On a paired runtime, the host probes its own omp.
  • Under a named OMP profile, the resting list is that profile's models.

Required tests

  • Parse parity against legacy fixtures (noisy stdout, duplicate selectors, missing context window).
  • Pick-at-rest → session/set_config_option with the identical id; unknown id → skipped and reported once.
  • Concurrent catalog reads share one probe; a profile / agent-dir change in the launch env invalidates.

Base branch

acp-migration (44madfire/orca).

Metadata

Metadata

Assignees

No one assigned

    Labels

    acp-migrationOMP Native Chat ACP migrationphase-BPhase B parity completion

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions