Skip to content

fix(platform): show the serving unpinned agent model picks actually use - #3057

Merged
larryro merged 1 commit into
mainfrom
fix/model-pin-visibility
Aug 25, 2026
Merged

larryro merged 1 commit into
mainfrom
fix/model-pin-visibility

Conversation

@larryro

@larryro larryro commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Problem

A model pick saved without a provider pin (every agent node and project agent saved before #3056, including the ones the pack seeder ships) rendered as a clean checkmark on whichever offered entry shared the bare model id — while the run's serving walk could pick, and bill, another provider entirely. On demo this misled directly: the editor showed claude-fable-5 · Anthropic · Subscription as selected, while every cron run of the deployed (pinless) version went through OpenRouter and died on its 402. The display asserted a provider the runtime never promised.

Principle

What the editor shows must be what a run would actually use. No id-lookalike preselects, no silent pin adoption, no shortcut that promotes the lookalike into a pick — the picker asks the runtime's own resolver and renders its answer.

Changes

  • Serving preview, per lane — new previewUnpinnedAgentServing (automations) and previewUnpinnedTaskServing (tasks) actions call each lane's real resolver with no pin and return the serving a run would use right now — {ok, providerSlug, modelId, lane} — or the resolver's own refusal as a result. The lanes intentionally differ unpinned (two-pass walk vs direct-only), so each surface asks its own. Org-member gated, same as the model listing.
  • Honest pickers — the automation node editor and the project-agent dialog select the resolved row and describe the state: resolving / “Saved as "{model}" without a pinned provider — runs currently resolve to {provider}. Pick an entry to pin it.” / the refusal when nothing serves. findSelectedModel is exact-(provider, id) only now; a pinless pick can no longer impersonate a pinned one. Picking any entry pins it, unchanged.
  • Deployed-version warning — getAutomation reports deployedUnpinnedAgentNodes read from the DEPLOYED document (not the loaded one — a pinned draft over a pinless live version is exactly the trap), and the automation detail page shows a standing warning until a pinned version is deployed.
  • Actual serving in the run log — both lanes' op queries project the op row's modelRef, and the agent log renders “This turn ran on {provider}/{model}.” (gateway refs' doubled provider segment collapsed for display). Closes the run-side visibility gap: the OpenRouter detour is now one glance in the log.

Verification

  • tsc, oxlint 1.79 (probe-confirmed engine), platform server suite 75 697 green, platform UI suite 3 370 green, packages/ui i18n suite 1 173 green (en/de/fr keys ship together).
  • Live on dev against the real trap state (triage-glitchtip-issues, live v2 pinless): the detail warning names v2 and its node; the node editor shows the pick sitting on anthropic/claude-fable-5 · OpenRouter — the walk's actual answer — instead of the subscription lookalike; explicitly picking the subscription entry pins it (description clears, draft dirties); a past run's agent log reads “This turn ran on openrouter/anthropic/claude-fable-5.”, matching what actually billed.

A model pick saved without a provider pin used to render as a clean
checkmark on whichever offered entry shared the bare id, while the run's
serving walk could pick (and bill) another provider entirely — on demo,
the editor showed the Anthropic subscription entry while every cron run
went through OpenRouter.

Make the display state the runtime's own answer instead of a lookalike:

- New previewUnpinnedAgentServing / previewUnpinnedTaskServing actions
  ask each lane's real resolver with no pin (the walks intentionally
  differ: two-pass for automation nodes, direct-only for task agents)
  and return the serving a run would use right now, or the resolver's
  own refusal as a result.
- The automation node editor and the project-agent dialog select the
  resolved row and say "runs currently resolve to {provider} — pick an
  entry to pin it"; findSelectedModel no longer falls back to an
  id-only match, so a pinless pick can never impersonate a pinned one.
- The automation detail page shows a standing warning when the DEPLOYED
  version carries pinless agent nodes (getAutomation reads the deployed
  document, not the loaded one — saving alone never moves the trigger).
- The agent log names the serving a turn actually ran on (op.modelRef,
  projected through both lanes' op queries), with the gateway ref's
  doubled provider segment collapsed for display.
@larryro
larryro merged commit 43444d0 into main Aug 25, 2026
69 of 70 checks passed
@larryro
larryro deleted the fix/model-pin-visibility branch August 25, 2026 02:31
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.

1 participant