fix(ai_client): restore get_current_tier() backward-compat for patchers

This commit is contained in:
ed
2026-06-24 17:56:11 -04:00
parent 07aa59e855
commit ee71e5a833
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -162,6 +162,10 @@ def get_current_tier_result() -> Result[str]:
"""Returns the current tier from thread-local storage as a Result."""
return Result(data=getattr(_local_storage, "current_tier", None))
def get_current_tier() -> str | None:
"""Backward-compat wrapper; prefer get_current_tier_result().data."""
return get_current_tier_result().data
def set_current_tier(tier: Optional[str]) -> None:
"""Sets the current tier in thread-local storage."""
_local_storage.current_tier = tier