Status: [LIVE] Endpoints found: https://api.z.ai/api/coding/paas/v4/chat https://api.z.ai/api/coding/paas/v4/chat/completions Source: https://github.com/alexeygrigorev/zai-codex-proxy # zai-codex-proxy [![CI](https://github.com/alexeygrigorev/zai-codex-proxy/workflows/CI/badge.svg)](https://github.com/alexeygrigorev/zai-codex-proxy/actions) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) An OpenAI Responses API-compatible proxy for running Codex/zodex against Z.AI. This project is based on [`JakkuSakura/codex-proxy`](https://github.com/JakkuSakura/codex-proxy), which served as the basis for this code. This project is used by the `.agents` dotfiles project at https://github.com/alexeygrigorev/.agents. In that setup, `zodex` downloads a released `zai-codex-proxy` binary and uses it to route an isolated Codex profile through Z.AI. The proxy accepts Codex's Responses-shaped requests, normalizes them into a shared typed internal form, resolves logical-model to Z.AI account/model routing, and translates requests to the Z.AI chat completions API. ## Features - OpenAI Responses-compatible `/responses` and `/v1/responses` endpoints for Codex/zodex - Z.AI upstream - Codex multi-agent namespace-tool flattening for Z.AI Chat Completions - Z.AI web search tool passthrough - Codex `agent_message` / encrypted-content normalization for subagent tasks - Multi-account Z.AI routing - Ordered preferred route targets per logical model - Sticky routing for KV-cache reuse on the exact resolved model/account path - Account health tracking with exponential backoff and recovery probes - Route-scoped reasoning defaults mapped to Z.AI `thinking.type` - Optional 429 retry support - Z.AI summary auto-compaction after context-length errors ## Quick start For `.agents`, no Rust toolchain is required. Configure `zodex` there and it will download the latest release binary from: https://github.com/alexeygrigorev/zai-codex-proxy/releases/latest Manual Linux binary install: ```bash mkdir -p ~/.zodex/bin curl -fL \ https://github.com/alexeygrigorev/zai-codex-proxy/releases/latest/download/zai-codex-proxy-linux-am