Private
Public Access
fix(ai_client): restore get_current_tier() backward-compat for patchers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user