@kortix/llm-catalog

中文文档
0.14.13发布于 2026/11/01Elastic-2.0TypeScriptES Module零依赖构建来源已验证

The Kortix LLM model catalog — the models the Kortix gateway supports and the managed-model set and defaults. Generated from models.dev; consumed across the Kortix platform and by the @kortix/sdk.

原始使用文档
文档目录3 节
  1. Kortix managed models: Platinum Inference
  2. Catalog
  3. License

@kortix/llm-catalog

This package supplies the bundled provider catalog (the models.dev snapshot) and the shared catalog helpers. It holds no Kortix managed model: the API owns runtime routing, the live served catalog, and the managed lineup.

Kortix managed models: Platinum Inference

Kortix managed models are a provider like any other, Platinum Inference, paid from Kortix credits. The lineup is whatever Platinum lists at GET {PLATINUM_INFERENCE_URL}/models: id, name, limits, image input, reasoning efforts and price per 1M tokens. The API reads it at boot and every 5 min (loadManagedLineup in apps/api/src/llm-gateway/models/managed-models.ts, replica/managed-lineup.ts). A model Platinum adds or reprices reaches users with no Kortix change.

  1. Every managed model has one upstream, Platinum (managedCandidates in apps/api/src/llm-gateway/resolution/descriptors.ts), reached with PLATINUM_INFERENCE_API_KEY (pt_live_, scope inference). Without the key, or with KORTIX_MANAGED_PROVIDER_ENABLED off, no managed model is listed, offered or served.
  2. Platinum owns the upstreams, their order, failover and their zero-data-retention terms.
  3. The gateway sends x-platinum-session (the Kortix session, else the API key, else the user). Platinum keys upstream prompt caches by it.
  4. Platinum reports its charge as usage.cost (USD). The gateway bills that cost × KORTIX_LLM_MARKUP (default 1.055). The listed price applies only to a response without usage.cost.
  5. usage_events.metadata.upstreamProvider is platinum. The client sees only Kortix.
  6. The platform default is LLM_GATEWAY_DEFAULT_MODEL when Platinum serves it, else the first model Platinum lists. Model-level fallback (LLM_GATEWAY_FALLBACK_POLICIES, policy-config.ts) is unchanged.
  7. Every client treats a bare model id under the gateway provider (kortix/<id>) as managed. No client holds a list of managed ids.

Retired ids that stored sessions may still carry (LEGACY_MANAGED_IDS, RETIRED_MANAGED_MODEL_IDS) stay in the API, so an old session moves to its successor.

The gateway answers every overflow as HTTP 400 context_length_exceeded, including an error as the first data: frame of a stream (packages/llm-gateway/src/http/call-upstream.ts). OpenCode reads that code as a context overflow and compacts.

Catalog

CATALOG is the bundled models.dev snapshot. It lives in src/catalog-data.ts, not in index.ts, so a bundler drops the ~7.6 MB JSON for consumers that never read CATALOG or catalogModelForWireModel. The runtime catalog refreshes from the configured models.dev URL.

License

Elastic-2.0.

版本与发布记录

@kortix/llm-catalog 共发布 106 个版本,首次发布于 2026/07/08;过去 12 个月发布了 106 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.14.13latest2026/11/011 天前
0.14.122026/10/303 天前
0.14.112026/10/304 天前
0.14.102026/10/304 天前
0.14.92026/10/295 天前
0.14.82026/10/2410 天前

关于 @kortix/llm-catalog 的常见问题

@kortix/llm-catalog 是什么?

Kortix LLM模型目录—Kortix网关支持的模型以及管理模型集和默认值。生成自models.dev;通过Kortix平台和@kortix/sdk使用。

如何安装 @kortix/llm-catalog?

在项目目录运行 npm install @kortix/llm-catalog,或使用 pnpm add / yarn add / bun add。

@kortix/llm-catalog 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@kortix/llm-catalog 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@kortix/llm-catalog 可以商用吗?

@kortix/llm-catalog 使用 Elastic-2.0 许可。声明的许可为 Elastic-2.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@kortix/llm-catalog 还在维护吗?

最新版本 0.14.13 发布于 2026/11/01(1 天前);至今共发布 106 个版本,其中过去 12 个月发布了 106 个;首次发布于 2026/07/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。