Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#321 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ThomasK33 ci sta già lavorando.

Dal 12/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
TypeScript
Stelle
3
Fork
0
Merge medio
50m
PR unite (30g)
136

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/ai-sdk

Tutte le issue di coder/ai-sdk

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.