fix(azure_ai): keep api_version as a property alongside the new getter

The PLR0206 fix renamed the property to get_api_version and dropped it.
AzureFoundryModelInfo().api_version does resolve today, so removing it
breaks external callers. Restore it as a zero-arg property delegating to
the staticmethod, which satisfies PLR0206 either way.
This commit is contained in:
ryan-crabbe-berri 2026-09-14 14:56:07 -07:00
parent d84e0eabf3
commit f9ba42860c

View file

@ -148,6 +148,10 @@ class AzureFoundryModelInfo(BaseLLMModelInfo):
def get_api_version(api_version: str | None = None) -> str | None:
return api_version or litellm.api_version or get_secret_str("AZURE_API_VERSION")
@property
def api_version(self) -> str | None:
return AzureFoundryModelInfo.get_api_version()
def get_token_counter(self) -> BaseTokenCounter | None:
"""
Factory method to create a token counter for Azure AI.