Can´t use DeepSeek API
- Langage dominant
- Shell
- Étoiles
- 11.2k
- Forks
- 1.9k
- Merge moyen
- 14 h 16 min
- PR mergées (30 j)
- 6
Description
### 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_
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start by reproducing the issue through the `copilot` entry point with the documented DeepSeek environment variables and inspect how the request conversation is assembled. The fix is done when the complete `reasoning_content` is passed back to the DeepSeek API and the request succeeds without the 400 error.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- shell
- Domaine
- api
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 52/100