{"id":51415741,"url":"https://github.com/jetxu-llm/codex-deepseek-bridge","last_synced_at":"2026-07-04T19:00:59.623Z","repository":{"id":366325795,"uuid":"1275443832","full_name":"JetXu-LLM/codex-deepseek-bridge","owner":"JetXu-LLM","description":"Use DeepSeek models inside OpenAI Codex through a tiny local Responses-compatible bridge.","archived":false,"fork":false,"pushed_at":"2026-06-21T10:12:35.000Z","size":107,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-21T10:21:02.627Z","etag":null,"topics":["codex","coding-agent","deepseek","kv-cache","llm-proxy","openai-codex","responses-api","usage-report"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JetXu-LLM.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-20T17:38:53.000Z","updated_at":"2026-06-21T10:12:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/JetXu-LLM/codex-deepseek-bridge","commit_stats":null,"previous_names":["jetxu-llm/codex-deepseek-bridge"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/JetXu-LLM/codex-deepseek-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetXu-LLM%2Fcodex-deepseek-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetXu-LLM%2Fcodex-deepseek-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetXu-LLM%2Fcodex-deepseek-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetXu-LLM%2Fcodex-deepseek-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JetXu-LLM","download_url":"https://codeload.github.com/JetXu-LLM/codex-deepseek-bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetXu-LLM%2Fcodex-deepseek-bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35132289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codex","coding-agent","deepseek","kv-cache","llm-proxy","openai-codex","responses-api","usage-report"],"created_at":"2026-07-04T19:00:57.670Z","updated_at":"2026-07-04T19:00:59.606Z","avatar_url":"https://github.com/JetXu-LLM.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [简体中文](./README.zh-CN.md)\n\n\u003cdiv align=\"center\"\u003e\n\n  \u003ch1\u003eCodex DeepSeek Bridge\u003c/h1\u003e\n\n  \u003cp\u003e\u003cstrong\u003eRun the OpenAI Codex app on DeepSeek.\u003c/strong\u003e\u003c/p\u003e\n  \u003cp\u003eOne command sets it up. No ChatGPT subscription needed.\u003cbr\u003eYour Codex, your DeepSeek key, your machine.\u003c/p\u003e\n\n  \u003cbr\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"#quick-start\"\u003e\n      \u003cimg alt=\"Quick Start\" src=\"https://img.shields.io/badge/🚀_Quick_Start-0DAFC6?style=for-the-badge\"\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003cimg alt=\"Platform: macOS and Windows\" src=\"https://img.shields.io/badge/platform-macOS_%7C_Windows-7959A2?style=flat-square\u0026logo=apple\u0026logoColor=white\"\u003e\n    \u003cimg alt=\"Runtime dependencies: zero\" src=\"https://img.shields.io/badge/runtime_deps-0-0A8447?style=flat-square\"\u003e\n    \u003cimg alt=\"License: Apache 2.0\" src=\"https://img.shields.io/badge/license-Apache_2.0-0F64B5?style=flat-square\"\u003e\n    \u003cimg alt=\"Uninstall: one command\" src=\"https://img.shields.io/badge/uninstall-one_command-3a3f47?style=flat-square\"\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\u003csub\u003e\n    Keep the Codex app you already use — approvals, plugins, MCP servers, your whole workflow stay put — but send every model call to DeepSeek.\u003cbr\u003e\n    No fork, no proxy account, no telemetry. When you want out, a single \u003ccode\u003erestore\u003c/code\u003e puts everything back.\n  \u003c/sub\u003e\u003c/p\u003e\n\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n![Codex composer running deepseek-pro with max thinking enabled](docs/assets/codex-composer-deepseek-pro.png)\n\n`setup` writes one reversible block into Codex's own `config.toml`, points it at a bridge on\n`127.0.0.1`, and the bridge talks to DeepSeek on the other side. No forked app, no account juggling.\n\n## Requirements\n\n- A DeepSeek API key from [platform.deepseek.com](https://platform.deepseek.com).\n- The Codex app on macOS or Windows.\n\n## Quick Start\n\n\u003e **Copy the commands below, run them, then restart Codex.** That is the whole install — no build step, and Node is not required.\n\n### macOS Apple Silicon\n\n```bash\ncurl -L -o codex-deepseek-bridge-macos https://github.com/JetXu-LLM/codex-deepseek-bridge/releases/latest/download/codex-deepseek-bridge-macos\nxattr -d com.apple.quarantine ./codex-deepseek-bridge-macos 2\u003e/dev/null || true\nchmod +x ./codex-deepseek-bridge-macos\n./codex-deepseek-bridge-macos setup\n```\n\n### macOS Intel\n\n```bash\ncurl -L -o codex-deepseek-bridge-macos-x64 https://github.com/JetXu-LLM/codex-deepseek-bridge/releases/latest/download/codex-deepseek-bridge-macos-x64\nxattr -d com.apple.quarantine ./codex-deepseek-bridge-macos-x64 2\u003e/dev/null || true\nchmod +x ./codex-deepseek-bridge-macos-x64\n./codex-deepseek-bridge-macos-x64 setup\n```\n\n### Windows PowerShell\n\n```powershell\n$ErrorActionPreference = \"Stop\"\n$url = \"https://github.com/JetXu-LLM/codex-deepseek-bridge/releases/latest/download/codex-deepseek-bridge-win-x64.exe\"\n$out = \".\\codex-deepseek-bridge-win-x64.exe\"\nRemove-Item $out -ErrorAction SilentlyContinue\ncurl.exe -L --fail --progress-bar -o $out $url\nif ($LASTEXITCODE -ne 0) { throw \"Download failed.\" }\nif ((Get-Item $out).Length -lt 10MB) { throw \"Download looks incomplete. Run the commands again.\" }\n\u0026 $out setup\n```\n\n`setup` asks for your DeepSeek API key in the terminal. It is not echoed, printed, logged, or taken\nas a command-line argument. When setup finishes it prints a short summary — what was configured,\nwhich models are published, and any action you still need to take — then you restart Codex.\nIf Codex Desktop is not installed yet, `setup` can install the official app first and continue.\nIf a newer bridge release is available, `setup` asks before upgrading and keeps your stored key, logs, and report data.\n\nSetup saves the Codex config, but Codex can use DeepSeek only while the local bridge process is\nrunning. If you restart your computer or Codex can no longer reach DeepSeek, run `start` with the\nsame command style you used for setup, for example `codex-deepseek-bridge start`,\n`./codex-deepseek-bridge-macos start`, or `.\\codex-deepseek-bridge-win-x64.exe start`.\nYou usually do not need `setup` again unless you want to reconfigure the bridge or change your\nDeepSeek key.\n\nBy default this keeps Codex on `deepseek-pro`. The composer shows `Custom` next to your reasoning\neffort (the screenshot up top is `deepseek-pro` running at max thinking) because current Codex Desktop\nbuilds do not render custom model names yet. Want both models with their real labels? See\n[Show both models in the picker](#show-both-models-in-the-picker-opt-in) below.\n\nReasoning effort maps straight through to DeepSeek: **Extra High** (and `max`) run `deepseek-pro` at\nmaximum thinking, **High** is the middle setting, and **None** turns thinking off.\n\nSetup is safe to run again. If you start with `setup` and later want the full picker, run\n`setup --desktop-patch`; the bridge rewrites the same managed block instead of duplicating config.\n\n## Why this exists\n\n- 🧩 **Your Codex stays your Codex.** Approvals, plugins, skills, and MCP servers keep working; common plugin tool-name slips are repaired before Codex sees them.\n- 🔒 **Your key stays local.** Read from stdin, stored with owner-only permissions, never printed, logged, or passed as an argument. No telemetry.\n- 📊 **You see every call.** A local, read-only [report](#the-local-report) shows tokens, latency, DeepSeek cache hits, and raw request/response JSON.\n- 🎯 **Cache visibility, not silent edits.** It flags when your prompt prefix drifts and stops hitting DeepSeek's cache. It reports the problem; it never rewrites your prompts.\n- 🖼️ **Ready for multimodal.** A vision seam is already wired in; when DeepSeek ships image input it is a config flag, not a rewrite.\n- ↩️ **One command out.** `restore` removes the managed block and stops the bridge; `restore --purge` clears everything, key included.\n\n\u003e **Plugins work today.** Browser, Chrome, Computer Use, MCP, and document-style plugins can stay in\n\u003e Codex while DeepSeek handles the model calls. If that unlocks a cheaper Codex workflow for you,\n\u003e please **Star** the repo so more users can find it.\n\n## Show both models in the picker (opt-in)\n\nConfig-only setup publishes `deepseek-pro`. To get **both** `deepseek-pro` and `deepseek-flash` with\ntheir real labels in the picker, opt in to the Desktop patch:\n\n```bash\n./codex-deepseek-bridge-macos setup --desktop-patch\n```\n\n\u003e **User choice.** `--desktop-patch` modifies the official Codex app installed on your machine,\n\u003e including its code bundle and signature; run it only if you choose to make that local change yourself.\n\n![Codex Desktop picker showing DeepSeek Pro and DeepSeek Flash with reasoning efforts](docs/assets/codex-desktop-deepseek-picker-patched.jpg)\n\n**Why it is needed.** Current Codex Desktop builds load `model_catalog_json` on the app-server side,\nbut the renderer filters custom models out of the visible picker\n([openai/codex#19694](https://github.com/openai/codex/issues/19694),\n[openai/codex#29156](https://github.com/openai/codex/issues/29156)). The patch edits your local Codex\napp files so the picker honors the local catalog. It does not download or distribute a modified Codex.\n\n- **macOS:** patches `Codex.app/Contents/Resources/app.asar`, updates ASAR integrity, and re-signs the local bundle.\n- **Windows (writable install):** patches `resources/app.asar` after backing it up.\n- **Windows (Store install):** builds a writable managed copy under the bridge state directory and prints a launcher to open it. *(Treat Windows `--desktop-patch` as experimental.)*\n\n**What is worth knowing up front:**\n\n- **macOS App Management.** macOS guards changes to apps in `/Applications`. The first run may need\n  System Settings \u0026rarr; Privacy \u0026amp; Security \u0026rarr; **App Management** turned on for your terminal.\n  `sudo` does not satisfy this — if the patch reports \"not writable,\" that is usually what it means.\n- **Keychain prompts.** Re-signing the bundle locally changes its signature, so macOS may ask to\n  allow Keychain access when Codex launches. Click **Always Allow**. Reinstalling or updating Codex\n  restores Apple's original signature. Plain `setup` does not re-sign Codex.app.\n- **Reversible.** `restore` undoes the patch and stops the bridge.\n\n```bash\ncodex-deepseek-bridge restore\n```\n\nIf you ran a downloaded binary that is not on your `PATH`, call it the same way, for example\n`./codex-deepseek-bridge-macos restore`. Normal `restore` keeps your key, logs, and backups so you can\nre-run setup without pasting the key again. For a full local cleanup, use `restore --purge`.\n\n## The local report\n\nEvery call runs through the bridge, so you can see exactly what Codex is doing on DeepSeek.\n\n![The local DeepSeek report dashboard: totals, cache hit rate, prefix risk, latency, and recent calls](docs/assets/report.png)\n\nRun `codex-deepseek-bridge report` to open it at `http://localhost:8787/report`. It is read-only,\noffline, and bound to `127.0.0.1`:\n\n- Tokens, latency, and per-model totals for every call.\n- DeepSeek **cache hit rate** plus a **prefix-risk** read on how stable your cached prompt prefix is.\n- A per-call detail view with a raw JSON link for prompt/request/response payloads. Disable payload\n  logs with `DSCB_LOG_PAYLOADS=0` or `--no-log-payloads` if you need metadata-only logging.\n  These logs are the ground truth for future DeepSeek cache-matching work.\n\n## How it works\n\nCodex officially supports user-level provider configuration, `model_provider`, `model_providers`,\n`openai_base_url`, and `model_catalog_json` in `~/.codex/config.toml`. See the OpenAI Codex docs:\n[configuration reference](https://developers.openai.com/codex/config-reference#configtoml),\n[custom model providers](https://developers.openai.com/codex/config-advanced#custom-model-providers),\nand [OSS mode local providers](https://developers.openai.com/codex/config-advanced#oss-mode-local-providers).\n\n```mermaid\nsequenceDiagram\n  participant Setup as setup\n  participant Config as ~/.codex/config.toml + models.json\n  participant Server as Codex app-server\n  participant UI as Codex Desktop UI\n  participant Gate as Desktop visible-model/history gate\n  participant Bridge as localhost bridge\n  participant DS as DeepSeek API\n\n  Setup-\u003e\u003eConfig: write one reversible managed block\n  Config-\u003e\u003eServer: model=deepseek-pro, model_catalog_json\n  Server--\u003e\u003eUI: returns DeepSeek catalog\n  UI-\u003e\u003eGate: applies Desktop visible-model filter\n  Gate--\u003e\u003eUI: custom models/history may be hidden without patch\n  UI-\u003e\u003eBridge: /v1/responses\n  Bridge-\u003e\u003eDS: /chat/completions\n```\n\n`setup --desktop-patch` changes only local Desktop renderer files. Model calls still go through the\nlocal bridge and then to DeepSeek.\n\n## Login and history\n\n`setup` does not replace your Codex login.\n\n- ChatGPT login stays ChatGPT.\n- API-key login stays API-key.\n- Existing non-reserved provider history is reused when possible.\n- The reserved `openai` provider is not redefined; current setup uses the independent\n  `deepseek_bridge` provider for that case.\n\nChatGPT cloud history still requires a ChatGPT sign-in. Local history can be scoped by Codex\nprovider id, so `restore` is the reliable way to return to the exact previous setup.\n\n| Before setup | While DeepSeek is active | After `restore` |\n| --- | --- | --- |\n| ChatGPT/OpenAI provider | ChatGPT cloud history needs the ChatGPT sign-in; local OpenAI-provider chats may be hidden while DeepSeek uses its own provider id | Previous ChatGPT/OpenAI setup returns |\n| Existing custom/API-key provider such as `codex` | Setup may reuse that provider id so those local chats stay visible, now routed through DeepSeek | Previous provider config returns |\n| No reusable provider history | DeepSeek uses its own `deepseek_bridge` provider; other provider histories are unchanged but may be hidden | Previous config returns |\n\n## Daily use\n\n```bash\ncodex-deepseek-bridge doctor        # is the bridge healthy and configured?\ncodex-deepseek-bridge doctor --live # make one real DeepSeek call, end to end\ncodex-deepseek-bridge report        # open the local report\ncodex-deepseek-bridge start         # start the local bridge again if needed\ncodex-deepseek-bridge restore       # put Codex back the way it was\n```\n\nOn macOS, `doctor` also flags the signature and Keychain situation when the Desktop patch left Codex\nlocally signed, so you know when `restore` can use bridge backups or when reinstalling/updating\nCodex is needed to quiet the launch prompts.\n\n## Privacy and responsibility\n\n- The bridge sends model requests to DeepSeek.\n- It stores your DeepSeek key locally with owner-only permissions.\n- It can optionally check GitHub releases for updates and asks before installing one.\n- It does not upload telemetry.\n- It does not distribute a modified Codex app.\n\nThe optional Desktop patch modifies local Codex Desktop app files on your machine. Review your own\nlegal, workplace, and contract obligations before using it. This project is provided under\nApache-2.0 without warranty and is not affiliated with OpenAI or DeepSeek.\n\n## Install with npm\n\nPrefer a global command and already have Node? Installing with npm puts `codex-deepseek-bridge` on\nyour `PATH`, so you can drop the `./codex-deepseek-bridge-macos` prefix and just run\n`codex-deepseek-bridge`:\n\n```bash\nnpm install -g github:JetXu-LLM/codex-deepseek-bridge\ncodex-deepseek-bridge setup\n```\n\n## Docs\n\n- [FAQ](docs/faq.md)\n- [Architecture](docs/architecture.md)\n- [Configuration and platforms](docs/platforms-and-upgrades.md)\n- [Cache and the report](docs/cache-and-observability.md)\n- [Privacy and network](docs/privacy-and-network.md)\n- [Troubleshooting](docs/troubleshooting.md)\n- [Security](SECURITY.md)\n\n## License\n\nApache License 2.0. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetxu-llm%2Fcodex-deepseek-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetxu-llm%2Fcodex-deepseek-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetxu-llm%2Fcodex-deepseek-bridge/lists"}