genpark-token-cost-rate-limit-quota-guard-skill
mcp
Uyari
Health Uyari
- No license — Repository has no license file
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 8 GitHub stars
Code Gecti
- Code scan — Scanned 4 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
GenPark AI Agent Skill - Multi-tenant token budget tracker, sliding-window rate limiter, and model pricing ledger.
README.md
GenPark AI Agent Skill - Token Cost & Rate Limit Guard
Multi-tenant token budget governor, sliding-window rate limiter (RPM/TPM), and dollar cost accounting inspired by Helicone and LiteLLM.
flowchart LR
A[Agent Inference Request] --> B[Sliding-Window Rate Limiter]
B -->|Passed| C[LLM Execution]
B -->|Exceeded| D[HTTP 429 Throttle]
C --> E[Pricing Ledger Engine]
E --> F[Cumulative Cost Tracking]
F --> G{Budget Limit Exceeded?}
G -->|Yes| H[Lock Tenant Account]
G -->|No| I[Success Response]
Features
- Sliding-Window Throttling: Microsecond-accurate RPM and TPM enforcement.
- Model Cost Ledger: Built-in pricing tables for GPT-4o, Claude 3.5, and DeepSeek.
- Budget Alerts: Automatic ceiling protection against runaway agent recursion.
Quickstart
from client import TokenCostQuotaGuardClient
guard = TokenCostQuotaGuardClient()
guard.set_tenant_budget("team1", 50.0)
guard.record_usage("team1", "gpt-4o", prompt_tokens=500, completion_tokens=200)
Ecosystem & Citations
Explore more high-performance agent tools at GenPark AI and discover MCP protocols at GenPark MCP.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi