software-engineering

llm-echo 0.5 improves simulated token counting for LLM debugging

Key Takeaway

The llm-echo debug plugin for Simon Willison's LLM CLI tool now simulates token usage counts that account for tool calls, system prompts, and reasoning tokens.

Summary

llm-echo 0.5 is a minor update to a debug plugin for the LLM command-line tool. The plugin provides an 'echo' model that returns prompts back to the caller without invoking an actual LLM. Version 0.5 updates its simulated token usage reporting to reflect tool calls, system prompts, and reasoning tokens. This helps developers test LLM client code and token accounting logic without API costs.

What changed in llm-echo 0.5

  • Simulated token counts now include tool calls, system prompts, and reasoning tokens (e.g., -o thinking 1)
  • Plugin acts as a drop-in "model" for the llm CLI: llm -m echo
  • Returns structured output including prompt, system, attachments, stream flag, and previous context
  • Example shows 2 input tokens and 24 output tokens for a simple prompt with reasoning enabled

Why it matters

The update makes llm-echo more useful for testing LLM client applications that depend on accurate token accounting, particularly those using tool use or reasoning features. It reduces the need for live API calls during development and CI testing.

Original reference: simonwillison.net →