github / github/copilot-cli

Can´t use DeepSeek API

Aberta
#2,995 8 comentários 9 reações 0 responsáveis Ver no GitHub
area:configuration area:models
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

### 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_

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece reproduzindo o problema pelo ponto de entrada `copilot` com as variáveis de ambiente documentadas do DeepSeek e inspecione como a conversa da solicitação é montada. A correção estará concluída quando o `reasoning_content` completo for repassado à DeepSeek API e a solicitação for concluída com sucesso sem o erro 400.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
shell
Domínio
api
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
52/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.