Add ClinePass usage provider#2199
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d39ba46172
ℹ️ 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".
| statusLinkURL: nil), | ||
| branding: ProviderBranding( | ||
| iconStyle: .clinepass, | ||
| iconResourceName: "ProviderIcon-clinepass", |
There was a problem hiding this comment.
Add the bundled ClinePass provider icon
This descriptor points brand-icon loading at ProviderIcon-clinepass.svg, but the commit does not add that resource under Sources/CodexBar/Resources (verified with find). Any ClinePass entry rendered through ProviderBrandIcon.image(for:) returns nil, so icon-and-percent/sidebar/provider-card brand icon UI loses the icon and the existing ProviderIconResourcesTests all-provider resource check fails for .clinepass.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| private struct ClinePassLimit: Decodable, Sendable { | ||
| let type: ClinePassLimitType |
There was a problem hiding this comment.
Ignore unknown ClinePass limit types
If the usage-limits API adds another entry to the limits array, decoding type through this closed enum makes JSONDecoder reject the entire response before the parser can use the known 5-hour/weekly/monthly entries. For an external endpoint where extra limit windows are additive, this should decode the raw string and skip unknown types so existing ClinePass usage does not break when a new limit kind appears.
Useful? React with 👍 / 👎.
d39ba46 to
0ed01c4
Compare
0ed01c4 to
a178968
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 15, 2026, 11:49 PM ET / July 16, 2026, 03:49 UTC. Summary Reproducibility: not applicable. to the requested capability because this PR adds a provider rather than fixing broken current-main behavior. The parser finding is nevertheless source-reproducible by adding any unrecognized Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Decode limit types as raw strings, ignore unknown entries while preserving recognized windows, add a regression fixture containing an extra type, and provide a redacted live CLI or app capture of a successful ClinePass fetch. Do we have a high-confidence way to reproduce the issue? Not applicable to the requested capability because this PR adds a provider rather than fixing broken current-main behavior. The parser finding is nevertheless source-reproducible by adding any unrecognized Is this the best way to solve the issue? No, not yet; the provider architecture is appropriate, but the decoder must tolerate additive API values and the production endpoint must be demonstrated before this becomes the narrowest reliable solution. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d661c1c37d00. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Thank you, @derekszen, for the original ClinePass implementation and test work. We landed #2219 as the canonical PR because it carried this implementation forward with the remaining lint and unknown-limit handling fixes; your authored commit and credit are preserved there. |
Summary
~/.codexbar/config.jsonGET https://api.cline.bot/api/v1/users/me/plan/usage-limitsusing Bearer authenticationCLINE_API_KEY, orCLINEPASS_API_KEYVerification
swift test --filter ClinePassProviderLinuxTestsmake test./Scripts/lint.sh lint-linuxnode Scripts/check-site-locales.mjsProviderIcon-clinepass.svgand visually confirmed the official Cline bot silhouetteSources
Notes
The usage request is read-only. ClinePass is implemented directly as a CodexBar provider; the separate local AI Router shim is not part of this pull request or required by CodexBar.