MiniMaxAI/MiniMax-M2.5 is the recommended default.
Quick Links
Sign up / Log in
Create your Tensormesh account with Google or GitHub.
Get an API key
Generate an
ak-... key under Profile → API keys.Install Codex CLI
npm install -g @openai/codex — verified against Codex 0.128+.Supported models
Full matrix of Codex-ready models on Tensormesh serverless.
Get support
Email saas-support@tensormesh.ai for help.
TL;DR
Three steps — install the CLI, configure the provider, set the API key — then runcodex. Step 2 has an ordering constraint (top-level keys must precede any [section] header); see Setup below if you have an existing ~/.codex/config.toml.
Prerequisites
- Codex CLI installed via
npm install -g @openai/codex. Verified against0.128.0through0.131.0(chat + tool use end-to-end); forward-compatible with later versions barring upstream Codex breaking changes. - A Tensormesh account with an API key (
ak-...). Sign up, then visit Profile → API keys. - macOS or Linux, bash or zsh. Windows binaries ship in Codex 0.131+ but aren’t currently tested by Tensormesh.
You do not need to run
codex login. The provider’s env_key field tells Codex to read your API key from the environment variable directly; the OAuth login flow is for OpenAI-hosted models only.You do not need to run any local infrastructure. Tensormesh handles Codex compatibility server-side, so stock
codex pointed at serverless.tensormesh.ai (per the TL;DR above) is the complete setup.Supported models
For non-Codex clients (Python SDK, curl, custom apps), every model in the table works fine via
/v1/chat/completions as well. Codex CLI specifically cannot fall back to that wire (see openai/codex#7782 for OpenAI’s rationale), which is why the matrix above is Codex-CLI specific.
Switching models
The Codex TUI’s/model picker only shows OpenAI’s built-in lineup (gpt-5.5, gpt-5.4, …) — Tensormesh model slugs aren’t in it. Likewise, the “GPT-5.5 is now available” tip on launch refers to models you can’t use here. Press Esc to dismiss the picker and switch models via one of the methods below.
This is a Codex CLI limitation that affects every third-party provider; it’s not specific to Tensormesh.
Per-invocation (no config edit)
-m is a per-invocation override; your config.toml default is unchanged. Equivalent long form: codex -c 'model="..."'.
Change the default
Edit~/.codex/config.toml and update the model = line, or use sed:
-i on Linux: sed -i 's|...|' ~/.codex/config.toml.)
Optional: shell aliases for frequent switching
If you switch models often, add aliases to your~/.zshrc (zsh) or ~/.bashrc (bash):
tm-coder from any directory to start a Codex session against that model. Exit codex (/exit or Ctrl-D twice) and run a different alias to switch.
Setup
The three steps from the TL;DR, with explanation.1
Install Codex CLI
codex command to your global node_modules/bin. Verify with codex --version.2
Configure the Tensormesh provider
Codex reads provider configuration from The first three keys make Tensormesh + MiniMax + medium reasoning the default for every
~/.codex/config.toml. Add this content:codex invocation. The [model_providers.tensormesh] block defines the provider those defaults reference. You can override per-invocation with -c.- Fresh config (file missing or empty)
- Merge into existing config
Just paste the block as-is — the TL;DR’s
cat > ~/.codex/config.toml does this.3
Set your API key
~/.zshrc (zsh) or ~/.bashrc (bash) to persist across sessions. The API key prefix selects environment: ak-dev-... for dev, ak-staging-... for staging, ak-live-... for production.Don’t have a key yet? Generate one in your profile.Usage
Slash commands in TUI
Inside an interactivecodex session, type / to bring up the command picker (autocomplete). /help is not a valid command — typing it gives Unrecognized command '/help'.
A few that customers reach for most often:
For the full list of slash commands available in your installed version, type
/ and arrow through the picker.
Sandbox / approval modes
Codex defaults to a strict sandbox: read-only, no network, prompts before each shell command. Three modes are available:
For
codex exec (non-interactive), the -a never flag is implicit, so just codex exec -s workspace-write is sufficient.
The -s workspace-write and --dangerously-bypass-approvals-and-sandbox configurations are mutually exclusive in effect — workspace-write sandboxes filesystem writes and disables network. If you need network access for a tool, use the bypass flag.
Codex CLI 0.128.0 removed the older
--full-auto shortcut. Use -s workspace-write (+ -a never for interactive) instead. If you copy a snippet that uses --full-auto, Codex will error with unexpected argument '--full-auto' found.Resume gotcha — --last orders by file mtime
codex exec resume --last picks the session whose JSONL file was most recently modified, not the one most recently created. So if you just touched an older session (even by reading or resuming it once), that session — not your latest one — wins --last. To target a specific session, pass its UUID explicitly:
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl filenames.
Recommended settings
model_reasoning_effort = "medium"is the empirical sweet spot for MiniMax-M2.5. The full set Codex accepts isnone/minimal/low/medium/high/xhigh. Against MiniMax-M2.5,highdoes not consistently improve output quality, costs more latency, and occasionally produces self-contradicting reasoning chains in long generations. Usenoneorminimalonly when you specifically want to skip the model’s reasoning step. This recommendation is calibrated only for MiniMax-M2.5. For the other supported models,mediumis a reasonable starting point but not validated; experiment if you’re optimizing for a specific workload.- Stay in
-s workspace-writefor most coding work. Switch to the bypass flag only for tasks that need network access (e.g., fetching docs, hitting an API).
Known cosmetic issues
”Model metadata not found” warning in TUI
When you run interactivecodex (TUI), you’ll see this between every user message and the model’s response:
gpt-5.5, gpt-5.4, …); when it sees a slug that isn’t in the registry it falls back to default metadata and emits this warning. Tensormesh model slugs (MiniMax, Qwen3, etc.) are not in OpenAI’s registry, so the warning fires for every supported model here.
The warning does not appear in codex exec (non-interactive) runs — only in TUI. It’s a Codex CLI behavior, not a Tensormesh behavior; the same applies to every other third-party provider.
Auto-compact threshold
Codex automatically compacts conversation history when it approaches the model’s context window. The exact trigger varies per model, and the threshold is configurable via Codex’sauto_compact_token_limit setting:
If you’re using a 40K-window model, expect compaction to fire much earlier in long sessions than on a 192K MiniMax run.
What you’ll see when it fires:
- In TUI mode: a visible “compacting…” event between turns.
- In
execmode: silent — the compact-trigger turn just takes longer (around 30–60 seconds extra) and the next turn proceeds with the compressed context. No explicit message is printed.
- ✓ Preserved: the topical context of the conversation (documents you’ve fed to Codex, the high-level task you’re working on).
- ✗ Lost: specific conversational facts you told Codex (“remember the codeword BLUEFISH42”). After compaction, Codex sees a summary of earlier turns, not the verbatim history. If specific recall matters for your workflow, plan for compaction or split into fresh sessions.
/compact in the TUI. Otherwise, start a fresh session.
Troubleshooting
When a request fails, Codex retries five times before surfacing the cause:The five
Reconnecting... lines are noise. The meaningful error is the line immediately after 5/5.
Still stuck? Email saas-support@tensormesh.ai with the meaningful error line (the one after
5/5) and the output of codex --version.
Rollback / uninstall
To remove Tensormesh from your Codex setup:- Delete the
[model_providers.tensormesh]block (and the three top-levelmodel_provider/model/model_reasoning_effortlines if you added them) from~/.codex/config.toml. - Unset
TENSORMESH_INFERENCE_API_KEYand remove from~/.zshrc/~/.bashrc.

