Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Coder Agents client tools: $ref in tool input schemas is not resolved

未关闭
#321 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@ThomasK33 已经在做这个了。

开始于 2026年10月12日。

评估

这个 Issue 还没有评估数据。

描述

Client tools registered through Coder Agents (chatd) lose any $ref in their input schema. The model then guesses the referenced shape.

Evidence (live, dogfood.cdr.dev v2.38.0-devel, 2026-10-12)

I registered one client tool, create_reminder, through @coder/ai-sdk-agent's CoderLanguageModel, with delay behind a reference. I tried two forms:

Schema form chatd response Model's delay argument
draft-07: { "$ref": "#/definitions/Delay" } + definitions accepted "10m"
2020-12: { "$ref": "#/$defs/Delay" } + $defs accepted "10m"
inline { "type": "object", "properties": { "minutes": { "type": "integer" } } } accepted { "minutes": 10 }

The dialect makes no difference, so the reference most likely never reaches the model resolved. I did not verify where it is dropped (chatd's schema handling or the upstream provider call).

Impact

@coder/ai-sdk-effect derives tool schemas from Effect Schema. Any schema with an identifier annotation is emitted as a $ref (on Effect 3 and Effect 4), so such tools do not work as Coder Agents client tools. The AI Gateway path (CoderLanguageModel) is not affected by this observation (not tested live).

Options

  • A. Find and fix where chatd drops or fails to resolve $ref (coder/coder).
  • B. Inline (dereference) local references in the agent package before registering client tools.
  • C. Document the limitation and inline only in @coder/ai-sdk-effect.

Found during the Effect 4 migration (#144, #320). The live test there uses an inline schema.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

主要语言
TypeScript
星标
3
派生
0
平均合并
50 分钟
30 天内合并 PR
136

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

coder/ai-sdk 的其他 Issue

查看 coder/ai-sdk 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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