github / github/copilot-cli

Can´t use DeepSeek API

Ouverte
#2,995 8 commentaires 9 réactions 0 personnes assignées Voir sur GitHub
area:configuration area:models
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

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.