Skip to content

v0.33.0

Choose a tag to compare

@errhythm errhythm released this 13 Sep 16:06
· 23 commits to main since this release
5222bf5

Codex credits and account allowances

Codex usage responses carry a credits balance and a per-user spend_control.individual_limit, both of which ccswap previously discarded. They now show up as separate resources in the CLI, TUI, and menu bar, and in ccswap codex usage --json. Credit-only responses that carry no rate-limit windows are accepted.

Thanks to @JOhugo6 for the feature (#3).

Hardened Codex usage parsing

The usage endpoint is a third-party JSON shape ccswap does not control, and several fields reached datetime and float conversions unguarded. A millisecond epoch where seconds were expected, a NaN, or an oversized number would raise out of fetch_codex_usage and take down ccswap codex usage and the menu bar refresh loop instead of degrading to "usage unavailable". All numeric and timestamp conversions now degrade to a missing field.

Partial responses are also no longer accepted as healthy. Previously any fragment that normalized at all counted as success, so a degraded response could overwrite a good stored usage row. A response must now carry a real quota window, real credit state, or a real spend allowance; banked resets or message estimates alone are rejected.

Docs

The README named upstream's command as ccswap. Upstream realiti4/claude-swap ships cswap; this fork ships ccswap.

Full changelog: v0.32.0...v0.33.0