MCPcopy Create free account
hub / github.com/AI45Lab/Code / AllowingGuard

Class AllowingGuard

sdk/python/tests/test_budget_guard.py:56–65  ·  view source on GitHub ↗

BudgetGuard that returns None / no-op for every method. Verifies that "shape with no real methods" still works (the wrapper looks up by name at call time).

Source from the content-addressed store, hash-verified

54
55
56class AllowingGuard:
57 """BudgetGuard that returns None / no-op for every method. Verifies
58 that "shape with no real methods" still works (the wrapper looks
59 up by name at call time)."""
60
61 def check_before_llm(self, session_id: str, estimated_tokens: int):
62 return None
63
64 def record_after_llm(self, session_id: str, usage: dict) -> None:
65 pass
66
67
68def main() -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68