[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75500":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},75500,"mimo2codex","7as0nch\u002Fmimo2codex","7as0nch","让最新版 OpenAI Codex CLI \u002F Codex 桌面端接入主流大模型的本地代理(新增mac\u002Fwin包支持，后台运行，开机自动重启)。内置 小米 MiMo V2.5\u002FDeepSeek V4 Pro，并提供通用 provider 机制，**OpenAI Chat Completions 兼容**（Qwen \u002F GLM \u002F Kimi \u002F 本地 vLLM \u002F Ollama \u002F LM Studio …）或**原生 Responses API**（OpenAI 自家）的上游接到新版 Codex。把 Codex 的 Responses API 实时翻译成上游的 Chat Completions API，按客户端发的 `model` 字段在 provider 之间自动路由. ","",null,"TypeScript",562,54,59,11,0,26,33,503,78,9.22,"MIT License",false,"main",true,[],"2026-06-12 02:03:34","# mimo2codex\n\n\u003Cp align=\"center\">\n  \u003Ca href=\".\u002FREADME.md\">\u003Cstrong>English\u003C\u002Fstrong>\u003C\u002Fa> ·\n  \u003Ca href=\".\u002FREADME.zh.md\">简体中文\u003C\u002Fa> ·\n  \u003Ca href=\".\u002Fdoc\u002Fenv-setup.md\">Env Setup\u003C\u002Fa> ·\n  \u003Ca href=\".\u002Fdoc\u002Fauth-deployment.md\">Auth &amp; Deployment\u003C\u002Fa> ·\n  \u003Ca href=\".\u002Fdoc\u002Fmimoskill.md\">mimoskill\u003C\u002Fa> ·\n  \u003Ca href=\".\u002Fdoc\u002Fgeneric-providers.md\">Generic Providers\u003C\u002Fa> ·\n  \u003Ca href=\".\u002Fdoc\u002Fcodex-enable.md\">Codex Enable\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002F7as0nch\u002Fmimo2codex\u002Fstargazers\">\u003Cimg alt=\"GitHub Stars\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002F7as0nch\u002Fmimo2codex?style=flat-square&logo=github\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fmimo2codex\">\u003Cimg alt=\"npm version\" src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fmimo2codex?style=flat-square&logo=npm\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fmimo2codex\">\u003Cimg alt=\"downloads\" src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdt\u002Fmimo2codex?style=flat-square&color=brightgreen\">\u003C\u002Fa>\n  \u003Cimg alt=\"license\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002F7as0nch\u002Fmimo2codex?style=flat-square\">\n  \u003Cimg alt=\"node\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNode-18%2B-blue?style=flat-square&logo=node.js&logoColor=white\">\n  \u003Cimg alt=\"wire_api\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fwire__api-responses-black?style=flat-square\">\n\u003C\u002Fp>\n\nLocal proxy that lets the **latest OpenAI Codex CLI \u002F 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 \u002F GLM \u002F Kimi \u002F vLLM \u002F Ollama \u002F 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`.\n\n> 🚀 **New in v0.2.16**: opt-in **Server mode** ships login + per-user API keys + BYOK + OAuth (Gitee \u002F GitHub) + downloadable Codex config bundles, so you can put mimo2codex behind Docker \u002F an internal network \u002F a small private circle without exposing your upstream key. Local single-user runs are unaffected (`authMode` defaults to `off`). See [doc\u002Fauth-deployment.md](.\u002Fdoc\u002Fauth-deployment.md) for the full walkthrough — Docker compose, first-run bootstrap, OAuth setup, troubleshooting.\n\n\u003Cdetails>\n\u003Csummary>🆕 \u003Cb>What's new \u002F v0.2.15 (2026-05-18) · Thinking mode UI \u002F toggle \u002F deep-thinking + Docker deployment + multi-arch images\u003C\u002Fb> (click to expand)\u003C\u002Fsummary>\n\n- **v0.2.15 (2026-05-18) · Thinking mode in admin UI**: the \"Codex Enable\" page adds a global **Thinking** card with two switches — (1) **Thinking ON\u002FOFF** persists into the settings DB so you no longer need to relaunch with `--disable-thinking`; takes effect immediately on the next request (no restart). OFF makes every provider skip thinking (`thinking:{type:\"disabled\"}` for mimo \u002F deepseek, `reasoning_effort:\"none\"` for sensenova \u002F generic). (2) **Force high reasoning effort** — when Codex didn't pass a `reasoning.effort` in the request (most clients don't, except GPT-5 models), mimo2codex fills in `reasoning_effort:\"high\"` so the upstream actually thinks at high intensity. Disabled by default with a clear side-effect warning (trivial requests will also reason; on some upstreams \"high\"≈\"max\" so billing can spike). CLI `--disable-thinking` still wins over the admin setting.\n- **v0.2.15 (2026-05-18) · Kimi (Moonshot) preset**: typing `https:\u002F\u002Fapi.moonshot.cn\u002Fv1` (or `moonshot.ai`) as baseUrl is auto-recognized in the admin UI and applies `dropReasoningEffort: true` so Kimi (which uses `thinking:{enabled\u002Fdisabled}` instead of `reasoning_effort`) doesn't see the unknown field when \"Force high reasoning effort\" is on. Models: `kimi-k2.6` \u002F `kimi-k2.5` \u002F `kimi-k2-thinking` \u002F `kimi-k2-thinking-turbo` \u002F `moonshot-v1-{8k,32k,128k}`. See [doc\u002Fkimi.md](.\u002Fdoc\u002Fkimi.md).\n- **v0.2.15 (2026-05-18) · Docker deployment**: new `Dockerfile` (multi-stage alpine build, ~70MB final image) + `.dockerignore` + GitHub Actions workflow that auto-builds **multi-arch `linux\u002Famd64 \u002F linux\u002Farm64` images and pushes to ghcr.io\u002F7as0nch\u002Fmimo2codex** (not DockerHub); bundled `docker-compose.yml` for one-command launch with **the data dir bind-mounted to local `.\u002F.mimo2codex\u002F`** (sqlite + providers.json + admin UI config persist across container rebuilds); env supports both `.env` file mount and `-e` \u002F `environment:` direct injection, works on **macOS \u002F Windows \u002F Linux**. Based on [#15](https:\u002F\u002Fgithub.com\u002F7as0nch\u002Fmimo2codex\u002Fpull\u002F15) (thanks @hufang360).\n- **v0.2.7 (2026-05-15) · webui overhaul + toolchain polish**: full admin webui rewrite on **Ant Design 5** (dark\u002Flight themes, EN\u002F中文 i18n, viewport-locked layout with fixed sider + footer, smoothed Token-usage curves); new `.env.example` + **Bash \u002F PowerShell one-liner scripts** that inject keys into the shell (`.env` is gitignored); per-model **⚡Probe** button on the \"Enable Codex\" page that fires a minimal ping to validate key \u002F baseUrl \u002F model id end-to-end; Token-usage chart now folds in a **cache-hit overlay** (green bars = cache hits, gray ghosts = prompt totals) plus a window-wide hit-rate summary; **customizable Codex dir** via settings or the `CODEX_HOME` env var.\n- **v0.2.6 (2026-05-14) · \"Codex Enable\" page**: one-click write of `~\u002F.codex\u002Fauth.json` + `config.toml` from the admin webui — a **cc-switch replacement** for Codex-only users. Comes with a \"runtime override\" mode (swap upstream models without restarting Codex). Old files are auto-backed-up, and **the first backup that captures your real OpenAI auth.json is permanently preserved** — switch models 100 times and you can still roll back to your original Codex config. See [doc\u002Fcodex-enable.md](.\u002Fdoc\u002Fcodex-enable.md).\n\n\u003C\u002Fdetails>\n\n![Admin console · dashboard](https:\u002F\u002Fraw.githubusercontent.com\u002F7as0nch\u002Fmimo2codex\u002Fmain\u002Fimages\u002Fadmin-dashboard.png)\n\n![mimo2codex install + run](https:\u002F\u002Fraw.githubusercontent.com\u002F7as0nch\u002Fmimo2codex\u002Fmain\u002Fimages\u002Fnpminstall.jpg)\n\n## Contents\n\n- [Why](#why) — what problem this solves\n- [What works](#what-works) — feature matrix\n- [Install — pick one](#install--pick-one) — npm \u002F curl \u002F clone\n- [Use](#use) — get a key, start the proxy, configure Codex\n- [.env + loader scripts](.\u002Fdoc\u002Fenv-setup.md) — set up all keys once, per-OS quick guide (macOS\u002FLinux + Windows)\n- [Docker deployment](.\u002Fdoc\u002Fdocker.md) — `docker compose up -d`, data persistence, multi-arch images (new in v0.2.15)\n- [Codex Enable — one-click model switching in the webui (v0.2.6, replaces cc-switch)](#codex-enable--one-click-model-switching-in-the-webui-v026-replaces-cc-switch)\n- [Use with cc-switch](#use-with-cc-switch)\n- [Admin console](#admin-console) — dashboard, logs, models, settings\n  - [Providers and model ids](#providers-and-model-ids)\n  - [Plugging in third-party OpenAI-compatible upstreams](#plugging-in-third-party-openai-compatible-upstreams) — Qwen \u002F GLM \u002F Kimi \u002F Ollama \u002F OpenAI\n- [CLI flags](#cli-flags)\n  - [Built-in defaults (no flag needed)](#built-in-defaults-no-flag-needed)\n- [Troubleshooting](#troubleshooting)\n- [mimoskill — fill MiMo's gaps](#mimoskill--fill-mimos-gaps) — image gen \u002F OCR fallback \u002F pet generation\n- [Project layout](#project-layout)\n- [Develop](#develop)\n- [License](#license)\n\n**Detailed guides:** [.env setup](.\u002Fdoc\u002Fenv-setup.md) · [Docker deployment](.\u002Fdoc\u002Fdocker.md) · [Auth & multi-user (v0.2.16)](.\u002Fdoc\u002Fauth-deployment.md) · [Codex Enable](.\u002Fdoc\u002Fcodex-enable.md) · [Generic providers](.\u002Fdoc\u002Fgeneric-providers.md) · [mimoskill](.\u002Fdoc\u002Fmimoskill.md)\n\n## Why\n\nMiMo's [official Codex doc](https:\u002F\u002Fplatform.xiaomimimo.com\u002Fdocs\u002Fzh-CN\u002Fintegration\u002Fcodex) only supports `wire_api = \"chat\"`, but newer Codex versions hard-error on it (the official workaround is to downgrade Codex, losing pets, the new desktop release and tool fixes). mimo2codex fixes this without touching either side: keep Codex on latest, run mimo2codex locally, Codex thinks it's talking to a native Responses backend.\n\nConceptually a sibling of [openrouter](https:\u002F\u002Fopenrouter.ai), [claude-code-router](https:\u002F\u002Fgithub.com\u002Fmusistudio\u002Fclaude-code-router), [y-router](https:\u002F\u002Fgithub.com\u002Fluohy15\u002Fy-router) — a thin protocol shim.\n\n## What works\n\n- ✅ Codex CLI `wire_api = \"responses\"` and Codex desktop app\n- ✅ Multi-provider — **MiMo** + **DeepSeek**, mixed within one process (per-request routing by `model` field)\n- ✅ **Generic OpenAI-compatible providers** — Qwen \u002F GLM \u002F Kimi \u002F Ollama \u002F native-Responses OpenAI, declare in `providers.json` and they just work. See [doc\u002Fgeneric-providers.md](.\u002Fdoc\u002Fgeneric-providers.md)\n- ✅ MiMo models: `mimo-v2.5-pro` \u002F `mimo-v2-flash`\n- ✅ DeepSeek models: `deepseek-v4-pro` (default) \u002F `deepseek-v4-flash` \u002F `deepseek-chat` \u002F `deepseek-reasoner`\n- ✅ Tool calling — function tools, parallel calls, `local_shell`, `custom`, MCP `namespace`\n- ✅ Web search — translated to MiMo's native `web_search` builtin (requires plugin activation); auto-skipped on DeepSeek\n- ✅ Vision — only `mimo-v2.5` and `mimo-v2-omni`; pro\u002Fflash auto-strip images with a placeholder\n- ✅ Reasoning passthrough + correct **multi-turn `reasoning_content` round-trip** per [MiMo's official spec](https:\u002F\u002Fplatform.xiaomimimo.com\u002Fdocs\u002Fzh-CN\u002Fusage-guide\u002Fpassing-back-reasoning_content) (with `--no-reasoning` to hide from terminal — round-trip stays intact)\n- ✅ MiMo host auto-routing — `tp-*` keys → token-plan host, `sk-*` keys → pay-as-you-go host\n- ✅ Local admin web UI at `http:\u002F\u002F127.0.0.1:8788\u002Fadmin\u002F` — model catalog, alias mgmt, chat logs, token stats, provider config\n- ✅ sqlite persistence (default `~\u002F.mimo2codex\u002Fdata.db`, override with `--data-dir`)\n- ✅ cc-switch integration (`mimo2codex print-cc-switch` outputs paste-ready snippets)\n- ⚠️ **`\u002Fhatch` custom pet generation** — pure MiMo can't do this. Codex's `\u002Fhatch` is hardcoded to call OpenAI's `image_gen` tool client-side, and we can't intercept that from the proxy layer. MiMo also has no image-generation endpoint. Workaround via `mimoskill\u002F` (free, no OpenAI key required) — see below.\n\n## Install — pick one\n\n### 🟢 npm (most users)\n\n```bash\nnpm install -g mimo2codex\n```\n\n### 🟡 curl one-liner (no global install)\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002F7as0nch\u002Fmimo2codex\u002Fmain\u002Fscripts\u002Finstall.sh | bash\n```\n\nPowerShell on Windows:\n\n```powershell\nirm https:\u002F\u002Fraw.githubusercontent.com\u002F7as0nch\u002Fmimo2codex\u002Fmain\u002Fscripts\u002Finstall.ps1 | iex\n```\n\n### Other paths\n\n- **Git clone + manual** — `git clone https:\u002F\u002Fgithub.com\u002F7as0nch\u002Fmimo2codex && cd mimo2codex && npm install && npm run build`. Use this if you want to hack on the source.\n- **`npm link`** — after a clone, `npm run build && npm link` registers `mimo2codex` globally without publishing.\n\nRequires Node.js ≥ 18.\n\n## Use\n\n### 1. Get an API key\n\n| Provider | Console | Key prefix |\n|---|---|---|\n| MiMo | [platform.xiaomimimo.com](https:\u002F\u002Fplatform.xiaomimimo.com) → Console → API Keys | `sk-` (pay-as-you-go) \u002F `tp-` (token-plan) |\n| DeepSeek | [api-docs.deepseek.com](https:\u002F\u002Fapi-docs.deepseek.com\u002Fzh-cn\u002F) | `sk-` |\n\n### 2. Start the proxy\n\n> 💡 **Don't want to `export` every time?** Use the built-in loader (v0.2.8+, no clone, OS-agnostic):\n>\n> ```bash\n> mimo2codex init                       # seeds ~\u002F.mimo2codex\u002F.env + .env.example\n> # open ~\u002F.mimo2codex\u002F.env in any editor and fill in your keys\n> mimo2codex                            # auto-loaded on every start; banner lists key names\n> ```\n>\n> Why it works everywhere: mimo2codex reads `~\u002F.mimo2codex\u002F.env` in-process, independent of the shell — desktop launch, cmd.exe, schedulers and Docker all see the same keys. Pass `--no-load-env` to opt out. First bare `mimo2codex` with no `.env` and no shell key auto-bootstraps the file and prints next steps.\n>\n> 📖 Both methods compared (built-in loader vs sourcing the repo scripts), per-OS notes (PowerShell execution-policy fallback, Git Bash \u002F WSL), `.env` syntax, FAQ: **[doc\u002Fenv-setup.md](.\u002Fdoc\u002Fenv-setup.md)**.\n\n**MiMo only** (default):\n\n```bash\nexport MIMO_API_KEY=sk-xxxxxxxxxxxxxxxx\nmimo2codex\n```\n\n**DeepSeek only**:\n\n```bash\nexport DS_API_KEY=sk-xxxxxxxxxxxxxxxx       # or DEEPSEEK_API_KEY\nmimo2codex --model ds\n```\n\n**Both providers at once** (per-request routing — sending `mimo-v2.5-pro` goes to MiMo, sending `deepseek-v4-pro` goes to DeepSeek):\n\n```bash\nexport MIMO_API_KEY=sk-mimo-key\nexport DS_API_KEY=sk-deepseek-key\nmimo2codex                           # default fallback: mimo\nmimo2codex --model ds                # default fallback: ds (unknown model fields go to ds)\n```\n\nThe startup banner prints the `auth.json` + `config.toml` snippets, the enabled providers, the admin UI URL and the data directory. Default works for both Codex CLI and desktop without any env-var dance.\n\n> **What `--model` actually does**: it picks the **default \u002F fallback** provider — not a hard switch. When the client-supplied `model` field matches any **enabled** (key configured) provider's catalog (including aliases), the request is routed to that provider regardless of `--model`. `--model` only matters when:\n> 1. Only one provider's key is configured — `--model` must point at it, otherwise startup errors out.\n> 2. The client sends a model id that no provider recognizes (e.g. `gpt-4o`) — it falls back to the `--model` provider's `defaultModel`.\n> 3. **The client sends a model that matches some provider's catalog, but that provider has no key configured** — also falls back to the `--model` provider's `defaultModel`, logged in admin as `client_model_rewritten`. E.g. if you only set `MIMO_API_KEY` (not `QWEN_API_KEY`), sending `qwen3-max` is silently rewritten to `mimo-v2.5-pro` and forwarded to MiMo. The admin \"model mappings\" table will show this `qwen3-max → mimo-v2.5-pro` rewrite.\n\n### 3. Configure Codex\n\nCopy the printed snippets to:\n\n| | macOS \u002F Linux | Windows |\n|---|---|---|\n| auth.json | `~\u002F.codex\u002Fauth.json` | `%USERPROFILE%\\.codex\\auth.json` |\n| config.toml | `~\u002F.codex\u002Fconfig.toml` | `%USERPROFILE%\\.codex\\config.toml` |\n\n### 4. Run Codex\n\n```bash\ncodex\n> Write a Python fibonacci function and save it to fib.py\n```\n\nPet, tool calls, reasoning, multi-turn — all just work. Pass `--no-reasoning` if you want to hide thinking from the terminal.\n\n> If Codex desktop ignores the new `auth.json`, **fully quit it** (system tray → Quit) and relaunch.\n\n## Codex Enable — one-click model switching in the webui (v0.2.6, replaces cc-switch)\n\n> Added **2026-05-14**, available since **v0.2.6**. Full details: [doc\u002Fcodex-enable.md](.\u002Fdoc\u002Fcodex-enable.md)\n\nIf you only use Codex (not Claude Code \u002F Gemini CLI etc.), you can **drop the cc-switch dependency entirely**. The admin webui now has a sidebar tab **\"Codex 启用\"** that does what cc-switch did — and a few things it didn't:\n\n- **One-click file write** — click \"Write files & enable\" on any model row → server atomically writes `~\u002F.codex\u002Fauth.json` + `~\u002F.codex\u002Fconfig.toml`. Fully quit + relaunch Codex to take effect.\n- **Runtime override** — click \"Runtime override only\" → store the active (provider, model) in mimo2codex's settings, route through Pass 0 of `selectProvider`. **No Codex restart needed.**\n- **Your original Codex config is permanently preserved** 🔒 — the first backup taken when overwriting a foreign `auth.json` (your real OpenAI login, etc.) is auto-tagged `.preserve` and **never rolls out** of the keep-window. Switch 100 times and that original is still one click away.\n- **Every switch is backed up** — regular snapshots rotate \"keep newest 10\"; the backups table shows each snapshot's captured `provider\u002Fmodel` so you can tell them apart at a glance.\n- **Symmetric half-pair restore** — if you only had `auth.json` and no customized `config.toml` before mimo2codex, restoring deletes the `config.toml` we created, returning the directory to its real prior state.\n- **Manual delete** — each row has a delete button; 🔒 preserved rows require an extra confirm + backend `?force=1`.\n\nMechanism comparison, REST API, edge behavior, troubleshooting → [doc\u002Fcodex-enable.md](.\u002Fdoc\u002Fcodex-enable.md).\n\n## Use with cc-switch\n\nIf you **also use Claude Code \u002F Gemini CLI** etc., cc-switch is still the right cross-tool switching hub; mimo2codex coexists fine (both write the same `~\u002F.codex\u002F`, no conflict).\n\n[cc-switch](https:\u002F\u002Fgithub.com\u002Ffarion1231\u002Fcc-switch) is a desktop app for switching between Claude Code \u002F Codex \u002F OpenCode providers in one click. Its built-in Codex preset list doesn't include MiMo, but mimo2codex slots in as a custom provider:\n\n1. Keep mimo2codex running (`MIMO_API_KEY=... mimo2codex`)\n2. `mimo2codex print-cc-switch` — outputs `auth.json` + `config.toml` text blocks\n3. cc-switch GUI → **Codex** tab → **+** → **Custom** → paste both blocks → name it `MiMo (via mimo2codex)` → **Add**\n4. Click the new provider to activate it; cc-switch writes Codex's config files for you. Switch back to OpenAI \u002F Azure \u002F OpenRouter anytime — mimo2codex keeps running and only gets traffic when its provider is active.\n\ncc-switch's \"Fetch Models\" button calls `\u002Fv1\u002Fmodels`, which mimo2codex implements — the dropdown auto-lists `mimo-v2.5-pro` and `mimo-v2-flash`.\n\n## Admin console\n\nBrowse to `http:\u002F\u002F127.0.0.1:8788\u002Fadmin\u002F` after start.\n\n**Dashboard** — 24h \u002F 7d \u002F 30d token usage, error rate, requests aggregated by provider\u002Fmodel, model-mapping records, last 10 requests.\n\n![Admin console · dashboard](https:\u002F\u002Fraw.githubusercontent.com\u002F7as0nch\u002Fmimo2codex\u002Fmain\u002Fimages\u002Fadmin-dashboard.png)\n\n**Logs** — filter by provider, paginate by time, prune old records; status codes are color-coded and error snippets expand inline.\n\n![Admin console · chat logs](https:\u002F\u002Fraw.githubusercontent.com\u002F7as0nch\u002Fmimo2codex\u002Fmain\u002Fimages\u002Fadmin-logs.png)\n\n**Models** — provider tabs; builtin models are read-only, custom models + aliases (client-supplied `model` → upstream id) editable.\n\n**Settings** — provider status, base URL, default model, UI prefs. **API keys are not stored in the UI** — they must come from environment variables; the UI only displays status and copy-paste shell snippets.\n\nData lives in sqlite (`~\u002F.mimo2codex\u002Fdata.db`); override with `--data-dir \u003Cpath>` or disable entirely with `--no-admin`.\n\n### Providers and model ids\n\n| Provider | Shortcut | Env var | Default base URL | Default model | Models |\n|---|---|---|---|---|---|\n| MiMo | `mimo` | `MIMO_API_KEY` | `https:\u002F\u002Fapi.xiaomimimo.com\u002Fv1` | `mimo-v2.5-pro` | `mimo-v2.5-pro` \u002F `mimo-v2-flash` |\n| DeepSeek | `ds` | `DS_API_KEY` or `DEEPSEEK_API_KEY` | `https:\u002F\u002Fapi.deepseek.com\u002Fv1` | `deepseek-v4-pro` | `deepseek-v4-pro` \u002F `deepseek-v4-flash` \u002F `deepseek-chat`* \u002F `deepseek-reasoner`* |\n\n*legacy, deprecated 2026-07-24, both alias the v4-flash thinking \u002F non-thinking modes.\n\n> MiMo's `tp-*` keys auto-route to the token-plan host (`https:\u002F\u002Ftoken-plan-cn.xiaomimimo.com\u002Fv1`); `sk-*` keys use the pay-as-you-go host. Setting `MIMO_BASE_URL` \u002F `--base-url` explicitly overrides this; the startup banner prints a ⚠ warning if your key prefix and host don't match.\n\n### Plugging in third-party OpenAI-compatible upstreams\n\nBeyond the built-in MiMo \u002F DeepSeek, **any OpenAI Chat Completions-compatible** (Qwen \u002F GLM \u002F Kimi \u002F Ollama \u002F vLLM …) or **native Responses API** (OpenAI itself, future-leaning providers) upstream can connect to Codex with zero code changes.\n\n**Simplest path** — one env trio:\n\n```bash\nexport GENERIC_BASE_URL=https:\u002F\u002Fdashscope.aliyuncs.com\u002Fcompatible-mode\u002Fv1\nexport GENERIC_API_KEY=sk-your-qwen-key\nexport GENERIC_DEFAULT_MODEL=qwen3-max\nmimo2codex --model generic\n```\n\n**Multi-instance** — write `~\u002F.mimo2codex\u002Fproviders.json`:\n\n```json\n{\n  \"providers\": [\n    {\n      \"id\": \"qwen\",\n      \"displayName\": \"Qwen (DashScope)\",\n      \"baseUrl\": \"https:\u002F\u002Fdashscope.aliyuncs.com\u002Fcompatible-mode\u002Fv1\",\n      \"envKey\": \"QWEN_API_KEY\",\n      \"defaultModel\": \"qwen3-max\"\n    }\n  ]\n}\n```\n\nThen `QWEN_API_KEY=sk-... mimo2codex --model qwen`.\n\nFull field reference, `wireApi: \"responses\"` passthrough mode, copy-pasteable examples for Qwen \u002F GLM \u002F Kimi \u002F Ollama \u002F OpenAI \u002F MiniMax, routing rules and troubleshooting all live in **[doc\u002Fgeneric-providers.md](.\u002Fdoc\u002Fgeneric-providers.md)**.\n\n> Strict OpenAI-compatible upstreams (e.g. **MiniMax**) need a one-line `features.minimaxCompat: true` switch — see [doc\u002Fminimax.md](.\u002Fdoc\u002Fminimax.md).\n\n> **SenseNova (商汤日日新)** is auto-detected in the admin UI: typing `https:\u002F\u002Ftoken.sensenova.cn\u002Fv1` as baseUrl applies the recommended features — see [doc\u002Fsensenova.md](.\u002Fdoc\u002Fsensenova.md).\n\n> **Kimi (Moonshot)** is auto-detected when you type `https:\u002F\u002Fapi.moonshot.cn\u002Fv1` (default applies `dropReasoningEffort` so the \"Force high reasoning effort\" admin switch doesn't break Kimi) — see [doc\u002Fkimi.md](.\u002Fdoc\u002Fkimi.md).\n\n> Existing mimo \u002F deepseek users with no `providers.json` **are not affected** — default provider stays `mimo` and behavior is byte-identical.\n\n## CLI flags\n\n| Flag | Env | Default | Notes |\n|---|---|---|---|\n| `--model \u003Cshortcut>` | `MIMO2CODEX_DEFAULT_PROVIDER` | `mimo` | default provider: `mimo` or `ds` |\n| `--port`, `-p` | `MIMO2CODEX_PORT` | `8788` | listen port |\n| `--host` | `MIMO2CODEX_HOST` | `127.0.0.1` | bind host |\n| `--base-url` | `MIMO_BASE_URL` \u002F `DEEPSEEK_BASE_URL` | see table above | base URL for the default provider |\n| `--api-key` | `MIMO_API_KEY` \u002F `DS_API_KEY` \u002F `DEEPSEEK_API_KEY` | _at least one required_ | api key for the default provider (other providers read their own env vars) |\n| `--data-dir \u003Cpath>` | `MIMO2CODEX_DATA_DIR` | `~\u002F.mimo2codex` | sqlite + admin UI data directory |\n| `--no-admin` | `MIMO2CODEX_NO_ADMIN=1` | off | disable the admin UI + sqlite logging |\n| `--no-reasoning` | `MIMO2CODEX_NO_REASONING=1` | off | hide reasoning from Codex (still preserved between turns) |\n| `--verbose`, `-v` | `MIMO2CODEX_VERBOSE=1` | off | log every translated request body |\n| _env-only_ | `MIMO2CODEX_CONTEXT_OVERFLOW_MODE` | `friendly` | how to render upstream 400s identified as \"context window exceeded\": `friendly` (default) rewrites them to a bilingual hint pointing users at codex's `\u002Fcompact` command; `passthrough` forwards the raw upstream error unchanged |\n\n### Built-in defaults (no flag needed)\n\nmimo2codex applies two behaviors automatically to make MiMo behave more like the OpenAI \u002F Anthropic models Codex was designed for:\n\n- **`parallel_tool_calls` forced on** — overrides Codex's default of `false`. Lets MiMo batch multiple tool calls per turn → fewer round-trips before the model commits to `apply_patch`.\n- **Web search auto-forwarded with auto-fallback** — Codex's `web_search`\u002F`web_search_preview` is translated to MiMo's `web_search` builtin. The model decides when to invoke it (no extra prompting required). If your account doesn't have the Web Search Plugin activated, the first request returns a 400; mimo2codex catches it, strips `web_search`, retries, and remembers — subsequent requests in the same process skip web_search proactively. **Zero config either way.**\n\n> **Thinking mode is ON** — MiMo generates `reasoning_content` on every request and Codex shows it in the terminal. Pass `--no-reasoning` to hide thinking from the terminal (mimo2codex still re-injects it across turns for multi-turn tool quality, per [MiMo's official recommendation](https:\u002F\u002Fplatform.xiaomimimo.com\u002Fdocs\u002Fzh-CN\u002Fquick-start\u002Ffirst-api-call)).\n\nSubcommands:\n\n```bash\nmimo2codex print-config             # ~\u002F.codex\u002Fconfig.toml + auth.json snippets\nmimo2codex print-config --env-key   # legacy env-var variant (CLI only)\nmimo2codex print-cc-switch          # cc-switch paste blocks\n```\n\n## Troubleshooting\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>MiMo 400 \u003Ccode>The reasoning_content in the thinking mode must be passed back\u003C\u002Fcode> \u002F multi-turn tool calls drift into rambling \u002F hallucinated text\u003C\u002Fb>\u003C\u002Fsummary>\n\nPer [MiMo's official advisory](https:\u002F\u002Fplatform.xiaomimimo.com\u002Fdocs\u002Fzh-CN\u002Fusage-guide\u002Fpassing-back-reasoning_content), when thinking mode is on (default) and history contains tool calls, every assistant message that carries `tool_calls` MUST also carry its original `reasoning_content` — otherwise the model context becomes inconsistent. Two failure modes:\n\n| Severity | Symptom |\n|---|---|\n| 🔴 **Hard fail** | MiMo returns 400 `\"The reasoning_content in the thinking mode must be passed back\"`. Codex shows \"Provider returned 400\" and the conversation stalls. |\n| 🟡 **Soft degrade** | No error, but model \"narrates\" instead of calling tools, fabricates content unrelated to the prompt (e.g. asked to generate a pet sprite, model outputs movie \u002F pop-culture trivia), or ends turns with \"I'll do X\" without calling `apply_patch`. Every off-task turn burns 1k-5k tokens. |\n\nBoth manifest specifically on **multi-turn tool-calling workflows** (agentic coding, `\u002Fhatch`-replacement pet generation, OCR feed-back, web search chains). Codex is on MiMo's published list of affected agent products (alongside Cursor, TRAE, Roo Code, Copilot CLI, etc.).\n\n**Fix**: upgrade to `mimo2codex >= 0.2.3`. Prior versions only stashed reasoning in `summary[].text` and dropped it entirely under `--no-reasoning`; 0.2.3+ also pins the full trace into `encrypted_content` (Codex echoes it back verbatim across turns) and re-injects it as `reasoning_content` on the prior assistant message during translation.\n\n```bash\nnpm update -g mimo2codex   # or: git pull && npm run build\nmimo2codex --version       # confirm >= 0.2.3\n```\n\nAffected models: MiMo-V2.5-Pro, MiMo-V2.5, MiMo-V2-Pro, MiMo-V2-Omni, MiMo-V2-Flash. DeepSeek V4 family has the same requirement and was already covered.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Missing environment variable: \u003Ccode>MIMO2CODEX_KEY\u003C\u002Fcode>\u003C\u002Fb>\u003C\u002Fsummary>\n\nYour `config.toml` has the legacy `env_key = \"MIMO2CODEX_KEY\"` line. Codex desktop doesn't inherit shell env vars. Switch to the auth.json variant: replace `env_key = \"...\"` with `requires_openai_auth = true` and write `~\u002F.codex\u002Fauth.json` with `{\"OPENAI_API_KEY\": \"mimo2codex-local\"}`. Or just rerun `mimo2codex print-config` and paste the new default output.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>MiMo returned 404: No endpoints found that support image input\u003C\u002Fb>\u003C\u002Fsummary>\n\nYou sent images on a model that doesn't support vision. Only `mimo-v2.5` and `mimo-v2-omni` accept images. Switch model in `config.toml` to one of those, or let mimo2codex auto-strip (it already does on `mimo-v2.5-pro`\u002F`-flash` — placeholder text replaces the image).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>MiMo returned 400: Param Incorrect: \u003Ccode>text\u003C\u002Fcode> is not set\u003C\u002Fb>\u003C\u002Fsummary>\n\nMiMo's image API requires every image-bearing message to include a `text` part. mimo2codex auto-injects a single space when missing — make sure you're on the latest version (`npm update -g mimo2codex` or `git pull && npm run build`).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Codex shows \u003Ccode>image_gen tool not available\u003C\u002Fcode> when generating a pet\u003C\u002Fb>\u003C\u002Fsummary>\n\nThat's Codex's `\u002Fhatch` trying to call OpenAI's image API. MiMo doesn't have image generation. Use [`mimoskill\u002Fscripts\u002Fgenerate_pet.py`](.\u002Fmimoskill\u002Fscripts\u002Fgenerate_pet.py) instead — defaults to free Pollinations.ai, no extra key needed. See [mimoskill\u002FSKILL.md](.\u002Fmimoskill\u002FSKILL.md).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Stream disconnected before completion\u003C\u002Fb>\u003C\u002Fsummary>\n\nOld version bug — make sure you're on >= 0.1.0. Each SSE event must have \u003Ccode>type\u003C\u002Fcode> in its data payload; older builds were missing it.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Logs spammed with \u003Ccode>dropping unsupported tool type\u003C\u002Fcode>\u003C\u002Fb>\u003C\u002Fsummary>\n\nAlready fixed — known server-side tools (`code_interpreter`, `image_generation`, `computer_use`, etc.) are silently dropped at debug level. Unknown types warn once per session, not per request.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>MiMo returned 400: web search tool found in the request body, but webSearchEnabled is false\u003C\u002Fb>\u003C\u002Fsummary>\n\nYou're on an old build. Newer mimo2codex catches this 400 automatically: it strips `web_search` and retries, then skips it for the rest of the session. Update with `npm update -g mimo2codex` (or `git pull && npm run build`) and the error stops appearing.\n\nIf you actually want web search to work upstream, activate the Web Search Plugin at [MiMo console → Plugin Management](https:\u002F\u002Fplatform.xiaomimimo.com\u002F#\u002Fconsole\u002Fplugin) (separately billed), then restart mimo2codex.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Startup banner shows ⚠ \"sk-* key needs the pay-as-you-go host...\" \u002F \"tp-* key needs the token-plan host...\"\u003C\u002Fb>\u003C\u002Fsummary>\n\nStale `MIMO_BASE_URL` in your shell is overriding the key-prefix inference. Resolution priority is `--base-url > MIMO_BASE_URL > key-prefix inference > default`, so env wins over inference.\n\nPowerShell:\n\n```powershell\necho $env:MIMO_BASE_URL                                            # check\nRemove-Item Env:MIMO_BASE_URL                                      # clear in current session\n[Environment]::GetEnvironmentVariable('MIMO_BASE_URL','User')      # check user-level\n[Environment]::SetEnvironmentVariable('MIMO_BASE_URL',$null,'User')  # remove user-level permanently\n```\n\nbash \u002F zsh:\n\n```bash\necho $MIMO_BASE_URL\nunset MIMO_BASE_URL\n```\n\nOnce cleared, `sk-*` keys auto-use `https:\u002F\u002Fapi.xiaomimimo.com\u002Fv1` and `tp-*` keys auto-use `https:\u002F\u002Ftoken-plan-cn.xiaomimimo.com\u002Fv1`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>DeepSeek returns 401 Unauthorized\u003C\u002Fb>\u003C\u002Fsummary>\n\nConfirm `DS_API_KEY` (or `DEEPSEEK_API_KEY`) is what's actually being picked up — DeepSeek keys are issued on the DeepSeek console only and don't interchange with MiMo keys.\n\n```bash\nmimo2codex --model ds --verbose\n# The startup banner prints `api key: sk-x…xxxx` — verify it's the DS one.\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Admin UI returns 503 \"Admin UI not built\"\u003C\u002Fb>\u003C\u002Fsummary>\n\nThe frontend bundle hasn't been built yet. Run `npm run build:all` (compiles backend with tsc, then frontend with vite) to populate `dist\u002Fweb\u002F`. To build only the frontend: `npm run web:install && npm run web:build`.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>better-sqlite3 fails to compile during npm install\u003C\u002Fb>\u003C\u002Fsummary>\n\nUsually caused by an unusual Node distribution (e.g., Electron-bundled Node). Node ≥ 18 from nodejs.org normally pulls a prebuilt binary without invoking node-gyp. If you only want the proxy and not the admin UI, pass `--no-admin` — the db module is not loaded in that mode.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Codex says \"I'll do X\" then ends the turn without calling any tool\u003C\u002Fb>\u003C\u002Fsummary>\n\n**Most common cause**: missing `reasoning_content` on prior assistant turns — see the top troubleshooting entry above (upgrade to ≥ 0.2.3). 0.2.2 and earlier silently drop reasoning across turns in some configurations, which makes MiMo's multi-turn tool calling degrade exactly this way.\n\nIf you're already on ≥ 0.2.3 and still see it, it's MiMo's known weakness on multi-step agentic coding. mimo2codex defaults `parallel_tool_calls: true` (lets MiMo batch tool calls per turn), which usually mitigates it. The highest-leverage manual fix is **a more directive prompt** — replace \"继续\" with something like:\n\n> 不要解释，直接调 apply_patch 写完整文件内容\n\nThis pattern (concrete instruction + explicit tool name + \"don't explain\") is much more reliable than \"continue\" with MiMo.\n\n\u003C\u002Fdetails>\n\n## mimoskill — fill MiMo's gaps\n\n> 📖 **Full reference:** [doc\u002Fmimoskill.md](.\u002Fdoc\u002Fmimoskill.md) — per-script docs, env vars, triggering rules, three usage modes, recipes, troubleshooting. The section below is a quick summary.\n\n[mimoskill\u002F](.\u002Fmimoskill\u002F) is a bundle of helper scripts + reference docs at the project root. It exists because some things MiMo just doesn't do natively (mainly: image generation, OCR fallback when the chat model is text-only), and Codex hardcodes a few capability assumptions on the client side that the proxy can't override.\n\n### Why it exists\n\n| Problem | Why mimo2codex alone can't fix it |\n|---|---|\n| `\u002Fhatch` custom pet generation | Codex calls OpenAI's `image_gen` tool **client-side**. MiMo has no image-gen endpoint, and we can't fake one in the proxy because Codex won't ship the request through us — it tries to talk to OpenAI directly with the auth.json key. |\n| In-Codex image generation in general | Same reason. |\n| Direct MiMo calls outside Codex | mimo2codex is a proxy, not an SDK — bare scripts are easier than spinning up the proxy for one-off calls. |\n| Quirks like image+text pairing, `max_completion_tokens`, `reasoning_content` re-injection | Repeating these every time you write a script wastes your time; the helper scripts encode them already. |\n\n### What's in it\n\n| File | Purpose |\n|---|---|\n| `SKILL.md` | Skill manifest read by Claude \u002F Codex agents — describes when to invoke each script |\n| `scripts\u002Fmimo_chat.py` | Direct chat \u002F vision \u002F web-search call to MiMo, **stdlib-only** (no `pip install openai`) |\n| `scripts\u002Fgenerate_pet.py` | Image generation: `auto` mode picks free Pollinations when no OpenAI key, else `gpt-image-1`. Also supports Replicate \u002F local SD. |\n| `scripts\u002Finstall_pet.sh` | Install the generated PNG into Codex's pet directory (probes macOS\u002FLinux\u002FWindows paths) |\n| `references\u002Fmodels.md` | MiMo capability matrix + field quirks |\n| `references\u002Fpet_workflow.md` | Pet generation walkthrough (single image vs animated bundle) |\n| `assets\u002Fpet_prompt_template.md` | Tuned chibi-sticker prompt templates |\n\n### Three ways to use it\n\n**1. Direct invocation (any user, no setup)**\n\n```bash\npython3 mimoskill\u002Fscripts\u002Fmimo_chat.py \"tell me a joke\"\npython3 mimoskill\u002Fscripts\u002Fmimo_chat.py --image src.jpg \"describe this\"\npython3 mimoskill\u002Fscripts\u002Fgenerate_pet.py --description \"chibi shiba dev\" --out pet.png\nbash mimoskill\u002Fscripts\u002Finstall_pet.sh pet.png shiba\n```\n\n**2. As a Claude Code skill** — symlink the directory into `~\u002F.claude\u002Fskills\u002F`:\n\n```bash\nln -s \"$(pwd)\u002Fmimoskill\" ~\u002F.claude\u002Fskills\u002Fmimoskill\n```\n\nClaude reads `SKILL.md` and routes relevant requests (e.g. \"generate a pet from this image\") to the right scripts automatically.\n\n**3. As a Codex agent guide** — already wired via [AGENTS.md](.\u002FAGENTS.md). Codex reads it on each session and routes image-gen \u002F pet tasks to mimoskill scripts instead of trying to `pip install openai`.\n\n### Generating a `\u002Fhatch` replacement pet\n\n```bash\n# Generate (free — defaults to Pollinations.ai when no OpenAI key is set)\npython3 mimoskill\u002Fscripts\u002Fgenerate_pet.py --description \"chibi shiba coder\" --out pet.png\n\n# Install\nbash mimoskill\u002Fscripts\u002Finstall_pet.sh pet.png shiba\n\n# Fully quit + relaunch Codex, pick the new pet from the picker\n```\n\nFor higher quality, set `PET_OPENAI_API_KEY=sk-real-openai-key` (separate from `MIMO_API_KEY` — used only for the image gen call) and `auto` mode switches to `gpt-image-1`. Animated multi-state bundles via `--bundle DIR\u002F`. Full guide: [mimoskill\u002FSKILL.md](.\u002Fmimoskill\u002FSKILL.md).\n\n## Project layout\n\n![Project structure](https:\u002F\u002Fraw.githubusercontent.com\u002F7as0nch\u002Fmimo2codex\u002Fmain\u002Ftutorial-video\u002Fassets\u002F04-agent-docs.jpg)\n\n```\nsrc\u002F\n  cli.ts, server.ts, config.ts        # entry, routing, multi-provider config\n  providers\u002F{types,mimo,deepseek,generic,genericLoader,registry}.ts   # Provider abstraction + built-ins + generic factory\n  setup\u002Fsnippets.ts                   # shared print-config \u002F admin \u002Fsetup-snippets generator\n  upstream\u002FopenaiCompatClient.ts      # chat + responses passthrough upstream clients\n  translate\u002F                          # Responses ↔ Chat Completions translation\n  admin\u002Frouter.ts                     # \u002Fadmin\u002Fapi\u002F* REST + \u002Fadmin\u002F* SPA static hosting\n  db\u002F{index,logs,settings,models}.ts  # better-sqlite3 layer + migrations + seed\ntest\u002F                # 136 vitest cases\nweb\u002F                 # Vite + React 18 admin console (builds to dist\u002Fweb\u002F)\nmimoskill\u002F           # MiMo helpers + pet generation workaround\ndoc\u002F                 # extended docs (generic providers, etc.) — referenced from README\nscripts\u002Finstall.{sh,ps1}  # one-liner bootstrap\ndist\u002F                # tsc + vite output (generated)\nAGENTS.md            # Codex-agent instructions (don't import openai, use mimoskill)\nPUBLISHING.md        # maintainer release runbook\n```\n\n## Develop\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F7as0nch\u002Fmimo2codex && cd mimo2codex\nnpm install\nnpm run web:install  # frontend deps (first run only)\nnpm run dev          # backend via tsx, no build step\nnpm run web:dev      # vite dev server (5173, proxies \u002Fadmin\u002Fapi → 8788) — separate terminal\nnpm test             # 100 vitest cases\nnpm run build        # backend only → dist\u002Fcli.js\nnpm run web:build    # frontend only → dist\u002Fweb\u002F\nnpm run build:all    # both at once\n```\n\nTo register `mimo2codex` globally from your local checkout: `npm run build:all && npm link`.\n\n## Changelog\n\n### 0.2.5-beta.0 (beta channel)\n\nBehavior alignment with MiMo \u002F DeepSeek **official docs**, plus a community-reported DeepSeek tool-calling 400 fix. No breaking changes. Install: `npm i -g mimo2codex@beta`.\n\n- **Fix DeepSeek multi-turn tool-calling 400**: `\"An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. (insufficient tool messages following tool_calls message)\"`. Root cause: `reasoning` items in the input were unconditionally flushed, wedging an `assistant(reasoning_content)` message between `assistant(tool_calls)` and the matching `tool` message — violating the Chat Completions contiguity invariant DeepSeek strictly enforces. `reasoning` is now folded into the same assistant message as the pending tool_calls. Also adds a defensive backstop: if any `tool_call_id` is missing its `function_call_output` (cancelled turn, dropped output, etc.), a placeholder tool message is synthesized so the emitted body is always structurally valid.\n- **DeepSeek thinking mode restored**: the `thinking` field used to be silently stripped by the DeepSeek provider — effectively nobody could enable thinking mode. Now we inject `thinking: {type: \"enabled\"}` + `reasoning_effort: \"high\"` by default per official docs; client-supplied values are respected.\n- **DeepSeek thinking-mode parameter strip**: `temperature` \u002F `top_p` \u002F `presence_penalty` \u002F `frequency_penalty` are ignored upstream in thinking mode; we strip them client-side to match.\n- **MiMo `mimo-v2-pro` added to catalog** (note: v2-pro, no `.5`). It's listed in the official OpenAI-API `model` enum but was missing.\n- **MiMo `thinking` default by model**: `mimo-v2-flash` defaults to upstream-disabled (no longer blindly injected); `mimo-v2.5-pro` \u002F `mimo-v2.5` \u002F `mimo-v2-pro` \u002F `mimo-v2-omni` default-inject `{type: \"enabled\"}`.\n- **MiMo `mimo-v2.5-pro` \u002F `mimo-v2.5` in thinking mode: `temperature` stripped** (upstream forces it to 1.0 anyway).\n- **MiMo `tool_choice` non-`auto` values stripped** (upstream removes them).\n- **MiMo catalog gets `maxOutputTokens`**: pro \u002F v2-pro = 131072, v2.5 \u002F omni = 32768, flash = 65536. `print-config` now emits `model_max_output_tokens`.\n- DeepSeek `defaultBaseUrl` **kept at `https:\u002F\u002Fapi.deepseek.com\u002Fv1`** (the docs say `https:\u002F\u002Fapi.deepseek.com`, but with `\u002Fv1` works too and we avoid regression risk).\n\nWill promote to `0.2.5` (latest) after community testing.\n\n## License\n\nMIT — see [LICENSE](.\u002FLICENSE).\n","mimo2codex 是一个本地代理项目，旨在让最新版的 OpenAI Codex CLI 或桌面端能够接入多种主流大语言模型。该项目的核心功能是通过内置支持小米 MiMo V2.5 和 DeepSeek V4 Pro 以及提供通用 provider 机制来实现与 OpenAI Chat Completions 兼容的大模型（如 Qwen、GLM 等）或原生 Responses API 的无缝对接。它能实时地将 Codex 的 Responses API 转换为上游的 Chat Completions API，并根据请求中的 `model` 字段自动选择合适的 provider 进行路由。此外，mimo2codex 支持服务器模式，包括用户认证和 Docker 部署等高级特性，适用于需要在内部网络或私有环境中安全使用大模型的场景。",2,"2026-06-11 03:52:58","CREATED_QUERY"]