Add AIHubMix prepaid USD balance - #3202
Conversation
Read remaining credits from the Manage Key account API and show the amount in the menu bar instead of an empty dash. Co-authored-by: Cursor <cursoragent@cursor.com>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 26, 2026, 12:54 AM ET / 04:54 UTC. ClawSweeper reviewWhat this changesThis PR adds AIHubMix prepaid-balance fetching, provider registration, menu rendering, CLI metadata, tests, and documentation. Merge readiness⛔ Blocked until stronger real behavior proof is added - 6 items remain Keep open: this is a new first-party provider with an unresolved credential-routing policy and insufficient real behavior proof; current main does not already provide AIHubMix support. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherCodexBar resolves a provider credential, fetches account usage into a shared snapshot, then displays it in the menu bar and provider details. AIHubMix would add a Manage Key-based balance source to that pipeline. flowchart LR
A[Manage Key] --> B[AIHubMix provider]
B --> C[API base selection]
C --> D[Account balance request]
D --> E[Usage snapshot]
E --> F[Menu bar balance]
E --> G[Account details]
Decision needed
Why: The PR intentionally introduces a configurable network destination for a long-lived credential, and source alone cannot determine whether self-hosted or proxy endpoints are a supported product contract. Before merge
Findings
Agent review detailsSecurityNeeds attention: No dependency or workflow change was found, but the new endpoint override can send a Manage Key to an arbitrary HTTPS host. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: If maintainers sponsor first-party AIHubMix support, define the endpoint trust boundary, then add redacted live proof of a Manage Key balance fetch and displayed value. Do we have a high-confidence way to reproduce the issue? Yes for the credential-routing concern: an injected transport can set a non-AIHubMix HTTPS override and observe that the fetch path sends Authorization to the resulting host; this read-only review did not execute it. Is this the best way to solve the issue? Unclear: the provider follows the established registry and snapshot shape, but maintainers must first choose whether arbitrary custom endpoints are a supported credential-routing contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3cde772b9f02. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Thanks for the implementation and the populated menu screenshot. The screenshot is useful visual evidence; it does not yet tie a successful request and freshly built display to the submitted commit. The exact-head CI run is awaiting approval with zero build/test jobs, and the PR's test checklist is still unchecked. Before we take this further, please add the public evidence required by hosted relay eligibility: identifiable operator/jurisdiction, independently verifiable upstream authorization, and operating track record. This is a request for evidence, not an assertion that the service is unauthorized. Please also make the intended credential/destination contract explicit. This uses an account-wide Manage Key—the official account API guide uses the same System Access Token for balance reads and key-management operations—and After those boundaries are settled, the final integrated head needs focused fetch/settings/rendering tests, the provider architecture gate, |
Summary
/api/user/selfendpointquota / 500000and show the remaining amount in the menu bar instead of an empty dashAIHUBMIX_ACCESS_KEY(orAIHUBMIX_TOKEN) and optionalAIHUBMIX_API_URL; inferencesk-keys are rejectedTest plan
swift test --filter AIHubMixUsageFetcherTestsmake checkMade with Cursor