GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — feat(console): add go usage endpoint by peculiarnewbie · Pull Request #16513 · anomalyco/opencode Conversation
|
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hey, any news on merging this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
no clue |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
+++ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I would like to see this implemented |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
+1 for implementing this. In the meantime I'm using this hacky solution https://pi.dev/packages/pi-go-bars |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I would like to see this implemented |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Official support would be nice. If you need usage and quota tracking in opencode, https://github.com/slkiser/opencode-quota |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
up |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'd employ this feature. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
+1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
+1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Did they truly forget about this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Would really love this for OpenUsage. A lot of users keep asking, and the local SQL is unreliable. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
+1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
+1 pls merge this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Upstream v1.18.16 (a3647eb) -> v1.18.17 (02546df), 32 commits. Functional changes: - fix(compaction): clearer instructions for smaller models like dsv4 flash (anomalyco#42045) - fix(provider): add Merge Gateway reasoning variants (anomalyco#41867) - fix(opencode): cap session retries with jitter (anomalyco#41939) - retry policy gains RETRY_MAX_RETRIES=5 global cap and 25% jitter - fix(opencode): detect Copilot PDF input support (anomalyco#41522) - fix(provider): scope DeepSeek V4 Flash sampling defaults (anomalyco#41620) - fix(session): route all Muse family models to the Meta system prompt (anomalyco#41581) - fix(app): use current default model (anomalyco#38603) - feat(console): add go usage endpoint (anomalyco#16513) and r2 data catalog stats - fix(ui): correct OC-2 weak icon color (anomalyco#41504) - fix(i18n): use widely recognized developer terminology (anomalyco#41532) Conflicts resolved: 30 package.json version bumps (rebranded 1.18.17-sscity), bun.lock (took upstream, rebranded workspace entries via bun install), and session/retry.ts (kept fork per-reason maxAttempts cap alongside upstream RETRY_MAX_RETRIES global cap and jitter).
Co-authored-by: vimtor <[email protected]>
Co-authored-by: vimtor <[email protected]>
Co-authored-by: vimtor <[email protected]>
Co-authored-by: vimtor <[email protected]>
GET /zen/go/v1/usage merged in anomalyco/opencode#16513 and now answers in production, so the parser no longer has to guess. The route returns `{ usage: { rolling, weekly, monthly } }`, each window holding a status, a floored percent and an ISO reset, and nothing else; the aliases and dollar fallbacks written against the proposal are gone. A window marked `rate-limited` reads as spent, since its floored percent can say 99. A valid key on a workspace without Go answers 403 with an EntitlementError, which now reads as no subscription instead of a rejected key, and a 404 is drift rather than an outage. The cookie still ranks above the key because only the console publishes dollars.
Co-authored-by: vimtor <[email protected]>
opencode exposes no plan limits, but opencode.ai has an undocumented usage route (GET /zen/go/v1/usage, anomalyco/opencode#16513) that answers the 5-hour, week and month windows with a status, a percent and a reset time. The Agents panel, the status bar and its hover now show them like Claude's and Codex's, a rate-limited window in red, on the same refresh interval. The key comes only from `opencode auth export` run in the temporary folder: the active opencode-go API key, every other entry ignored. It lives for that one request, goes to opencode.ai over https in the Authorization header and nowhere else: never written, logged, shown or passed to a child; zinc.json asks for net:opencode.ai only. A Settings toggle, on by default, turns it off. Off, no key, a revoked or expired key, a 403 or an answer the app does not know show « unknown », the reason and the console link. agents_go.sh drives a fake export and made-up route answers (nothing goes to the network) and checks the fake key appears in no file of the run: data, settings, output, scenes, child arguments and environment. One read-only check against the real route returned three windows ok. New-task: owner ZN-770 OpenCode Go usage read with the Go key
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[FEATURE]: Add Go plan usage/balance API endpoint (rolling/weekly/monthly windows)
There was an error while loading. Please reload this page.