mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6684] [Feature]: NanoGPT subscription usage and model cost indicators #3743
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3743
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ylli-selmani on GitHub (Sep 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6684
Originally assigned to: @SpicyMarinara on GitHub.
HELLO! So, I've already implemented this locally, and tested it, so i think it works great, and here's the FR. I'll add screenshots of my local implementation below, and in the eventual PR too, obviously. Also, this FR and the feature itself was primarily written by my agent, fyi.
What problem does this solve?
NanoGPT subscription users cannot see how much of their weekly limit they have used without
leaving Marinara and opening the NanoGPT dashboard. There is also no way to tell
which models in the dropdown are covered by a subscription and which consume
quota at a higher rate.
Two specific gaps:
only discover you are near the limit when generation starts failing.
sent (specifically 2x for something like GLM 5.3). Others are not in the subscription at all and bill to
the paid balance instead. The model dropdown shows neither, so the expensive
choice looks identical to the cheap one.
Proposed solution
Optional Management Token field on the NanoGPT connection, below the API
key. Management tokens can be created with a
usage:read-only scope, so theinference key never has to be used for quota reads. It is used when present
and falls back to the API key otherwise. This is simply because the nanoGPT
documentation itself recommends it.
"Show subscription usage" toggle (off by default, per connection) that
displays weekly input-token quotas. When enabled, the meter appears
in three places:
Model list indicators, using data already returned by the existing
detailed=truemodels call:Nxpill on models the subscription covers that consume more than oneinput token per token sent,
1xpill when covered at the normal rate,Paidpill when the model is not in the subscription.Alternatives considered
it means a quota display holds a credential that can spend balance. The
management token is the safer default.
refresh and some users do not want a second progress bar in the chat UI, hence
the per-connection toggle.
Additional context
Endpoints used (both hosts are hardcoded because neither is derivable from the
stored base URL of
https://nano-gpt.com/api/v1):https://nano-gpt.com/api/management/v1/subscription/usagehttps://api.nano-gpt.com/api/subscription/v1/usageNotes for review:
subscription.inputTokenMultiplieris not in NanoGPT's published OpenAPIdump, but is returned by the live API and verified by direct request. It is
nested under
subscriptionalongsideincluded.percentUsedis a fraction, not a percentage, and can exceed 1.degraded: trueresponse means"unknown" and is rendered as unknown rather than as zero or full.
usage:read-only token returns 403 on/api-keys, which is expected.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
Local Examples: