Software Engineering

llm-echo 0.5 improves simulated token accounting for debug workflows

Key Takeaway

The llm-echo debug plugin for Simon Willison's LLM CLI now counts tool calls, system prompts, and reasoning tokens in its simulated usage output.

Summary

llm-echo 0.5 is a minor update to a debug plugin for the LLM command-line tool. The plugin provides a fake 'echo' model that returns prompts verbatim instead of calling an actual LLM API. Version 0.5 improves the accuracy of its simulated token usage counts to reflect tool calls, system prompts, and reasoning tokens. This helps developers test LLM CLI workflows and token accounting without incurring API costs.

What changed in llm-echo 0.5

  • Simulated token counts now include tool calls in the calculation
  • System prompts are now factored into input token totals
  • Reasoning tokens (e.g., from -o thinking 1) are reflected in output counts
  • Plugin remains a zero-cost debug target for the llm CLI tool
  • Example shows 2 input tokens and 24 output tokens for a simple prompt with reasoning enabled

Original reference: simonwillison.net →