Files
openclaw/extensions/xai/provider-id.ts
Peter Steinberger e1c144a003 fix(xai): preserve Grok thinking through the x-ai alias (#103340)
* fix(xai): honor provider alias runtime policy

* fix(xai): preserve alias billed tool defaults
2026-07-10 06:45:10 +01:00

9 lines
388 B
TypeScript

import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
const XAI_PROVIDER_IDS = new Set(["xai", "x-ai"]);
// Provider dispatch preserves the selected alias. Keep all xAI-owned runtime policy symmetric.
export function isXaiProviderId(provider: unknown): boolean {
return typeof provider === "string" && XAI_PROVIDER_IDS.has(normalizeProviderId(provider));
}