Can´t use DeepSeek API
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
### Describe the bug
When I run the following command:
```bash
export COPILOT_PROVIDER_BASE_URL="https://api.deepseek.com" \
export COPILOT_PROVIDER_API_KEY="...." \
export COPILOT_PROVIDER_TYPE="openai" \
export COPILOT_MODEL="deepseek-v4-pro" \
copilot
```
When I make a question to the copilot, I get this answer back:
```
● Request failed (transient_bad_request). Retrying...
● Request failed (transient_bad_request). Retrying...
✗ 400 The `reasoning_content` in the thinking mode must be passed back to the API.
```
I confirm that the DeepSeek API needs the entire reasoning_content field to be returned back to the API every time. In my own code I had the same problem and could rapidly fix the issue by sending back the the entire conversation.
### Affected version
_No response_
### Steps to reproduce the behavior
I run the following command:
```bash
export COPILOT_PROVIDER_BASE_URL="https://api.deepseek.com" \
export COPILOT_PROVIDER_API_KEY="...." \
export COPILOT_PROVIDER_TYPE="openai" \
export COPILOT_MODEL="deepseek-v4-pro" \
copilot
```
Ensure to have a valid api key for the DeepSeek endpoint
### Expected behavior
I expect the request to be fulfilled.
### Additional context
_No response_
コントリビューションガイド
調査の方向性
まず、ドキュメントに記載された DeepSeek の環境変数を使い、`copilot` エントリーポイント経由で問題を再現して、リクエストの会話がどのように組み立てられているかを調べます。完全な `reasoning_content` が DeepSeek API に渡し返され、400 エラーなしでリクエストが成功すれば、修正は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- api
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100