Files
OmniRoute/open-sse/config/providers/registry/grok-cli/index.ts
Ankit e61b75f007 fix(config): externalize ws for copilot-m365-web executor (#6098, closes #6062)
Externalize ws / bufferutil / utf-8-validate in serverExternalPackages so the copilot-m365-web WebSocket masking path works at runtime (bundling ws → TypeError: b.mask is not a function → 80s chat timeout). Regression guard in next-config.test.ts.

Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
2026-07-03 16:36:35 -03:00

33 lines
966 B
TypeScript

import type { RegistryEntry } from "../../shared.ts";
import { resolvePublicCred } from "../../shared.ts";
export const grok_cliProvider: RegistryEntry = {
id: "grok-cli",
alias: "gc",
format: "openai",
executor: "grok-cli",
baseUrl: "https://cli-chat-proxy.grok.com/v1/chat/completions",
authType: "oauth",
authHeader: "bearer",
passthroughModels: true,
models: [
{
id: "grok-build",
name: "Grok Build",
contextLength: 256000,
unsupportedParams: ["presencePenalty", "frequencyPenalty", "logprobs", "topLogprobs"],
},
{
id: "grok-composer-2.5-fast",
name: "Grok Composer 2.5 Fast",
contextLength: 200000,
unsupportedParams: ["presencePenalty", "frequencyPenalty", "logprobs", "topLogprobs"],
},
],
oauth: {
clientIdEnv: "GROK_OAUTH_CLIENT_ID",
clientIdDefault: resolvePublicCred("grok_id", "GROK_OAUTH_CLIENT_ID"),
tokenUrl: "https://auth.x.ai/oauth2/token",
},
};