orca icon indicating copy to clipboard operation
orca copied to clipboard

[Feature]: Kimi account , add auto switch account when limit exceed for all providers

Open lerothias opened this issue 4 months ago • 2 comments

Problem or use case

add Kimi account login same like all others ai Provider accounts. add auto switch account when limit exceed.

Proposed solution

user have many accounts and its annoying to change account between sessions, working in a sesstions account limit exceed sesstions stopped, so add auto switch when account limit below 5% siwtch to other so sesstion wont stop

Alternatives or additional context

This feature is similar to this one, but it's just for Kimi—https://github.com/stablyai/orca/issues/8121

lerothias avatar Jul 20 '26 12:07 lerothias

One important cross-platform consideration for this feature is Windows + WSL2 support.

The current Kimi usage fetcher resolves KIMI_CODE_HOME or ~/.kimi-code in the Orca desktop process. When Orca runs on Windows but Kimi Code is installed and authenticated only inside WSL, the Windows process cannot discover the WSL credential file.

When Kimi is added to AI Provider Accounts, could its account handling follow Orca's existing account-location model?

  • Allow selecting This device or a specific WSL distribution.
  • Run Kimi login and credential discovery in the selected runtime.
  • Read ~/.kimi-code/credentials/kimi-code.json from that runtime for usage tracking.
  • Ensure Kimi sessions launched in WSL use the matching selected account.
  • Keep Kimi's rotating CLI-owned credentials read-only rather than copying them between Windows and WSL homes.

This would make Kimi account management and status-bar usage work correctly for Windows-hosted Orca projects whose agents run inside WSL2.

euclodius avatar Aug 01 '26 23:08 euclodius

Same request as #12098 / #9565, with a Claude-shaped gap that the existing PRs don't cover.

Orca already has the meters (ProviderRateLimits.session / .weekly as usedPercent in src/shared/rate-limit-types.ts; Claude statusline five_hour / seven_day in src/shared/claude-statusline-rate-limits.ts) and the switcher (claudeAccounts.select → doSelectAccount, which does not kill the live PTY). What is missing is an opt-in trigger: when 5h or weekly hits a watermark (e.g. 99%, whichever first), call that same selectAccount for the next account with headroom.

That is before the vendor 429, and for Claude it can stay on the same terminal — unlike PR #5778 (restart + continue after limit text) and PR #14290 (Codex, new Dispatch after proven exhaustion).

Posted the full recorte on #12098 so we don't fork the thread. Grok/Kimi still need a provider-specific exhaustion signal; Claude already has the percentage.

Tauri-EPO avatar Aug 16 '26 01:08 Tauri-EPO