Increase wait timeout to 90s and pytest.fail() instead of silently
continuing, so the failure message points at the real cause.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gpt-3.5-turbo-0301 was removed from the model cost map, so every call
had response_cost=0 and team member spend never increased. The wait
helper also returned True after 3s regardless of whether spend updated.
- Switch fake-openai-endpoint to gpt-3.5-turbo (has pricing in cost map)
- Remove premature early-return in wait_for_team_member_spend_update
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, the test created a user first (without team_id), then added them
to a team. This caused the API key to have team_id=None, which broke team
budget tracking and enforcement.
The fix:
- Create team first, then create user with team_id parameter
- This ensures the API key gets team_id set from creation time
- Team budget tracking and enforcement now work correctly
Added comprehensive comments explaining why the order is critical and should
not be changed, as it tests the intended flow where keys are associated with
teams at creation time.
Also added extensive debugging output to help diagnose future issues.
* fix(team_endpoints.py): ensure 404 raised when team not found
* fix(key_management_endpoints.py): fix adding tags to key when metadata is empty
* fix(key_management_endpoints.py): refactor set metadata field to use common function across keys + teams
reduces scope for errors + easier testing
* fix: fix linting error
* fix(team_endpoints.py): cleanup user <-> team association on team delete
Fixes issue where user table still listed team membership post delete
* test(test_team.py): update e2e test - ensure user/team membership is deleted on team delete
* fix(base_invoke_transformation.py): fix deepseek r1 transformation
remove deepseek name from model url
* test(test_completion.py): assert model route not in url
* feat(base_invoke_transformation.py): infer region name from model arn
prevent errors due to different region name in env var vs. model arn, respect if explicitly set in call though
* test: fix test
* test: skip on internal server error
* test: add more unit testing for team member add
* fix(team_endpoints.py): add validation check to prevent same user from being added to team again
prevents duplicates
* fix(team_endpoints.py): raise error if `/team/member_delete` called on member that's not in team
prevent being able to call delete on same member multiple times
* test: update initial tests
* test: fix test
* test: update test to handle no member duplication
* fix(deepseek/chat): convert content list to str
Fixes https://github.com/BerriAI/litellm/issues/6642
* test(test_deepseek_completion.py): implement base llm unit tests
increase robustness across providers
* fix(router.py): support content policy violation fallbacks with default fallbacks
* fix(opentelemetry.py): refactor to move otel imports behing flag
Fixes https://github.com/BerriAI/litellm/issues/6636
* fix(opentelemtry.py): close span on success completion
* fix(user_api_key_auth.py): allow user_role to default to none
* fix: mark flaky test
* fix(opentelemetry.py): move otelconfig.from_env to inside the init
prevent otel errors raised just by importing the litellm class
* fix(user_api_key_auth.py): fix auth error
this also removes the functionality for modifying membership via `/team/update`. This is not considered a breaking change, as we've been pointing to usage of `/team/member_add` and `/team/member_delete` for this. Previous behaviour for this endpoint was causing it to be non-functional. If you're impacted, please let us know.