You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Context-size configuration is lost for extension-provided models in Agent Host #333017
Hi! I’m working on a LanguageModelChatProvider for Vercel AI Gateway, and I ran into what looks like an Agent Host projection gap.
I first noticed this through the product: the Vercel models work in both normal Chat and a Local Agent Host session, but the Context Size dropdown only appears in normal Chat.
The provider already includes contextSize choices in the model's configurationSchema. Normal Chat renders those choices and passes the selection back to the provider. When the same model is used through Agent Host, the model still appears and works, but that configuration is no longer available.
Reproduction
Install an extension that contributes a language model with configurationSchema.properties.contextSize.
Select the model in normal Chat and confirm that Context Size is available.
Start a Local session from the Agents view.
Select the same model and open its configuration.
The Context Size control is missing in the Agent Host session.
I think this is adjacent to #328336 and #320824. #329892 is also close, although I’m not sure it’s exactly the same question: that issue is about declaring context-size choices in chatLanguageModels.json, while in this case the extension provider has already declared them and normal Chat can render them.
Looking through the current path, it seems like Agent Host reconstructs the reasoning-effort configuration explicitly, but doesn't carry the provider's context-size choices—or its configuration schema more generally. I may be missing a supported hook here.
What is the intended boundary? Should Agent Host preserve the model configuration supplied by an extension provider, or should context size become another explicit capability carried through the bridge?
If there’s already a supported way for a provider extension to make this configuration available in Agent Host, I’d be happy to use it.
#341913 implements this. To your question about the intended boundary: it takes the "explicit capability carried through the bridge" route rather than preserving the whole provider schema, for the same reason reasoning effort went that way in #328431 — the agent host has to act on contextSize (it registers the model with the Copilot SDK at the selected size so compaction respects it), not just display it. The provider's values, labels, descriptions and default are all carried over, so a Vercel AI Gateway model that already publishes contextSize choices should need no changes.
The broader "preserve the provider's configuration schema" question is tracked in #340138.
Activity
agentHost: offer Context Size for extension BYOK models in Copilot se…
spencrr commentedon Oct 16, 2026
#341913 implements this. To your question about the intended boundary: it takes the "explicit capability carried through the bridge" route rather than preserving the whole provider schema, for the same reason reasoning effort went that way in #328431 — the agent host has to act on
contextSize(it registers the model with the Copilot SDK at the selected size so compaction respects it), not just display it. The provider's values, labels, descriptions and default are all carried over, so a Vercel AI Gateway model that already publishescontextSizechoices should need no changes.The broader "preserve the provider's configuration schema" question is tracked in #340138.