-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Pre-flight checks
- I searched existing issues and did not find a duplicate.
- I verified this on the current production released OpenCode version, or I explain why not below.
OpenCode version tested
1.2.27
opencode-quota version tested
2.10.0
Bug summary
Hey @kvn1351, thank you so much for this PR! Adding NanoGPT support is exactly the kind of contribution that moves the plugin forward, and your work here directly inspired what I ended up building.
Unfortunately, I can't merge this as-is because it's missing a few things the plugin requires, e.g. some provider metadata fields. But my template checklist didn't make those requirements explicit enough, so I'll be updating the template to reflect this clearly.
I also extended the implementation a bit, to include check balance as a fallback, incase someone stops using NanoGPT as a subscription source.
Thanks again!
Hey @slkiser, no worries. I'm very happy to help and thanks for this great plugin. Unfortunately, some of your changes have "broken" it. First of all, it's important to know that there isn't any daily quota for the LLM endpoint that is of any actual interest to the user. Daily quota only counts for images. Weekly quota is of interest however. Here's a screenshot of what we see:
So for a subscriber only the daily image usage and weekly token usage (out of the max being 60 million) count.
My branch correctly visualises this:

Whereas today's release shows me this:

It should show the usage in % relative to the 60 mil token limit for the week.
Steps to reproduce
.
Expected behavior
.
Actual behavior
.
Relevant logs/output
If not tested on current production OpenCode, explain why
No response