Class SessionProviderApi
java.lang.Object
com.github.copilot.generated.rpc.SessionProviderApi
API methods for the
provider namespace.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionadd(SessionProviderAddParams params) Adds BYOK providers and/or models to the session's registry at runtime, extending the additive registry built from the session's `providers`/`models` options.Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses.Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses.sync(SessionProviderSyncParams params) Atomically updates the session's BYOK provider and model registry by applying the supplied snapshot, replacing existing entries, updating models, or removing entries absent from the snapshot.Withdraws named host-managed models from the session's BYOK registry, leaving every other entry untouched.
-
Method Details
-
getEndpoint
Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses.Invokes the method with no params, applying the runtime defaults.
- Since:
- 1.0.0
-
getEndpoint
@CopilotExperimental public CompletableFuture<SessionProviderGetEndpointResult> getEndpoint(SessionProviderGetEndpointParams params) Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
add
@CopilotExperimental public CompletableFuture<SessionProviderAddResult> add(SessionProviderAddParams params) Adds BYOK providers and/or models to the session's registry at runtime, extending the additive registry built from the session's `providers`/`models` options. Both fields are optional, so a call may add providers only, models only, or both. Within a single call providers are registered before models, so a model may reference a provider added in the same call; across calls a model may reference any provider already registered (from session creation or a prior add). A model whose referenced provider is not registered by the end of the call is rejected. Newly added models become selectable via `model.list` / `model.switchTo` and are inherited by sub-agents spawned afterwards.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
sync
@CopilotExperimental public CompletableFuture<SessionProviderSyncResult> sync(SessionProviderSyncParams params) Atomically updates the session's BYOK provider and model registry by applying the supplied snapshot, replacing existing entries, updating models, or removing entries absent from the snapshot.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-
withdraw
@CopilotExperimental public CompletableFuture<SessionProviderWithdrawResult> withdraw(SessionProviderWithdrawParams params) Withdraws named host-managed models from the session's BYOK registry, leaving every other entry untouched. The scoped counterpart to `provider.sync`: a snapshot can only describe entries the caller knows about, so using it to remove one model silently withdraws rows registered by another source, such as a plugin calling `provider.add` at runtime. Naming what to remove leaves unrelated entries alone. Selection ids that are not registered are ignored, so withdrawal is idempotent. A provider is removed only when one of the withdrawn models was the last entry referencing it; a provider that simply has no models, which is the normal state while its rows are supplied by catalog discovery, is left in place.Note: the
sessionIdfield in the params record is overridden by the session-scoped wrapper; any value provided is ignored.- Since:
- 1.0.0
-