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

1.1 KB
Raw Blame
import { resolvePublicCred, type RegistryEntry } from "../../shared.ts";

/**
 * Openference — OpenAI-compatible AI inference gateway (https://openference.com/).
 *
 * OAuth access tokens are ES256 JWTs accepted as Bearer credentials on
 * api.openference.com/v1/*. Live model discovery uses NAMED_OPENAI_STYLE_PROVIDERS;
 * seed models below are the offline fallback when the live fetch fails.
 */
export const openferenceProvider: RegistryEntry = {
  id: "openference",
  alias: "of",
  format: "openai",
  executor: "default",
  baseUrl: "https://api.openference.com/v1/chat/completions",
  responsesBaseUrl: "https://api.openference.com/v1/responses",
  authType: "oauth",
  authHeader: "bearer",
  passthroughModels: true,
  oauth: {
    clientIdDefault: resolvePublicCred("openference_id"),
    tokenUrl: "https://openference.com/oauth/token",
  },
  models: [
    { id: "GLM-5.2", name: "GLM 5.2", contextLength: 850000 },
    { id: "Qwen3.8 27b", name: "Qwen3.8 27B", contextLength: 262144 },
    { id: "Llama 3.2 3B", name: "Llama 3.2 3B", contextLength: 131072 },
  ],
};