-
Notifications
You must be signed in to change notification settings - Fork 241
Add OpenCode usage to Claude cost tracking #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add OpenCode usage to Claude cost tracking #259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 922cb2e2b8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Sources/CodexBarCore/Vendored/CostUsage/CostUsageScanner+OpenCode.swift
Outdated
Show resolved
Hide resolved
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
Don't think this is even needed. Its against TOS and Anthropic has been banning users of third party apps You cannot use Claude Pro/Max with OpenCode currently (they just blocked it again) |
Yeah they blocked it again literally a few hours after I opened this PR haha. Closing 🫡 |
|
@jeankvd looks like it's working again. do you think this PR makes sense now for those of us who's using opencode with their claude account? |
Problem (by author)
When using OpenCode with the Anthropic provider (Claude Pro/Max), the cost is not being contributed towards total calculation in the CodexBar app when Claude is used as a provider in settings.
The reason is that we're only calculating the cost from Claude Code usage and not taking into account that Claude Code can be used from 3rd party clients such as OpenCode.
This PR only solves this specific issue when OpenCode usage is not calculated towards Claude Code cost. I would assume the same probably happens for users who are on Copilot/Codex/Cursor/etc subscriptions and using a tool like OpenCode as an interface.
Everything below is AI generated ⬇️
Summary
~/.local/share/opencode/storage/message/providerIDand filtering happens at call siteChanges
openCodeStorageRootoption for testabilityTesting
codexbar cost --provider claudeshows combined usage