stablyai / stablyai/orca

[Bug]: Codex Business usage percentage is not displayed correctly in Status Bar

Open
#8,664 1 comment 0 reactions 1 assignee Claimed by @brennanb2025 View on GitHub
bug has_repro os:linux
Dominant language
TypeScript
Stars
72.1k
Forks
4.7k
Avg merge
14h 54m
Merged PRs (30d)
520

Description

### Operating system

Linux

### Orca version

v1.4.138

### Details

## Description

I am using Codex Business, and the Usage percentage shown in the Status Bar does not appear to be displayed correctly.

The Status Bar should show the current usage percentage based on the account's actual usage limit, but the value is missing for Business accounts.

## Expected behavior

The Status Bar should display the current usage percentage for Codex Business accounts.

For example, the usage information can be retrieved from the following API:

```
GET https://chatgpt.com/backend-api/wham/usage
```

The response contains usage information under:

```json
{
"spend_control": {
"individual_limit": {
"used_percent": 39,
"remaining_percent": 61
}
}
}
```

In this case, the Status Bar should display approximately:

```
Usage: 39%
```

## Actual behavior

The Status Bar does not show the correct usage percentage for my Codex Business account.

## Additional context

When calling:

```
https://chatgpt.com/backend-api/wham/usage
```

the API returns the following response structure:

```json
{
"plan_type": "business",
"spend_control": {
"reached": false,
"individual_limit": {
"source": "group_based_spend_controls",
"limit": "11450",
"used": "4522.358407497406",
"remaining": "6927.641592502594",
"used_percent": 39,
"remaining_percent": 61,
"reset_after_seconds": 1539578,
"reset_at": 1785542400
}
}
}
```

It looks like Business plan usage may need to be parsed from `spend_control.individual_limit.used_percent` instead of the fields used for other plans.

## Suggested fix

Please update the usage parsing logic to support Codex Business accounts and display the correct percentage in the Status Bar.

Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.