Class SessionProviderApi

java.lang.Object
com.github.copilot.generated.rpc.SessionProviderApi

@Generated("copilot-sdk-codegen") public final class SessionProviderApi extends Object
API methods for the provider namespace.
Since:
1.0.0
  • 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

      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 sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • add

      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 sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • sync

      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 sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0
    • withdraw

      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 sessionId field in the params record is overridden by the session-scoped wrapper; any value provided is ignored.

      Since:
      1.0.0