mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-02 22:52:58 +00:00
The Kimi CLI keeps one credential slot per deployment. A login to the global (kimi.ai) deployment writes its token to credentials/kimi-code-env-<hash>.json and talks to api.kimi.ai, but the usage source only read credentials/kimi-code.json and only called api.kimi.com. Users signed in through kimi.ai saw no Kimi usage, or a "Login expired. Sign in again." message when an old kimi-code.json from an earlier login was still on disk. Discovery now checks the slots of both official deployments and picks the one with the latest expiry, which is the slot the CLI keeps refreshing. The usage request goes to the API of that deployment. Kimi access tokens last 15 minutes, so a CLI token is often expired while the user is still signed in. Report those with refreshedBy so the Usage page says to run kimi instead of asking for a new sign-in.