import { CancellationToken } from "../../../base/common/cancellation.js"; import { Event } from "../../../sessions/sessions.web.main.internal.js"; import { IByokLmChatRequest, IByokLmChatResult, IByokLmModelInfo } from "./agentHostByokLm.js"; export declare const IAgentHostByokLmHandler: import("../../instantiation/common/instantiation.js").ServiceIdentifier; /** * Renderer-side handler that services {@link IByokLmChatRequest}s by calling * the VS Code Language Model API. Implemented in the workbench (where * `ILanguageModelsService` lives) and reached from the node agent host over * the reverse bridge. */ export interface IAgentHostByokLmHandler { readonly _serviceBrand: undefined; /** * Fires when the renderer's set of BYOK models changes, so the node agent * host can re-enumerate them for the model picker. Optional: test fakes may * omit it. */ readonly onDidChangeModels?: Event; /** * Run a BYOK Responses request against the extension-registered model that * matches `request.vendor` + `request.modelId`. Rejects (or resolves with * {@link IByokLmChatResult.error}) when no such model is available. */ chat(request: IByokLmChatRequest, token: CancellationToken): Promise; /** * Enumerate the renderer's BYOK models (vendor `isBYOK`, excluding * session-scoped agent-host copies) so the node agent host can synthesize * provider/model config for the SDK runtime. */ listModels(token: CancellationToken): Promise; }