zed icon indicating copy to clipboard operation
zed copied to clipboard

Agent usage calculation

Open NyanHelsing opened this issue 6 months ago • 4 comments

Summary

Is counting usage based on per api call? compared to competition where it's based on per prompt.

I've had the agent trial access for about 15 minutes, started three threads with the agent which achieved a skeleton react/tauri app (with 1 button) - that doesn't even actually start, and blew through literally all of the trial usage - even though the trial usage is supposed to provide 150 prompts.

I think this would make Zed about 50x more expensive than cursor? seems like maybe a bug considering the api usage is based on tokens not per api call.

Zed Version and System Specs

Zed: v0.185.9 (Zed) OS: macOS 15.4.1 Memory: 16 GiB Architecture: aarch64

NyanHelsing avatar May 07 '25 11:05 NyanHelsing

It sounds like you might be using Max Mode.

maxdeviant avatar May 07 '25 12:05 maxdeviant

Yeah even with max mode off the agent still uses additional prompts itself which doesn’t align with what I’m reading on the blog post

fraser018 avatar May 07 '25 20:05 fraser018

imo, the usage calculation is not very transparent or something is wrong! I burned through my pro credit within a week without even using it heavily.

Just enabled "Usage-Based Spending" and use 1 Prompt with "Max Mode" on. The Agent changed 3 files and it costs me $1.15. How is this possible, I don't understand 🤷

avatarnguyen avatar May 21 '25 06:05 avatarnguyen

In my experience the Zed Pro pricing is indeed per prompt, as long as Max Mode/Burn Mode is disabled. When using agentic editing, after 25 requests a new prompt is required to continue.

GitHub Copilot calculates usage per request, and every tool call counts as a request. When their premium requests billing starts this means you'll reach the plan limit in a few prompts.

praseodym avatar May 30 '25 08:05 praseodym

GitHub Copilot calculates usage per request, and every tool call counts as a request. When their premium requests billing starts this means you'll reach the plan limit in a few prompts.

Just a note, it doesn't seem to be the case in vscode according to what I've seen, see also evidence in https://github.com/zed-industries/zed/discussions/31068.

bluetech avatar Jun 25 '25 12:06 bluetech

For me, this is one of the biggest limitations when it comes to using Zed at work. We have a GitHub Copilot Enterprise license, but with VSCode it seems that "premium requests" are consumed more prudently. Maybe now that the Copilot Chat code has been open-sourced, it will be easier to investigate what's going on.

luismgg avatar Jul 03 '25 09:07 luismgg

This issue is related to Zed's hosted models. Discussion about Copilot should occur elsewhere, such as in the discussion mentioned above.

lj3954 avatar Jul 03 '25 13:07 lj3954

There is now much better documentation describing how usage is calculated here:

  • https://zed.dev/docs/ai/plans-and-usage

In the 2+ months since this issue was opened we have also fixed some bugs. If you are seeing issues with prompt accounting, please open a clean issue with explicit details with how to reproduce or if you believe you have been incorrectly charged you can reach out to [email protected].

Thanks!

notpeter avatar Jul 17 '25 19:07 notpeter