github / github/app

CAPIError 400 invalid message content type <nil>

未关闭
#2,140 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
Bugs
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

### Short summary

When using a local model (seems to be any model loaded with Ollama), after one response from the model, any subsequent requests will instantly error with the following error: CAPIError 400 invalid message content type

### Affected version or release

v1.0.25

### Installation context

Installed on Windows 11 desktop, private repo (can provide if needed)

### What happened?

Trying to use a local model served by Ollama, getting the following error after one response from the model:

`CAPIError 400 invalid message content type `

Seems to happen with any model loaded in Ollama that supports tool calling - attempted with `gpt-oss:20b` and `empero-ai/Qwable-9B-Claude-Fable-5-GGUF` (from huggingface) models.

I haven't found any relevant errors in any Github issues, nor any relevant search results. There isn't any workaround except for starting a new session, where I can only make one request before getting the error again.

### Steps to reproduce

1. Add local Ollama provider with any model that supports tool calling
2. In Copilot app, make any request in a new session
3. After first response from the model, make another request
4. See error

### Expected behavior

Subsequent requests should be attempted and respond as normal without errors

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

使用支持 tool-calling 的 Ollama 模型在 Copilot 应用中重现该问题,然后追踪第一次响应之后第二个请求是如何组装的。重点检查变为 nil 的消息内容,并验证在不重启会话的情况下,重复请求能够正常完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
ollama
领域
ai, desktop
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。