deepseek2responses
Convert DeepSeek API to OpenAI Responses API. Run locally, plug into any tool that speaks Responses API (Codex, etc.).
Quick start
uv tool install deepseek2responses
deepseek2responses
Or from source:
git clone https://github.com/Lhy723/deepseek2responses && cd deepseek2responses
uv tool install .
deepseek2responses
First run prompts for your DeepSeek API key and saves to ~/.deepseek2responses/config.yaml. Subsequent runs just deepseek2responses.
Or run directly without installing:
export DEEPSEEK_API_KEY=sk-your-deepseek-key
uv run deepseek2responses
Output:
Proxy API key: dH7kXp2m...
Bind: http://0.0.0.0:19199
Endpoint: http://127.0.0.1:19199/v1/responses
Configure Codex
Manually edit the two files below, or use cc-switch to manage providers via GUI.
~/.codex/auth.json:
{"OPENAI_API_KEY": "deepseek"}
~/.codex/config.toml:
model = "deepseek-v4-pro"
model_provider = "deepseek"
model_context_window = 1000000
model_max_output_tokens = 393216
model_reasoning_effort = "high"
disable_response_storage = true
[model_providers.deepseek]
name = "DeepSeek"
base_url = "http://127.0.0.1:19199/v1"
wire_api = "responses"
requires_openai_auth = true
request_max_retries = 1
Start proxy:
uv run deepseek2responses --no-auth
Then completely quit Codex (menu bar → Quit) and reopen.
FAQ
Codex 桌面端连不上代理(502 Bad Gateway)
macOS 上 Codex 桌面端存在本地网络权限问题。解决步骤:
- 开启 VPN
- 启动 Codex 桌面端
- 关闭 VPN
- 正常使用 Codex
每次重启 Codex 前都需要重复此流程。
Config file
Config stored at ~/.deepseek2responses/config.yaml. First run creates it automatically. Edit manually for advanced settings:
deepseek_api_key: "sk-your-key"
host: "127.0.0.1"
# port: 19199
# api_key: "fixed-proxy-key"
# model_mapping:
# "gpt-4.1": "deepseek-v4-pro"
Use --config for a custom path.
CLI options
--config, -c Path to config file
--port, -p Override server port
--no-auth Disable proxy API key auth
--version, -v Show version
How it works
Receives OpenAI Responses API requests, converts to DeepSeek Chat Completions API (/v1/chat/completions), and converts responses back. Supports multi-turn conversation, tool calling, and thinking/reasoning mode.
Metadata
Release files for deepseek2responses 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deepseek2responses-0.1.0.tar.gz | 33.7 kB | Without provenance | Details for deepseek2responses-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepseek2responses-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for deepseek2responses-0.1.0-py3-none-any.whl |
Total release size: 48.9 kB
Release files / deepseek2responses-0.1.0.tar.gz
| Download URL | deepseek2responses-0.1.0.tar.gz |
|---|---|
| Size | 33.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad5799bb41d1df8058a545615f8e99982e3f33078eeb66279e89a798b90ce004
|
|
BLAKE2b-256 checksum How to use checksums |
95918b7c26ac402bf69863eb33ab4bdfd494e5d14e4a5b991d3df661f2330c91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / deepseek2responses-0.1.0-py3-none-any.whl
| Download URL | deepseek2responses-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e319289d2ba5778ed0a93f658444869cc534f19444a22cf25bc861c1f326eb6
|
|
BLAKE2b-256 checksum How to use checksums |
a6a69f1c485f1b885ac4387840046fc9208093c60b46a73d86c0d0a3b7e832ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for deepseek2responses 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.