import type { Backend, BackendPorts, BackendRequest, BackendRequestOptions } from "./backend.js"; export type OpenAiBackendOptions = { /** * Base URL including the OpenAI API prefix, e.g. * `http://127.0.0.1:8080/v1`. Route paths (`/chat/completions`, `/models`, * `/embeddings`) are appended to this value. */ baseUrl: string; /** * Bearer credential forwarded to the backend. Local servers ignore it; the * default mirrors the `not-needed` placeholder the AI SDK uses for local * OpenAI-compatible servers. */ apiKey?: string; /** Model id used when a request omits `model`. */ defaultModel?: string; /** * When set, every request's `model` is overwritten with this id before it is * forwarded upstream, regardless of what the client sent. Used by per-candidate * capture gateways that are dedicated to one routed endpoint: the driving CLI * (e.g. Claude Code) picks its own model label, but the router must always * receive the routed model id. Absent means the client's model passes through. */ forceModel?: string; /** * Extra headers sent on every request. */ headers?: Record; }; /** An OpenAI HTTP backend supporting Chat Completions and native Responses. */ export declare class OpenAiBackend implements Backend { #private; readonly defaultModel: string | undefined; readonly ports: BackendPorts; constructor(options: OpenAiBackendOptions); chat(body: unknown, signal?: AbortSignal, options?: BackendRequestOptions): BackendRequest; supportsResponses(): boolean; responses(body: unknown, signal?: AbortSignal, options?: BackendRequestOptions): BackendRequest; models(signal?: AbortSignal): BackendRequest; embeddings(body: unknown, signal?: AbortSignal, options?: BackendRequestOptions): BackendRequest; }