/** * Detection of an operation's provider route: the initiating Agent or explicit * request names a route and model, the `llm-pi-ai` settings * section carries the route's profile, and the pi-ai catalog supplies the * defaults (wire protocol, base URL) a profile that overrides nothing inherits. * The probe and plan modules read this to decide which search-capable * protocol to use without any configuration. * @module dsh-github-copilot/current-provider */ import type { Context } from '@deepseek-ai/cordis'; import type { Agent } from '@deepseek-ai/dsh-agent'; /** The resolved chat-route facts this package consumes. */ export interface CurrentChatRoute { /** Registered provider route key (the llm-pi-ai `providers` dict key). */ readonly provider: string; /** Provider-owned model id. */ readonly model: string; /** Wire protocol the route speaks, when determinable. */ readonly api?: string; /** Endpoint base the route's requests go to. */ readonly baseURL?: string; /** Credential reference the route resolves its key through. */ readonly apiKeyEnv?: string; /** All interactive APIs advertised by this route's selected model. */ readonly supportedApis?: readonly string[]; /** Static provider/model request headers from pi-ai's catalog. */ readonly headers?: Readonly>; } /** * Read the public asynchronous initiator seam when supported by Core. * Older Core and agentless callers have no session selection; never substitute * the default-model service or an arbitrary registered Agent. * @param ctx - Host context with the optional Agent registry. * @returns the initiating Agent, or undefined when the capability/caller is absent. */ export declare function currentSearchInitiator(ctx: Context): Agent | undefined; /** * Capture the initiating Session's effective request route. Agent.options is * only an activation seed; Core model-selection waterfalls need not update it. * @param agent - initiating Agent recovered at the operation entry. * @returns provider/model leaves from the last committed request header, or none. */ export declare function currentSearchSelection(agent: Agent | undefined): { provider: string; model: string; } | undefined; /** * Resolve one operation's route. Explicit GenerateOptions fields are already * resolved by Core and take precedence; otherwise use the initiating Session's * effective request header. Missing request evidence fails closed. * @param ctx - context used for public initiator, settings and catalog reads. * @param explicit - explicit request selection, captured at operation entry. * @returns owned route facts, or undefined without a usable selection. */ export declare function currentChatRoute(ctx: Context, explicit?: { readonly provider?: string; readonly model?: string; }): CurrentChatRoute | undefined; //# sourceMappingURL=current-provider.d.ts.map