From 83be41fc008057f63d877b0b6ad315c4db39e48f Mon Sep 17 00:00:00 2001 From: JUN Date: Sun, 13 Sep 2026 15:55:59 +0900 Subject: [PATCH] fix(xai): scope Fast-tier catalog copy to key-auth pricing #4431 opened Grok OAuth subscription rows to Fast. Those rows have no per-token price, so the shared catalog string advertised a 2x token price where it is false. Keep the priority-processing claim and scope the token-price claim to key auth. Residue of #4077 only. The source branch's forwardCallerServiceTier flips are not carried: live origin/dev keeps grok-4.20-multi-agent-0309 excluded after a 2026-09-13 probe recorded a default-tier downgrade. Co-authored-by: Jerome <221477575+laerad777@users.noreply.github.com> --- src/providers/registry.ts | 4 +++- tests/codex-integration/codex-catalog.test.ts | 2 +- tests/service/service-tier-capability.test.ts | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/providers/registry.ts b/src/providers/registry.ts index 08096f0fb7..dae15708f2 100644 --- a/src/providers/registry.ts +++ b/src/providers/registry.ts @@ -1400,7 +1400,9 @@ export const PROVIDER_REGISTRY: readonly ProviderRegistryEntry[] = [ // the map above. Key-auth declared the same value via keyAuthServiceTier, so the key // lane is unchanged. chatServiceTier: true, - fastTierDescription: "Priority processing, 2x token price", + // Shared across key and OAuth catalog rows. OAuth subscription has no + // per-token price, so the 2x claim is scoped to key auth. + fastTierDescription: "Priority processing; tier pricing applies on key auth only", featured: true, oauthId: "xai", jawcodeBundle: "xai", diff --git a/tests/codex-integration/codex-catalog.test.ts b/tests/codex-integration/codex-catalog.test.ts index 482e3f022b..cae7a2d00f 100644 --- a/tests/codex-integration/codex-catalog.test.ts +++ b/tests/codex-integration/codex-catalog.test.ts @@ -2043,7 +2043,7 @@ describe("provider discovered model display names", () => { // Classified by the 2026-09-13 OAuth-lane probe: grok-4.6 is Fast-eligible on // either xAI transport, so the hint fills the capability and its description. supportsServiceTier: true, - fastTierDescription: "Priority processing, 2x token price", + fastTierDescription: "Priority processing; tier pricing applies on key auth only", }); expect(catalogModelSlug(output)).toBe("xai/grok-4.6"); }); diff --git a/tests/service/service-tier-capability.test.ts b/tests/service/service-tier-capability.test.ts index efd7797ae2..febdfc7a6e 100644 --- a/tests/service/service-tier-capability.test.ts +++ b/tests/service/service-tier-capability.test.ts @@ -129,7 +129,7 @@ describe("xAI Fast capability follows the captured authentication transport", () capability: true, eligibility: "eligible", forwardCallerTier: true, - fastTierDescription: "Priority processing, 2x token price", + fastTierDescription: "Priority processing; tier pricing applies on key auth only", }); const oauthPolicy = fastPolicyForModel(xaiProvider("oauth"), "grok-4.6", "xai"); @@ -155,7 +155,7 @@ describe("xAI Fast capability follows the captured authentication transport", () expect(keyCatalog?.service_tiers).toEqual([{ id: "priority", name: "Fast", - description: "Priority processing, 2x token price", + description: "Priority processing; tier pricing applies on key auth only", }]); expect(keyCatalog?.additional_speed_tiers).toEqual(["fast"]); expect(decideTier(keyPolicy, true, undefined)).toEqual({ kind: "set", value: "priority" }); @@ -167,7 +167,7 @@ describe("xAI Fast capability follows the captured authentication transport", () expect(oauthCatalog?.service_tiers).toEqual([{ id: "priority", name: "Fast", - description: "Priority processing, 2x token price", + description: "Priority processing; tier pricing applies on key auth only", }]); expect(oauthCatalog?.additional_speed_tiers).toEqual(["fast"]); expect(decideTier(oauthPolicy, true, undefined)).toEqual({ kind: "set", value: "priority" });