Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

797 B
Raw Blame
import type { RegistryEntry } from "../../shared.ts";
import { GLM_REQUEST_DEFAULTS, GLM_TIMEOUT_MS, GLM_SHARED_MODELS } from "../../shared.ts";

export const glmProvider: RegistryEntry = {
  id: "glm",
  alias: "glm",
  format: "openai",
  executor: "glm",
  naiveResetTimezone: "+08:00",
  baseUrl: "https://api.z.ai/api/coding/paas/v4/chat/completions",
  defaultContextLength: 200000,
  authType: "apikey",
  authHeader: "bearer",
  requestDefaults: GLM_REQUEST_DEFAULTS,
  timeoutMs: GLM_TIMEOUT_MS,
  // #14779: bare "glm" has no live-discovery endpoint; its synced catalog is only a
  // point-in-time copy of this registry (local_catalog), so it must not veto
  // registry models added after the snapshot was taken.
  liveCatalogAuthoritative: false,
  models: [...GLM_SHARED_MODELS],
};