FEATURE REQUEST: Show tokens per file #937

Closed
opened 2026-02-16 17:28:51 -05:00 by yindo · 1 comment
Owner

Originally created by @hakan-demirli on GitHub (Jul 27, 2025).

Originally assigned to: @thdxr on GitHub.

Number of tokens per file is incredibly helpful when you are exploring foreign repos.

This is from Aider tool upon running /tokens command:

Approximate context window usage for gemini/gemini-2.5-pro, in tokens:

$ 0.0026    2,064 system messages
$ 0.0000       17 src/main.py     /drop to remove
$ 0.0004      290 flake.nix       /drop to remove
==================
$ 0.0030    2,371 tokens total
         1,046,205 tokens remaining in context window
         1,048,576 tokens max context window size

Something similar would be great for opencode. I dont want to accidently send 500k tokens header file and get a hefty bill.

I don't use the approximate cost metric but Aider also has that.

Originally created by @hakan-demirli on GitHub (Jul 27, 2025). Originally assigned to: @thdxr on GitHub. Number of tokens per file is incredibly helpful when you are exploring foreign repos. This is from Aider tool upon running `/tokens` command: ``` Approximate context window usage for gemini/gemini-2.5-pro, in tokens: $ 0.0026 2,064 system messages $ 0.0000 17 src/main.py /drop to remove $ 0.0004 290 flake.nix /drop to remove ================== $ 0.0030 2,371 tokens total 1,046,205 tokens remaining in context window 1,048,576 tokens max context window size ``` Something similar would be great for opencode. I dont want to accidently send 500k tokens header file and get a hefty bill. I don't use the approximate cost metric but Aider also has that.
yindo closed this issue 2026-02-16 17:28:51 -05:00
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#937