跳到正文
Simon Willison·· 2026-10-19精选

llm-echo 0.5 更新调试插件,不调用模型即可检查提示输入

AI 导读

Simon Willison 的调试插件把输入提示原样回显,并更新模拟的 token 用量统计。开发者可用它检查工具调用、系统提示等结构,适合本地排错和理解调用过程。

推荐理由

Codex 来源核对 · 原始技术资料,附实现与评估入口。

正文 · AI 翻译

我正在为 LLM 的新版本发布做准备,在测试 PR 时重新研究了 llm-echo 调试插件。这个插件提供了一个完全不涉及 LLM 的“模型”——它只是原样返回输入的提示词。新版本更新了模拟的 token 用量统计,将工具调用、系统提示词和推理 token 也纳入计算。

使用示例:

uvx --with llm-echo llm -m echo 'hi there' -o thinking 1 --usage

输出:

First I consider the prompt, then I decide what to say.
{
  "prompt": "hi there",
  "system": "",
  "attachments": [],
  "stream": true,
  "previous": []
}
Token usage: 2 input, 24 output

来源:Simon Willison · simonwillison.net