Skip to content
Merged
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
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ocx init

`ocx init` walks you through:

1. **Pick a provider** — choose one of the 68 built-in registry presets or `custom` to type a base
1. **Pick a provider** — choose one of the 69 built-in registry presets or `custom` to type a base
URL and adapter.
2. **API key** — paste a key, or reference an environment variable like `${ANTHROPIC_API_KEY}`.
3. **Default model** — for key, local, and custom providers, accept the preset or enter a model id.
Expand Down
13 changes: 11 additions & 2 deletions docs-site/src/content/docs/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,10 @@ selectors, then retry. Signing in from a machine with no existing `kiro-cli` ses

## 3. API-key catalog

opencodex ships 68 built-in presets: 57 key-based, seven OAuth, three local, and the default
opencodex ships 69 built-in presets: 58 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. Notable entries:
validates the key, and stores it; validation is provider-specific, and Command Code's public
catalog reports keys as unverifiable. Notable entries:

**ClinePass** uses a Cline API key with the [official subscription catalog](https://docs.cline.bot/getting-started/clinepass)
and [Chat Completions endpoint](https://docs.cline.bot/api/chat-completions), operated by Cline Bot Inc. under
Expand Down Expand Up @@ -225,6 +226,7 @@ free-experimentation model.
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
| Command Code | `https://api.commandcode.ai/provider/v1` |
| Together | `https://api.together.xyz/v1` |
| Fireworks | `https://api.fireworks.ai/inference/v1` |
| Moonshot (Kimi API) · Kimi (coding) | `https://api.moonshot.ai/v1` · `https://api.kimi.com/coding/v1` |
Expand Down Expand Up @@ -273,6 +275,13 @@ slash-containing native model ids, and caps live discovery at 256 KiB and 256 ra
serverless text and vision-language chat only; Hyperbolic's separate image, audio, and GPU endpoints
are out of scope. Create keys at [Hyperbolic](https://app.hyperbolic.ai).

**Command Code discovery.** The preset reads Command Code's public `/provider/v1/models` list from
the fixed Provider API host, preserves provider-native ids, and caps discovery at 256 KiB and 256 raw
rows. The model catalog is unauthenticated, so the CLI login flow reports the key as unverifiable
instead of a false positive. Chat requests use the configured Bearer key; API access requires the
Provider plan, and CLI auth bridging for Go/Pro subscriptions is not yet available. Create keys at
[Command Code Studio](https://commandcode.ai/studio/).

Comment thread
coderabbitai[bot] marked this conversation as resolved.
> **Baseten scope:** The preset covers Baseten's shared [Model APIs](https://docs.baseten.co/inference/model-apis/overview)
> only. Use a personal [API key](https://docs.baseten.co/organization/api-keys) for local use, or a team key
> with **Call Model APIs** access for shared/production use. Dedicated Truss `predict` endpoints use different
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ocx init

`ocx init` では次の手順を説明します。

1. **プロバイダーを選択してください** — 68 の組み込みレジストリ プリセットのいずれか、または `custom` を選択してベースを入力します
1. **プロバイダーを選択してください** — 69 の組み込みレジストリ プリセットのいずれか、または `custom` を選択してベースを入力します
URLとアダプター。
2. **API キー** — キーを貼り付けるか、`${ANTHROPIC_API_KEY}` のような環境変数を参照します。
3. **デフォルト モデル** — キー、ローカル、カスタム プロバイダーの場合は、プリセットを受け入れるか、モデル ID を入力します。
Expand Down
13 changes: 11 additions & 2 deletions docs-site/src/content/docs/ja/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ Kiro のログインには Kiro CLI が必要です。Unix では `curl -fsSL ht

## 3. API キーカタログ

opencodex には組み込みプリセットが 68 個含まれています。キー方式 57、OAuth 7、ローカル 3、
opencodex には組み込みプリセットが 69 個含まれています。キー方式 58、OAuth 7、ローカル 3、
デフォルト ChatGPT 転送プリセット 1 です。ダッシュボードの **Add provider** ピッカーはキー発行ページを開き、
入力したキーを検証した後保存します。主な項目は以下のとおりです:
入力したキーを検証した後保存します(検証はプロバイダー固有で、Command Code の公開カタログはキーを
検証不能として報告します)。主な項目は以下のとおりです:

**ClinePass** は Cline API キーで[公式サブスクリプションカタログ](https://docs.cline.bot/getting-started/clinepass)と
[Chat Completions エンドポイント](https://docs.cline.bot/api/chat-completions)に接続します。運営主体は
Expand Down Expand Up @@ -154,6 +155,7 @@ Cline IDE/CLI のみで API からは使えません。`minimax/minimax-m2.5`
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
| Command Code | `https://api.commandcode.ai/provider/v1` |
| Together | `https://api.together.xyz/v1` |
| Fireworks | `https://api.fireworks.ai/inference/v1` |
| Moonshot (Kimi API) · Kimi (coding) | `https://api.moonshot.ai/v1` · `https://api.kimi.com/coding/v1` |
Expand Down Expand Up @@ -196,6 +198,13 @@ Volcengine Agent Plan は `openai-responses` アダプターでネイティブ R
vision-language chat のみを対象とし、別系統の image、audio、GPU endpoint は対象外です。キーは
[Hyperbolic](https://app.hyperbolic.ai) で作成します。

**Command Code の discovery:** preset は Command Code の公開 `/provider/v1/models` リストを固定の
Provider API ホストから読み、スラッシュを含むネイティブモデル ID を保持し、live discovery を
256 KiB と raw 256 行に制限します。モデルカタログは未認証のため、CLI ログインフローはキーを
誤って有効と報告せず、検証不能として報告します。チャットリクエストは設定済みの bearer キーを使います。
API アクセスには Provider プランが必要で、Go/Pro サブスクリプション向けの CLI 認証ブリッジはまだ利用できません。
キーは [Command Code Studio](https://commandcode.ai/studio/) で作成します。

> **Baseten の対象範囲:** このプリセットは Baseten の共有 [Model APIs](https://docs.baseten.co/inference/model-apis/overview)
> のみを対象とします。ローカル利用では個人の [API キー](https://docs.baseten.co/organization/api-keys)を、
> 共有/本番利用では **Call Model APIs** 権限を持つチームキーを使用してください。専用 Truss `predict`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ocx init

`ocx init`은 다음 과정을 안내합니다:

1. **프로바이더 선택** — 내장 레지스트리 프리셋 68개 중 하나를 고르거나 `custom`을 선택해 base URL과 adapter를 직접 입력합니다.
1. **프로바이더 선택** — 내장 레지스트리 프리셋 69개 중 하나를 고르거나 `custom`을 선택해 base URL과 adapter를 직접 입력합니다.
2. **API 키** — 키를 붙여넣거나 `${ANTHROPIC_API_KEY}` 같은 환경 변수를 참조합니다.
3. **기본 모델** — 키, 로컬, custom 프로바이더에서는 프리셋을 그대로 쓰거나 모델 ID를 직접 입력합니다.
4. **프록시 포트** — 기본값은 `10100`입니다.
Expand Down
13 changes: 11 additions & 2 deletions docs-site/src/content/docs/ko/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ Kiro 로그인에는 Kiro CLI가 필요합니다. Unix에서는 `curl -fsSL http

## 3. API 키 카탈로그

opencodex에는 빌트인 프리셋이 68개 들어 있습니다. 키 방식 57개, OAuth 7개, 로컬 3개,
opencodex에는 빌트인 프리셋이 69개 들어 있습니다. 키 방식 58개, OAuth 7개, 로컬 3개,
기본 ChatGPT 포워드 프리셋 1개입니다. 대시보드의 **Add provider** 선택기는 키 발급 페이지를 열고,
입력한 키를 검증한 뒤 저장합니다. 주요 항목은 다음과 같습니다:
입력한 키를 검증한 뒤 저장합니다(검증은 프로바이더별로 다르며, Command Code의 공개 카탈로그는 키를
검증 불가로 보고합니다). 주요 항목은 다음과 같습니다:

**ClinePass**는 Cline API 키로 [공식 구독 카탈로그](https://docs.cline.bot/getting-started/clinepass)와
[Chat Completions 엔드포인트](https://docs.cline.bot/api/chat-completions)에 연결합니다. 운영 주체는
Expand Down Expand Up @@ -155,6 +156,7 @@ Cline IDE/CLI에서만 제공되며 API로는 사용할 수 없습니다. `minim
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
| Command Code | `https://api.commandcode.ai/provider/v1` |
| Together | `https://api.together.xyz/v1` |
| Fireworks | `https://api.fireworks.ai/inference/v1` |
| Moonshot (Kimi API) · Kimi (coding) | `https://api.moonshot.ai/v1` · `https://api.kimi.com/coding/v1` |
Expand Down Expand Up @@ -196,6 +198,13 @@ Bearer API 키를 사용합니다. registry가 소유하는 DeepInfra 모델 목
대상으로 하며 별도 image, audio, GPU 엔드포인트는 범위에서 제외합니다. 키는
[Hyperbolic](https://app.hyperbolic.ai)에서 생성합니다.

**Command Code 검색:** 프리셋은 Command Code의 공개 `/provider/v1/models` 목록을 고정된 Provider API
호스트에서 읽고, 슬래시가 포함된 네이티브 모델 ID를 보존하며 live discovery를 256 KiB와 raw 행
256개로 제한합니다. 모델 카탈로그는 인증이 없으므로 CLI 로그인 흐름은 키를 유효하다고 잘못 보고하지
않고 검증 불가로 보고합니다. 채팅 요청은 설정된 bearer 키를 사용하며, API 액세스에는 Provider 플랜이
필요하고 Go/Pro 구독자용 CLI 인증 브리지는 아직 제공되지 않습니다. 키는
[Command Code Studio](https://commandcode.ai/studio/)에서 생성합니다.

> **Baseten 범위:** 이 프리셋은 Baseten의 공유 [Model APIs](https://docs.baseten.co/inference/model-apis/overview)만
> 지원합니다. 로컬 사용에는 개인 [API 키](https://docs.baseten.co/organization/api-keys)를, 공유/프로덕션
> 사용에는 **Call Model APIs** 권한이 있는 팀 키를 사용하세요. 전용 Truss `predict` 엔드포인트는
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ocx init

`ocx init` проведёт вас по следующим шагам:

1. **Выбор провайдера** — выберите один из 68 встроенных пресетов реестра или `custom`, чтобы
1. **Выбор провайдера** — выберите один из 69 встроенных пресетов реестра или `custom`, чтобы
ввести базовый URL и адаптер вручную.
2. **API-ключ** — вставьте ключ или сошлитесь на переменную окружения вида `${ANTHROPIC_API_KEY}`.
3. **Модель по умолчанию** — для провайдеров с ключом, локальных и `custom` примите значение из
Expand Down
15 changes: 12 additions & 3 deletions docs-site/src/content/docs/ru/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ OAuth-провайдеры, чьи учётные данные содержат

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

opencodex поставляется с 68 встроенными пресетами: 57 на основе ключей, семь OAuth, три локальных и
пресет ChatGPT-форварда по умолчанию. Селектор **Add provider** в дашборде открывает страницу
выдачи ключей провайдера, проверяет ключ и сохраняет его. Наиболее заметные записи:
opencodex поставляется с 69 встроенными пресетами: 58 на основе ключей, семь OAuth, три локальных и
один пресет ChatGPT-форварда по умолчанию. Селектор **Add provider** в дашборде открывает страницу
выдачи ключей провайдера, проверяет ключ и сохраняет его; проверка зависит от провайдера, а публичный
каталог Command Code сообщает ключ как непроверенный. Наиболее заметные записи:

**ClinePass** подключается с помощью Cline API key к [официальному каталогу подписки](https://docs.cline.bot/getting-started/clinepass)
и [Chat Completions endpoint](https://docs.cline.bot/api/chat-completions). Оператор — Cline Bot Inc., указанный в
Expand Down Expand Up @@ -161,6 +162,7 @@ opencodex поставляется с 68 встроенными пресетам
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
| Command Code | `https://api.commandcode.ai/provider/v1` |
| Together | `https://api.together.xyz/v1` |
| Fireworks | `https://api.fireworks.ai/inference/v1` |
| Moonshot (Kimi API) · Kimi (coding) | `https://api.moonshot.ai/v1` · `https://api.kimi.com/coding/v1` |
Expand Down Expand Up @@ -205,6 +207,13 @@ Volcengine Agent Plan использует нативную конечную т
строками. Он охватывает только serverless text и vision-language chat; отдельные image, audio и GPU
endpoint в него не входят. Ключи создаются в [Hyperbolic](https://app.hyperbolic.ai).

**Discovery для Command Code.** Пресет читает публичный список `/provider/v1/models` с фиксированного
хоста Provider API, сохраняет нативные id моделей со знаком `/` и ограничивает live discovery размером
256 KiB и 256 исходными строками. Каталог моделей не требует аутентификации, поэтому CLI-флоу входа
сообщает ключ как непроверенный, а не как ложноположительно действительный. Запросы чата используют
настроенный bearer-ключ; для доступа к API требуется план Provider, а CLI-мост аутентификации для
подписок Go/Pro пока недоступен. Ключи создаются в [Command Code Studio](https://commandcode.ai/studio/).

> **Область Baseten:** пресет поддерживает только общие [Model APIs](https://docs.baseten.co/inference/model-apis/overview)
> Baseten. Для локальной работы используйте личный [API-ключ](https://docs.baseten.co/organization/api-keys),
> а для общего/промышленного использования — командный ключ с правом **Call Model APIs**. Выделенные конечные точки Truss `predict` используют другие хосты и
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ocx init

`ocx init` 会引导你完成:

1. **选择 provider** — 从内置 registry 的 68 个预设中选择一个,或选择 `custom` 手动输入 base URL 和 adapter。
1. **选择 provider** — 从内置 registry 的 69 个预设中选择一个,或选择 `custom` 手动输入 base URL 和 adapter。
2. **API key** — 粘贴一个 key,或引用一个环境变量,例如 `${ANTHROPIC_API_KEY}`。
3. **默认模型** — 对于 key、本地和 custom provider,接受预设值或输入模型 id。
4. **代理端口** — 默认为 `10100`。
Expand Down
11 changes: 9 additions & 2 deletions docs-site/src/content/docs/zh-cn/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ Kiro 登录需要 Kiro CLI:Unix 使用 `curl -fsSL https://cli.kiro.dev/instal

## 3. API 密钥目录

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

**ClinePass** 使用 Cline API 密钥连接[官方订阅目录](https://docs.cline.bot/getting-started/clinepass)和
[Chat Completions 端点](https://docs.cline.bot/api/chat-completions)。运营主体是
Expand Down Expand Up @@ -146,6 +146,7 @@ Cline IDE/CLI 中提供,不能通过 API 使用;`minimax/minimax-m2.5` 是
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
| Hyperbolic | `https://api.hyperbolic.xyz/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
| Command Code | `https://api.commandcode.ai/provider/v1` |
| Together | `https://api.together.xyz/v1` |
| Fireworks | `https://api.fireworks.ai/inference/v1` |
| Moonshot (Kimi API) · Kimi (coding) | `https://api.moonshot.ai/v1` · `https://api.kimi.com/coding/v1` |
Expand Down Expand Up @@ -184,6 +185,12 @@ OpenAI Chat Completions 提供商。registry 固定的 DeepInfra 模型列表 UR
并将实时发现限制为 256 KiB 和 256 条原始记录。它仅覆盖 serverless text 与 vision-language chat;独立的
image、audio 和 GPU 端点不在范围内。密钥可在 [Hyperbolic](https://app.hyperbolic.ai) 创建。

**Command Code 发现:**该预设从固定的 Provider API 主机读取 Command Code 公开的
`/provider/v1/models` 列表,保留含 `/` 的原生模型 id,并将实时发现限制为 256 KiB 和 256 条原始记录。
模型目录无需认证,因此 CLI 登录流程会将密钥报告为无法验证,而不是误报为有效。聊天请求使用已配置的
bearer 密钥;API 访问需要 Provider 套餐,Go/Pro 订阅用户的 CLI 认证桥接尚不可用。
密钥可在 [Command Code Studio](https://commandcode.ai/studio/) 创建。

> **Baseten 范围:**该预设仅覆盖 Baseten 的共享 [Model APIs](https://docs.baseten.co/inference/model-apis/overview)。
> 本地使用可选择个人 [API 密钥](https://docs.baseten.co/organization/api-keys);共享或生产用途请使用具备
> **Call Model APIs** 权限的团队密钥。
Expand Down
4 changes: 4 additions & 0 deletions src/oauth/key-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export async function validateApiKey(
key: string,
): Promise<boolean | "unknown"> {
try {
// A public model catalog cannot prove that the supplied key is valid. Returning unknown keeps
// the best-effort login flow available without persisting a false-positive validation result.
if (provider.apiKeyValidation === "unknown") return "unknown";

if (provider.adapter === "anthropic") {
const base = provider.baseUrl.replace(/\/v1\/?$/, "");
const res = await fetch(`${base}/v1/messages`, {
Expand Down
2 changes: 2 additions & 0 deletions src/providers/derive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface DerivedKeyLoginProvider {
baseUrl: string;
responsesPath?: string;
adapter: string;
apiKeyValidation?: "unknown";
apiKeyTransport?: OcxProviderConfig["apiKeyTransport"];
dashboardUrl: string;
models?: string[];
Expand Down Expand Up @@ -161,6 +162,7 @@ export function deriveKeyLoginMap(): Record<string, DerivedKeyLoginProvider> {
baseUrl: entry.baseUrl,
...(entry.responsesPath ? { responsesPath: entry.responsesPath } : {}),
adapter: entry.adapter,
...(entry.apiKeyValidation !== undefined ? { apiKeyValidation: entry.apiKeyValidation } : {}),
...(entry.apiKeyTransport !== undefined ? { apiKeyTransport: entry.apiKeyTransport } : {}),
dashboardUrl: entry.dashboardUrl,
...(entry.models ? { models: [...entry.models] } : {}),
Expand Down
Loading
Loading