MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _spending_payload

Function _spending_payload

uncommon_route/support.py:109–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108
109def _spending_payload() -> dict[str, Any]:
110 status = SpendControl().status()
111 return {
112 "limits": {
113 key: value
114 for key, value in vars(status.limits).items()
115 if value is not None
116 },
117 "spent": status.spent,
118 "remaining": {
119 key: value
120 for key, value in status.remaining.items()
121 if value is not None
122 },
123 "calls": status.calls,
124 }
125
126
127def _stats_summary_payload(stats: RouteStats) -> dict[str, Any]:

Callers 1

build_support_bundleFunction · 0.85

Calls 2

SpendControlClass · 0.90
statusMethod · 0.45

Tested by

no test coverage detected