[PR #26] [CLOSED] 增加OpenRouter作为DeepSeek Provider的支持 #103

Closed
opened 2026-02-27 01:56:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ErlichLiu/DeepClaude/pull/26
Author: @sunqiuming526
Created: 2/8/2025
Status: Closed

Base: mainHead: feature/deepseek-support-openrouter-provider


📝 Commits (1)

  • d0b75fc added deepseek support for openrouter as provider

📊 Changes

4 files changed (+11 additions, -4 deletions)

View changed files

📝 .env.example (+1 -0)
📝 app/clients/deepseek_client.py (+6 -3)
📝 app/deepclaude/deepclaude.py (+2 -1)
📝 app/main.py (+2 -0)

📄 Description

OpenRouter对于DeepSeek R1相关的模型的字段和官方API用到的字段有细微差别:

  1. Request Body中需要增加 "include_reasoning": true
  2. Response中推理字段的名字是"reasoning"并非"reasoning_content"

因此这个PR通过在.env中设置 DEEPSEEK_PROVIDER=openrouter 解决上述问题。

另外有一个问题想问作者: 在修改代码时看到在deepseek_client中有is_origin_reasoning的相关判断逻辑, 请问这个origin reasoning是出于什么考量, 在代码中好像没有看到相关描述. 谢谢!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ErlichLiu/DeepClaude/pull/26 **Author:** [@sunqiuming526](https://github.com/sunqiuming526) **Created:** 2/8/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/deepseek-support-openrouter-provider` --- ### 📝 Commits (1) - [`d0b75fc`](https://github.com/ErlichLiu/DeepClaude/commit/d0b75fc1b20f1f9469e8a7743d2486d36cda2344) added deepseek support for openrouter as provider ### 📊 Changes **4 files changed** (+11 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+1 -0) 📝 `app/clients/deepseek_client.py` (+6 -3) 📝 `app/deepclaude/deepclaude.py` (+2 -1) 📝 `app/main.py` (+2 -0) </details> ### 📄 Description OpenRouter对于DeepSeek R1相关的模型的字段和官方API用到的字段有细微差别: 1. Request Body中需要增加 "include_reasoning": true 2. Response中推理字段的名字是"reasoning"并非"reasoning_content" 因此这个PR通过在.env中设置 `DEEPSEEK_PROVIDER=openrouter` 解决上述问题。 另外有一个问题想问作者: 在修改代码时看到在deepseek_client中有is_origin_reasoning的相关判断逻辑, 请问这个origin reasoning是出于什么考量, 在代码中好像没有看到相关描述. 谢谢! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 01:56:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DeepClaude#103
No description provided.