@kenkaiiii/gg-ai 5.18.0 → 5.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -118,12 +118,14 @@ var PROVIDER_DISPLAY = {
118
118
  deepseek: "DeepSeek",
119
119
  openrouter: "OpenRouter",
120
120
  sakana: "Sakana",
121
+ xai: "xAI (Grok)",
121
122
  xiaomi: "Xiaomi (MiMo)",
122
123
  minimax: "MiniMax"
123
124
  };
124
125
  var PROVIDER_STATUS_URL = {
125
126
  openai: "status.openai.com",
126
- anthropic: "status.anthropic.com"
127
+ anthropic: "status.anthropic.com",
128
+ xai: "status.x.ai"
127
129
  };
128
130
  function providerDisplayName(provider) {
129
131
  return PROVIDER_DISPLAY[provider] ?? provider;
@@ -3411,6 +3413,18 @@ providerRegistry.register("sakana", {
3411
3413
  baseUrl: options.baseUrl ?? "https://api.sakana.ai/v1"
3412
3414
  })
3413
3415
  });
3416
+ providerRegistry.register("xai", {
3417
+ // xAI's public API (console.x.ai key) is OpenAI-compatible — ride the Chat
3418
+ // Completions transport like Moonshot/DeepSeek. Grok reasoning models take
3419
+ // top-level `reasoning_effort` (low/medium/high), which the shared thinking
3420
+ // path already sends. xAI's OAuth path exists but only via the Grok CLI's
3421
+ // private Responses proxy (cli-chat-proxy.grok.com) with reverse-engineered
3422
+ // attribution headers and account-tier gating — intentionally not wired.
3423
+ stream: (options) => streamOpenAI({
3424
+ ...options,
3425
+ baseUrl: options.baseUrl ?? "https://api.x.ai/v1"
3426
+ })
3427
+ });
3414
3428
  providerRegistry.register("minimax", {
3415
3429
  stream: (options) => streamAnthropic({
3416
3430
  ...options,