/** * Builtin provider profiles for xAI (Grok models). * * xAI exposes an OpenAI-compatible API at `https://api.x.ai/v1`. Two * profiles are registered — one per ApiMode: * * - {@link xaiProfile}: `chat_completions` — standard OpenAI-compatible path. * Quirk: `x-grok-conv-id` header for KV-cache affinity. * - {@link xaiResponsesProfile}: `codex_responses` — xAI's Responses-compatible * endpoint (grok-* models). Selected automatically when the model id starts * with `grok-` and the caller requests `codex_responses` ApiMode. * * @task T9286 (W1d) * @task T9311 (xAI Responses profile) * @epic T9261 (T-LLM-CRED-CENTRALIZATION Phase 3/5) */ import type { ProviderProfile } from '@cleocode/contracts'; /** * Return (and lazily create) the process-scoped Grok conversation id. * * Pinning a stable `x-grok-conv-id` across requests in the same process * gives xAI's KV-cache layer a consistent cache key, reducing TTFT on * repeated system-prompt prefix calls within the same agent session. * * The id is intentionally not persisted — it resets each process restart so * stale cache entries do not accumulate across sessions. * * @returns Stable `cleo--` identifier for this process. */ export declare function getGrokConvId(): string; /** * xAI Grok provider profile — `chat_completions` ApiMode. * * Encodes the Grok conversation-id header as a `buildApiKwargsExtras` hook. * * @task T9286 (W1d) */ export declare const xaiProfile: ProviderProfile; /** * xAI Grok provider profile — `codex_responses` ApiMode. * * xAI exposes Responses-compatible endpoints for grok-* models. Select this * profile when the caller requests `codex_responses` ApiMode or when the * model id starts with `grok-` and the Responses API is preferred. * * Callers should construct a {@link CodexResponsesTransport} (from * `packages/core/src/llm/transports/codex-responses.ts`) with this profile's * `baseUrl` and any `x-grok-conv-id` header from `buildApiKwargsExtras`. * * @task T9311 */ export declare const xaiResponsesProfile: ProviderProfile; //# sourceMappingURL=xai.d.ts.map