Commit graph

20 commits

Author SHA1 Message Date
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
Krrish Dholakia
2874b94fb1 refactor: replace .error() with .exception() logging for better debugging on sentry 2024-08-16 09:22:47 -07:00
Krrish Dholakia
c69193c321 fix: move to using pydantic obj for setting values 2024-07-11 13:18:36 -07:00
Krrish Dholakia
e391e30285 refactor: replace 'traceback.print_exc()' with logging library
allows error logs to be in json format for otel logging
2024-06-06 13:47:43 -07:00
Krrish Dholakia
b10f03706d fix(utils.py): fix streaming to not return usage dict
Fixes https://github.com/BerriAI/litellm/issues/3237
2024-04-24 08:06:07 -07:00
Krrish Dholakia
859a2af3ed build: fix mypy build issues 2024-03-21 08:27:23 -07:00
Krrish Dholakia
79978c44ba refactor: add black formatting 2023-12-25 14:11:20 +05:30
ishaan-jaff
7bc28f3b1c (fix) pydantic errors with response.time 2023-11-20 18:28:19 -08:00
Krrish Dholakia
526eb99ade fix(palm.py): exception mapping bad requests / filtered responses 2023-11-14 11:53:13 -08:00
Krrish Dholakia
4b74ddcb17 refactor: fixing linting issues 2023-11-11 18:52:28 -08:00
ishaan-jaff
194b6263c7 (feat) add model_response.usage.completion_tokens for bedrock, palm, petals, sagemaker 2023-10-27 09:51:50 -07:00
Krrish Dholakia
cc0e4f4f9f fix: fix value error if model returns empty completion 2023-10-10 10:11:40 -07:00
Krrish Dholakia
1c9f87751d fix(test-fixes): test fixes 2023-10-10 08:09:42 -07:00
Krrish Dholakia
4a1bd8267f fix: bug fix when n>1 passed in 2023-10-09 16:46:33 -07:00
Krrish Dholakia
69cdf5347a style(test_completion.py): fix merge conflict 2023-10-05 22:09:38 -07:00
Krrish Dholakia
8c48af11c2 fixes to get optional params 2023-10-02 14:44:11 -07:00
ishaan-jaff
307801e88f remove import requests from palm.py 2023-10-02 09:07:14 -07:00
ishaan-jaff
6cdd98a3fb add palm warning 2023-09-26 10:28:13 -07:00
ishaan-jaff
660a223663 lint fix 2023-09-26 10:11:53 -07:00
ishaan-jaff
a178082d89 add palm 2023-09-26 10:00:56 -07:00