type ModelCapabilities = { temperature?: boolean; [key: string]: unknown; }; type ModelInfo = { modelID?: string; capabilities?: ModelCapabilities; [key: string]: unknown; }; type ChatParamsInput = { sessionID: string; agent: string; model: ModelInfo; provider: unknown; message: unknown; }; type ChatParamsOutput = { temperature: number; topP: number; top_p?: number; topK: number; maxOutputTokens: number | undefined; options: Record; }; /** * Sanitize LLM sampling parameters to avoid API rejections. * * Two classes of problems are addressed: * * 1. **Model does not support temperature** — Reasoning models (o1/o3/o4-mini, * Claude thinking, etc.) report `capabilities.temperature === false`. * For these models we strip both `temperature` and `topP`/`top_p` because * the provider will reject the request if either is present. * * 2. **temperature and top_p both present** — Some providers (e.g. certain * OpenAI endpoints) refuse requests that set both simultaneously. * We keep `temperature` (the more commonly configured knob) and drop `topP`. * * This hook runs for every LLM call — main agent and subagents alike — so it * covers the child-session path that previously caused * "`temperature` and `top_p` cannot both be specified" errors. */ export declare function createChatParamsHook(): (input: ChatParamsInput, output: ChatParamsOutput) => Promise; export {};