fix(o_series_handler.py): handle async calls

This commit is contained in:
Krrish Dholakia 2025-03-11 21:22:13 -07:00
parent d9c32342fe
commit 16224f8db6
2 changed files with 4 additions and 0 deletions

View file

@ -45,6 +45,7 @@ class AzureOpenAIO1ChatCompletion(BaseAzureLLM, OpenAIChatCompletion):
api_base=api_base, api_base=api_base,
api_version=api_version, api_version=api_version,
client=client, client=client,
_is_async=acompletion,
) )
return super().completion( return super().completion(
model_response=model_response, model_response=model_response,

View file

@ -868,10 +868,13 @@ class BaseLLMChatTest(ABC):
except Exception as e: except Exception as e:
pytest.fail(f"Error occurred: {e}") pytest.fail(f"Error occurred: {e}")
@pytest.mark.flaky(retries=3, delay=1)
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_completion_cost(self): async def test_completion_cost(self):
from litellm import completion_cost from litellm import completion_cost
litellm._turn_on_debug()
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True" os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
litellm.model_cost = litellm.get_model_cost_map(url="") litellm.model_cost = litellm.get_model_cost_map(url="")