mimo2codex 0.1.19 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/README.md +18 -31
- package/README.zh.md +18 -31
- package/dist/setup/snippets.js +7 -1
- package/dist/setup/snippets.js.map +1 -1
- package/mimoskill/SKILL.md +1 -2
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -30,7 +30,7 @@ adjust your assumptions accordingly.
|
|
|
30
30
|
depends on it.
|
|
31
31
|
|
|
32
32
|
4. **Non-vision model + image input → don't give up, OCR it.** When the
|
|
33
|
-
active chat model is `mimo-v2.5-pro`, `mimo-v2
|
|
33
|
+
active chat model is `mimo-v2.5-pro`, `mimo-v2-flash`, `deepseek-*`,
|
|
34
34
|
or any third-party model without vision, the proxy strips image
|
|
35
35
|
attachments in `src/translate/reqToChat.ts:48-72` and leaves a
|
|
36
36
|
`[N image attachment(s) omitted: this model does not support image input …]`
|
package/README.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# mimo2codex
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="./README.md"><strong>English</strong></a> ·
|
|
5
|
+
<a href="./README.zh.md">简体中文</a> ·
|
|
6
|
+
<a href="./doc/mimoskill.md">mimoskill</a> ·
|
|
7
|
+
<a href="./doc/generic-providers.md">Generic Providers</a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://github.com/7as0nch/mimo2codex/stargazers"><img alt="GitHub Stars" src="https://img.shields.io/github/stars/7as0nch/mimo2codex?style=flat-square&logo=github"></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/mimo2codex"><img alt="npm version" src="https://img.shields.io/npm/v/mimo2codex?style=flat-square&logo=npm"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/mimo2codex"><img alt="downloads" src="https://img.shields.io/npm/dt/mimo2codex?style=flat-square&color=brightgreen"></a>
|
|
14
|
+
<img alt="license" src="https://img.shields.io/github/license/7as0nch/mimo2codex?style=flat-square">
|
|
15
|
+
<img alt="node" src="https://img.shields.io/badge/Node-18%2B-blue?style=flat-square&logo=node.js&logoColor=white">
|
|
16
|
+
<img alt="wire_api" src="https://img.shields.io/badge/wire__api-responses-black?style=flat-square">
|
|
17
|
+
</p>
|
|
4
18
|
|
|
5
19
|
Local proxy that lets the **latest OpenAI Codex CLI / desktop** talk to virtually any modern LLM. Built-in support for **Xiaomi MiMo V2.5** and **DeepSeek V4 Pro**, plus a **generic provider mechanism** that connects any **OpenAI Chat Completions-compatible** (Qwen / GLM / Kimi / vLLM / Ollama / LM Studio …) or **native Responses API** (OpenAI itself) upstream — no code changes, no re-publish needed. Translates Codex's Responses API ↔ upstream Chat Completions on the fly, per-request routing by `model` field, optional admin web console, runs on `127.0.0.1`.
|
|
6
20
|
|
|
@@ -16,7 +30,6 @@ Local proxy that lets the **latest OpenAI Codex CLI / desktop** talk to virtuall
|
|
|
16
30
|
- [Use](#use) — get a key, start the proxy, configure Codex
|
|
17
31
|
- [Use with cc-switch](#use-with-cc-switch)
|
|
18
32
|
- [Admin console](#admin-console) — dashboard, logs, models, settings
|
|
19
|
-
- [Enabling 1M long context](#enabling-1m-long-context)
|
|
20
33
|
- [Providers and model ids](#providers-and-model-ids)
|
|
21
34
|
- [Plugging in third-party OpenAI-compatible upstreams](#plugging-in-third-party-openai-compatible-upstreams) — Qwen / GLM / Kimi / Ollama / OpenAI
|
|
22
35
|
- [CLI flags](#cli-flags)
|
|
@@ -40,7 +53,7 @@ Conceptually a sibling of [openrouter](https://openrouter.ai), [claude-code-rout
|
|
|
40
53
|
- ✅ Codex CLI `wire_api = "responses"` and Codex desktop app
|
|
41
54
|
- ✅ Multi-provider — **MiMo** + **DeepSeek**, mixed within one process (per-request routing by `model` field)
|
|
42
55
|
- ✅ **Generic OpenAI-compatible providers** — Qwen / GLM / Kimi / Ollama / native-Responses OpenAI, declare in `providers.json` and they just work. See [doc/generic-providers.md](./doc/generic-providers.md)
|
|
43
|
-
- ✅ MiMo models: `mimo-v2.5-pro` / `mimo-v2
|
|
56
|
+
- ✅ MiMo models: `mimo-v2.5-pro` / `mimo-v2-flash`
|
|
44
57
|
- ✅ DeepSeek models: `deepseek-v4-pro` (default) / `deepseek-v4-flash` / `deepseek-chat` / `deepseek-reasoner`
|
|
45
58
|
- ✅ Tool calling — function tools, parallel calls, `local_shell`, `custom`, MCP `namespace`
|
|
46
59
|
- ✅ Web search — translated to MiMo's native `web_search` builtin (requires plugin activation); auto-skipped on DeepSeek
|
|
@@ -149,7 +162,7 @@ Pet, tool calls, reasoning, multi-turn — all just work. Pass `--no-reasoning`
|
|
|
149
162
|
3. cc-switch GUI → **Codex** tab → **+** → **Custom** → paste both blocks → name it `MiMo (via mimo2codex)` → **Add**
|
|
150
163
|
4. Click the new provider to activate it; cc-switch writes Codex's config files for you. Switch back to OpenAI / Azure / OpenRouter anytime — mimo2codex keeps running and only gets traffic when its provider is active.
|
|
151
164
|
|
|
152
|
-
cc-switch's "Fetch Models" button calls `/v1/models`, which mimo2codex implements — the dropdown auto-lists `mimo-v2.5-pro
|
|
165
|
+
cc-switch's "Fetch Models" button calls `/v1/models`, which mimo2codex implements — the dropdown auto-lists `mimo-v2.5-pro` and `mimo-v2-flash`.
|
|
153
166
|
|
|
154
167
|
## Admin console
|
|
155
168
|
|
|
@@ -169,37 +182,11 @@ Browse to `http://127.0.0.1:8788/admin/` after start.
|
|
|
169
182
|
|
|
170
183
|
Data lives in sqlite (`~/.mimo2codex/data.db`); override with `--data-dir <path>` or disable entirely with `--no-admin`.
|
|
171
184
|
|
|
172
|
-
### Enabling 1M long context
|
|
173
|
-
|
|
174
|
-
The Codex client **doesn't read the context window from the proxy** — it reads `model_context_window` from `config.toml`. When unset, Codex falls back to ~256K, so even when the proxy forwards to `mimo-v2.5-pro[1m]` or `deepseek-v4-pro`, the bottom-left context badge stays at 258K.
|
|
175
|
-
|
|
176
|
-
`mimo2codex print-config` already emits `model_context_window` for the default model and lists every builtin variant for that provider in an inline comment block:
|
|
177
|
-
|
|
178
|
-
```toml
|
|
179
|
-
model = "mimo-v2.5-pro"
|
|
180
|
-
model_provider = "mimo"
|
|
181
|
-
model_context_window = 128000
|
|
182
|
-
|
|
183
|
-
# Switch model — replace the two lines above with one entry below.
|
|
184
|
-
# Available MiMo (via mimo2codex) models:
|
|
185
|
-
# model = "mimo-v2.5-pro" model_context_window = 128000 (current)
|
|
186
|
-
# model = "mimo-v2.5-pro[1m]" model_context_window = 1000000
|
|
187
|
-
# model = "mimo-v2-flash" model_context_window = 128000
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
To use 1M, replace the `model =` and `model_context_window =` pair with the 1M entry from the list. cc-switch users can edit the same lines directly in cc-switch's textarea — no proxy restart needed.
|
|
191
|
-
|
|
192
|
-
After writing to `~/.codex/config.toml`, **fully quit and relaunch Codex** (desktop: system tray → Quit, not just close the window).
|
|
193
|
-
|
|
194
|
-
> ⚠ **Whether 1M actually engages depends on two things outside the proxy**:
|
|
195
|
-
> 1. **Your upstream account** — for instance MiMo's `mimo-v2.5-pro[1m]` is gated on certain plans; you'll see upstream `400 "Not supported model"` if your account doesn't include it. Confirm with `curl https://api.xiaomimimo.com/v1/models -H "Authorization: Bearer $MIMO_API_KEY"`.
|
|
196
|
-
> 2. **Your Codex client version** — older desktop builds ignore `model_context_window` and hard-cap at 256K. The CLI usually ships fixes earlier; if `codex` in a terminal shows 1M but the desktop badge still shows 258K, update the desktop app.
|
|
197
|
-
|
|
198
185
|
### Providers and model ids
|
|
199
186
|
|
|
200
187
|
| Provider | Shortcut | Env var | Default base URL | Default model | Models |
|
|
201
188
|
|---|---|---|---|---|---|
|
|
202
|
-
| MiMo | `mimo` | `MIMO_API_KEY` | `https://api.xiaomimimo.com/v1` | `mimo-v2.5-pro` | `mimo-v2.5-pro` / `mimo-v2
|
|
189
|
+
| MiMo | `mimo` | `MIMO_API_KEY` | `https://api.xiaomimimo.com/v1` | `mimo-v2.5-pro` | `mimo-v2.5-pro` / `mimo-v2-flash` |
|
|
203
190
|
| DeepSeek | `ds` | `DS_API_KEY` or `DEEPSEEK_API_KEY` | `https://api.deepseek.com/v1` | `deepseek-v4-pro` | `deepseek-v4-pro` / `deepseek-v4-flash` / `deepseek-chat`* / `deepseek-reasoner`* |
|
|
204
191
|
|
|
205
192
|
*legacy, deprecated 2026-07-24, both alias the v4-flash thinking / non-thinking modes.
|
package/README.zh.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# mimo2codex · 中文文档
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="./README.md">English</a> ·
|
|
5
|
+
<a href="./README.zh.md"><strong>简体中文</strong></a> ·
|
|
6
|
+
<a href="./doc/mimoskill.zh.md">mimoskill</a> ·
|
|
7
|
+
<a href="./doc/generic-providers.zh.md">通用 Provider</a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://github.com/7as0nch/mimo2codex/stargazers"><img alt="GitHub Stars" src="https://img.shields.io/github/stars/7as0nch/mimo2codex?style=flat-square&logo=github"></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/mimo2codex"><img alt="npm version" src="https://img.shields.io/npm/v/mimo2codex?style=flat-square&logo=npm"></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/mimo2codex"><img alt="downloads" src="https://img.shields.io/npm/dt/mimo2codex?style=flat-square&color=brightgreen"></a>
|
|
14
|
+
<img alt="license" src="https://img.shields.io/github/license/7as0nch/mimo2codex?style=flat-square">
|
|
15
|
+
<img alt="node" src="https://img.shields.io/badge/Node-18%2B-blue?style=flat-square&logo=node.js&logoColor=white">
|
|
16
|
+
<img alt="wire_api" src="https://img.shields.io/badge/wire__api-responses-black?style=flat-square">
|
|
17
|
+
</p>
|
|
4
18
|
|
|
5
19
|
让**最新版** OpenAI Codex CLI / Codex 桌面端接入主流大模型的本地代理。内置 **小米 MiMo V2.5** 与 **DeepSeek V4 Pro**,并提供**通用 provider 机制**——不改任何代码、不重新发包,就能把任何 **OpenAI Chat Completions 兼容**(Qwen / GLM / Kimi / 本地 vLLM / Ollama / LM Studio …)或**原生 Responses API**(OpenAI 自家)的上游接到新版 Codex。把 Codex 的 Responses API 实时翻译成上游的 Chat Completions API,按客户端发的 `model` 字段在 provider 之间自动路由。可配 admin Web 控制台。
|
|
6
20
|
|
|
@@ -16,7 +30,6 @@
|
|
|
16
30
|
- [使用](#使用) —— 拿 key、启动代理、配置 Codex
|
|
17
31
|
- [配合 cc-switch 使用](#配合-cc-switch-使用)
|
|
18
32
|
- [Admin 控制台](#admin-控制台) —— 概览 / 日志 / 模型 / 设置
|
|
19
|
-
- [1M 长上下文怎么用](#1m-长上下文怎么用)
|
|
20
33
|
- [Provider 与模型 ID](#provider-与模型-id)
|
|
21
34
|
- [接入第三方 OpenAI 兼容上游](#接入第三方-openai-兼容上游) —— Qwen / GLM / Kimi / Ollama / OpenAI
|
|
22
35
|
- [CLI 参数速查](#cli-参数速查)
|
|
@@ -39,7 +52,7 @@
|
|
|
39
52
|
- ✅ Codex CLI 0.x(`wire_api = "responses"`)+ 桌面端
|
|
40
53
|
- ✅ 多 provider:**MiMo** + **DeepSeek**,同实例混用(按 `model` 字段路由)
|
|
41
54
|
- ✅ **通用 OpenAI 兼容 provider**——Qwen / GLM / Kimi / Ollama / OpenAI 原生 Responses 等,写 `providers.json` 即可接入,详见 [doc/generic-providers.zh.md](./doc/generic-providers.zh.md)
|
|
42
|
-
- ✅ MiMo 模型:`mimo-v2.5-pro` / `mimo-v2
|
|
55
|
+
- ✅ MiMo 模型:`mimo-v2.5-pro` / `mimo-v2-flash`
|
|
43
56
|
- ✅ DeepSeek 模型:`deepseek-v4-pro`(默认)/ `deepseek-v4-flash` / `deepseek-chat` / `deepseek-reasoner`
|
|
44
57
|
- ✅ 工具调用——function tools、并行调用、`local_shell`、`custom`、MCP `namespace`
|
|
45
58
|
- ✅ 联网搜索——翻译成 MiMo 原生 `web_search` builtin(需在控制台激活 Web Search Plugin);DeepSeek 路径自动跳过
|
|
@@ -148,7 +161,7 @@ codex
|
|
|
148
161
|
3. cc-switch GUI → **Codex** Tab → **+** → **自定义** → 把两段贴对应文本框 → 名称写 `MiMo (via mimo2codex)` → 添加
|
|
149
162
|
4. 点击新供应商激活——cc-switch 自动写 Codex 的配置文件。后续切回 OpenAI 官方 / Azure / OpenRouter 都是一键,mimo2codex 进程不需要重启,只在被路由到时收到流量。
|
|
150
163
|
|
|
151
|
-
cc-switch 的「获取模型」按钮调 `/v1/models`,mimo2codex 已实现——下拉里能直接选 `mimo-v2.5-pro` / `mimo-v2
|
|
164
|
+
cc-switch 的「获取模型」按钮调 `/v1/models`,mimo2codex 已实现——下拉里能直接选 `mimo-v2.5-pro` / `mimo-v2-flash`。
|
|
152
165
|
|
|
153
166
|
## Admin 控制台
|
|
154
167
|
|
|
@@ -168,37 +181,11 @@ cc-switch 的「获取模型」按钮调 `/v1/models`,mimo2codex 已实现—
|
|
|
168
181
|
|
|
169
182
|
数据存 sqlite(`~/.mimo2codex/data.db`),可 `--data-dir <path>` 改路径,或 `--no-admin` 关闭。
|
|
170
183
|
|
|
171
|
-
### 1M 长上下文怎么用
|
|
172
|
-
|
|
173
|
-
Codex 客户端**不会从代理拿 context window**,它读 `config.toml` 里的 `model_context_window` 字段。未声明时统一兜底成 ~256K——所以即便代理转发到 `mimo-v2.5-pro[1m]` 或 `deepseek-v4-pro`,左下角显示也只有 258K。
|
|
174
|
-
|
|
175
|
-
`mimo2codex print-config` 输出里已经默认带上 `model_context_window`,并在注释块里列出该 provider 所有可选模型 + 对应窗口:
|
|
176
|
-
|
|
177
|
-
```toml
|
|
178
|
-
model = "mimo-v2.5-pro"
|
|
179
|
-
model_provider = "mimo"
|
|
180
|
-
model_context_window = 128000
|
|
181
|
-
|
|
182
|
-
# Switch model — replace the two lines above with one entry below.
|
|
183
|
-
# Available MiMo (via mimo2codex) models:
|
|
184
|
-
# model = "mimo-v2.5-pro" model_context_window = 128000 (current)
|
|
185
|
-
# model = "mimo-v2.5-pro[1m]" model_context_window = 1000000
|
|
186
|
-
# model = "mimo-v2-flash" model_context_window = 128000
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
想用 1M 就把 `model = "mimo-v2.5-pro"` + `model_context_window = 128000` 两行换成对应的 1M 那条。cc-switch 用户在它的 toml 文本框里就地改即可,**不用改代理**。
|
|
190
|
-
|
|
191
|
-
写入 `~/.codex/config.toml` 后**完全退出 + 重启 Codex**(桌面端走系统托盘退出,不只是关窗口)。
|
|
192
|
-
|
|
193
|
-
> ⚠ **能不能跑通 1M 取决于两件事**,跟代理无关:
|
|
194
|
-
> 1. **上游账号**——比如 MiMo 的 `mimo-v2.5-pro[1m]` 在某些套餐下不开放,会上游 400 "Not supported model"。先 `curl https://api.xiaomimimo.com/v1/models -H "Authorization: Bearer $MIMO_API_KEY"` 看下 data 数组里到底有没有
|
|
195
|
-
> 2. **Codex 客户端版本**——较老的桌面端会无视 `model_context_window`,硬卡 256K。CLI 通常更新得快,可对照试一下 `codex` 终端命令的左下角显示,如果终端能显示 1M 而桌面端不行,升级桌面端
|
|
196
|
-
|
|
197
184
|
### Provider 与模型 ID
|
|
198
185
|
|
|
199
186
|
| Provider | 短码 | Env 变量 | 默认 baseUrl | 默认模型 | 模型清单 |
|
|
200
187
|
|---|---|---|---|---|---|
|
|
201
|
-
| MiMo | `mimo` | `MIMO_API_KEY` | `https://api.xiaomimimo.com/v1` | `mimo-v2.5-pro` | `mimo-v2.5-pro` / `mimo-v2
|
|
188
|
+
| MiMo | `mimo` | `MIMO_API_KEY` | `https://api.xiaomimimo.com/v1` | `mimo-v2.5-pro` | `mimo-v2.5-pro` / `mimo-v2-flash` |
|
|
202
189
|
| DeepSeek | `ds` | `DS_API_KEY` 或 `DEEPSEEK_API_KEY` | `https://api.deepseek.com/v1` | `deepseek-v4-pro` | `deepseek-v4-pro` / `deepseek-v4-flash` / `deepseek-chat`* / `deepseek-reasoner`* |
|
|
203
190
|
|
|
204
191
|
*legacy,2026-07-24 弃用,对应 v4-flash 的非思考 / 思考双模。
|
package/dist/setup/snippets.js
CHANGED
|
@@ -56,10 +56,16 @@ export function alternativesComment(t) {
|
|
|
56
56
|
].join("\n");
|
|
57
57
|
}
|
|
58
58
|
const lines = [];
|
|
59
|
-
lines.push(`# Switch model — replace the two lines above (model = ... and`, `# model_context_window = ...) with one of the entries below
|
|
59
|
+
lines.push(`# Switch model — replace the two lines above (model = ... and`, `# model_context_window = ...) with one of the entries below.`, `# Available ${provider.displayName} models:`);
|
|
60
60
|
for (const m of provider.builtinModels) {
|
|
61
61
|
if (m.deprecatedAfter)
|
|
62
62
|
continue;
|
|
63
|
+
// Skip `[1m]` long-context variants — Codex doesn't actually honor
|
|
64
|
+
// model_context_window above its built-in cap, so advertising them as
|
|
65
|
+
// alternatives here just sets users up for disappointment. The variants
|
|
66
|
+
// still exist in the catalog for direct mimo_chat.py / API use.
|
|
67
|
+
if (m.id.endsWith("[1m]"))
|
|
68
|
+
continue;
|
|
63
69
|
const ctx = m.contextWindow ? ` model_context_window = ${m.contextWindow}` : "";
|
|
64
70
|
const modelMaxOut = m.maxOutputTokens ?? (t.providerId === "deepseek" ? deepseekMaxOutput() : undefined);
|
|
65
71
|
const maxOut = modelMaxOut && m.contextWindow ? ` model_max_output_tokens = ${modelMaxOut}` : "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippets.js","sourceRoot":"","sources":["../../src/setup/snippets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAoBjE,4EAA4E;AAC5E,wEAAwE;AACxE,qDAAqD;AACrD,SAAS,iBAAiB;IACxB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,2EAA2E;AAC3E,+BAA+B;AAC/B,+CAA+C;AAC/C,k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CAAC,aAAa;qBACT,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI;;;;CAIxC,CAAC;IACA,OAAO;;;EAGP,QAAQ;;;EAGR,UAAU;;;;CAIX,CAAC;AACF,CAAC;AAcD,MAAM,UAAU,kBAAkB,CAAC,YAAgC,EAAE,GAAa;IAChF,MAAM,MAAM,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/E,MAAM,MAAM,GAAG,qBAAqB,MAAM,CAAC,WAAW;WAC7C,MAAM,CAAC,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC;;EAEnD,mBAAmB,CAAC,MAAM,CAAC;;mBAEV,MAAM,CAAC,WAAW;UAC3B,MAAM,CAAC,aAAa;qBACT,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI;;;;CAIxC,CAAC;IACA,OAAO;QACL,MAAM;QACN,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC;QACtC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC;QAClD,gBAAgB,EAAE,MAAM;QACxB,kBAAkB,EAAE,MAAM;KAC3B,CAAC;AACJ,CAAC"}
|
package/mimoskill/SKILL.md
CHANGED
|
@@ -29,7 +29,6 @@ Quick answer:
|
|
|
29
29
|
| Capability | MiMo native | Best model | Notes |
|
|
30
30
|
|---|---|---|---|
|
|
31
31
|
| Text chat | ✅ | `mimo-v2.5-pro` | reasoning + tools |
|
|
32
|
-
| 1M context | ✅ | `mimo-v2.5-pro[1m]` | append `[1m]` suffix |
|
|
33
32
|
| Tool / function calling | ✅ | any | parallel calls supported |
|
|
34
33
|
| Vision (image input) | ✅ | `mimo-v2.5` or `mimo-v2-omni` | NOT mimo-v2.5-pro |
|
|
35
34
|
| Web search | ✅ | any | requires Web Search Plugin activated in MiMo console |
|
|
@@ -82,7 +81,7 @@ For non-trivial integrations, [references/models.md](references/models.md) and [
|
|
|
82
81
|
|
|
83
82
|
## OCR / image recognition (when the chat model can't see images)
|
|
84
83
|
|
|
85
|
-
If the user wants to **read text from an image** or **describe / 识别 an image** but the current chat model is non-vision (`mimo-v2.5-pro`, `mimo-v2
|
|
84
|
+
If the user wants to **read text from an image** or **describe / 识别 an image** but the current chat model is non-vision (`mimo-v2.5-pro`, `mimo-v2-flash`, `deepseek-*`, or any third-party text-only model), invoke `scripts/ocr.py`. Three engines, `--engine auto` (default) picks in this order — mimo if `MIMO_API_KEY` set, else tesseract if installed and mode=text, else pollinations:
|
|
86
85
|
|
|
87
86
|
- **`mimo`** — needs `MIMO_API_KEY`, uses `mimo-v2.5` regardless of the chat model. Best quality. All modes.
|
|
88
87
|
- **`tesseract`** — **no key, no network**. Fully local OCR. Auto-used if installed and `--mode text`. Recommended for users behind GFW or offline. One-time install: `brew install tesseract tesseract-lang` / `sudo apt install tesseract-ocr tesseract-ocr-chi-sim` / Windows installer at github.com/UB-Mannheim/tesseract/wiki.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mimo2codex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Local proxy that lets the latest OpenAI Codex CLI / desktop talk to Xiaomi MiMo (V2.5 Pro) via the Responses API by translating to Chat Completions on the fly.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codex",
|