Skip to content

Commit 89cb08f

Browse files
authored
Merge pull request #747 from olddonkey/codex/572-deepinfra-novita-model-apis
feat(providers): add DeepInfra preset
2 parents 5ddb14c + 06a974f commit 89cb08f

16 files changed

Lines changed: 329 additions & 21 deletions

File tree

docs-site/src/content/docs/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ocx init
1313

1414
`ocx init` walks you through:
1515

16-
1. **Pick a provider** — choose one of the 50 built-in registry presets or `custom` to type a base
16+
1. **Pick a provider** — choose one of the 61 built-in registry presets or `custom` to type a base
1717
URL and adapter.
1818
2. **API key** — paste a key, or reference an environment variable like `${ANTHROPIC_API_KEY}`.
1919
3. **Default model** — for key, local, and custom providers, accept the preset or enter a model id.

docs-site/src/content/docs/guides/providers.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ selectors, then retry. Signing in from a machine with no existing `kiro-cli` ses
190190

191191
## 3. API-key catalog
192192

193-
opencodex ships 53 built-in presets: 42 key-based, seven OAuth, three local, and the default
193+
opencodex ships 61 built-in presets: 50 key-based, seven OAuth, three local, and the default
194194
ChatGPT-forward preset. The dashboard's **Add provider** picker opens a key provider's dashboard,
195195
validates the key, and stores it. Notable entries:
196196

@@ -207,6 +207,7 @@ validates the key, and stores it. Notable entries:
207207
| MiniMax · MiniMax (CN) | `https://api.minimax.io/v1` · `https://api.minimaxi.com/v1` |
208208
| DeepSeek | `https://api.deepseek.com` |
209209
| Cerebras | `https://api.cerebras.ai/v1` |
210+
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
210211
| Together | `https://api.together.xyz/v1` |
211212
| Fireworks | `https://api.fireworks.ai/inference/v1` |
212213
| Moonshot (Kimi API) · Kimi (coding) | `https://api.moonshot.ai/v1` · `https://api.kimi.com/coding/v1` |
@@ -226,6 +227,11 @@ validates the key, and stores it. Notable entries:
226227
Most use the `openai-chat` adapter with a bearer key; a few that expose only an Anthropic-compatible
227228
endpoint (e.g. **Xiaomi MiMo**) use the `anthropic` adapter (`x-api-key`).
228229

230+
**DeepInfra discovery.** The key-based `deepinfra` OpenAI Chat Completions provider uses the
231+
`openai-chat` adapter with a Bearer API key. Its registry-owned model-list URL keeps only rows tagged
232+
`chat`, preserves slash-containing native model ids, and caps live discovery at 512 KiB and 512 raw
233+
rows. Create keys in [DeepInfra's dashboard](https://deepinfra.com/dash/api_keys).
234+
229235
> **Tencent Cloud Coding Plan usage restriction:** Tencent documents this subscription for
230236
> interactive coding tools only. General API automation, custom application backends, and
231237
> non-interactive batch use are prohibited and may cause the plan key to be suspended.

docs-site/src/content/docs/ja/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ocx init
1313

1414
`ocx init` は次の手順を案内します:
1515

16-
1. **プロバイダー選択** — 組み込みレジストリのプリセット 50 個から一つを選ぶか、`custom` を選んで
16+
1. **プロバイダー選択** — 組み込みレジストリのプリセット 61 個から一つを選ぶか、`custom` を選んで
1717
base URL とアダプターを直接入力します。
1818
2. **API キー** — キーを貼り付けるか、`${ANTHROPIC_API_KEY}` のような環境変数を参照します。
1919
3. **デフォルトモデル** — API キー、ローカル、custom プロバイダーではプリセット値を使うかモデル ID を直接入力します。

docs-site/src/content/docs/ja/guides/providers.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ ChatGPT パススルーカタログには GPT-5.6 Sol/Terra/Luna の名前空間
6060

6161
## 2. アカウントログイン(OAuth)
6262

63-
OAuth ログインを使うプロバイダープリセットは 6 つです。認証情報は
64-
`~/.opencodex/auth.json` に保存され、自動更新されます。ログイン CLI は `chatgpt` も受け付けます。
65-
このコマンドは ChatGPT 認証情報を発行し `forward` モードのプロバイダーエントリを作成します。
63+
OAuth ログインを使うプロバイダープリセットは 6 つで、これに実験的な非公式デバイスフロー
64+
ブリッジ経由の GitHub Copilot が加わります。認証情報は `~/.opencodex/auth.json` に保存され、
65+
自動更新されます。ログイン CLI は `chatgpt` も受け付けます。このコマンドは ChatGPT 認証情報を
66+
発行し `forward` モードのプロバイダーエントリを作成します。
6667

6768
```bash
6869
ocx login xai # xAI Grok
@@ -71,18 +72,20 @@ ocx login kimi # Moonshot Kimi
7172
ocx login kiro # kiro-cli 認証情報の取り込み(トークンフォールバック対応)
7273
ocx login google-antigravity
7374
ocx login cursor # Cursor 専用 PKCE ログイン
75+
ocx login github-copilot # GitHub デバイスフロー → Copilot トークン (Copilot Pro/Business)
7476
ocx login chatgpt # 別途 ChatGPT OAuth ログイン
7577
ocx logout <provider>
7678
```
7779

7880
| プロバイダー | アダプター | ベース URL | 備考 |
79-
--- | --- | --- | --- |
81+
| --- | --- | --- | --- |
8082
| `xai` | `openai-chat` | `https://api.x.ai/v1` | ライブ一覧を優先し、フォールバックのデフォルトモデルは `grok-4.5`|
8183
| `anthropic` | `anthropic` | `https://api.anthropic.com` | Claude モデル; ライブモデル一覧は `/v1/models` から取得。 |
8284
| `kimi` | `openai-chat` | `https://api.kimi.com/coding/v1` | Kimi K2.7/K2.6/K2.5 コーディングモデル。 |
8385
| `kiro` | `kiro` | `https://runtime.us-east-1.kiro.dev` | 初回ログインは、インストール済みでサインインした `kiro-cli` セッションを取り込みます(Unix では `curl -fsSL https://cli.kiro.dev/install | bash`、Windows PowerShell では `irm 'https://cli.kiro.dev/install.ps1' | iex` でインストールしてから `kiro-cli login` を実行)。**アカウントを追加**は `kiro-cli` をログアウトして新しいブラウザログインを開始し、`kiro-cli` 自体のアカウントを切り替えてアカウント別プロファイルメタデータを保存します。既存の OpenCodex アカウントは保持され、キャンセルまたは失敗時には以前の `kiro-cli` セッションが復元されます。 |
8486
| `google-antigravity` | `google` | `https://daily-cloudcode-pa.googleapis.com` | Google OAuth を Cloud Code Assist wire で使用。 |
8587
| `cursor` | `cursor` | `https://api2.cursor.sh` | 実験的 PKCE ログイン、HTTP/2 トランスポート、アカウント別モデル探索をサポート。 |
88+
| `github-copilot` | `openai-chat` | `https://api.githubcopilot.com` | 実験的。GitHub デバイスフロー + `copilot_internal` 交換(VS Code OAuth クライアント)。有効な Copilot サブスクリプションが必要で、公式のサードパーティ API ではありません。 |
8689

8790
正規の Kimi Coding Plan プリセット(`kimi` アカウントログインと `kimi-code` API key)では、
8891
opencodex は呼び出し元が指定した安定した `prompt_cache_key` だけを Chat Completions リクエストへ
@@ -116,7 +119,7 @@ Kiro のログインには Kiro CLI が必要です。Unix では `curl -fsSL ht
116119

117120
## 3. API キーカタログ
118121

119-
opencodex v2.7.1 には組み込みプリセットが 50 個含まれています。キー方式 40、OAuth 6、ローカル 3、
122+
opencodex には組み込みプリセットが 61 個含まれています。キー方式 50、OAuth 7、ローカル 3、
120123
デフォルト ChatGPT 転送プリセット 1 です。ダッシュボードの **Add provider** ピッカーはキー発行ページを開き、
121124
入力したキーを検証した後保存します。主な項目は以下のとおりです:
122125

@@ -133,6 +136,7 @@ opencodex v2.7.1 には組み込みプリセットが 50 個含まれていま
133136
| MiniMax · MiniMax (CN) | `https://api.minimax.io/v1` · `https://api.minimaxi.com/v1` |
134137
| DeepSeek | `https://api.deepseek.com` |
135138
| Cerebras | `https://api.cerebras.ai/v1` |
139+
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
136140
| Together | `https://api.together.xyz/v1` |
137141
| Fireworks | `https://api.fireworks.ai/inference/v1` |
138142
| Moonshot (Kimi API) · Kimi (coding) | `https://api.moonshot.ai/v1` · `https://api.kimi.com/coding/v1` |
@@ -152,6 +156,11 @@ opencodex v2.7.1 には組み込みプリセットが 50 個含まれていま
152156
大半は bearer キーと共に `openai-chat` アダプターを使い、Anthropic 互換エンドポイントのみを公開する一部
153157
(例: **Xiaomi MiMo**)は `anthropic` アダプター(`x-api-key`)を使います。
154158

159+
**DeepInfra の discovery:** キー方式の OpenAI Chat Completions プロバイダー `deepinfra` は、
160+
`openai-chat` アダプターと Bearer API キーを使います。registry が所有する DeepInfra のモデル一覧 URL から
161+
`chat` タグを持つ行だけを残し、スラッシュを含むネイティブモデル ID を保持します。live discovery は
162+
512 KiB、raw 512 行に制限します。キーは [DeepInfra dashboard](https://deepinfra.com/dash/api_keys) で作成します。
163+
155164
> **Tencent Cloud Coding Plan の利用制限:** Tencent はこのサブスクリプションを対話型
156165
> コーディングツール専用としています。一般的な API 自動化、カスタムアプリのバックエンド、
157166
> 非対話型バッチ利用は禁止されており、プランキーが停止される場合があります。

docs-site/src/content/docs/ko/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ocx init
1313

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

16-
1. **프로바이더 선택** — 내장 레지스트리 프리셋 50개 중 하나를 고르거나, `custom`을 선택해
16+
1. **프로바이더 선택** — 내장 레지스트리 프리셋 61개 중 하나를 고르거나, `custom`을 선택해
1717
base URL과 adapter를 직접 입력합니다.
1818
2. **API 키** — 키를 붙여넣거나, `${ANTHROPIC_API_KEY}`와 같은 환경 변수를 참조합니다.
1919
3. **기본 모델** — API 키, 로컬, custom 프로바이더에서는 프리셋 값을 쓰거나 모델 id를 직접 입력합니다.

docs-site/src/content/docs/ko/guides/providers.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ ChatGPT 패스스루 카탈로그에는 GPT-5.6 Sol/Terra/Luna의 네임스페
6060

6161
## 2. 계정 로그인 (OAuth)
6262

63-
OAuth 로그인을 사용하는 프로바이더 프리셋은 여섯 개입니다. 자격 증명은
64-
`~/.opencodex/auth.json`에 저장되고 자동으로 갱신됩니다. 로그인 CLI는 `chatgpt`도 받습니다.
65-
이 명령은 ChatGPT 자격 증명을 발급받고 `forward` 모드 프로바이더 항목을 만듭니다.
63+
OAuth 로그인을 사용하는 프로바이더 프리셋은 여섯 개이며, 여기에 실험적 비공식 디바이스 플로우
64+
브리지를 쓰는 GitHub Copilot이 추가됩니다. 자격 증명은 `~/.opencodex/auth.json`에 저장되고
65+
자동으로 갱신됩니다. 로그인 CLI는 `chatgpt`도 받습니다. 이 명령은 ChatGPT 자격 증명을
66+
발급받고 `forward` 모드 프로바이더 항목을 만듭니다.
6667

6768
```bash
6869
ocx login xai # xAI Grok
@@ -71,6 +72,7 @@ ocx login kimi # Moonshot Kimi
7172
ocx login kiro # kiro-cli 자격 증명 가져오기(토큰 폴백 지원)
7273
ocx login google-antigravity
7374
ocx login cursor # Cursor 전용 PKCE 로그인
75+
ocx login github-copilot # GitHub 디바이스 플로우 → Copilot 토큰 (Copilot Pro/Business)
7476
ocx login chatgpt # 별도 ChatGPT OAuth 로그인
7577
ocx logout <provider>
7678
```
@@ -83,6 +85,7 @@ ocx logout <provider>
8385
| `kiro` | `kiro` | `https://runtime.us-east-1.kiro.dev` | 최초 로그인은 설치하고 로그인한 `kiro-cli` 세션을 가져옵니다(Unix에서는 `curl -fsSL https://cli.kiro.dev/install | bash`, Windows PowerShell에서는 `irm 'https://cli.kiro.dev/install.ps1' | iex`로 설치한 뒤 `kiro-cli login` 실행). **계정 추가**는 `kiro-cli`에서 로그아웃한 뒤 새 브라우저 로그인을 시작하여 `kiro-cli` 자체의 계정을 전환하고, 계정별 프로필 메타데이터를 저장합니다. 기존 OpenCodex 계정은 유지되며, 취소되거나 실패하면 이전 `kiro-cli` 세션을 복원합니다. |
8486
| `google-antigravity` | `google` | `https://daily-cloudcode-pa.googleapis.com` | Google OAuth를 Cloud Code Assist wire로 사용합니다. |
8587
| `cursor` | `cursor` | `https://api2.cursor.sh` | 실험적 PKCE 로그인, HTTP/2 전송, 계정별 모델 탐색을 지원합니다. |
88+
| `github-copilot` | `openai-chat` | `https://api.githubcopilot.com` | 실험적. GitHub 디바이스 플로우 + `copilot_internal` 교환(VS Code OAuth 클라이언트). 활성 Copilot 구독 필요; 공식 서드파티 API가 아닙니다. |
8689

8790
정식 Kimi Coding Plan 프리셋(`kimi` 계정 로그인과 `kimi-code` API key)의 경우, opencodex는
8891
호출자가 제공한 안정적인 `prompt_cache_key`만 Chat Completions 요청으로 전달하며 직접 생성하지
@@ -116,7 +119,7 @@ Kiro 로그인에는 Kiro CLI가 필요합니다. Unix에서는 `curl -fsSL http
116119

117120
## 3. API 키 카탈로그
118121

119-
opencodex v2.7.1에는 빌트인 프리셋이 50개 들어 있습니다. 키 방식 40개, OAuth 6개, 로컬 3개,
122+
opencodex에는 빌트인 프리셋이 61개 들어 있습니다. 키 방식 50개, OAuth 7개, 로컬 3개,
120123
기본 ChatGPT 포워드 프리셋 1개입니다. 대시보드의 **Add provider** 선택기는 키 발급 페이지를 열고,
121124
입력한 키를 검증한 뒤 저장합니다. 주요 항목은 다음과 같습니다:
122125

@@ -133,6 +136,7 @@ opencodex v2.7.1에는 빌트인 프리셋이 50개 들어 있습니다. 키 방
133136
| MiniMax · MiniMax (CN) | `https://api.minimax.io/v1` · `https://api.minimaxi.com/v1` |
134137
| DeepSeek | `https://api.deepseek.com` |
135138
| Cerebras | `https://api.cerebras.ai/v1` |
139+
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
136140
| Together | `https://api.together.xyz/v1` |
137141
| Fireworks | `https://api.fireworks.ai/inference/v1` |
138142
| Moonshot (Kimi API) · Kimi (coding) | `https://api.moonshot.ai/v1` · `https://api.kimi.com/coding/v1` |
@@ -152,6 +156,11 @@ opencodex v2.7.1에는 빌트인 프리셋이 50개 들어 있습니다. 키 방
152156
대부분은 bearer 키와 함께 `openai-chat` 어댑터를 사용하며, Anthropic 호환 엔드포인트만 노출하는 일부
153157
(예: **Xiaomi MiMo**)는 `anthropic` 어댑터(`x-api-key`)를 사용합니다.
154158

159+
**DeepInfra 검색:** 키 기반 OpenAI Chat Completions 제공자인 `deepinfra``openai-chat` 어댑터와
160+
Bearer API 키를 사용합니다. registry가 소유하는 DeepInfra 모델 목록 URL에서 `chat` 태그가 있는 행만
161+
유지하고, 슬래시가 포함된 네이티브 모델 ID를 보존합니다. live discovery는 512 KiB 및 raw 512행으로
162+
제한합니다. 키는 [DeepInfra dashboard](https://deepinfra.com/dash/api_keys)에서 생성합니다.
163+
155164
> **Tencent Cloud Coding Plan 사용 제한:** Tencent는 이 구독을 대화형 코딩 도구 전용으로
156165
> 안내합니다. 일반 API 자동화, 사용자 애플리케이션 백엔드 및 비대화형 일괄 호출은 금지되며
157166
> 플랜 키가 정지될 수 있습니다.

docs-site/src/content/docs/ru/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ocx init
1313

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

16-
1. **Выбор провайдера** — выберите один из 50 встроенных пресетов реестра или `custom`, чтобы
16+
1. **Выбор провайдера** — выберите один из 61 встроенного пресета реестра или `custom`, чтобы
1717
ввести базовый URL и адаптер вручную.
1818
2. **API-ключ** — вставьте ключ или сошлитесь на переменную окружения вида `${ANTHROPIC_API_KEY}`.
1919
3. **Модель по умолчанию** — для провайдеров с ключом, локальных и `custom` примите значение из

docs-site/src/content/docs/ru/guides/providers.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ OAuth-провайдеры, чьи учётные данные содержат
126126

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

129-
opencodex поставляется с 53 встроенными пресетами: 42 на основе ключей, семь OAuth, три локальных и
129+
opencodex поставляется с 61 встроенным пресетом: 50 на основе ключей, семь OAuth, три локальных и
130130
пресет ChatGPT-форварда по умолчанию. Селектор **Add provider** в дашборде открывает страницу
131131
выдачи ключей провайдера, проверяет ключ и сохраняет его. Наиболее заметные записи:
132132

@@ -143,6 +143,7 @@ opencodex поставляется с 53 встроенными пресетам
143143
| MiniMax · MiniMax (CN) | `https://api.minimax.io/v1` · `https://api.minimaxi.com/v1` |
144144
| DeepSeek | `https://api.deepseek.com` |
145145
| Cerebras | `https://api.cerebras.ai/v1` |
146+
| DeepInfra | `https://api.deepinfra.com/v1/openai` |
146147
| Together | `https://api.together.xyz/v1` |
147148
| Fireworks | `https://api.fireworks.ai/inference/v1` |
148149
| Moonshot (Kimi API) · Kimi (coding) | `https://api.moonshot.ai/v1` · `https://api.kimi.com/coding/v1` |
@@ -163,6 +164,12 @@ opencodex поставляется с 53 встроенными пресетам
163164
только Anthropic-совместимую конечную точку (например, **Xiaomi MiMo**), используют адаптер
164165
`anthropic` (`x-api-key`).
165166

167+
**Discovery для DeepInfra.** `deepinfra` — провайдер OpenAI Chat Completions с аутентификацией по
168+
ключу; он использует адаптер `openai-chat` и Bearer API-ключ. Принадлежащий registry URL списка
169+
моделей DeepInfra оставляет только строки с тегом `chat`, сохраняет нативные id моделей со знаком
170+
`/` и ограничивает live discovery 512 KiB и 512 исходными строками. Ключи создаются в
171+
[дашборде DeepInfra](https://deepinfra.com/dash/api_keys).
172+
166173
> **Ограничение Tencent Cloud Coding Plan:** Tencent разрешает использовать эту подписку только
167174
> в интерактивных инструментах программирования. Автоматизация общего API, серверы пользовательских
168175
> приложений и неинтерактивные пакетные вызовы запрещены и могут привести к блокировке ключа плана.

docs-site/src/content/docs/zh-cn/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ocx init
1313

1414
`ocx init` 会引导你完成:
1515

16-
1. **选择 provider** —— 从内置 registry 的 50 个预设中选择一个,或选择 `custom` 手动输入
16+
1. **选择 provider** —— 从内置 registry 的 61 个预设中选择一个,或选择 `custom` 手动输入
1717
base URL 和 adapter。
1818
2. **API key** —— 粘贴一个 key,或引用一个环境变量,例如 `${ANTHROPIC_API_KEY}`
1919
3. **默认模型** —— 对于 API key、本地和 custom provider,可接受预设值或输入模型 id。

0 commit comments

Comments
 (0)