Krish Dholakia
f68eb6f74e
Merge pull request #3704 from BerriAI/litellm_replicate_async_fxi
...
fix(replicate.py): move replicate calls to being async
2024-05-16 17:27:12 -07:00
Krrish Dholakia
709373b15c
fix(replicate.py): move replicate calls to being completely async
...
Closes https://github.com/BerriAI/litellm/issues/3128
2024-05-16 17:24:08 -07:00
Ishaan Jaff
bd63af395f
ui - new build
2024-05-16 17:08:36 -07:00
Ishaan Jaff
a292583ff1
fix - allow users to opt into specific alert types
2024-05-16 16:52:44 -07:00
Krrish Dholakia
a2a5884df1
fix(utils.py): allow passing in custom pricing to completion_cost as params
2024-05-16 16:24:44 -07:00
Ishaan Jaff
97324800ec
Merge pull request #3694 from BerriAI/litellm_allow_setting_anthropic_beta
...
[Feat] Support Anthropic `tools-2024-05-16` - Set Custom Anthropic Custom Headers
2024-05-16 15:48:26 -07:00
Krrish Dholakia
bc23365acc
fix(utils.py): update completion_cost docstring
2024-05-16 15:47:40 -07:00
Krrish Dholakia
ce4dffb7cb
fix(utils.py): fix logging level of error message
2024-05-16 15:44:08 -07:00
Krish Dholakia
acf95e978d
Merge pull request #3575 from BerriAI/litellm_end_user_obj
...
fix(proxy_server.py): check + get end-user obj even for master key calls
2024-05-16 15:34:06 -07:00
Krrish Dholakia
48714805bd
fix(proxy_server.py): fix code
2024-05-16 15:02:39 -07:00
Ishaan Jaff
e19e475c9f
test - setting extra headers for anthropic tool use
2024-05-16 14:41:26 -07:00
Ishaan Jaff
23bcd03904
feat: Anthropic allow users to set anthropic-beta in headers
2024-05-16 14:40:31 -07:00
Ishaan Jaff
1fc9bcb184
feat use OpenAI extra_headers param
2024-05-16 14:38:17 -07:00
Ishaan Jaff
2179598d1d
Merge pull request #3693 from BerriAI/litellm_fix_gemini_responses
...
[Fix] AI Studio (Gemini API) returns invalid 1 index instead of 0 when "stream": false
2024-05-16 14:21:55 -07:00
Krish Dholakia
0a775821db
Merge branch 'main' into litellm_end_user_obj
2024-05-16 14:16:09 -07:00
Krish Dholakia
92729478c3
Merge pull request #3645 from paneru-rajan/issue-3627-timeout-support
...
Timeout param: custom_llm_provider needs to be set before setting timeout
2024-05-16 14:15:34 -07:00
Krrish Dholakia
a7b9a03991
docs(billing.md): add tutorial on billing with litellm + lago to docs
2024-05-16 14:13:39 -07:00
Ishaan Jaff
a2ef089667
fix - choices index for gemini/ provider
2024-05-16 13:52:46 -07:00
Ishaan Jaff
e9358684fb
feat add gemini-1.5-flash-latest
2024-05-16 13:48:51 -07:00
Ishaan Jaff
0a816b2c45
Merge pull request #3682 from BerriAI/litellm_token_counter_endpoint
...
[Feat] `token_counter` endpoint
2024-05-16 13:39:23 -07:00
Krrish Dholakia
3acb31fa49
docs(lago.md): add lago usage-based billing quick-start to docs
2024-05-16 13:24:04 -07:00
Ishaan Jaff
4a5e6aa43c
test - token count response
2024-05-16 13:20:01 -07:00
Krish Dholakia
d43f75150a
Merge pull request #3685 from BerriAI/litellm_lago_integration
...
feat(lago.py): Enable Usage-based billing with lago
2024-05-16 13:09:48 -07:00
Ishaan Jaff
d16a6c03a2
feat - include model name in cool down alerts
2024-05-16 12:52:15 -07:00
Ishaan Jaff
8c3657bad0
Merge pull request #3686 from msabramo/msabramo/fix-datetime-utcnow-deprecation-warnings
...
Fix `datetime.datetime.utcnow` `DeprecationWarning`
2024-05-16 12:19:06 -07:00
Krish Dholakia
ea976d8c30
Merge pull request #3663 from msabramo/msabramo/allow-non-admins-to-use-openai-routes
...
Allow non-admins to use `/engines/{model}/chat/completions`
2024-05-16 12:17:50 -07:00
Marc Abramowitz
4af6638be6
Fix datetime.datetime.utcnow DeprecationWarning
...
Eliminates these warning when running tests:
```
$ cd litellm/tests
pytest test_key_generate_prisma.py -x -vv
...
====================================================================== warnings summary =======================================================================
...
test_key_generate_prisma.py::test_generate_and_call_with_expired_key
test_key_generate_prisma.py::test_key_with_no_permissions
/Users/abramowi/Code/OpenSource/litellm/litellm/proxy/proxy_server.py:2934: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
expires = datetime.utcnow() + timedelta(seconds=duration_s)
...
```
2024-05-16 11:56:02 -07:00
Marc Abramowitz
4194bafae0
Add nicer test ids when using pytest -v
...
Replace:
```
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route0] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route10] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route11] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route12] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route13] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route14] PASSED
````
with:
```
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'audio_transcriptions', 'path': '/audio/transcriptions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'audio_transcriptions', 'path': '/v1/audio/transcriptions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'chat_completion', 'path': '/chat/completions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'chat_completion', 'path': '/engines/{model}/chat/completions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'chat_completion', 'path': '/openai/deployments/{model}/chat/completions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'chat_completion', 'path': '/v1/chat/completions'}] PASSED
```
2024-05-16 11:34:22 -07:00
Ishaan Jaff
22ba5fa186
feat - try using hf tokenizer
2024-05-16 10:59:29 -07:00
Krrish Dholakia
e273e66618
feat(lago.py): adding support for usage-based billing with lago
...
Closes https://github.com/BerriAI/litellm/issues/3639
2024-05-16 10:54:18 -07:00
Marc Abramowitz
cf71857354
Add more routes to test_generate_and_call_with_valid_key
2024-05-16 10:44:36 -07:00
Marc Abramowitz
dc52c83b88
Add more routes to test_generate_and_call_with_valid_key
2024-05-16 10:05:35 -07:00
Marc Abramowitz
c427ea3781
Add "/engines/{model}/chat/completions" to openai_routes
...
I don't think that this helps with the issue that I'm seeing, but I
think it might be nice to have this model listed in the openai_routes
list so that it's documented that it's a valid chat_completion route.
2024-05-16 10:03:23 -07:00
Ishaan Jaff
c646b809a6
fix token counter endpoint
2024-05-16 10:03:21 -07:00
Ishaan Jaff
b790d65d28
fix make token counter a /utils/token_counter
2024-05-16 10:00:34 -07:00
Ishaan Jaff
d42e5fcbd5
working token counter endpoint
2024-05-16 09:58:22 -07:00
Marc Abramowitz
d5b2e8e7e8
Make test_generate_and_call_with_valid_key parametrized
...
This allows us to test the same code with different routes.
For example, it lets us test the `/engines/{model}/chat/completions`
route, which https://github.com/BerriAI/litellm/pull/3663 fixes.
2024-05-16 09:54:10 -07:00
Ishaan Jaff
e50284bc72
dev - token_counter endpoint
2024-05-16 09:47:07 -07:00
Ishaan Jaff
5310706d1d
Merge pull request #3681 from BerriAI/litellm_fix_langfuse_flush_on_shutdown
...
[Fix] Flush langfuse logs on proxy shutdown
2024-05-16 09:45:33 -07:00
Ishaan Jaff
579bc09c37
fix - flush langfuse logs on proxy shutdown
2024-05-16 09:21:48 -07:00
Ishaan Jaff
848561a8a7
fix - router show better client side errors
2024-05-16 09:01:27 -07:00
Marc Abramowitz
b079f4cb79
model_info_v{1,2} (LiteLLM) => model_list (OpenAI)
2024-05-16 07:54:09 -07:00
Krish Dholakia
152946e910
Merge branch 'main' into litellm_end_user_cost_tracking
2024-05-15 22:27:04 -07:00
Krish Dholakia
57d425aed7
Merge pull request #3666 from BerriAI/litellm_jwt_fix
...
feat(proxy_server.py): JWT-Auth improvements
2024-05-15 22:22:44 -07:00
Krrish Dholakia
600b6f7e1d
feat(proxy_server.py): support 'user_id_upsert' flag for jwt_auth
2024-05-15 22:19:59 -07:00
Krrish Dholakia
99653d2d3e
feat(handle_jwt.py): add support for 'team_id_default
...
allows admin to set a default team id for spend-tracking + permissions
2024-05-15 21:33:35 -07:00
Ishaan Jaff
bb86d2510f
(ci/cd) run again
2024-05-15 21:07:55 -07:00
Krrish Dholakia
f48cd87cf3
feat(proxy_server.py): make team_id optional for jwt token auth (only enforced, if set)
...
Allows users to use jwt auth for internal chat apps
2024-05-15 21:05:14 -07:00
Ishaan Jaff
ac71a89b0e
ui - new build
2024-05-15 21:04:09 -07:00
Ishaan Jaff
5300a4c9b3
fix model prices
2024-05-15 21:00:56 -07:00