diff --git a/extensions/xai/runtime-model-compat.ts b/extensions/xai/runtime-model-compat.ts index b44de081398..bb8d1d6535a 100644 --- a/extensions/xai/runtime-model-compat.ts +++ b/extensions/xai/runtime-model-compat.ts @@ -3,10 +3,11 @@ import { applyXaiModelCompat } from "openclaw/plugin-sdk/provider-tools"; type XaiRuntimeModelCompat = { compat?: unknown; reasoning?: unknown; - thinkingLevelMap?: Partial< - Record<"off" | "minimal" | "low" | "medium" | "high" | "xhigh", string | null> - >; + thinkingLevelMap?: XaiThinkingLevelMap; }; +type XaiThinkingLevelMap = Partial< + Record<"off" | "minimal" | "low" | "medium" | "high" | "xhigh", string | null> +>; const XAI_UNSUPPORTED_REASONING_EFFORTS = { off: null, @@ -26,7 +27,9 @@ const XAI_REASONING_EFFORTS = { xhigh: "high", } satisfies NonNullable; -export function applyXaiRuntimeModelCompat(model: T): T { +export function applyXaiRuntimeModelCompat( + model: T, +): T & { thinkingLevelMap: XaiThinkingLevelMap } { const withCompat = applyXaiModelCompat(model); return { ...withCompat,