Files
vscode/src
80a8fb2108 Push BYOK models to the agent host instead of pulling them (#325737)
* agentHost: push BYOK models over onDidChangeModels

Change the reverse BYOK LM bridge from a pull model to a push model. The
renderer now owns its model set and pushes the current snapshot over
`onDidChangeModels` (on subscribe and on every change) instead of answering
`listModels()` round-trips. `IByokLmBridgeConnection.onDidChangeModels` becomes
required and carries `IByokLmModelInfo[]`; the client channel serves a snapshot
stream that enumerates renderer-locally and drops `listModels`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: cache pushed BYOK snapshots in the bridge registry

Subscribe to each connection's onDidChangeModels on register and cache the
pushed snapshot rather than enumerating connections. A connection becomes
serving once it pushes its first snapshot (even empty). Drop listModels and the
per-connection re-enumeration path from the registry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: read BYOK session models from the registry cache

Read the serving window's models from the registry's cache of renderer-pushed
snapshots. The renderer pushes on connect, so the cache is warm by session-create
time; drop the preferCache parameter and the live-enumeration fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: update BYOK tests for the push model

Rework the BYOK tests to drive connections by pushing model snapshots over
onDidChangeModels instead of scripting listModels, and assert against the
registry cache. Non-serving windows are modeled as connections that never push.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentHost: implement throttling for BYOK model snapshot emissions

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-14 06:27:48 +00:00
..
2026-07-13 14:18:24 +00:00