Skip to content

feat(models): tokens in/out and prices per model, and the account's usage limits - #35

Merged
TomasPlatero merged 3 commits into
experimentalfrom
claude/usage-panel
Oct 26, 2026
Merged

TomasPlatero merged 3 commits into
experimentalfrom
claude/usage-panel

Conversation

@TomasPlatero

Copy link
Copy Markdown
Member

What changes, in one line

The model list shows what each model reads and writes plus its price, the editor's own "Pricing" column is filled, and Status shows NaN's usage limits as bars whichever model is in the chat.

Why

Three things the owner saw missing:

  1. Tokens in/out: the list only said "1000k" (context). It now says 1M in and 64k out, and vision models are marked as vision (every model was registered as tools-only, so the Vision filter matched nothing).
  2. Prices: pi's catalogue carries cost per million tokens, but the connector never passed it on, so the Language Models editor's Pricing column was empty. languageModelPricing is now enabled and fed. A model with no price in the catalogue shows none, not "Free".
  3. Usage limits: the NaN meter existed but only drew when the session's model was a NaN model, so with Claude active the panel showed nothing. It now lists every metered model of the account (model in use first) as bars with "used" and "resets in". The card is called Usage limits.

Not covered: Claude Pro/Max limits. Those windows arrive in response headers the connector never sees (usage-data.ts says so). That would need a separate decision.

How was it observed working

extensions/picode: node --test test/*.test.ts -> 591 tests, 583 pass, 8 fail.
The same 8 fail without my change (Windows-path tests run on Linux).
New: test/model-info.test.ts (6) and 2 more in usage-data.test.ts, all pass.
tsc on the connector: no errors in the files touched (4 pre-existing in agent.ts/piSdk.ts: the pi SDK package is not installed here).
Workbench files (picodeStatusSection.ts, picodeProvidersModelsSection.ts): syntax-checked only.

Not seen running. I could not build or open the editor here, so the new rows, chips and bars have not been looked at on screen. Please open Chat Settings > Providers & Models > Models, Status, and the Language Models editor before releasing. Cached model lists keep their old (priceless) entries until the next refresh.

Which layer

  • The editor itself (src/vs/workbench/contrib/picode)
  • Agent integration (extensions/picode)

Review workload

  • ~250 lines changed. The base is experimental, which another session is releasing from: this PR is not merged so it cannot disturb that.
  • Run first: cd extensions/picode && node --test test/model-info.test.ts test/usage-data.test.ts test/status-layout.test.ts.

Records

  • Product-facing strings are English.

Generated by Claude Code

…t's usage limits

- The model list (Providers & Models) now shows what each model reads and writes
  ("1M in", "64k out") and its price per million tokens, instead of only the
  context size. Vision models are marked as vision (they all read as tools-only).
- pi's catalogue already carries cost and accepted inputs; the connector now
  passes them on (languageModelPricing), so the editor's own Language Models
  "Pricing" column is filled too. A model with no price in the catalogue shows no
  price rather than a made-up "Free".
- Status > Usage limits: NaN's subscription is drawn as bars (used, resets in)
  for every metered model with the model in use first, and no longer disappears
  when a model from another provider is the one in the chat.

Claude Pro/Max limits are not covered: those windows only arrive in response
headers the connector never sees.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013MVCF6g83vB8dmSjDqo2B2
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
picode-sync-api Error Error Oct 26, 2026 7:30pm UTC

Request Review

The test config lists the proposed typings by hand; the pricing fields the
model list now sets need theirs too, or the test types stop compiling.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013MVCF6g83vB8dmSjDqo2B2
@TomasPlatero
TomasPlatero merged commit 714ca1b into experimental Oct 26, 2026
2 of 3 checks passed
@TomasPlatero
TomasPlatero deleted the claude/usage-panel branch October 30, 2026 11:18

This branch had an error being deployed

1 failed deployment
Preview — 01957340 Deployed Oct 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants