/** * The three model API shapes the gateway speaks, each on a *different* mount: * * anthropic POST {base}/anthropic/v1/messages * openai POST {base}/v1/chat/completions * openai-responses POST {base}/openai/v1/responses * * `openai` and `openai-responses` are NOT interchangeable: /v1 serves chat * completions only, /openai/v1 serves responses only. Picking the wrong one * gives a 404, not a fallback — which is most of why this helper exists. */ export type ModelShape = "anthropic" | "openai" | "openai-responses"; /** Thrown when the proxy plane can't be configured (bad shape, missing key). */ export declare class ModelConfigError extends Error { constructor(message: string); } /** * The ACP proxy base URL for one model API shape. Pass it as `baseURL` to the * matching official SDK client. */ export declare function modelBaseUrl(shape?: ModelShape): string; /** The ACP workspace key (`gsk_...`) used to authenticate proxied calls. */ export declare function apiKey(): string; /** * Constructor options that point an official SDK client at the ACP proxy. * * import Anthropic from "@anthropic-ai/sdk"; * import { modelClientOptions } from "@agenticcontrolplane/governance"; * * const client = new Anthropic(modelClientOptions("anthropic")); * * The gateway accepts the ACP key as `x-api-key`, which is the header both * SDKs send for `apiKey`, so no auth override is needed. */ export declare function modelClientOptions(shape?: ModelShape): { baseURL: string; apiKey: string; }; export interface InitOptions { /** Set false to configure the interception plane only. Default true. */ proxy?: boolean; /** Which shapes to route. Default `["anthropic", "openai"]`. */ shapes?: ModelShape[]; /** Gateway base URL override, forwarded to `configure`. */ baseUrl?: string; timeoutMs?: number; clientHeader?: string; } /** * Wire both planes in one call. * * Configures the governance hook, then points the model SDKs at the ACP proxy * by setting their environment variables. Call it **before** constructing any * model client — the SDKs read the environment at construction time. * * import { init } from "@agenticcontrolplane/governance"; * * init(); * const client = new Anthropic(); // now priced and metered by ACP * * Routing per provider is all-or-nothing. If a provider's base URL is already * set to something other than ACP, that provider is left completely alone * (base URL *and* key) and a warning names it — a half-applied provider, ACP's * URL against a real vendor key, is just a 401. * * Returns a map of what happened, keyed by shape: the URL applied, or a * "skipped: ..." reason. */ export declare function init(options?: InitOptions): Record; //# sourceMappingURL=model.d.ts.map