diff --git a/proxy_server_config.yaml b/proxy_server_config.yaml index 8ed728c5b2..5d3d810926 100644 --- a/proxy_server_config.yaml +++ b/proxy_server_config.yaml @@ -46,7 +46,7 @@ model_list: model: dall-e-3 - model_name: fake-openai-endpoint litellm_params: - model: openai/gpt-3.5-turbo-0301 + model: openai/gpt-3.5-turbo api_key: fake-key api_base: https://exampleopenaiendpoint-production.up.railway.app/ - model_name: fake-openai-endpoint-2 diff --git a/tests/test_team.py b/tests/test_team.py index 424e0495d2..d73e36d1df 100644 --- a/tests/test_team.py +++ b/tests/test_team.py @@ -45,9 +45,6 @@ async def wait_for_team_member_spend_update( Wait for the team member spend update to be committed to the database. Polls the user info endpoint until the spend is updated. This is needed because spend updates are queued asynchronously and committed periodically. - - Note: If the model has no pricing (cost = 0), the spend will remain 0.0. - In that case, we just wait a bit to ensure the spend update queue has been processed. """ start_time = time.time() initial_spend = None @@ -62,21 +59,12 @@ async def wait_for_team_member_spend_update( if initial_spend is None: initial_spend = spend print(f"Initial team member spend: {spend}") - - # If spend has been updated (even if still 0), the queue has been processed - # For models with no pricing, spend will be 0, but we still need to wait - # for the update to be committed so the budget check sees the current state + if spend >= expected_min_spend: print(f"[OK] Team member spend updated: {spend} >= {expected_min_spend}") return True - - # If we've waited a reasonable amount and spend is still 0, - # it likely means the model has no pricing, but we should still - # wait a bit more to ensure the update queue has been processed - elapsed = time.time() - start_time - if elapsed > 3.0: # Wait at least 3 seconds for queue processing - print(f"[OK] Waited {elapsed:.1f}s for spend update queue processing (spend: {spend})") - return True + + print(f"[WAITING] Team member spend: {spend}, expected >= {expected_min_spend}, elapsed: {time.time() - start_time:.1f}s") await asyncio.sleep(0.5) except Exception as e: print(f"Error checking team member spend: {e}")