Skip to content

MyToken!!!!! 0.2.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 11:47
· 73 commits to main since this release

Relay reconciliation: see what your relay charged next to what your own logs say it should have, and where the difference comes from.

First launch upgrades the database in place, one way, and reprices every request once (relay price rules now depend on the tool that made the request). Back up ~/Library/Application Support/MyToken (macOS), %AppData%\MyToken (Windows) or ~/.local/share/mytoken (Linux) first if you may want to go back to 0.1.3.

Privacy

Still one network request by default (the price table). Relay reconciliation is off until you turn it on, site by site. It only uses the key you already gave that site, only talks to that site, and only reads. Keys are never written to disk or to logs.

New

  • Relay reconciliation for new-api and sub2api relays, plus balances for some official APIs. Turn on a site and pick what to fetch:
    • Ratios. The site's model prices and group multipliers become dated price rules, so local estimates use the site's own prices from then on.
    • Balance.
    • Charges. new-api: each request's charge, matched to your local requests. sub2api: daily usage.
  • Reconciliation page in the main window: local estimate vs. charged, the implied multiplier, and a waterfall that splits the difference into matched, price differs, token counting differs, charge only (another device or tool used the key), local only and refunds. Also broken down by model and by day.
  • Tray shows the balances of the sites you turned on.
  • CLI: mytoken relay list|enable|disable|sync and mytoken reconcile <site>, with --json / --csv. Balances keep the site's currency (no conversion).
  • 12 more tools: WorkBuddy, CodeBuddy, Hermes, Claude Desktop, Qwen Code, Kimi CLI, OpenClaude, Grok CLI, OpenClaw, Droid, Goose and Forge (22 in total). Parser approach for several follows codeburn (MIT).
  • Keys are found in cc-switch (every provider) and in each tool's own config.

Tested on real relays

  • Price rules are kept per key and per tool. Keys of one site can bill in different groups, and they no longer overwrite each other's rules. Rules left over from earlier builds are cleaned up.
  • new-api 1-hour cache writes are priced at their own rate (Claude bills them at 8× instead of 5×).
  • A site's ratio or balance endpoint failing no longer stops the sync. Rate limits (HTTP 429) are retried once.
  • A key with several sites' providers behind it only gets charged for requests it can be shown to have served.

Fixes

  • macOS: the window buttons overlapped the sidebar; they now sit inside it.
  • Tables in the CLI line up with Chinese text.
  • Negative amounts printed as "<$0.01".

Known limits

  • Local logs can't tell 1-hour from 5-minute cache writes, so sites that bill 1-hour writes show a steady price differs gap.
  • sub2api only reports daily totals, so it can't show which of your tools a charge came from.
  • Time-of-day pricing (peak multipliers, tiered expressions) isn't applied to local estimates yet. Ratio changes are dated when MyToken first sees them. Both are planned for 0.2.1.

Roadmap: docs/ROADMAP.md · Relay design: docs/RELAY.md · Full Changelog: v0.1.3...v0.2.0