跳到正文
DEV Community · LLM· Davidrs·· 7 天前AI 评分67

OpenCode 接入 Ollama 为何不工作?4,096 token 上下文导致输入截断

OpenCode + Ollama does nothing? It's the 4,096-token context

AI 导读

OpenCode 接入 Ollama 后出现工具调用异常,实测发现 Ollama 默认的 4,096 token 上下文窗口静默截断了请求。在 Windows 11 的 16 GB RTX 5060 Ti 上,OpenCode 1.19.5 发出的一次 22,207 token 请求被 Ollama 0.40.14 截至 2,051 token。

来源:DEV Community · LLM · dev.to