File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
tests/contrib/openai_agents Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11import json
22import os
3+ import sys
34import uuid
45from dataclasses import dataclass
56from datetime import timedelta
3940 trace ,
4041)
4142from agents .extensions .handoff_prompt import RECOMMENDED_PROMPT_PREFIX
42- from agents .extensions .models .litellm_provider import LitellmProvider
4343from agents .items import (
4444 HandoffOutputItem ,
4545 ToolCallItem ,
@@ -1853,9 +1853,14 @@ async def test_exception_handling(client: Client):
18531853 await assert_status_retry_behavior (404 , client , should_retry = False )
18541854
18551855
1856- async def test_lite_llm (client : Client ):
1856+ async def test_lite_llm (client : Client , env : WorkflowEnvironment ):
18571857 if not os .environ .get ("OPENAI_API_KEY" ):
18581858 pytest .skip ("No openai API key" )
1859+ if sys .version_info < (3 , 10 ):
1860+ pytest .skip ("Lite LLM does not import below 3.10" )
1861+
1862+ from agents .extensions .models .litellm_provider import LitellmProvider
1863+
18591864 new_config = client .config ()
18601865 new_config ["plugins" ] = [
18611866 openai_agents .OpenAIAgentsPlugin (
You can’t perform that action at this time.
0 commit comments