How to Integrate the DeepSeek Model with Codex (an AI Programming Assistant): A Detailed Tutorial!


Using an intermediary tool called mimo2codex, it forwards requests locally, allowing Codex to call the DeepSeek model.
Below is a summary of the main operational steps:
1⃣ Install the middleware:
Open the terminal (PowerShell), run the command npm install -g mimo2codex to install the tool globally.
2⃣ Start the forwarding service:
In the terminal, enter the command containing the DeepSeek API Key to forward the model to a local port (e.g., 8789).
Example command: $env:DEEPSEEK_API_KEY="your_key"; mimo2codex --model ds --port 8789
3⃣ Obtain configuration information:
Open a new terminal window, run the command mimo2codex --model ds --port 8789 print-cc-switch.
The terminal will output configuration information, including the contents of auth.json and config.toml.
4⃣ Configure the CC Switch tool:
Open the configuration software called CC Switch.
Click Add Provider.
Enter the API Key: copy the value of "OPENAI_API_KEY": "mimo2codex-local" from the terminal output.
Enter the API request URL: copy the base_url from the terminal output (e.g.,
Name the provider "deepseek".
5⃣ Modify and apply the configuration:
Find the generated config.toml content at the bottom of the configuration interface.
Change the name field to your desired name (e.g., "DEEPSEEK").
Click "Enable" and save to add.
6⃣ Verify usage:
Return to the Codex software interface.
In the model selection bar at the bottom, select the "DEEPSEEK" you just configured.
Send a message (e.g., "hello"), and if DeepSeek replies successfully, the integration is complete.
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments
  • Pin