Commit Graph
7 Commits
Author SHA1 Message Date
Jason 959e4a955f fix(usage): read MiniMax Code and Kimi credentials for native usage queries
The usage dialog resolves the provider's key and base URL on the frontend
per app, but had no branch for MiniMax Code or Kimi, so both came back
empty. Testing the official balance or coding plan template then failed
with "API key is empty", the template was not auto-detected from the
endpoint, and the custom template showed {{apiKey}} and {{baseUrl}} as
unset, while the backend resolver (Provider::resolve_usage_credentials)
already reads both apps and saved queries worked. Same gap as DeepSeek
Harness in #9108.

MiniMax Code stores credentials in options.{baseURL, apiKey} like
OpenCode and DeepSeek Harness, so it joins that branch. Kimi keeps them
in provider.{base_url, api_key} and gets its own branch; like the
backend it reads only api_key, not api_key_env.
2026-10-31 23:09:32 +08:00
KFCSZYWJ a9ec21a97d fix(usage): read DeepSeek Harness credentials for official balance queries (#9108) 2026-10-31 22:53:45 +08:00
Jason 67cce7ad33 fix(usage): show bound Claude official account quota in tray and usage settings
A Claude official card bound to an auth-center account queries usage by
default on the provider card, but the usage settings dialog showed it as
disabled and the tray never displayed it.

- Tray: add an account-scoped ClaudeAccount source that defaults to on
  until the user turns it off, reads only that account's snapshot (no
  fallback to the default login's app-wide cache), and refreshes it on
  hover.
- Cache the result of get_claude_account_quota per account and schedule
  a tray refresh, so the card and tray share one snapshot.
- Usage settings dialog: default to enabled for bound Claude cards and
  test against the bound account instead of the default login.
2026-10-29 15:19:25 +08:00
Jason 2afe8cdbef refactor(omp): rename the internal app id from ohmypi to omp
Match the binary name, the Apps page tool id and the i18n keys that
already used omp. The app is unreleased, so nothing persisted needs a
migration; ohmypi stays accepted as an alias when parsing app ids.
Show the app by default like Pi and Kimi Code.
2026-10-24 15:30:32 +08:00
JackieJKandallenxu09 c8945d2d91 feat(omp): add Oh My Pi support
Squashed from #6747 (head 50c3cec1d) onto current main: providers in
models.yml, MCP in mcp.json, Skills, sessions, app visibility and
directory override for Oh My Pi. Conflicts with the Kimi Code refresh
refactor in App.tsx and the locale files were resolved by keeping both
sides and routing Oh My Pi through refreshAdditiveLiveState.

Co-authored-by: allenxu09 <s23372.xu@stu.scie.com.cn>
2026-10-24 15:30:32 +08:00
Jason 941267953e fix(agy): show only the typed prompt in sessions and describe the quota check
- agy stores every prompt wrapped in <USER_REQUEST>, followed by context it
  adds itself (<ADDITIONAL_METADATA>, <USER_SETTINGS_CHANGE>). Session titles
  and user messages now show only the text inside <USER_REQUEST>; an empty
  request keeps the original content.
- The official-quota hint said CC Switch reads the CLI's OAuth credentials.
  For agy it runs agy's own /usage command instead, so the usage dialog now
  says that (and that a check takes about 10 seconds).
2026-10-21 08:54:18 +08:00
Jason 382c0e965f feat(usage): add a Sub2API usage query template
Sub2API sites expose GET /v1/usage authenticated with the API key, so the
template only needs the provider's key and base URL, like the general one.
The script accepts a base URL with or without /v1, shows the plan name, and
reports used/total only when the quota has a limit, so unlimited
subscriptions (remaining -1) no longer show a negative balance.

The modal's two hand-written template-type unions are replaced with the
shared TemplateType so new templates are not silently dropped on save.
2026-10-12 23:26:43 +08:00