llm-echo 0.5 发布:LLM 调试插件支持模拟推理 Token 与工具调用用量
英文标题:llm-echo 0.5
开源项目 LLM 迎来调试插件 llm-echo 0.5 版本更新。该插件提供了一个无需连接真实大语言模型的虚拟“模型”,仅原样回显输入的 Prompt 内容,专用于本地快速测试。新版本完善了 Token 消耗的模拟计算机制,将工具调用(tool calls)、系统提示词(system prompts)以及推理 Token(reasoning tokens)全部纳入统计。这为基于 LLM CLI 工具开发与测试的开发者提供了零成本、贴合真实调用场景的调试方案。
中文
我目前正在筹备 LLM 的新版本发布,而在测试 PR 的过程中,我重新审视了 llm-echo 调试插件。该插件提供了一个完全不涉及 LLM 的“模型”——它只会原样回显输入给它的提示词(prompt)。新版本更新了模拟的 Token 使用量计数机制,现已将工具调用(tool calls)、系统提示词(system prompts)以及推理 Token(reasoning tokens)全部纳入统计范围。
使用示例:
bash uvx --with llm-echo llm -m echo 'hi there' -o thinking 1 --usage
输出:
text 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
English / 原文
I'm working towards a new LLM release, and testing PRs caused me to revisit the llm-echo debug plugin. This plugin provides a "model" which doesn't involve an LLM at all - it just repeats back the prompts that have been fed to it. The new release now updates the simulated token usage counts to take tool calls, system prompts, and reasoning tokens into account.
Example usage:
uvx --with llm-echo llm -m echo 'hi there' -o thinking 1 --usage
Outputs:
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