Repository navigation
feat(providers): add OMP provider with multi-account aggregation and subprovider selection - #4610
renan-brasilio wants to merge 9 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9fd3f1334
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex review: needs real behavior proof before merge. What this changesAdds an opt-in OMP quota provider with multi-account aggregation, subprovider selection, account details, and CLI support. Example: OMP reports four Antigravity accounts with 1.4 weekly account-equivalents used and one unused Codex account.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 5 items remain Keep this PR open under repository policy; the revision addresses most earlier findings, but two quota-cadence defects remain. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe provider framework invokes the installed OMP CLI, decodes its quota JSON, and publishes usage snapshots to the menu, history, and CodexBar CLI. flowchart LR
A[Provider settings] --> B[OMP fetch strategy]
B --> C[Installed OMP CLI]
C --> D[Quota JSON parser]
D --> E[Usage snapshot]
E --> F[Menu and CLI]
Technical reviewBest possible solution: If approved, retain the existing provider owners and derive quota durations consistently from upstream windows while preserving existing Pi accounting. Do we have a high-confidence way to reproduce the issue? Source inspection establishes both cadence errors with supported quota shapes; no target code or tests were run during this read-only review. Is this the best way to solve the issue? The existing fetch strategy, subprocess runner, and settings extension mechanism fit the integration; window construction should preserve reported cadence through one consistent conversion. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6480977b47f6. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 18, 2026, 3:11 AM ET / 07:11 UTC (Revision 2). |
4a41847 to
e50e180
Compare
…mit normalization, and slot stability
e50e180 to
ec95b3a
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec95b3a261
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c899187d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… derive xAI cadence, and stabilize section titles
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a00210167
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ty, and recompute on visibility changes
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Thanks @renan-brasilio for the substantial work here. I'm closing this implementation, for two reasons. First, new provider fetching in CodexBar goes through bundled JavaScript plugins with minimal Swift glue, and this adds a native CLI fetcher plus a separate 900-line aggregation and presentation layer. Second, that layer sums capacity across providers and changes those totals when UI items are hidden, which would show numbers that don't correspond to any single quota. The command and response shape also look like Oh My Pi rather than Oh My Prompt. Existing Pi support covers local token history, so live OMP quotas are still a fair request. Upstream documents a bearer-authenticated |
Summary
Adds OMP (Oh My Prompt) as a first-party provider to CodexBar, enabling combined limit tracking, multi-account capacity aggregation, and subprovider filtering from
omp usage --json.Context & Motivation
OMP centrally manages authenticated OAuth credentials and provider usage quotas for developers working across multiple AI coding engines (Google Antigravity, OpenAI Codex, GitHub Copilot, Anthropic Claude, and xAI Grok). For multi-account setups (such as multiple Google accounts under Antigravity), OMP resolves live quotas directly through provider APIs and calculates aggregate capacity windows.
This provider brings that visibility directly into CodexBar's menu bar, popover cards, and CLI.
Features & Capabilities
Gemini 5h,Gemini 7d,Claude & GPT (shared) 5h,Claude & GPT (shared) 7dChat Requests,Completions5 hours,7 daysWeekly Credits5-Hourprimary window dynamically computes aggregate usage across all 5-hour accounts.Weeklysecondary window computes aggregate usage across all weekly accounts.Combined (All Limits),Google Antigravity (agy),OpenAI Codex,Anthropic Claude,GitHub Copilot,xAI Grok, and custom subprovider filters.OMP_SUBPROVIDER(e.g.OMP_SUBPROVIDER=agy codexbar usage --provider omp).SubprocessRunnerwith a 15-second execution timeout and null standard input.["usage", "--json"]) preventing any argument or shell injection.NaN/±Infinity).Files Changed
Sources/CodexBarCore/Providers/Providers.swift: Registered.ompprovider and icon style.Sources/CodexBarCore/PathEnvironment.swift: AddedresolveOMPBinary(...)locator.Sources/CodexBarCore/Providers/ProviderVersionDetector.swift: AddedompVersion().Sources/CodexBarCore/Providers/OMP/:OMPProviderDescriptor.swift: Provider descriptor, pace configuration, and fetch plan.OMPUsageModels.swift: Strongly-typed decodable models for OMP usage and capacity responses.OMPUsageParser.swift: Usage snapshot parser and quota family aggregators.OMPCLIProbe.swift: Subprocess execution wrapper.OMPProviderConfig.swift&OMPProviderSettings.swift: Config and settings models.Sources/CodexBar/Providers/OMP/:OMPProviderImplementation.swift: UI descriptors, subprovider picker, and settings snapshot.OMPSettingsStore.swift: SettingsStore extensions.Sources/CodexBar/Resources/ProviderIcon-omp.svg&docs/logos/omp.svg: Template SVG icon.docs/omp.md: Provider documentation.Tests/CodexBarTests/OMPProviderTests.swift: Comprehensive unit tests.Test Coverage & Verification
swift test --filter OMPProviderTests— 7/7 passed (descriptor configuration, combined capacity parsing, AGY filtering, Codex filtering, 5 vs 6 accounts visibility gating, settings persistence, template icon loading).swift test --filter ProviderArchitectureGatekeeperTests— 48/48 passed (strict architecture gatekeeper and lexical drift tests).swift test --filter ProviderIconResourcesTests— 11/11 passed (SVG template rendering and caching).codexbar usage --provider ompandOMP_SUBPROVIDER=<id>across all supported subproviders.