What's new in 1.2.0
AutoGen adapter
- Patches
ConversableAgent.initiate_chatandgenerate_replytransparently — no code changes needed - Per-agent caps via
b.agent("name", max_usd=X)withAgentBudgetExceededError - Spend visible in
budget.tree(); auto-skipped whenpyautogenis not installed
Per-tenant budget enforcement
budget(max_usd=X, tenant_id=user.id, name="api", backend=RedisBackend())— isolated cap per user, one shared backend- Redis key namespaced as
shekel:tb:{name}:{tenant_id}; 30-day rolling window by default BudgetConfigMismatchErroron limit mismatch;Budget.tenant_idproperty;summary()surfaces tenant
Quota management API (RedisBackend / AsyncRedisBackend)
get_tenant_spend·get_tenant_limit·set_tenant_limit·reset_tenant·list_tenants- Full async equivalents on
AsyncRedisBackend
shekel tenants CLI
shekel tenants list --name api— table with spend, limit, utilization--jsonflag;set-limitandresetsubcommands
Install
pip install shekel==1.2.0
pip install shekel[redis]==1.2.0 # for per-tenant enforcementFull changelog
See docs/changelog.md for the complete entry.