Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs-site/src/content/docs/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ selectors, then retry. Signing in from a machine with no existing `kiro-cli` ses

## 3. API-key catalog

opencodex ships 69 built-in presets: 58 key-based, seven OAuth, three local, and one default
opencodex ships 70 built-in presets: 59 key-based, seven OAuth, three local, and one default
ChatGPT-forward preset. The dashboard's **Add provider** picker opens a key provider's dashboard,
validates the key, and stores it; validation is provider-specific, and Command Code's public
catalog reports keys as unverifiable. Notable entries:
Expand Down Expand Up @@ -249,6 +249,7 @@ free-experimentation model.
| MiniMax · MiniMax (CN) | `https://api.minimax.io/v1` · `https://api.minimaxi.com/v1` |
| DeepSeek | `https://api.deepseek.com` |
| Cerebras | `https://api.cerebras.ai/v1` |
| Apertis | `https://api.apertis.ai/v1` |
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
Expand All @@ -270,6 +271,12 @@ free-experimentation model.
| Cloudflare AI Gateway | `https://gateway.ai.cloudflare.com/v1/{account-id}/{gateway}/anthropic` |
| …and more | opencode zen, Vercel AI Gateway, Venice, NanoGPT, Synthetic, Qianfan, Alibaba, Parallel, ZenMux, LiteLLM |

**Apertis discovery.** Apertis exposes an OpenAI-compatible API at
[`https://api.apertis.ai/v1`](https://docs.apertis.ai/api/), uses Bearer API keys, and returns a
key/plan-scoped live catalog from [`GET /v1/models`](https://docs.apertis.ai/api/utilities/models/).
Do not freeze a model id from the catalog; availability can vary by key type and plan. Apertis's
public site identifies the operator as STIMA AI LLC and publishes its [Terms of Service](https://apertis.ai/terms).

Most use the `openai-chat` adapter with a bearer key; a few that expose only an Anthropic-compatible
endpoint (e.g. **Xiaomi MiMo**) use the `anthropic` adapter (`x-api-key`).
Volcengine Agent Plan uses its native Responses endpoint through `openai-responses`.
Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/ja/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Kiro のログインには Kiro CLI が必要です。Unix では `curl -fsSL ht

## 3. API キーカタログ

opencodex には組み込みプリセットが 69 個含まれています。キー方式 58、OAuth 7、ローカル 3、
opencodex には組み込みプリセットが 70 個含まれています。キー方式 59、OAuth 7、ローカル 3、
デフォルト ChatGPT 転送プリセット 1 です。ダッシュボードの **Add provider** ピッカーはキー発行ページを開き、
入力したキーを検証した後保存します(検証はプロバイダー固有で、Command Code の公開カタログはキーを
検証不能として報告します)。主な項目は以下のとおりです:
Expand Down Expand Up @@ -176,6 +176,7 @@ Cline IDE/CLI のみで API からは使えません。`minimax/minimax-m2.5`
| MiniMax · MiniMax (CN) | `https://api.minimax.io/v1` · `https://api.minimaxi.com/v1` |
| DeepSeek | `https://api.deepseek.com` |
| Cerebras | `https://api.cerebras.ai/v1` |
| Apertis | `https://api.apertis.ai/v1` |
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/ko/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Kiro 로그인에는 Kiro CLI가 필요합니다. Unix에서는 `curl -fsSL http

## 3. API 키 카탈로그

opencodex에는 빌트인 프리셋이 69개 들어 있습니다. 키 방식 58개, OAuth 7개, 로컬 3개,
opencodex에는 빌트인 프리셋이 70개 들어 있습니다. 키 방식 59개, OAuth 7개, 로컬 3개,
기본 ChatGPT 포워드 프리셋 1개입니다. 대시보드의 **Add provider** 선택기는 키 발급 페이지를 열고,
입력한 키를 검증한 뒤 저장합니다(검증은 프로바이더별로 다르며, Command Code의 공개 카탈로그는 키를
검증 불가로 보고합니다). 주요 항목은 다음과 같습니다:
Expand Down Expand Up @@ -176,6 +176,7 @@ Cline IDE/CLI에서만 제공되며 API로는 사용할 수 없습니다. `minim
| MiniMax · MiniMax (CN) | `https://api.minimax.io/v1` · `https://api.minimaxi.com/v1` |
| DeepSeek | `https://api.deepseek.com` |
| Cerebras | `https://api.cerebras.ai/v1` |
| Apertis | `https://api.apertis.ai/v1` |
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/ru/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ OAuth-провайдеры, чьи учётные данные содержат

## 3. Каталог API-ключей

opencodex поставляется с 69 встроенными пресетами: 58 на основе ключей, семь OAuth, три локальных и
opencodex поставляется с 70 встроенными пресетами: 59 на основе ключей, семь OAuth, три локальных и
один пресет ChatGPT-форварда по умолчанию. Селектор **Add provider** в дашборде открывает страницу
выдачи ключей провайдера, проверяет ключ и сохраняет его; проверка зависит от провайдера, а публичный
каталог Command Code сообщает ключ как непроверенный. Наиболее заметные записи:
Expand Down Expand Up @@ -186,6 +186,7 @@ opencodex поставляется с 69 встроенными пресетам
| MiniMax · MiniMax (CN) | `https://api.minimax.io/v1` · `https://api.minimaxi.com/v1` |
| DeepSeek | `https://api.deepseek.com` |
| Cerebras | `https://api.cerebras.ai/v1` |
| Apertis | `https://api.apertis.ai/v1` |
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/zh-cn/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Kiro 登录需要 Kiro CLI:Unix 使用 `curl -fsSL https://cli.kiro.dev/instal

## 3. API 密钥目录

opencodex 内置 69 个预设:58 个密钥预设、7 个 OAuth 预设、3 个本地预设,以及 1 个默认的
opencodex 内置 70 个预设:59 个密钥预设、7 个 OAuth 预设、3 个本地预设,以及 1 个默认的
ChatGPT 转发预设。仪表盘的 **Add provider** 选择器会打开密钥提供商的控制台,验证并保存密钥。
验证因提供商而异,Command Code 的公开目录会将密钥报告为无法验证。主要条目包括:

Expand Down Expand Up @@ -163,6 +163,7 @@ Cline IDE/CLI 中提供,不能通过 API 使用;`minimax/minimax-m2.5` 是
| MiniMax · MiniMax (CN) | `https://api.minimax.io/v1` · `https://api.minimaxi.com/v1` |
| DeepSeek | `https://api.deepseek.com` |
| Cerebras | `https://api.cerebras.ai/v1` |
| Apertis | `https://api.apertis.ai/v1` |
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
Expand Down
8 changes: 4 additions & 4 deletions gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"lint": "bun --bun eslint .",
"test": "bun test tests",
"lint:i18n": "eslint src/pages src/components src/App.tsx src/ui.tsx",
"doctor": "npx --yes react-doctor@0.9.3 --verbose --scope changed --base origin/main --no-telemetry",
"doctor:full": "npx --yes react-doctor@0.9.3 --verbose --scope full --no-telemetry",
"lint:i18n": "bun --bun eslint src/pages src/components src/App.tsx src/ui.tsx",
"doctor": "npm exec --yes --package=typescript@6.0.2 --package=react-doctor@0.9.3 -- react-doctor --verbose --scope changed --base origin/main --no-telemetry",
"doctor:full": "npm exec --yes --package=typescript@6.0.2 --package=react-doctor@0.9.3 -- react-doctor --verbose --scope full --no-telemetry",
"preview": "vite preview"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions gui/src/provider-icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const PROVIDER_DISPLAY_NAMES: Record<string, string> = {
xiaomi: "Xiaomi",
cursor: "Cursor",
deepseek: "DeepSeek",
apertis: "Apertis",
github: "GitHub",
"github-copilot": "GitHub Copilot",
"gitlab-duo": "GitLab Duo",
Expand Down
2 changes: 2 additions & 0 deletions openspec/changes/apertis-reference-directory/.openspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-08-03
4 changes: 4 additions & 0 deletions openspec/changes/apertis-reference-directory/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# apertis-reference-directory

Restore Apertis as a canonical OpenAI-compatible API-key provider with authenticated live model
discovery, while keeping the maintainer evidence and security-review boundary explicit.
84 changes: 84 additions & 0 deletions openspec/changes/apertis-reference-directory/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
## Context

Canonical registry entries seed provider configuration, expose API-key setup, enrich saved
providers, and feed routing and the shared Codex catalog. Apertis's official API documentation
currently describes the OpenAI-compatible base URL `https://api.apertis.ai/v1`, Bearer
authentication, and an authenticated `/v1/models` endpoint whose result depends on the API key
type/plan. Apertis's public website identifies STIMA AI LLC as the operator and describes
multi-provider routing.

The upstream repository requires additional private routing/resale authorization and maintainer
security review before a credential-destination preset can merge. This change therefore implements
the requested canonical behavior and records that external gate honestly; it does not infer private
authorization from public product or API documentation.

## Goals / Non-Goals

**Goals:**

- Register Apertis as a canonical `authKind: "key"`, `adapter: "openai-chat"` provider.
- Seed the documented fixed base URL and dashboard URL into CLI/key-login/dashboard flows.
- Validate keys and discover model ids through the authenticated OpenAI-shaped `/models` path.
- Route chat-completion requests to the canonical host while preserving same-named custom
providers' own adapter, destination, and credentials.
- Keep model availability live and key-scoped rather than encoding a speculative static catalog.
- Keep public evidence links and the private maintainer authorization gate separate.

**Non-Goals:**

- Add a new adapter, Responses wire, image/audio integration, or provider-specific request
semantics beyond the existing OpenAI Chat adapter.
- Freeze model ids, context windows, prices, or a default model from the mutable live catalog.
- Claim that public endpoint/terms/legal-entity evidence proves private routing/resale authorization.
- Send credentials, post maintainer messages, push the branch, merge, or deploy as part of local
implementation.

## Decisions

- **Extend the existing registry-derived provider flow.** This keeps CLI init, key-login,
dashboard presets, routing, and catalog derivation on one source of truth instead of adding an
Apertis-specific path.
- **Use live discovery with the default `/models` resolution.** The configured base URL already
ends in `/v1`, so the existing discovery and key-validation flow produces `/v1/models`, sends a
Bearer key, and applies the repository's bounded response/row guards. A registry-specific
discovery policy is unnecessary for the documented endpoint.
- **Set `preserveCustomDestination: true`.** A saved provider named `apertis` with a custom
adapter/base URL must not be silently retargeted when the canonical preset is introduced.
- **Do not add static models or a default model.** Official documentation says availability varies
by key type and plan; live discovery is the faithful contract and avoids stale claims.
- **Use the existing GUI display-name classification without inventing an icon asset.** The provider
remains discoverable and correctly labeled while the default unknown-provider icon fallback stays
intact.
- **Keep the evidence gate outside runtime behavior.** Public API/terms/legal-entity links are
recorded in source/docs; private routing/resale authorization remains a maintainer review input.
- **Keep GUI validation runtimes explicit.** ESLint continues to use Bun's runtime bridge, while
React Doctor uses npm exec with pinned TypeScript and React Doctor packages so Bun cannot omit
React Doctor's TypeScript peer.

## Risks / Trade-offs

- [A user key and traffic reach a multi-provider gateway] → fixed-host routing, explicit public
provenance, `preserveCustomDestination`, and maintainer/security review are required before merge.
- [The live catalog changes by key/plan] → no static model list/default is claimed; discovery is
bounded and fixture-tested.
- [A same-named custom provider could be disabled in GUI classification] → the canonical entry's
destination-preservation contract and regression test keep custom adapter/base URL controls intact.
- [Public docs may be mistaken for private authorization] → the change records public evidence and
the unresolved routing/resale gate separately.
- [A GUI validation command could lose its local TypeScript peer under Bun] → ESLint scripts use
Bun's runtime bridge and React Doctor scripts use npm exec with explicit TypeScript and React
Doctor packages; direct external invocations remain outside this repository contract.

## Migration Plan

Fresh Apertis setup derives the canonical fixed destination. Existing saved `apertis` providers
retain their configured adapter, base URL, and key when they do not match the canonical transport.
Rolling back removes the preset surfaces but does not rewrite or delete existing provider config;
explicit custom routes remain user-owned.

## Open Questions

- Which maintainer-designated private channel will record the routing/resale authorization, named
maintenance owner, and verification date required for merge?
- After the current head is reviewed, does the maintainer require any provider-specific capability
exclusions beyond the existing `openai-chat` contract?
46 changes: 46 additions & 0 deletions openspec/changes/apertis-reference-directory/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## Why

Apertis publishes an OpenAI-compatible API at `https://api.apertis.ai/v1`, uses Bearer API keys,
and exposes a key-scoped live `/v1/models` catalog. The current PR intentionally removed the
canonical entry and therefore no longer meets the requested outcome of adding Apertis as a model
provider.

## What Changes

- Restore Apertis as a canonical API-key provider in the registry-derived CLI, dashboard, key-login,
routing, and model-discovery surfaces.
- Use the documented fixed base URL and authenticated live model discovery without freezing a
mutable model list or claiming a default model.
- Preserve same-named custom providers' adapter, destination, and key boundary.
- Add focused coverage for derivation, Bearer validation, live discovery, chat routing, and custom
provider preservation.
- Sync the provider catalog documentation and translated tables/counts.
- Retain the existing Bun-based GUI lint runtime fix and make React Doctor's TypeScript peer
resolution explicit for Bun-launched validation.
- Keep the maintainer-required routing/resale authorization and security review as an explicit
pre-merge gate; public endpoint/terms/legal-entity evidence must not be presented as proof of
private authorization.

## Capabilities

### New Capabilities

- `provider-canonical-integration`: expose Apertis as a canonical key provider with authenticated
live model discovery and fixed-host routing.
- `gui-lint-runtime`: execute GUI lint and React Doctor validation with runtimes that preserve
the repository's local TypeScript tooling.

### Modified Capabilities

<!-- None. The previous reference-only contract is replaced by the canonical integration capability
in this still-unmerged change. -->

## Impact

- `src/providers/registry.ts`, registry derivation, key validation, GUI provider classification,
and provider parity gain the `apertis` canonical entry.
- `tests/apertis-provider.test.ts`, the discovery fixture, and registry parity tests prove the
provider contract without contacting the live service.
- English and translated `docs-site` provider guides list the new endpoint and updated counts.
- `gui/package.json` lint commands continue to use Bun's runtime bridge, while React Doctor
commands use npm's explicit package resolution instead of a Bun-translated `npx` launch.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## ADDED Requirements

### Requirement: GUI lint scripts load the local TypeScript ESLint plugin
The GUI package's `lint` and `lint:i18n` scripts SHALL execute ESLint through Bun's runtime bridge
so that the checked-in ESLint configuration and its local TypeScript plugin load successfully.

#### Scenario: Full GUI lint command
- **WHEN** a contributor runs the GUI `lint` script from the repository validation path
- **THEN** ESLint evaluates the configured GUI files without an unknown-TypeScript-extension error

#### Scenario: Focused GUI i18n lint command
- **WHEN** a contributor runs the GUI `lint:i18n` script
- **THEN** ESLint evaluates the configured UI paths with the same local plugin available

### Requirement: React Doctor scripts resolve their TypeScript peer explicitly
The GUI package's `doctor` and `doctor:full` scripts SHALL invoke React Doctor through npm
with the pinned TypeScript and React Doctor packages so that Bun's `npx` alias cannot omit the
TypeScript peer required by React Doctor.

#### Scenario: Changed GUI React Doctor command
- **WHEN** a contributor runs the GUI `doctor` script from the repository validation path
- **THEN** React Doctor evaluates the changed GUI scope and resolves its TypeScript peer
successfully

#### Scenario: Full GUI React Doctor command
- **WHEN** a contributor runs the GUI `doctor:full` script
- **THEN** React Doctor evaluates the full GUI scope with the same explicit TypeScript peer
resolution
Loading
Loading