Feature Suggestion: Optional token metering & paid API key support via `neuforge-pay`
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reviewing FunASR's existing API and MCP serving entry points, then compare them with the proposed meter_endpoint integration for /v1/query. Clarify whether optional token metering, paid API keys, session budgets, and the neuforge-pay dependency fit the project roadmap; done requires an agreed scope and validation plan.
Written by the indexing model from the issue text.
Description
Hi @modelscope,
Love the work on modelscope/FunASR! As usage grows across AI agent frameworks, server compute costs can start adding up quickly. We've also seen developers report that their autonomous agents accidentally burn through thousands of dollars in a single session because traditional payment rails lack built-in agent guardrails.
Would you be open to adding an optional usage metering & billing decorator using neuforge-pay? It acts as a proactive Spend Firewall and Merchant of Record for MCP servers. In 3 lines of code, it meters tokens, calculates live LLM COGS, and proactively blocks agent transactions that exceed a strict session budget limit (to prevent surprise bills).
Example Integration:
from neuforge_pay import meter_endpoint
@app.get("/v1/query")
@meter_endpoint(price_charged_usd=0.05, model_name="claude-3-5-sonnet", session_budget_usd=10.00)
async def query_endpoint():
...
Happy to submit a clean PR if this aligns with your roadmap!
- Dominant language
- Python
- Stars
- 20.4k
- Forks
- 2k
- Avg merge
- 6h 31m
- Merged PRs (30d)
- 169
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelscope/FunASR
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
modelscope/FunASR#3704 · 1 comment ·
-
bug needs feedback
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
modelscope/FunASR#3401 · 2 comments ·
-
bug needs triage
Difficulty 4/5 3-5 days Newbie friendliness 30/100
modelscope/FunASR#3727 ·
-
needs triage question
Difficulty 4/5 3-5 days Newbie friendliness 30/100
modelscope/FunASR#3718 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
modelscope/FunASR#3717 · 1 comment ·
All issues in modelscope/FunASR
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100