Fix flaky CI: update deprecated model, filter leaked async task logs

- test_router_context_window_check_pre_call_check_out_group: replace deprecated
  gpt-3.5-turbo-1106 (removed from model_cost, returns max_input_tokens=0) with
  gpt-4.1-mini + mock_response
- test_async_fallbacks: filter "Task was destroyed but it is pending" messages
  that leak from parallel test execution in CI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yuneng-jiang 2026-03-15 13:38:35 -07:00
parent 968d7a3eca
commit 717d37cc5b
2 changed files with 3 additions and 1 deletions

View file

@ -825,8 +825,9 @@ def test_router_context_window_check_pre_call_check_out_group():
{ {
"model_name": "gpt-3.5-turbo-large", # openai model name "model_name": "gpt-3.5-turbo-large", # openai model name
"litellm_params": { # params for litellm completion/embedding call "litellm_params": { # params for litellm completion/embedding call
"model": "gpt-3.5-turbo-1106", "model": "gpt-4.1-mini",
"api_key": os.getenv("OPENAI_API_KEY"), "api_key": os.getenv("OPENAI_API_KEY"),
"mock_response": "Alexander was a great conqueror.",
}, },
}, },
] ]

View file

@ -83,6 +83,7 @@ def test_async_fallbacks(caplog):
log log
for log in captured_logs for log in captured_logs
if "Task exception was never retrieved" not in log if "Task exception was never retrieved" not in log
and "Task was destroyed but it is pending" not in log
and "get_available_deployment" not in log and "get_available_deployment" not in log
and "in the Langfuse queue" not in log and "in the Langfuse queue" not in log
] ]