microsoft / microsoft/flint-chart

Feature Suggestion: Optional token metering & paid API key support via `neuforge-pay`

Open
#125 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.2k
Forks
235
Avg merge
17h 45m
Merged PRs (30d)
11

Description

Hi @microsoft,

Love the work on microsoft/flint-chart! 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!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Flint's MCP server and API endpoint architecture, then compare it with the proposed Python meter_endpoint example. Define the integration boundary, supported paid-key flow, token metering behavior, and session-budget outcome before implementation; the issue currently names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
api, backend, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.