mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
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:
parent
d84e0eabf3
commit
f9ba42860c
1 changed files with 4 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue