/** * The OrcaRouter summarizer: this package's own model calls, routed through the provider seam. * * WHY THIS ADAPTER EXISTS AT ALL. `createSummarizerFromEnv()` picks the highest-fidelity summarizer * whose credentials are present, and the two it shipped with speak Anthropic and Google dialects on * those vendors' hosts. A user who holds an OrcaRouter key has no way to make the optimizer's own * model calls go through the gateway they already pay for, even though OrcaRouter is * OpenAI-compatible and the request is a plain chat completion. * * IT TAKES A CREDENTIAL, NOT A KEY. Construction goes through `sendProviderRequest`, which resolves * the key from the shared credential seam, so this adapter is identical whether the user pasted a key * or authorized in a browser. It never reads `ORCAROUTER_API_KEY` itself and never sees a raw secret * in its own signature. * * THE MODEL IS NOT GUESSED. A caller supplies one from the catalog; when it does not, the model comes * from `TOKEN_OPTIMIZER_ORCA_MODEL`, and absent that the request is refused with an actionable * message rather than sent to a name nobody verified. There is no built-in default model id here for * the same reason the catalog filters strictly: a plausible name is not a callable model. */ import type { Message } from '../core/session.js'; import type { ISummarizer } from '../core/summarization.js'; export interface OrcaRouterSummarizerOptions { /** A model id from the OrcaRouter catalog. Required unless the env var supplies one. */ readonly model?: string; readonly timeoutMs?: number; readonly fetchImpl?: typeof fetch; readonly env?: NodeJS.ProcessEnv; } export declare class OrcaRouterSummarizer implements ISummarizer { private readonly model; private readonly timeoutMs; private readonly fetchImpl; private readonly env; constructor(options?: OrcaRouterSummarizerOptions); summarize(messages: readonly Message[]): Promise; } /** * The model the user selected for optimizer-internal calls, if any. * * Read separately from construction so `createSummarizerFromEnv()` can decide whether this adapter * is usable before it tries to build one. */ export declare function configuredOrcaModel(env?: NodeJS.ProcessEnv): string | null; //# sourceMappingURL=summarizer.d.ts.map