mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
Litellm dev 01 14 2025 p2 (#7772)
* feat(pass_through_endpoints.py): fix anthropic end user cost tracking * fix(anthropic/chat/transformation.py): use returned provider model for anthropic handles anthropic `-latest` tag in request body throwing cost calculation errors ensures we can be accurate in our model cost tracking * feat(model_prices_and_context_window.json): add gemini-2.0-flash-thinking-exp pricing * test: update test to use assumption that user_api_key_dict can get anthropic user id * test: fix test * fix: fix test * fix(anthropic_pass_through.py): uncomment previous anthropic end-user cost tracking code block can't guarantee user api key dict always has end user id - too many code paths * fix(user_api_key_auth.py): this allows end user id from request body to always be read and set in auth object * fix(auth_check.py): fix linting error * test: fix auth check * fix(auth_utils.py): fix get end user id to handle metadata = None
This commit is contained in:
parent
73c004cfe5
commit
543655adc7
16 changed files with 287 additions and 43 deletions
|
@ -566,7 +566,7 @@ def _init_kwargs_for_pass_through_endpoint(
|
|||
"user_api_key": user_api_key_dict.api_key,
|
||||
"user_api_key_user_id": user_api_key_dict.user_id,
|
||||
"user_api_key_team_id": user_api_key_dict.team_id,
|
||||
"user_api_key_end_user_id": user_api_key_dict.user_id,
|
||||
"user_api_key_end_user_id": user_api_key_dict.end_user_id,
|
||||
}
|
||||
if _litellm_metadata:
|
||||
_metadata.update(_litellm_metadata)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue