Skip to content

Commit 43f7c4d

Browse files
committed
fix: scope xAI transport gate to built-in id
1 parent e0eeeb8 commit 43f7c4d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎src/providers/service-tier.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type CapturedServiceTierAdapterAuthority = Readonly<Record<string, string
1313
* xai preset opts into chatServiceTier, but that opt-in must only arm when the effective
1414
* transport is the canonical API-key path (issue #1875).
1515
*/
16-
const XAI_CHAT_PRIORITY_PROVIDERS = new Set(["xai", "x.ai", "x-ai"]);
16+
const XAI_CHAT_PRIORITY_PROVIDER = "xai";
1717

1818
const capturedAdapterAuthority = new WeakMap<object, CapturedServiceTierAdapterAuthority>();
1919

@@ -48,8 +48,7 @@ function exactModelValue<T>(
4848
}
4949

5050
function isXaiPriorityProvider(providerName: string | undefined): boolean {
51-
return typeof providerName === "string"
52-
&& XAI_CHAT_PRIORITY_PROVIDERS.has(providerName.trim().toLowerCase());
51+
return providerName?.trim().toLowerCase() === XAI_CHAT_PRIORITY_PROVIDER;
5352
}
5453

5554
function isCanonicalXaiPriorityTransport(provider: ChatServiceTierProvider): boolean {

0 commit comments

Comments
 (0)