togetherlink
Open model guide · 10 min

Run Open Models in Codex CLI Without Replacing Your Config

Switch the model behind Codex for one run at a time. TogetherLink handles the Responses protocol bridge while keeping provider and model settings scoped to that run.

By TogetherLink

Default shortcut: Kimi K3
$tcodex
TLtogetherlinkCONFIG-SAFE CODEX ROUTINGRun open models in Codexwithout replacing config$tcodex6 open models · Responses APICodex CLIPOWERED BY
One-time setup

Install and add your key

macOS or Linux · Codex CLI installed
1. Install
$curl -fsSL https://togetherlink.vercel.app/install.sh | bash
2. Save Together API key
$togetherlink configure
3. Launch Codex on the default model
$tcodex

Install Codex first with the official Codex CLI setup. If togetherlink configure asks for an Exa key, press Enter to skip unless you want proxy-backed web search.

In automation, you can skip local storage and set TOGETHER_API_KEY through your secret manager instead.

How it works

How TogetherLink connects Codex

Codex expects an OpenAI Responses-style endpoint. TogetherLink starts a local proxy that accepts that protocol, preserves the tool loop it relies on, and sends each model request to Together AI.

That provider exists only inside the Codex process TogetherLink launches. A later plain codex command follows your normal Codex provider configuration.

01

Codex CLI

Creates a Responses request and runs tools.

02

Local proxy

Adapts the protocol on localhost.

03

Together API

Runs the selected serverless model.

04

Back to Codex

Streams model events into the normal UI.

Headless and CI

Run Codex headlessly or in CI

The same temporary provider works for one-shot repository checks. The final session line reports the Together AI token cost, which is useful in automation logs.

export TOGETHER_API_KEY=••••••••
togetherlink --model Qwen/Qwen3.7-Max \
codex exec "Review the current diff"

When this setup is useful

Compare models

Run the same Codex workflow against two Together models without maintaining separate Codex configs.

Long repositories

Choose a larger-context model for tasks that require Codex to work with more files or longer histories.

Keep Codex

Retain Codex tools, approvals, and exec workflow while changing only the model provider for that run.

Three details that prevent most mistakes

  1. Use a Together key.An OpenAI key or ChatGPT subscription cannot authorize Together model calls.
  2. Put the model first.Write --model … codex, not codex --model ….
  3. Read the banner.It should say: TogetherLink is routing Codex to Together AI, followed by the selected model.
Optional model choice

Choose another model after the first run

Start with tcodex. When the task needs a different model, use its exact Together ID before codex.

01
Kimi K3
moonshotai/Kimi-K3

Default · vision · reasoning · 1M context

02
GLM 5.2
zai-org/GLM-5.2

text · reasoning · 512K context

03
DeepSeek V4 Pro 0813
deepseek-ai/DeepSeek-V4-Pro-0813

text · reasoning · 1M context

04
Qwen 3.7 Max
Qwen/Qwen3.7-Max

vision · reasoning · 1M context

05
DeepSeek V4 Flash 0731
deepseek-ai/DeepSeek-V4-Flash-0731

text · reasoning · 1M context

Example: switch to DeepSeek V4 Pro
$togetherlink --model deepseek-ai/DeepSeek-V4-Pro-0813 codex

These are provider model limits. Codex may compact earlier to account for tokenizer differences.

Common questions

FAQ

Can I connect Codex CLI to Together AI?+

Yes. TogetherLink launches Codex with a temporary provider that points to a local Responses-compatible proxy. The proxy translates Codex requests into Together AI model calls.

Which Together AI model does Codex use by default?+

TogetherLink currently defaults to moonshotai/Kimi-K3 for Codex. You can select another curated model with --model before the codex command.

Where does the --model flag go?+

Put TogetherLink's --model flag before codex: togetherlink --model deepseek-ai/DeepSeek-V4-Pro-0813 codex. Other Codex arguments go after codex.

Will this overwrite ~/.codex/config.toml?+

TogetherLink does not rewrite an existing non-empty Codex config. If ~/.codex/config.toml is missing or empty, TogetherLink seeds on-request approvals, workspace-write sandboxing, and automatic approval review. Provider and model settings remain temporary.

Does my OpenAI API key get sent to Together AI?+

No. Together AI requests use the Together API key you configure. Your regular Codex login remains available for runs you launch without TogetherLink.

Can I use Together AI with codex exec in CI?+

Yes. Codex exec uses the same temporary provider. Provide TOGETHER_API_KEY through your CI secret store and launch togetherlink with the model flag before codex exec.

Related guides