Skip to content

Commit 72cebf6

Browse files
committed
add MiniMax client integrations
1 parent a1e5192 commit 72cebf6

34 files changed

Lines changed: 899 additions & 33 deletions

‎docs-site/astro.config.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export default defineConfig({
9595
{ label: "opencode", translations: { ko: "opencode", "zh-CN": "opencode", "zh-TW": "opencode", ru: "opencode", ja: "opencode", tr: "opencode" }, slug: "guides/opencode" },
9696
{ label: "Pi", translations: { ko: "Pi", "zh-CN": "Pi", "zh-TW": "Pi", ru: "Pi", ja: "Pi", tr: "Pi" }, slug: "guides/pi" },
9797
{ label: "Integrations", translations: { ko: "연동", "zh-CN": "集成", "zh-TW": "整合", ru: "Интеграции", ja: "連携", tr: "Entegrasyonlar" }, slug: "guides/integrations" },
98+
{ label: "MiniMax clients", translations: { ko: "MiniMax 클라이언트", "zh-CN": "MiniMax 客户端", "zh-TW": "MiniMax 客戶端", ru: "Клиенты MiniMax", ja: "MiniMax クライアント", tr: "MiniMax İstemcileri" }, slug: "guides/minimax" },
9899
{ label: "Sidecars: Web Search & Vision", translations: { ko: "사이드카: 웹 검색 & 비전", "zh-CN": "边车:网络搜索与视觉", "zh-TW": "邊車:網路搜尋與視覺", ru: "Сайдкары: веб-поиск и зрение", ja: "サイドカー: ウェブ検索 & ビジョン", tr: "Sidecar'lar: Web Arama ve Görme" }, slug: "guides/sidecars" },
99100
{ label: "Image Bridge", translations: { ko: "이미지 브릿지", "zh-CN": "图像桥接", "zh-TW": "圖像橋接", ru: "Image Bridge", ja: "画像ブリッジ", tr: "Image Bridge" }, slug: "guides/image-bridge" },
100101
{ label: "Video Bridge", translations: { ko: "비디오 브릿지", "zh-CN": "视频桥接", "zh-TW": "影片橋接", ru: "Video Bridge", ja: "動画ブリッジ", tr: "Video Bridge" }, slug: "guides/video-bridge" },
88.4 KB
Loading

‎docs-site/src/content/docs/guides/integrations.md‎

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Integrations
3-
description: Connect opencodex to OpenCode, Pi, OMP, Hermes, OpenClaw, Kimi Code and Gajae Code from the dashboard — one switch per client, with a backup taken before every write.
3+
description: Connect opencodex to OpenCode, Pi, OMP, Hermes, OpenClaw, Kimi Code, Gajae Code and MiniMax Code from the dashboard — one switch per client, with a backup taken before every write.
44
---
55

66
The **Integrations** tab writes opencodex's provider block into a client's own config
7-
file, and removes it again. Seven clients work this way, each with a switch:
7+
file, and removes it again. Eight clients work this way, each with a switch:
88

99
| Client | Config file | Format | When the change takes effect | Credential |
1010
|---|---|---|---|---|
@@ -15,6 +15,7 @@ file, and removes it again. Seven clients work this way, each with a switch:
1515
| OpenClaw | `~/.openclaw/openclaw.json` | JSON5 | immediately, on a running gateway | `OPENCODEX_OPENCLAW_API_KEY` |
1616
| Kimi Code | `~/.kimi-code/config.toml` | TOML | on restart, or `/reload` | loopback placeholder |
1717
| Gajae Code | `~/.gjc/agent/models.yml` | YAML | new sessions, or when you open `/model` |`OPENCODEX_GAJAE_API_KEY` |
18+
| MiniMax Code | `~/.minimax/config.yaml` | YAML | new sessions, or after opening the model picker | loopback placeholder |
1819

1920
Paths honor each client's own environment override where it has one. For OMP,
2021
`OMP_PROFILE` wins over `PI_PROFILE` by presence, even when explicitly empty. A named profile
@@ -24,6 +25,12 @@ is deliberately loopback-only; remote `x-opencodex-api-key` wiring is deferred.
2425
`HERMES_HOME`, `KIMI_CODE_HOME`, and `XDG_CONFIG_HOME` paths are likewise followed rather than
2526
guessed at. The table lists each client's default.
2627

28+
MiniMax Code follows `MINIMAX_DATA_DIR`, then `MAVIS_DATA_DIR`, before falling
29+
back to `~/.minimax`. Its managed block owns only `custom_provider.opencodex`.
30+
It does not change `defaultModel`, the selected MiniMax credential source, or
31+
the user's MiniMax login. Choose a `custom_provider:opencodex/<provider/model>`
32+
entry in MCode after connecting it.
33+
2734
For native OpenAI models, the generated OMP block selects its model-level Responses API, preserving
2835
image input and reasoning-effort controls. Routed models retain the provider's Chat Completions
2936
dialect so their existing adapters remain compatible.
@@ -76,8 +83,8 @@ than 1000 levels — which locks the switch instead, so nothing is silently chan
7683
**OMP** is unaffected by sibling edits too, for a different reason: its writer
7784
patches only its own `providers.opencodex` range byte-wise, so the rest of the
7885
file is never rewritten. For the remaining formats that can carry comments
79-
(Hermes, OpenClaw, Kimi Code, Gajae Code — YAML, JSON5 and TOML written as whole
80-
documents), or
86+
(Hermes, OpenClaw, Kimi Code, Gajae Code, MiniMax Code — YAML, JSON5 and TOML
87+
written as whole documents), or
8188
whenever our own entries were edited, the switch locks and disable refuses rather
8289
than guessing which edits were yours.
8390

@@ -98,7 +105,7 @@ changed value and calling it success. You will see the file named and nothing on
98105
disk will have moved. Editing that file by hand still works; it is only our
99106
automatic rewrite that declines.
100107

101-
**Pi, Kimi Code and Gajae Code only work against a loopback bind.** Their config schemas
108+
**Pi, Kimi Code, Gajae Code and MiniMax Code only work against a loopback bind.** Their config schemas
102109
have no place for the `x-opencodex-api-key` header that a non-loopback bind requires, so a
103110
generated config would simply be rejected. Give them loopback access instead, through an
104111
SSH tunnel or a local forwarder that adds the header.
@@ -129,6 +136,28 @@ ocx integration client history --client hermes
129136
ocx integration client restore --op <opId> [--confirm-drift]
130137
```
131138

139+
For MiniMax Code, connect the provider once and launch through the checked wrapper:
140+
141+
```bash
142+
ocx integration client enable --client mcode
143+
ocx mcode
144+
```
145+
146+
The separate MiniMax platform CLI (`mmx`) is not a file-toggle integration. Its text
147+
commands use MiniMax's Anthropic-compatible endpoint, so OpenCodex provides a
148+
credential-isolated, loopback-only launcher:
149+
150+
```bash
151+
ocx mmx text chat --model anthropic/claude-opus-5 --message "Hello"
152+
ocx mmx text repl --model openai/gpt-5.6-sol
153+
```
154+
155+
Only `mmx text` is proxied. Run plain `mmx` for MiniMax-native image, video, speech,
156+
music, vision, search, quota, auth, config, file and update commands. The wrapper uses
157+
a temporary config containing only a non-secret loopback placeholder; it never loads
158+
your `~/.mmx` OAuth or API-key credentials, and it refuses `--api-key` and `--base-url`
159+
overrides. See [MiniMax clients](/guides/minimax/) for the complete workflow and limits.
160+
132161
`--confirm-drift` is never assumed. If the file changed after the operation you are
133162
restoring, the command refuses and tells you, because replacing your newer edits is your
134163
decision to make.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: MiniMax clients
3+
description: Route MiniMax Code and MiniMax CLI text commands through OpenCodex without exposing MiniMax credentials.
4+
---
5+
6+
MiniMax publishes two different command-line products. OpenCodex integrates each at
7+
the protocol boundary it actually exposes:
8+
9+
- **MiniMax Code** (`mcode`) is a coding agent with custom Anthropic Messages providers.
10+
- **MiniMax CLI** (`mmx`) is a multimodal platform CLI. Only its `text` resource speaks
11+
the Anthropic-compatible API that OpenCodex can route.
12+
13+
## MiniMax Code
14+
15+
Install and sign in to MiniMax Code using MiniMax's instructions first. Then start
16+
OpenCodex and connect the reversible file integration:
17+
18+
```bash
19+
ocx start
20+
ocx integration client enable --client mcode
21+
ocx mcode
22+
```
23+
24+
![MiniMax Code integration in the OpenCodex dashboard](/screenshots/minimax-code-integration.png)
25+
26+
The integration merges one block into `~/.minimax/config.yaml`:
27+
28+
```yaml
29+
custom_provider:
30+
opencodex:
31+
name: OpenCodex
32+
kind: custom
33+
enabled: true
34+
api: anthropic-messages
35+
options:
36+
apiKey: opencodex-loopback
37+
baseURL: http://127.0.0.1:10100
38+
authMode: api-key
39+
models:
40+
anthropic/claude-opus-5: {}
41+
```
42+
43+
The real generated model list comes from the running OpenCodex catalog. The block does
44+
not write a real key, does not replace `defaultModel`, and does not change your MiniMax
45+
login. In MCode, choose a model under `custom_provider:opencodex/...`.
46+
47+
`ocx mcode` verifies that this provider points at the currently running proxy before it
48+
launches the client. If the port changed, refresh the managed block by running the enable
49+
command again. Disable or restore it through the same audited integration system:
50+
51+
```bash
52+
ocx integration client disable --client mcode
53+
ocx integration client history --client mcode
54+
ocx integration client restore --op <opId> [--confirm-drift]
55+
```
56+
57+
`MINIMAX_DATA_DIR` and the legacy `MAVIS_DATA_DIR` are honored. Relative overrides are
58+
refused because OpenCodex and MCode may start in different working directories.
59+
60+
## MiniMax CLI (`mmx`)
61+
62+
Install the official CLI separately:
63+
64+
```bash
65+
npm install -g mmx-cli
66+
mmx --version
67+
```
68+
69+
Route a text command through OpenCodex by using the wrapper and an OpenCodex model id:
70+
71+
```bash
72+
ocx mmx text chat \
73+
--model anthropic/claude-opus-5 \
74+
--message "Explain this function"
75+
76+
ocx mmx --output json text chat \
77+
--model openai/gpt-5.6-sol \
78+
--message "Return a JSON summary"
79+
```
80+
81+
MMX hard-codes `/anthropic/v1/messages` below its API base URL. The wrapper starts a
82+
temporary loopback bridge for the lifetime of the child process and maps that path to
83+
OpenCodex's existing `/v1/messages` data plane. The bridge accepts only the two MMX text
84+
POST paths, strips credential headers, and pins the public `opencodex-loopback`
85+
placeholder before forwarding. It also creates a temporary `MMX_CONFIG_DIR` containing
86+
only that placeholder, then deletes it after `mmx` exits. Your `~/.mmx/config.json`,
87+
OAuth tokens and MiniMax API key are never loaded or copied.
88+
89+
The following limits are intentional:
90+
91+
- Only `text chat` and `text repl` are routed through OpenCodex.
92+
- `--api-key` and `--base-url` are refused by the wrapper so a caller credential cannot
93+
be sent to an unintended destination or bypass the proxy.
94+
- The wrapper is loopback-only because MMX cannot send OpenCodex's dedicated
95+
`x-opencodex-api-key` admission header for a remote bind.
96+
- Run plain `mmx` for `image`, `video`, `speech`, `music`, `vision`, `search`, `quota`,
97+
`auth`, `config`, `file` and `update`; those call MiniMax-specific APIs that OpenCodex
98+
does not emulate.
99+
100+
`mmx` defaults its text model to `MiniMax-M3`. Pass `--model <provider/model>` when you
101+
want a specific OpenCodex route; otherwise normal OpenCodex model routing rules decide
102+
whether the default id is available.

‎docs-site/src/content/docs/tr/guides/integrations.md‎

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Entegrasyonlar
3-
description: Kontrol panelinden OpenCode, Pi, OMP, Hermes, OpenClaw, Kimi Code ve Gajae Code'u opencodex'e bağlayın — istemci başına tek bir anahtar ve her yazmadan önce alınan bir yedek.
3+
description: Kontrol panelinden OpenCode, Pi, OMP, Hermes, OpenClaw, Kimi Code, Gajae Code ve MiniMax Code'u opencodex'e bağlayın — istemci başına tek bir anahtar ve her yazmadan önce alınan bir yedek.
44
---
55

66
**Entegrasyonlar** sekmesi, opencodex'in sağlayıcı bloğunu istemcinin kendi
7-
yapılandırma dosyasına yazar ve tekrar kaldırır. Yedi istemci bu şekilde
7+
yapılandırma dosyasına yazar ve tekrar kaldırır. Sekiz istemci bu şekilde
88
çalışır, her biri bir anahtarla:
99

1010
| İstemci | Yapılandırma dosyası | Format | Değişiklik ne zaman geçerli olur? | Kimlik bilgisi |
@@ -16,6 +16,7 @@ yapılandırma dosyasına yazar ve tekrar kaldırır. Yedi istemci bu şekilde
1616
| OpenClaw | `~/.openclaw/openclaw.json` | JSON5 | hemen, çalışan bir ağ geçidinde | `OPENCODEX_OPENCLAW_API_KEY` |
1717
| Kimi Code | `~/.kimi-code/config.toml` | TOML | yeniden başlatmada veya `/reload` ile | geri döngü (loopback) yer tutucusu |
1818
| Gajae Code | `~/.gjc/agent/models.yml` | YAML | yeni oturumlarda veya `/model` açtığınızda | `OPENCODEX_GAJAE_API_KEY` |
19+
| MiniMax Code | `~/.minimax/config.yaml` | YAML | yeni oturumlarda veya model seçici açıldıktan sonra | geri döngü (loopback) yer tutucusu |
1920

2021
Yollar, varsa her istemcinin kendi ortam geçersiz kılmalarını dikkate alır. OMP
2122
için `OMP_PROFILE`, açıkça boş olduğunda bile varlığıyla `PI_PROFILE`'a üstün
@@ -28,6 +29,13 @@ bağlantısı ertelenmiştir. Taşınmış `HERMES_HOME`, `KIMI_CODE_HOME` ve
2829
`XDG_CONFIG_HOME` yolları tahmin edilmek yerine benzer şekilde takip edilir.
2930
Tablo her istemcinin varsayılanını listeler.
3031

32+
MiniMax Code önce `MINIMAX_DATA_DIR`, ardından `MAVIS_DATA_DIR` yolunu izler ve
33+
son olarak `~/.minimax` dizinine geri döner. Yönetilen blok yalnızca
34+
`custom_provider.opencodex` alanına sahiptir; `defaultModel` değerini, seçilen
35+
MiniMax kimlik bilgisi kaynağını veya kullanıcının MiniMax oturumunu değiştirmez.
36+
Bağladıktan sonra MCode içinde bir
37+
`custom_provider:opencodex/<provider/model>` girdisi seçin.
38+
3139
Yerel OpenAI modelleri için üretilen OMP bloğu, görsel girişini ve akıl yürütme
3240
çabası denetimlerini koruyarak model düzeyindeki Responses API'sini seçer.
3341
Yönlendirilen modeller, sağlayıcının Chat Completions lehçesini korur, böylece
@@ -92,7 +100,7 @@ hiçbir şey sessizce değiştirilmez veya düşürülmez. **OMP** de yanındaki
92100
düzenlemelerden etkilenmez, ama başka bir nedenle: writer'ı yalnızca kendi
93101
`providers.opencodex` aralığını bayt bayt yamalar, dosyanın geri kalanı hiçbir
94102
zaman yeniden yazılmaz. Yorum taşıyabilen diğer biçimlerde (Hermes, OpenClaw,
95-
Kimi Code, Gajae Code — bütün belge olarak yazılan YAML, JSON5 ve TOML) veya
103+
Kimi Code, Gajae Code, MiniMax Code — bütün belge olarak yazılan YAML, JSON5 ve TOML) veya
96104
kendi girdilerimiz düzenlenmişse, anahtar kilitlenir ve hangi düzenlemelerin
97105
size ait olduğunu tahmin etmek yerine devre dışı bırakmayı reddeder.
98106

@@ -115,7 +123,7 @@ değişen bir değer yazıp buna başarı demek yerine durur ve bunu söyler. Do
115123
adlandırıldığını ve diskte hiçbir şeyin taşınmadığını görürsünüz. Bu dosyayı
116124
elle düzenlemek hala çalışır; yalnızca otomatik yeniden yazmamız reddeder.
117125

118-
**Pi, Kimi Code ve Gajae Code yalnızca geri döngü (loopback) bağlantısına karşı
126+
**Pi, Kimi Code, Gajae Code ve MiniMax Code yalnızca geri döngü (loopback) bağlantısına karşı
119127
çalışır.** Yapılandırma şemalarında geri döngü olmayan bir bağlantının
120128
gerektirdiği `x-opencodex-api-key` başlığı için yer yoktur, bu nedenle
121129
oluşturulan bir yapılandırma basitçe reddedilir. Bunun yerine onlara bir SSH
@@ -149,6 +157,32 @@ ocx integration client history --client hermes
149157
ocx integration client restore --op <opId> [--confirm-drift]
150158
```
151159

160+
MiniMax Code için sağlayıcıyı bir kez bağlayın ve denetimli başlatıcı üzerinden
161+
çalıştırın:
162+
163+
```bash
164+
ocx integration client enable --client mcode
165+
ocx mcode
166+
```
167+
168+
Ayrı MiniMax platform CLI'si (`mmx`) bir dosya anahtarı entegrasyonu değildir.
169+
Metin komutları MiniMax'ın Anthropic uyumlu uç noktasını kullandığı için
170+
OpenCodex, kimlik bilgilerini yalıtan ve yalnızca geri döngüde çalışan bir
171+
başlatıcı sağlar:
172+
173+
```bash
174+
ocx mmx text chat --model anthropic/claude-opus-5 --message "Hello"
175+
ocx mmx text repl --model openai/gpt-5.6-sol
176+
```
177+
178+
Yalnızca `mmx text` proxy üzerinden yönlendirilir. MiniMax'a özgü görüntü,
179+
video, konuşma, müzik, görme, arama, kota, kimlik doğrulama, yapılandırma, dosya
180+
ve güncelleme komutları için doğrudan `mmx` çalıştırın. Başlatıcı yalnızca gizli
181+
olmayan geri döngü yer tutucusunu içeren geçici bir yapılandırma kullanır;
182+
`~/.mmx` OAuth veya API anahtarı kimlik bilgilerinizi yüklemez ve `--api-key`
183+
ile `--base-url` geçersiz kılmalarını reddeder. Tam iş akışı ve sınırlar için
184+
[MiniMax istemcileri](/guides/minimax/) sayfasına bakın.
185+
152186
`--confirm-drift` asla varsayılmaz. Geri yüklediğiniz işlemden sonra dosya
153187
değiştiyse, komut reddeder ve size bildirir; çünkü daha yeni düzenlemelerinizin
154188
üzerine yazmak sizin vereceğiniz bir karardır.
@@ -158,4 +192,3 @@ doğrulanmıştır; neyin ne zaman denetlendiğine ilişkin
158192
`devlog/_fin/260802_client_toggle_api/002_client_toggle_matrix.md` içindeki
159193
araştırma notlarına bakın.
160194

161-

0 commit comments

Comments
 (0)