Commit graph

6734 commits

Author SHA1 Message Date
Rajan Paneru
65b07bcb8c Preserving the Pydantic Message Object
Following statement replaces the Pydantic Message Object and initialize it with the dict
model_response["choices"][0]["message"] = response_json["message"]

We need to make sure message is always litellm.Message object

As a fix, based on the code of ollama.py file, i am updating just the content intead of entire object for both sync and async functions
2024-05-10 22:12:32 +09:30
Rajan Paneru
8eb842dcf5 revered the patch so that the fix can be applied in the main place 2024-05-10 22:04:44 +09:30
Rajan Paneru
c45085b728 Based on the data-type using json
The value of response_obj["choices"][0]["message"] is Message object and dict

Added a conditional to use .json only iff it is Message Object
2024-05-10 10:06:50 +09:30
Krish Dholakia
8ad979cdfe
Merge branch 'main' into litellm_region_based_routing 2024-05-08 22:19:51 -07:00
Krish Dholakia
3f13251241
Merge pull request #3479 from simonsanvil/feature/watsonx-integration
Add support for async streaming to watsonx provider
2024-05-08 22:19:05 -07:00
Krrish Dholakia
3d18897d69 feat(router.py): enable filtering model group by 'allowed_model_region' 2024-05-08 22:10:17 -07:00
Krrish Dholakia
db666b01e5 feat(proxy_server.py): add CRUD endpoints for 'end_user' management
allow admin to specify region + default models for end users
2024-05-08 18:50:36 -07:00
Ishaan Jaff
dea4a081c7 ui - new build 2024-05-08 18:45:54 -07:00
Ishaan Jaff
6d955ef457
Merge branch 'main' into ui_show_spend_end_user 2024-05-08 18:29:25 -07:00
Ishaan Jaff
a38d9e35fd feat - get price by end_user 2024-05-08 18:19:27 -07:00
Ishaan Jaff
b99a6717af fix - startTime, endTime in GlobalEndUsersSpend 2024-05-08 17:05:09 -07:00
Ishaan Jaff
1eea4d1c90 fix /global/spend/end_users 2024-05-08 17:03:38 -07:00
Ishaan Jaff
faab704d28 update global/spend/end_users 2024-05-08 17:03:09 -07:00
Ishaan Jaff
41a4a06389
Merge pull request #3534 from BerriAI/litellm_fix_cost_calc_bedrock
[Fix] `litellm.completion_cost(model="bedrock/anthropic.claude-instant-v1"..)`
2024-05-08 16:59:46 -07:00
Krrish Dholakia
6575143460 feat(proxy_server.py): return litellm version in response headers 2024-05-08 16:00:08 -07:00
Ishaan Jaff
33d6caa889 fix completion cost test 2024-05-08 15:51:30 -07:00
Ishaan Jaff
282b8d0ae4 test bedrock pricing 2024-05-08 15:26:53 -07:00
Ishaan Jaff
8348c671a9 fix - cost tracking - looking up bedrock pricing 2024-05-08 15:25:52 -07:00
Krish Dholakia
91bb7cd261
Merge pull request #3437 from msabramo/add-engines-model-chat-completions-endpoint
Add `/engines/{model}/chat/completions` endpoint
2024-05-08 14:30:39 -07:00
Ishaan Jaff
597b09598c feat - send alert on cooling down a deploymeny 2024-05-08 14:14:14 -07:00
Ishaan Jaff
aef3d89f0c fix add cooldown_deployment alert_type 2024-05-08 14:13:51 -07:00
Krrish Dholakia
51b6c3bdbc test(test_function_call_parsing.py): add test for function call parsing
Closes https://github.com/BerriAI/litellm/issues/2654
2024-05-08 10:54:26 -07:00
Krrish Dholakia
6ce13ab364 refactor(main.py): trigger new build 2024-05-08 09:24:01 -07:00
Krrish Dholakia
a854824c02 fix(main.py): fix together ai text completion call 2024-05-08 09:10:45 -07:00
CyanideByte
b7c60031ca Pydantic warning snuck in here 2024-05-07 23:59:18 -07:00
Krish Dholakia
0e709fdc21
Merge branch 'main' into litellm_ui_fixes_6 2024-05-07 22:01:04 -07:00
Krish Dholakia
303e0c6226
Revert "* feat(factory.py): add support for merging consecutive messages of one role when separated with empty message of another role" 2024-05-07 21:42:18 -07:00
Krrish Dholakia
fbcda918de feat(ui/model_dashboard.tsx): show if model is config or db model 2024-05-07 21:34:18 -07:00
Krrish Dholakia
f45954d154 test(test_config.py): fix test 2024-05-07 21:31:03 -07:00
Krish Dholakia
a325bf2fb8
Merge pull request #3478 from nkvch/Issue-#3474-anthropic-roles-alternation-issue
* feat(factory.py): add support for merging consecutive messages of one role when separated with empty message of another role
2024-05-07 21:24:47 -07:00
Krrish Dholakia
8d04f4686f test: fix test 2024-05-07 21:14:33 -07:00
Krrish Dholakia
dc8239ecc6 feat(model_dashboard.tsx): allow adding output cost per token on ui 2024-05-07 21:09:49 -07:00
Krrish Dholakia
5a16bec6a1 feat(model_dashboard.tsx): allow user to edit input cost per token for model on ui
also contains fixes for `/model/update`
2024-05-07 20:57:21 -07:00
Ishaan Jaff
21d3407b95 fix replicate test 2024-05-07 19:48:46 -07:00
Ishaan Jaff
4e7b5aa9d7
Merge pull request #3439 from phact/patch-3
add_function_to_prompt bug fix
2024-05-07 19:31:19 -07:00
Ishaan Jaff
2725a55e7a
Merge pull request #3470 from mbektas/fix-ollama-embeddings
support sync ollama embeddings
2024-05-07 19:21:37 -07:00
Ishaan Jaff
6e72857cf7 fix model cost map 2024-05-07 19:15:58 -07:00
Ishaan Jaff
223e386737
Merge pull request #3511 from BerriAI/litellm_router_send_exceptions_slack
[Feat] litellm.Router / litellm.completion -  send llm exceptions to slack
2024-05-07 19:09:44 -07:00
Ishaan Jaff
596adf6e2f test - slack alerting on litellm router 2024-05-07 19:04:25 -07:00
Krrish Dholakia
312249ca44 feat(ui/model_dashboard.tsx): show if model is config or db model 2024-05-07 18:29:14 -07:00
Ishaan Jaff
dc74204427 fix typo 2024-05-07 18:27:49 -07:00
Ishaan Jaff
e8053c3d0b fix slack alerting 2024-05-07 18:17:12 -07:00
Ishaan Jaff
c08352a0ce router- initialize alerting 2024-05-07 18:03:04 -07:00
Ishaan Jaff
5fd3b12d34 add router alerting type 2024-05-07 17:46:18 -07:00
Ishaan Jaff
17787db973
Merge pull request #3503 from paul-gauthier/deepseek
Added "deepseek/" as a supported provider (openai compatible)
2024-05-07 15:15:47 -07:00
Ishaan Jaff
b1230dd919 test - slack alerts on router 2024-05-07 15:12:21 -07:00
Ishaan Jaff
32f3e032e9 feat - send slack alerts litellm.router 2024-05-07 15:10:47 -07:00
Krish Dholakia
2aaaa5e1b4
Merge pull request #3506 from BerriAI/litellm_reintegrate_langfuse_url_slack_alert
feat(slack_alerting.py): reintegrate langfuse trace url for slack alerts
2024-05-07 15:03:29 -07:00
Ishaan Jaff
84055c0546
Merge pull request #3510 from BerriAI/litellm_make_lowest_cost_async
[Feat] Make lowest cost routing Async
2024-05-07 14:14:04 -07:00
Ishaan Jaff
8644aec8d3 test - lowest cost router 2024-05-07 13:52:34 -07:00