Repository navigation
Description
When a Session's conversation is on a line other than the root and that line's adopted model came through a Provider route (providers/set), session/load answers config options without model: only mode remains. The same routed adoption on the root line keeps the option, so the difference is the line the reply reads its configuration from.
Where it happens
The gateway emits the model option only when the adopted model id appears in the catalog under the adopted provider: config.rs L247-L256 compares model.provider with catalog_provider_id and falls back to the execution provider_id. A routed adoption executes under a fresh provider id and keeps the catalog provider id beside it in catalogProviderId (scoped_routes.rs L254-L300).
On the root line the load reply's configuration comes from session.attach, whose reply carries catalogProviderId (subscription.rs L632-L680), so the comparison finds the catalog row.
On any other line the load reads the line through session.model.get (gateway.rs L3449-L3454, L3506-L3511), whose ModelConfigurationView carries only model, capabilitySnapshot and modelPreferences (protocol.rs L446-L457, built at connection/tree.rs L646-L666). No catalog provider id is sent, so the gateway compares the routed execution id against the catalog, finds no row, and drops the option. The client type already reserves the optional field (wire.rs L70-L95), and the public context/configured view does carry catalog_provider_id (tree_protocol.rs L186-L191), but a line's configuration at load comes from the by-line read, not from a history event.
Reproduce
- Create a Session on a catalog model of a Provider that accepts a route, open a line from the root, and call
session.branch_set_defaultfor that line. - Over ACP,
session/loadthe Session: the config options aremodeandmodel. - Call
providers/setfor that Provider with its protocol and a base URL, thensession/set_config_optionwith{"configId": "model", "value": "<model>"}: the reply still listsmodel. session/loadagain:moderemains andmodelis gone.- Move the default back to the root with
session.branch_set_default, callsession/set_config_optionwith the same model there, andsession/load:modeandmodelare both present.
After step 5 session.model.get answers a routed execution provider id on both lines, so the configuration each line runs is the same kind of adoption; only the root's load reply still names the model.
Verified
Reproduced end to end with a local test against origin/main at 4ff6b0a, with a real App Server, a catalog Provider that accepts a route, and the real ACP gateway. The line's load reply carried mode and model before the routed adoption and only mode after it; the root's load reply carried both.
Impact
providers/set is the way an ACP editor points a Provider at its own endpoint, which #2009 added, and #1963 makes the gateway read and write the default line. A client that reopens a Session whose conversation is on a line loses the model option for that Session whenever the line runs on a route, until the line adopts a configuration again; the permission mode stays usable, so what is lost is the model picker.
This shares its origin with #2118: #2009 wired the catalog provider id into the root's AttachResult only, and #1963 moves the client reads to the default line, where both gaps become reachable.
Design contract
model-configuration.md L200-L202 records catalogProviderId on the attach reply and catalog_provider_id on the event for scoped routes, and clients.md L173 makes session.model.get the read of a line's own adopted configuration. Whether that read should carry the catalog provider id is a decision for the fix: it adds a field to a public reply.
Activity