agentgate
agentgate guides/use-codex-with-deepseek

Codex + DeepSeek

Use Codex with DeepSeek through AgentGate.

AgentGate gives Codex a local gateway endpoint, then routes requests to DeepSeek or any other provider you enable.

direct answer

Short answer: AgentGate gives Codex a local gateway endpoint, then routes requests to DeepSeek or any other provider you enable.

Best fit

  • You want AI apps to keep one stable local endpoint.
  • You need provider switching, request logs, cost visibility, or failover.
  • You want client config changes to be reversible.

Not ideal

  • You use one client, one provider, and the setup rarely changes.
  • You do not need logs, failover, cost tracking, or config rollback.

Why this setup helps

Codex expects an OpenAI-style model entry. DeepSeek is cheaper for many coding and reasoning tasks, but switching clients by hand is fragile. AgentGate sits locally between the app and the provider, so you can route Codex traffic without giving up local visibility.

Basic setup

Install AgentGate, add DeepSeek as a provider, start the local gateway, then apply the Codex client config from the AgentGate client page. Open Codex normally and verify the request in AgentGate logs.

What to check

Confirm the local gateway is running, the DeepSeek key is valid, the selected route profile points to DeepSeek, and the Codex request appears in the local request log.

agentgate --faq

FAQ.

Can Codex use DeepSeek directly?

It depends on the client and protocol. AgentGate is the local bridge that keeps Codex pointed at a stable local endpoint.

Can I switch back?

Yes. AgentGate keeps client config history and supports one-click restore to the original config.