@effect/ai-anthropic: text_editor_20250728 insert decodes `new_str`, but the API sends `insert_text`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- ai
調査の方向性
packages/ai/anthropic/src/AnthropicTool.ts の TextEditorInsertCommand 付近を読み、同じファイル内の古い挿入スキーマと比較してください。提供された Schema.decodeUnknownExit の再現例を使って不一致を確認してください。API 形式の挿入呼び出しが正常にデコードされ、ツールハンドラーが受け取れる状態になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happens
TextEditorInsertCommand in packages/ai/anthropic/src/AnthropicTool.ts (line 1881 on main), which TextEditor_20250728's parameters use, declares the inserted text as new_str:
export const TextEditorInsertCommand = Schema.Struct({
command: Schema.Literal("insert"),
path: Schema.String,
insert_line: Schema.Int,
/**
* The text to insert.
*/
new_str: Schema.String
})
The Messages API sends an insert call as path, insert_line and insert_text. So every insert the model makes fails to decode as the tool's parameters, and the handler never runs. The model gets a parameter error back instead. The older insert schema in the same file (line 1553) already uses insert_text.
Repro
With @effect/[email protected] and [email protected]:
import { Schema } from "effect"
import { TextEditorInsertCommand } from "@effect/ai-anthropic/AnthropicTool"
// The arguments the Messages API sends for an insert with text_editor_20250728
const call = { command: "insert", path: "a.md", insert_line: 0, insert_text: "x" }
console.log(String(Schema.decodeUnknownExit(TextEditorInsertCommand)(call)))
// Failure(Cause([Fail(SchemaError(Missing key
// at ["new_str"]))]))
We hit it in a real run with Claude Opus: each insert came back to the model as a validation error until we patched the field.
Fix
Rename the field to insert_text in src/AnthropicTool.ts. We've run that patch (the src, dist .js and .d.ts) against the live API, and inserts apply.
Versions: 4.0.0 through 4.1.0, and main.
- 主要言語
- TypeScript
- スター
- 16.7k
- フォーク
- 808
- 平均マージ
- 11時間 11分
- マージ済み PR(30日)
- 840
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Effect-TS/effect のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[email protected]: crypto/KeyFormat declarations require the global JsonWebKey, breaking Node-only type-checks対応中かも @effect-bot が今日担当しました。 オープン
Effect-TS/effect#10115 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
sql-pg: send several statements in one extended-query Sync (transaction-local context without extra round trips)対応中かも @effect-bot が今日担当しました。 オープン
Effect-TS/effect#10113 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
CircuitBreaker: record an outcome without guarding the call対応中かも @effect-bot が今日担当しました。 オープン
Effect-TS/effect#10110 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Effect-TS/effect の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
lichess-org/lila#22324 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature Request] [Web] Expose kvCacheQuantizationBits in the onnxruntime-web WebGPU EP optionsオープンep:WebGPU platform:web quantization
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/onnxruntime#33752 ·
メンテナーはふだん 2 日以内に返信
-
[Skill Bug]: entra-agent-id: inaccurate blueprint permission inheritance and parent token sub claimオープンbug entra-agent-id
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/GitHub-Copilot-for-Azure#3467 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(worker): keep normal prepare waiting states failure-free対応中かも @LichKing-2234 が今日担当しました。 オープンagent:codex priority:P1
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AgoraIO-Extensions/agent-infra#3745 ·
メンテナーはふだん 1 日以内に返信
-
The five-line work window can drop its oldest line: the per-line byte share ignores the JSON framing対応中かも @Eapp1e が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
makecindy/cindy#7973 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信