ModelCallOptions
This content is not available in your language yet.
单次模型调用的选项:取消信号与分层超时(总闸 / 建连闸 / 空闲闸)。
connectTimeoutMs?
Section titled “connectTimeoutMs?”optional connectTimeoutMs?: number;建连/响应头到达闸(毫秒)。覆盖「发出请求 → 响应头到达」区间; 响应头到达后退场,交棒 idle 闸。缺席时消费方适配器用内建缺省 (openai 系 15_000)。
idleTimeoutMs?
Section titled “idleTimeoutMs?”optional idleTimeoutMs?: number;流式分片间空闲闸(毫秒)。响应头到达后启用,每到一段字节重臂; 分片持续到达的健康慢长流恒不误杀。缺席时消费方适配器用内建缺省 (openai 系 90_000)。
signal?
Section titled “signal?”optional signal?: any;timeoutMs?
Section titled “timeoutMs?”optional timeoutMs?: number;单次尝试总闸(毫秒)。分层超时落地后语义收敛为「总闸兼容位」: 消费分层超时的适配器(openai/openai-responses)把本值并入总闸 (totalTimeoutMs 优先);未跟进的适配器沿用「单闸覆盖整次尝试」旧语义。 压缩路径恒传本位(90s 总闸,kernel context/compaction.ts)。
totalTimeoutMs?
Section titled “totalTimeoutMs?”optional totalTimeoutMs?: number;可选总闸(毫秒)。整次尝试(建连 + 流式读取)的绝对上限; 缺省关闭(与 timeoutMs 同给时本位优先)。
Was this page helpful?
Thanks for your feedback.