Can´t use DeepSeek API
- Lenguaje dominante
- Shell
- Estrellas
- 11.2k
- Forks
- 1.9k
- Merge medio
- 14 h 16 min
- PR fusionados (30 d)
- 6
Descripción
### 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_
Guía de contribución
Línea de trabajo
Empieza reproduciendo el problema a través del punto de entrada `copilot` con las variables de entorno de DeepSeek documentadas e inspecciona cómo se ensambla la conversación de la solicitud. La corrección estará terminada cuando se devuelva el `reasoning_content` completo a la API de DeepSeek y la solicitud se complete correctamente sin el error 400.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- api
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 52/100