Repository navigation
feat(platform): pin task-agent models to their serving provider - #2959
Merged
Merged
Conversation
The agent dialog's model picker now lists one option per (provider, model) pair - searchable, with the serving provider named under every entry - and stores the pair on the agent. Run resolution honors the pin fail-closed: a pinned provider that cannot serve fails the run with the reason instead of silently routing (and billing) another provider. Unpinned rows keep the legacy first-match walk unchanged. A pinned provider whose default credential is a vendor subscription (anthropic subscription-broker forcing claude-code today) now serves the turn on the redeemed subscription token: no virtual key is minted, the capability bridge rides a random session token, and the harness yml's subscription delivery overrides the auth pair over the managed env shell. Subscription-served models are offered only for their forced harness in the dialog.
The page still documented the retired Agents & models curation tab (Recommended/Restricted). Rewrite it around what ships: named per-project agents with an Agent type (harness), a model pinned to its serving provider (subscription entries offered only for their forced harness), equipment, and standing instructions - plus the task loop that runs them. Sweep the sibling claims the same surface invalidated: the projects overview tab strip and card, the concepts crew paragraph, and the field- label sentences in agents/concepts and agents/harnesses (the dialog says "Agent type" / "Agent-Laufzeit"; only the automation node says "Harness"). EN, DE, and FR authored natively; frontmatter manifest regenerated via build-search-index. The project-agents-models.webp still shows the retired UI - the manifest entry already captures the current Agents tab, so a docs:screenshots run against the seeded stack refreshes it (not run here: the hermetic capture stack needs :3000, which the live dev stack holds).
Build the model option without a per-iteration spread, and narrow the default-credential row field by field instead of asserting to the narrower shape - a drifted row now degrades to the no-active-credential error instead of an unsound read.
larryro
force-pushed
the
feat/task-agent-model-provider
branch
from
August 10, 2026 23:42
97e2e88 to
cbc6b32
Compare
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
The Edit-agent Model field was a flat, unsearchable list of bare model ids. With two credentials configured (e.g. Anthropic subscription broker + OpenRouter env key) there was no way to tell which provider serves an entry, let alone choose one:
projectAgents.modelstored a bare string — no provider anywhere;resolveServingTargetwalked connectors alphabetically over default direct credentials with fuzzy id matching, so picking OpenRouter'santhropic/claude-xcould silently serve (and bill) via the Anthropic connector, and vice versa;subscription:injection, exec-builder override, broker redemption) all existed, but nothing producedserving: {kind:'subscription'}. "Select the Anthropic provider" was impossible regardless of UI.What ships
Provider-visible, provider-pinned selection
projectAgents.modelProvider, snapshotted onto the run row likemodel).resolveServingTarget(..., {pinnedProvider})resolves only that connector and fails the run with the reason instead of silently routing another provider. Unpinned rows keep the legacy walk byte-for-byte; automation nodes unchanged.Claude Code · Anthropic · claude-sonnet-5 · 6 equipped.Subscription serving lane for task agents
convex/tasks/task_serving.tssplits the lanes: a pinned provider whose default credential is subscription-flavored serves the turn on the redeemed vendor token, gated byresolveExecution(forced-harness match + byo policy) and the harness's ymlsubscriptiondelivery.mintTurnServing(shared by fresh start + steer restart): gateway lane mints the session VK exactly as before; the subscription lane mints no VK — the capability bridge rides a random session token (llmGatewayKeyIdoptional), and the exec composes the managed env shell (bridge token, model-pin slots) with the vendor auth pair overridingANTHROPIC_AUTH_TOKEN/ANTHROPIC_BASE_URL.CREDENTIAL_BROKER_*messages as the run error; no gateway metering on the subscription lane (vendor flat-rate).Docs
platform/projects/project-agents.mdrewritten for the real Agents tab (en/de/fr authored natively) — it still documented the retired "Agents & models" curation feature — plus the sibling claims that surface invalidated (projects overview tab strip + card, concepts crew paragraph, the "both label the field Harness" sentences; the project dialog says Agent type / Agent-Laufzeit).project-agents-models.webpstill shows the retired UI; the manifest entry already captures the current tab, sobun run docs:screenshots -- --only project-agents-modelsagainst the seeded capture stack refreshes it (not run here — the hermetic stack needs :3000, held by the live dev stack).Verification
bun run checkgreen (incl. ~20 new tests: pin arms inllm_call.test.ts, lane split + refusals intask_serving.test.ts, managed+subscription exec composition inexternal_turn_bridge_exec.test.ts, mutation normalization);migrations:checkclasses the new optional fields as data-safe (no migration); docs suite 194/194.anthropic/claude-sonnet-5 — OpenRouterandclaude-sonnet-5 — Anthropic · Subscriptionside by side; a task run on the subscription pick did real multi-turn PDF work on the brokered token, harvested a deliverable, and settled to In review (no-VK release path included). Rendered docs pages eyeballed on the docs dev server.