Commit graph

3623 commits

Author SHA1 Message Date
Ishaan Jaff
3a48776720 fix /global/spend/provider 2024-09-05 12:48:58 -07:00
Ishaan Jaff
b4d6efd454 add global/spend/provider 2024-09-05 12:44:44 -07:00
Ishaan Jaff
6d656983c6 allow internal user to view global/spend/models 2024-09-05 12:38:48 -07:00
Ishaan Jaff
bb0fc2504b allow internal user to view their own spend 2024-09-05 12:35:04 -07:00
Ishaan Jaff
14ba077bf9 add usage endpoints for internal user 2024-09-05 12:34:41 -07:00
Ishaan Jaff
6ab47703b8 show /spend/logs for internal users 2024-09-05 12:14:03 -07:00
Ishaan Jaff
38890a731d fix create view - MonthlyGlobalSpendPerUserPerKey 2024-09-05 12:11:59 -07:00
Ishaan Jaff
5d808f488e add /spend/tags as allowed route for internal user 2024-09-05 10:41:43 -07:00
Krish Dholakia
6f354ecac6 fix(pass_through_endpoints): support bedrock agents via pass through (#5527) 2024-09-04 22:22:22 -07:00
Krish Dholakia
6fdee99632 LiteLLM Minor fixes + improvements (08/04/2024) (#5505)
* Minor IAM AWS OIDC Improvements (#5246)

* AWS IAM: Temporary tokens are valid across all regions after being issued, so it is wasteful to request one for each region.

* AWS IAM: Include an inline policy, to help reduce misuse of overly permissive IAM roles.

* (test_bedrock_completion.py): Ensure we are testing cross AWS region OIDC flow.

* fix(router.py): log rejected requests

Fixes https://github.com/BerriAI/litellm/issues/5498

* refactor: don't use verbose_logger.exception, if exception is raised

User might already have handling for this. But alerting systems in prod will raise this as an unhandled error.

* fix(datadog.py): support setting datadog source as an env var

Fixes https://github.com/BerriAI/litellm/issues/5508

* docs(logging.md): add dd_source to datadog docs

* fix(proxy_server.py): expose `/customer/list` endpoint for showing all customers

* (bedrock): Fix usage with Cloudflare AI Gateway, and proxies in general. (#5509)

* feat(anthropic.py): support 'cache_control' param for content when it is a string

* Revert "(bedrock): Fix usage with Cloudflare AI Gateway, and proxies in gener…" (#5519)

This reverts commit 3fac0349c2.

* refactor: ci/cd run again

---------

Co-authored-by: David Manouchehri <david.manouchehri@ai.moda>
2024-09-04 22:16:55 -07:00
Ishaan Jaff
15ac8f4ebe fix allow general guardrails on free tier 2024-09-04 19:59:32 -07:00
Ishaan Jaff
770fc45ec1 Merge pull request #5518 from BerriAI/litellm_log_request_response
[Feat] log request / response on pass through endpoints
2024-09-04 17:57:47 -07:00
Ishaan Jaff
3e1ff425de return error from /global/spend endpoint 2024-09-04 17:26:34 -07:00
Ishaan Jaff
8426d0e3e0 return error client side from spend endpoints 2024-09-04 17:20:47 -07:00
Ishaan Jaff
94ecb4e480 show error from /spend/tags 2024-09-04 17:14:49 -07:00
Ishaan Jaff
784ceaad0d rename type 2024-09-04 16:33:36 -07:00
Ishaan Jaff
b336977ff6 add doc on PassthroughStandardLoggingObject 2024-09-04 16:30:47 -07:00
Ishaan Jaff
5e121660d5 feat log request / response on pass through endpoints 2024-09-04 16:26:32 -07:00
Ishaan Jaff
b468ccbb77 Merge pull request #5514 from BerriAI/litellm_add_presidio
[Fix-Refactor] support presidio on new guardrails config
2024-09-04 16:09:54 -07:00
Krish Dholakia
0595d03116 security - Prevent sql injection in /team/update query (#5513)
* fix(team_endpoints.py): replace `.get_data()` usage with prisma interface

Prevent sql injection in `/team/update` query

Fixes https://huntr.com/bounties/a4f6d357-5b44-4e00-9cac-f1cc351211d2

* fix(vertex_ai_non_gemini.py): handle message being a pydantic model
2024-09-04 16:03:02 -07:00
Ishaan Jaff
a5f892bb6d fix init presidio guardrail 2024-09-04 15:22:37 -07:00
Ishaan Jaff
120486d2fc allow init guardrails with output parsing logic 2024-09-04 14:40:35 -07:00
Ishaan Jaff
5e15433004 docs new presidio language controls 2024-09-04 13:04:19 -07:00
Ishaan Jaff
7b1e0beda5 fix allow setting language per call to presidio 2024-09-04 12:46:59 -07:00
Ishaan Jaff
935dba4470 Merge pull request #5484 from BerriAI/litellm_fix_redis
fix proxy server - always read redis for rate limiting logic
2024-09-04 12:39:15 -07:00
Ishaan Jaff
90163de80a fix presidio calling logic 2024-09-04 12:14:30 -07:00
Ishaan Jaff
69e8e4fdb5 migrate presidio to new guardrails 2024-09-04 10:12:23 -07:00
Krish Dholakia
8eb7cb5300 LiteLLM Minor fixes + improvements (08/03/2024) (#5488)
* fix(internal_user_endpoints.py): set budget_reset_at for /user/update

* fix(vertex_and_google_ai_studio_gemini.py): handle accumulated json

Fixes https://github.com/BerriAI/litellm/issues/5479

* fix(vertex_ai_and_gemini.py): fix assistant message function call when content is not None

Fixes https://github.com/BerriAI/litellm/issues/5490

* fix(proxy_server.py): generic state uuid for okta sso

* fix(lago.py): improve debug logs

Debugging for https://github.com/BerriAI/litellm/issues/5477

* docs(bedrock.md): add bedrock cross-region inferencing to docs

* fix(azure.py): return azure response headers on aembedding call

* feat(azure.py): return azure response headers for `/audio/transcription`

* fix(types/utils.py): standardize deepseek / anthropic prompt caching usage information

Closes https://github.com/BerriAI/litellm/issues/5285

* docs(usage.md): add docs on litellm usage object

* test(test_completion.py): mark flaky test
2024-09-03 21:21:34 -07:00
Ishaan Jaff
2a6bcad5d2 Merge branch 'main' into litellm_allow_setting_route_controls 2024-09-03 17:00:22 -07:00
Ishaan Jaff
daaca2760e add test for admin only routes 2024-09-03 15:26:42 -07:00
Ishaan Jaff
bfb0aceeae add check for admin only routes 2024-09-03 15:03:32 -07:00
Ishaan Jaff
dd9ae9ccae Merge pull request #5489 from BerriAI/litellm_Add_secret_managers
[Feat] Add Google Secret Manager Support
2024-09-03 14:51:32 -07:00
Ishaan Jaff
cf66ca89b9 allow setting allowed routes on proxy 2024-09-03 13:59:31 -07:00
Ishaan Jaff
b5d1d93c14 refactor secret managers 2024-09-03 10:58:02 -07:00
Ishaan Jaff
47bfa77e3b read from .env for secret manager 2024-09-03 10:53:52 -07:00
Ishaan Jaff
09519b74db refactor get_secret 2024-09-03 10:42:12 -07:00
Krrish Dholakia
030567b886 fix(proxy/_types.py): add lago 'charge_by' env var to proxy ui 2024-09-03 08:19:40 -07:00
Krish Dholakia
18da7adce9 feat(router.py): Support Loadbalancing batch azure api endpoints (#5469)
* feat(router.py): initial commit for loadbalancing azure batch api endpoints

Closes https://github.com/BerriAI/litellm/issues/5396

* fix(router.py): working `router.acreate_file()`

* feat(router.py): working router.acreate_batch endpoint

* feat(router.py): expose router.aretrieve_batch function

Make it easy for user to retrieve the batch information

* feat(router.py): support 'router.alist_batches' endpoint

Adds support for getting all batches across all endpoints

* feat(router.py): working loadbalancing on `/v1/files`

* feat(proxy_server.py): working loadbalancing on `/v1/batches`

* feat(proxy_server.py): working loadbalancing on Retrieve + List batch
2024-09-02 21:32:55 -07:00
Ishaan Jaff
9c14d63697 Merge branch 'main' into litellm_track_imagen_spend_logs 2024-09-02 21:21:15 -07:00
Ishaan Jaff
b6009233ac fix always read redis 2024-09-02 21:08:32 -07:00
Ishaan Jaff
7f8b43542b fix success handler typing 2024-09-02 19:42:36 -07:00
Ishaan Jaff
778cba702e fix linting errors 2024-09-02 19:39:10 -07:00
Ishaan Jaff
e882219b7d Merge pull request #5480 from BerriAI/litellm_track_streaming_spendLogs
[Feat] Track Usage for `/streamGenerateContent` endpoint
2024-09-02 19:25:52 -07:00
Ishaan Jaff
de3fab70bd fix linting error 2024-09-02 18:14:15 -07:00
Ishaan Jaff
e77133f3e1 fix linting error 2024-09-02 18:13:32 -07:00
Ishaan Jaff
dc042d1a00 add cost tracking for pass through imagen 2024-09-02 18:10:46 -07:00
Ishaan Jaff
54fbea1a82 track image gen in spend logs 2024-09-02 17:36:25 -07:00
Ishaan Jaff
e3becc6514 refactor vtx image gen 2024-09-02 17:35:51 -07:00
Ishaan Jaff
a9c9967b6d fix lining 2024-09-02 17:08:30 -07:00
Ishaan Jaff
8b4ba3ccb8 fix linting error 2024-09-02 17:08:03 -07:00