Repository navigation
feat(platform): pin automation agent node models to a provider - #3056
Merged
Merged
Conversation
The agent node's Model field becomes the project-agent (provider, model) picker: the pick stores the pair, subscription-served entries gate on the node's effective harness, and a harness switch clears an invalidated pick. A saved model no listing offers is called out under the picker. resolveWorkflowAgentServing honors the pin fail-closed through the shared resolvePinnedAgentServing, extracted from the task lane's split so the two lanes cannot drift; llm_call returns to an unpinned direct-only door. A pinned Anthropic subscription model can no longer be stolen by another connector's direct key in the walk's first pass. Unpinned nodes keep the two-pass walk byte-for-byte, and kick, answered-ask resume, and in-node retry all carry the pin.
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An automation
agentnode stores only a bare model string, andresolveWorkflowAgentServingwalks connectors direct-pass-first. An org holding an Anthropic subscription credential plus an OpenRouter BYO key therefore hadclaude-fable-5served — and billed — by OpenRouter (modelIdsEquivalentmatchesanthropic/claude-fable-5to the bare id, and a subscription default is invisible to the direct pass). Seen live on demo: the triage-glitchtip run failed with OpenRouter 402 while the Anthropic subscription sat unused. The task lane closed this exact hole in #2959 with a provider pin; the automation lane had no pin and no picker — the Model field was a free-text input.What ships
Editor. The agent node's Model field becomes the project-agent (provider, model)
SearchableSelect: one option per pair with the provider named under each entry (… · Subscriptionfor subscription-served copies), search, and index-keyed values. The pick storesmodel+modelProvideron the node. Subscription entries are offered only for the node's effective harness (host defaultclaude-codewhen unset), a harness switch that invalidates the pick clears it, and a saved model no listing offers is called out under the picker (editor.agent.modelUnlisted, en/de/fr). The option-mapping and selected-match helpers moved toapp/features/projects/lib/model-options.ts, shared with the project-agent dialog.Grammar.
agentnodes gain optionalmodelProvider(engineslots.ts/types.ts, builder docs + catalog). Legacy nodes without it validate and run unchanged.Serving. The pinned split is extracted from
task_serving.tsinto the sharedresolvePinnedAgentServing(lib/providers/agent_serving.ts): the pinned provider's default credential shape decides the lane, and a pin that cannot serve throws — never a silent fallback to another provider.resolveWorkflowAgentServingdelegates to it when the node carries a pin; unpinned nodes keep the two-pass walk byte-for-byte.resolveTaskServingnow delegates its pinned arm to the same implementation (its suite is green unchanged except the one test that asserted the old llm_call delegation seam), andllm_call.resolveServingTargetreturns to an unpinned, direct-only door. Kick, answered-ask resume, and the in-node auto-retry all carry the pin.Verification
agent_serving.test.ts: new pinned suite — pinned subscription wins over a live direct connector, pinned direct serves in catalog spelling, refused pin throws instead of falling back, unconfigured/inactive/catalog-miss errors name the pin.stepper.test.ts: a published pinned node carriesmodelProviderinto the kick request through the real save→load→step path.anthropic/claude-fable-5 — OpenRouterandclaude-fable-5 — Anthropic · Subscriptionside by side; picking the subscription copy saved v3 through server-side validation; switching harness to Codex cleared the invalidated pick; Discard restored it from the stored version.