実際のコード変更。4 つのテストに合格しました。

OpenCode 1.19.0 · Qwen3.8-27B · Windows · 2026 年 10 月 14 日。コードと操作ログとして提示されたオリジナルの実行証拠。

1 → 4合格したテスト / 4
25.256秒エージェントイベントウィンドウ
30,911クライアントが報告したトークン
0記録されたツールの失敗

これは、10 月 15 日に実行された新しい API ではなく、保持された 10 月 14 日の実行です。25.256 秒は、最初の step_start から最後の step_finish までをカバーします。インストール、プロセスの起動、および独立したテストの再実行は除外されます。プロセス全体の経過時間は記録されませんでした。

原点を再現する

Node.js 25.2.1 および OpenCode 1.19.0。バージョン、構成、スターター、およびテストはソース例に固定されています。構成されたプロバイダーは IteraCompute のみで、ファイル操作とノード --test が許可されます。

固定された例とロックファイル → · 受領証明書の原本 · OpenCode CLI · プロバイダーリファレンス

1 · セットアップ (Bash)
git clone https://github.com/IteraCompute/migration-kit.git
cd migration-kit
git checkout b71ebf5e09b761f958c643075b8e0a5d3032e44f
cd examples/opencode
npm ci
npm run code -- --version
export ITERACOMPUTE_API_KEY="your-api-key"
mkdir workspace
cp opencode.json starter/slugify.mjs starter/slugify.test.mjs workspace/
cd workspace
node --test slugify.test.mjs
検証されたプロバイダー構成
オープンコード.json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "iteracompute/qwen/qwen3.8-27b",
  "small_model": "iteracompute/qwen/qwen3.8-27b",
  "enabled_providers": ["iteracompute"],
  "provider": {
    "iteracompute": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "IteraCompute",
      "options": {
        "baseURL": "https://api.iteracompute.com/v1",
        "apiKey": "{env:ITERACOMPUTE_API_KEY}"
      },
      "models": {
        "qwen/qwen3.8-27b": {
          "name": "Free Qwen3.8-27B",
          "cost": { "input": 0, "output": 0, "cache_read": 0, "cache_write": 0 },
          "limit": { "context": 131072, "output": 8192 },
          "options": { "chat_template_kwargs": { "enable_thinking": false } }
        }
      }
    }
  },
  "permission": {
    "*": "deny",
    "read": "allow",
    "glob": "allow",
    "grep": "allow",
    "edit": "allow",
    "bash": { "*": "deny", "node --test*": "allow" }
  }
}
前 · slugify.mjs
export function slugify(text) {
  return text.toLowerCase().replaceAll(" ", "-");
}
後 · モデルで書かれた slugify.mjs
export function slugify(text) {
  return text
    .toLowerCase()
    .replace(/[^a-z0-9]+/g, "-")
    .replace(/^-+|-+$/g, "");
}
4 つの元のテストすべて (変更なし)
slugify.test.mjs
import assert from "node:assert/strict";
import test from "node:test";
import { slugify } from "./slugify.mjs";

test("lowercases and joins words", () => {
  assert.equal(slugify("Hello World"), "hello-world");
});
test("trims whitespace and collapses punctuation", () => {
  assert.equal(slugify("  Hello,   World!  "), "hello-world");
});
test("collapses repeated separators", () => {
  assert.equal(slugify("API___  migration---kit"), "api-migration-kit");
});
test("keeps digits and returns empty for punctuation only", () => {
  assert.equal(slugify("Version 42"), "version-42");
  assert.equal(slugify(" !!! "), "");
});

正確な入力と操作ログ

2 · 正確なプロンプト
Fix slugify.mjs so all four existing tests pass. Lowercase ASCII letters, preserve digits, replace runs of other characters with one hyphen, and trim leading/trailing hyphens. Do not change slugify.test.mjs. Run node --test slugify.test.mjs and report the result.
3 · ワークスペースから実行 (Bash / PowerShell)
npm --prefix .. run code -- run --dir workspace --agent build --format json "Fix slugify.mjs so all four existing tests pass. Lowercase ASCII letters, preserve digits, replace runs of other characters with one hyphen, and trim leading/trailing hyphens. Do not change slugify.test.mjs. Run node --test slugify.test.mjs and report the result."
  1. ベースライン: テスト 4 回、合格 1 回、不合格 3 回。exit 1. 3 つの失敗により、句読点、区切り記号の繰り返し、トリミングが明らかになります。
  2. +0.769s · glob · completed プロジェクトファイルの一覧表示
  3. +4.708s · read · completed 読み取り機能
  4. +5.641s · read · completed テストの読み取り
  5. +13.577s · edit · completed 編集機能
  6. +19.899s · bash · completed node --test slugify.test.mjs を実行し、終了コード 0 を実行します。
  7. 最終応答: 空ではない完了。独立した再実行: 4 合格、0 失敗、0 終了。テスト ファイル SHA-256 は同一のままでした。
4 · エージェントテストの出力
✔ lowercases and joins words (2.3435ms)
✔ trims whitespace and collapses punctuation (0.2539ms)
✔ collapses repeated separators (0.2248ms)
✔ keeps digits and returns empty for punctuation only (0.1989ms)
ℹ tests 4
ℹ suites 0
ℹ pass 4
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 212.5302
5 · エージェントの最終返信
All 4 tests pass:

```
✔ lowercases and joins words
✔ trims whitespace and collapses punctuation
✔ collapses repeated separators
✔ keeps digits and returns empty for punctuation only
tests 4, pass 4, fail 0
```

The fix in slugify.mjs: lowercase, replace runs of non-`[a-z0-9]` characters with a single hyphen, then trim leading/trailing hyphens.
6 · 独立した検証: ノード --test slugify.test.mjs
✔ lowercases and joins words (1.8327ms)
✔ trims whitespace and collapses punctuation (0.2687ms)
✔ collapses repeated separators (0.178ms)
✔ keeps digits and returns empty for punctuation only (0.1737ms)
ℹ tests 4
ℹ suites 0
ℹ pass 4
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 198.9705

使い方、費用、失敗例

ステップ入力出力推論合計
15,48432215,537
25,609131225,762
36,1431581956,496
46,31682836,481
56,5309696,635
合計30,08249933030,911

これらは、5 つのモデル ステップにわたって合計された OpenCode step_finish カウンターです。繰り返されたコンテキストはステップごとに再度カウントされます。このクライアント レコードでは、出力 (499) に推論 (330) が除外されています。合計にはすでに推論が含まれています: 30,082 入力 + 499 出力 + 330 推論 = 30,911 トークン。再度推論を追加せずに tokens.total を合計します。キャッシュ読み取り/書き込み: 0。クライアントコストの見積もり: $0。これは、コンソールの請求受領書や独立したトークナイザーの測定ではありません。

サニタイズされたオリジナルのタイミングおよびトークン イベント (JSONL) をダウンロード →

JSONL の抜粋には、記録された標準出力からの 5 つの step_start イベントと 5 つの step_finish イベントがすべて保持されます。セッション、メッセージ、パート、およびスナップショットの識別子は省略されています。タイムスタンプ、イベント タイプ、理由、トークン、コスト フィールドは変更されません。最後のタイムスタンプ (1791954330940) から最初のタイムスタンプ (1791954305684) を減算すると、25,256 ミリ秒が得られます。古い受け入れファイルはコードとテストをサポートしています。これらのタイミング フィールドとトークン フィールドは含まれません。

成功した実行では、chat_template_kwargs.enable_ Thinking=false が使用されました。その顧客レコードには依然として 330 個の推論トークンが含まれています。この構成だけでは、推論の使用がゼロになるわけではありません。

失敗: 3 つのベースライン テストが失敗しました。保持された成功したセッションで失敗したツールはゼロです。以前の試行、リクエストの再試行、および繰り返し実行の成功率は記録されませんでした。1 回の小規模な修復では、128K コンテキスト、イメージの理解、大規模なリポジトリ、持続的な負荷、またはその他のオペレーティング システムは検証されません。

完全にサニタイズされた証拠 (JSON)
オープンコード-ワークフロー.json
{
  "date": "2026-10-14",
  "platform": "Windows",
  "model": "qwen/qwen3.8-27b",
  "base_url": "https://api.iteracompute.com/v1",
  "versions": {
    "node": "25.2.1",
    "opencode": "1.19.0"
  },
  "source_commit": "b71ebf5e09b761f958c643075b8e0a5d3032e44f",
  "prompt": "Fix slugify.mjs so all four existing tests pass. Lowercase ASCII letters, preserve digits, replace runs of other characters with one hyphen, and trim leading/trailing hyphens. Do not change slugify.test.mjs. Run node --test slugify.test.mjs and report the result.",
  "event_window_ms": 25256,
  "timing_scope": "First step_start to final step_finish; excludes install, process startup and independent test rerun. Process wall time was not recorded.",
  "steps": [
    {
      "elapsed_ms": 1421,
      "reason": "tool-calls",
      "tokens": {
        "total": 5537,
        "input": 5484,
        "output": 32,
        "reasoning": 21,
        "cache": {
          "write": 0,
          "read": 0
        }
      },
      "client_cost_usd": 0
    },
    {
      "elapsed_ms": 6373,
      "reason": "tool-calls",
      "tokens": {
        "total": 5762,
        "input": 5609,
        "output": 131,
        "reasoning": 22,
        "cache": {
          "write": 0,
          "read": 0
        }
      },
      "client_cost_usd": 0
    },
    {
      "elapsed_ms": 14321,
      "reason": "tool-calls",
      "tokens": {
        "total": 6496,
        "input": 6143,
        "output": 158,
        "reasoning": 195,
        "cache": {
          "write": 0,
          "read": 0
        }
      },
      "client_cost_usd": 0
    },
    {
      "elapsed_ms": 20584,
      "reason": "tool-calls",
      "tokens": {
        "total": 6481,
        "input": 6316,
        "output": 82,
        "reasoning": 83,
        "cache": {
          "write": 0,
          "read": 0
        }
      },
      "client_cost_usd": 0
    },
    {
      "elapsed_ms": 25256,
      "reason": "stop",
      "tokens": {
        "total": 6635,
        "input": 6530,
        "output": 96,
        "reasoning": 9,
        "cache": {
          "write": 0,
          "read": 0
        }
      },
      "client_cost_usd": 0
    }
  ],
  "exit_code": 0,
  "baseline": {
    "tests": 4,
    "pass": 1,
    "fail": 3,
    "exit_code": 1
  },
  "tools": [
    {
      "tool": "glob",
      "status": "completed"
    },
    {
      "tool": "read",
      "status": "completed",
      "file": "slugify.mjs"
    },
    {
      "tool": "read",
      "status": "completed",
      "file": "slugify.test.mjs"
    },
    {
      "tool": "edit",
      "status": "completed",
      "file": "slugify.mjs"
    },
    {
      "tool": "bash",
      "status": "completed",
      "command": "node --test slugify.test.mjs",
      "exit_code": 0,
      "output": "✔ lowercases and joins words (2.3435ms)\n✔ trims whitespace and collapses punctuation (0.2539ms)\n✔ collapses repeated separators (0.2248ms)\n✔ keeps digits and returns empty for punctuation only (0.1989ms)\nℹ tests 4\nℹ suites 0\nℹ pass 4\nℹ fail 0\nℹ cancelled 0\nℹ skipped 0\nℹ todo 0\nℹ duration_ms 212.5302\n"
    }
  ],
  "client_estimated_cost_usd": 0,
  "tests_unchanged": true,
  "test_sha256": "a86b36c60e8d19281abbd656dafc9eabe87e66053bed8e57e466696e65e04884",
  "final_code": "export function slugify(text) {\n  return text\n    .toLowerCase()\n    .replace(/[^a-z0-9]+/g, \"-\")\n    .replace(/^-+|-+$/g, \"\");\n}\n",
  "final_reply": "All 4 tests pass:\n\n```\n✔ lowercases and joins words\n✔ trims whitespace and collapses punctuation\n✔ collapses repeated separators\n✔ keeps digits and returns empty for punctuation only\ntests 4, pass 4, fail 0\n```\n\nThe fix in slugify.mjs: lowercase, replace runs of non-`[a-z0-9]` characters with a single hyphen, then trim leading/trailing hyphens.",
  "independent_rerun": {
    "exit_code": 0,
    "stdout": "✔ lowercases and joins words (1.8327ms)\n✔ trims whitespace and collapses punctuation (0.2687ms)\n✔ collapses repeated separators (0.178ms)\n✔ keeps digits and returns empty for punctuation only (0.1737ms)\nℹ tests 4\nℹ suites 0\nℹ pass 4\nℹ fail 0\nℹ cancelled 0\nℹ skipped 0\nℹ todo 0\nℹ duration_ms 198.9705\n"
  },
  "tool_events": [
    {
      "elapsed_ms": 769,
      "tool": "glob",
      "status": "completed"
    },
    {
      "elapsed_ms": 4708,
      "tool": "read",
      "status": "completed"
    },
    {
      "elapsed_ms": 5641,
      "tool": "read",
      "status": "completed"
    },
    {
      "elapsed_ms": 13577,
      "tool": "edit",
      "status": "completed"
    },
    {
      "elapsed_ms": 19899,
      "tool": "bash",
      "status": "completed"
    }
  ],
  "recorded_tool_failures": 0,
  "scope": "One retained successful session, five model steps. Earlier attempts and multi-run reliability were not recorded. No long-context boundary, image quality or sustained load test."
}

Qwen の証拠と限界 → · モデルとツールの選択に戻る →