Skip to content

fix(composer): display and match models by their complete wire ID - #966

Merged
vastsa merged 2 commits into
vastsa:mainfrom
aurorax-neo:fix/composer-full-model-id
Sep 23, 2026
Merged

vastsa merged 2 commits into
vastsa:mainfrom
aurorax-neo:fix/composer-full-model-id

Conversation

@aurorax-neo

Copy link
Copy Markdown
Contributor

Problem

The Composer chip, model picker, settings panes, and runtime binding lookups used tolerant model-ID matching that could conflate proxy/model with model, borrow another route's metadata, or display a friendly catalog name instead of the configured wire ID.

Changes (36 files, +495 −190)

Identity

  • modelWireIdsEqual(): new exact case-insensitive full-ID comparator for configured-model identity.
  • Composer: chip label is the raw modelId; list rows show the complete wire ID; selection, binding lookup, and reasoning projection all use the exact comparator.
  • Settings: default model, image model, subagent pin, and advanced-pane metadata keyed by provider + complete wire ID.
  • Runtime: binding and context-window lookups match the exact stored ID.

Catalog safety

  • providerFor() no longer picks the first catalog provider on a shared API URL when no vendor key matches.
  • findModel() requires a single unambiguous candidate when no preferred provider resolves.

Image-generation alignment

  • imageGenerationBindingAvailable() mirrors the runtime service's exact check.

Default-model readiness

  • Empty defaultModelId resolves through the same fallback chain as the runtime.
  • A stale image-valued default is shown with its wire ID and an unavailable hint.

Tests

  • Desktop JS: 2688/2688 pass. Shared: 1012/1012. Host-runtime: 47/47.
  • TypeScript, build, git diff --check, and Biome lint pass.
  • New regressions: prefixed/unprefixed coexistence, no cross-borrow, shared-API ambiguity, stale defaults, reasoning projection scope.

aurorax-neo and others added 2 commits September 23, 2026 22:31
The Composer, settings panes, and runtime binding lookups previously
used tolerant model-ID matching that could conflate proxy/model with
model, borrow another route's metadata, or display a catalog friendly
name instead of the configured wire ID.

This commit:

- Introduces modelWireIdsEqual() for configured-model identity and
  uses it across Composer selection, advanced settings, image/default
  model resolution, subagent pins, scheduled picker, context usage,
  and launch resolver.
- Always shows the complete saved wire ID in the Composer chip, model
  list rows, and settings default summary.
- Prevents models.dev catalog lookup from returning ambiguous
  cross-provider metadata when the endpoint cannot be identified:
  providerFor() no longer picks the first publisher on a shared API,
  and findModel() requires a unique candidate when no provider
  resolves.
- Aligns image-generation availability with the runtime's exact-ID
  check so the UI and the service agree on what can be launched.
- Adds regression tests for prefixed/unprefixed coexistence, no
  cross-borrow of capabilities or context windows, stale defaults,
  and shared-API ambiguity.
@vastsa
vastsa force-pushed the fix/composer-full-model-id branch from 3d1ff53 to 1d634ae Compare September 23, 2026 15:50
@vastsa
vastsa merged commit 6d1d9fc into vastsa:main Sep 23, 2026
4 checks passed

This branch was previously deployed

1 inactive deployment
Preview — 1d634ae1 Deployed Sep 23, 2026 by vercel[bot]
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.

2 participants