anomalyco / anomalyco/opencode

工具调用参数始终报 `SchemaError: Missing key`(bash/write/webfetch)

Open
#48,258 0 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Sep 10, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

标题: 工具调用参数始终报 SchemaError: Missing key(bash/write/webfetch)

环境:

OS: Windows / PowerShell 5.1
模型: cfb196c954ab449caeab5a5a827af57d(网关转发模型)
现象: 对话早期 {"command": "echo test"} 成功过一次,之后所有工具调用全部失败,无论:

{"command": "xxx"} → SchemaError: Missing key at ["command"]
{filePath, content} → SchemaError: Missing key at ["content"]
{"url": "..."} → SchemaError: Missing key at ["url"]
根因推测: 模型经网关/代理转发后,tool-call 的参数 JSON 被二次包装(双重编码或 key 被吞),schema 校验时拿到的是空对象或错位结构。

相关已有 issue: #24604、#29142、#29518、#29076、#35105、#29940

建议排查:

网关转发层是否改变了 tool-call 参数结构(如 {"arguments": {...}} 包裹或 snake_case 转换)
校验前日志是否打印了实际收到的 payload

Plugins

No response

OpenCode version

OpenCode Desktop v1.18.30

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

windows 10

Terminal

windows terminal

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.