Commit graph

1736 commits

Author SHA1 Message Date
Krrish Dholakia
682ec33aa0 fix(litellm_logging.py): initialize global variables
Fixes https://github.com/BerriAI/litellm/issues/4281
2024-06-19 18:39:45 -07:00
Krrish Dholakia
16da21e839 feat(llm_cost_calc/google.py): do character based cost calculation for vertex ai
Calculate cost for vertex ai responses using characters in query/response

 Closes https://github.com/BerriAI/litellm/issues/4165
2024-06-19 17:18:42 -07:00
Ishaan Jaff
3c6785c207 add ft:gpt4 2024-06-19 16:49:45 -07:00
Ishaan Jaff
8c07f3edf4 fix remove get_or_generate_uuid 2024-06-19 14:10:35 -07:00
Ishaan Jaff
f5ebc1a042
Merge pull request #4282 from BerriAI/litellm_add_openrouter_exception_mapping
feat - add open router exception mapping
2024-06-19 12:25:12 -07:00
Krish Dholakia
3a3b3667ee
Merge branch 'main' into litellm_aws_kms_fixes 2024-06-19 09:30:54 -07:00
Ishaan Jaff
5982fd88f9 feat - add open router exception mapping 2024-06-19 08:40:08 -07:00
Tom Usher
17482ded74 Return output_vector_size in get_model_info 2024-06-19 14:09:20 +01:00
Krish Dholakia
0c2c02ba8d
Merge pull request #4266 from BerriAI/litellm_gemini_image_url
Support 'image url' to vertex ai / google ai studio gemini models
2024-06-18 20:39:25 -07:00
Krish Dholakia
d96ffe8075
Merge pull request #4271 from BerriAI/litellm_vertex_httpx_fix
fix(vertex_httpx.py): Correctly handle Vertex content policy violation error
2024-06-18 20:19:46 -07:00
Ishaan Jaff
a26a023ff8 fix - log langfuse prompt 2024-06-18 19:25:51 -07:00
Krrish Dholakia
f41c443abb fix(vertex_httpx.py): re-raise vertex content policy violation error
Fixes https://github.com/BerriAI/litellm/issues/4270
2024-06-18 19:00:35 -07:00
Ishaan Jaff
2d15a3c586 fix - mock completion request 2024-06-18 17:08:54 -07:00
Krrish Dholakia
5ad095ad9d fix(openai.py): deepinfra function calling - drop_params support for unsupported tool choice value 2024-06-18 16:19:57 -07:00
Krrish Dholakia
3f7252c422 fix(support-passing-image-url-to-gemini-via-vertex-ai): Closes https://github.com/BerriAI/litellm/issues/4262 2024-06-18 10:55:58 -07:00
Ishaan Jaff
8f3bd0780b fix exception mapping for vertex ai 2024-06-18 08:38:36 -07:00
Krish Dholakia
63216f42b8
Merge branch 'main' into litellm_gemini_refactoring 2024-06-17 19:50:56 -07:00
Ishaan Jaff
c93463b535 fix maintain older usage of logfire 2024-06-17 19:42:39 -07:00
Ishaan Jaff
4a75e57b6f fix logfire 2024-06-17 19:21:35 -07:00
Krrish Dholakia
fca2ffb480 fix(utils.py): return cost above 128k from get_model_info 2024-06-17 19:15:02 -07:00
Krrish Dholakia
3d9ef689e7 fix(vertex_httpx.py): check if model supports system messages before sending separately 2024-06-17 17:32:38 -07:00
Krish Dholakia
a80520004e
Merge branch 'main' into litellm_gemini_refactoring 2024-06-17 17:28:50 -07:00
Ishaan Jaff
fc23399b6f
Merge pull request #4247 from BerriAI/litellm_add_codestral_fim
[Feat] Add Codestral FIM API
2024-06-17 16:35:47 -07:00
Krish Dholakia
02d9d96141
Merge pull request #4245 from BerriAI/litellm_gemini_pricing_token_counter
VertexAI/Gemini: Calculate cost based on context window
2024-06-17 16:35:23 -07:00
Ishaan Jaff
2ce032405d test - codestral streaming 2024-06-17 14:17:25 -07:00
Ishaan Jaff
364492297d feat - add fim codestral api 2024-06-17 13:46:03 -07:00
Krrish Dholakia
be66800a98 feat(main.py): initial commit - refactoring google ai studio to just use vertex httpx
Uses the same calling logic for google ai studio/vertex ai. Simplifies logic, gives google ai studio integration all of vertex
ai features.
2024-06-17 13:31:46 -07:00
Ishaan Jaff
ad47fee181 feat add text completion config for mistral text 2024-06-17 12:48:46 -07:00
Krish Dholakia
fcea4c22ad
Merge pull request #4228 from CodeVigilanteOfficial/fix_rce_eval
Update utils.py (fix dangerous code)
2024-06-17 12:43:29 -07:00
Krrish Dholakia
f597aa432b feat(cost_calculator.py): add cost calculating for dynamic context window (vertex ai / google ai studio) 2024-06-17 12:38:10 -07:00
Ishaan Jaff
5f76f96e4d working chat, text for codestral 2024-06-17 11:30:22 -07:00
Ishaan Jaff
3ae05c0404 vo - init commit adding codestral API 2024-06-17 11:05:24 -07:00
Krrish Dholakia
2623bb260f fix(litellm_logging.py): fix lago callback logic 2024-06-17 09:10:19 -07:00
Krrish Dholakia
cc066e019a fix(utils.py): don't require httpx.response for azure badrequesterror 2024-06-17 08:51:50 -07:00
CodeVigilante
ef87a75f77
Update utils.py
fix dangerous code for this vulnerability https://huntr.com/bounties/ae623c2f-b64b-4245-9ed4-f13a0a5824ce
2024-06-16 22:49:28 +02:00
Krrish Dholakia
ffa546d649 docs(utils.py): add comments explaining utils vs. core utils 2024-06-15 14:50:05 -07:00
Krrish Dholakia
af88e55d46 fix(utils.py): move 'set_callbacks' to litellm_logging.py 2024-06-15 12:02:30 -07:00
Krrish Dholakia
115adc7c30 fix(init.py): fix imports 2024-06-15 11:31:09 -07:00
Krrish Dholakia
4f91205530 refactor(utils.py): refactor Logging to it's own class. Cut down utils.py to <10k lines.
Easier debugging

 Reference: https://github.com/BerriAI/litellm/issues/4206
2024-06-15 10:57:20 -07:00
Krrish Dholakia
6f715b4782 feat(router.py): support content policy fallbacks
Closes https://github.com/BerriAI/litellm/issues/2632
2024-06-14 17:15:44 -07:00
Krrish Dholakia
2732ff5d56 fix(utils.py): return traceback on unmapped exception error
Fixes https://github.com/BerriAI/litellm/issues/4201
2024-06-14 15:08:01 -07:00
Krrish Dholakia
345094a49d fix(utils.py): check if model info is for model with correct provider
Fixes issue where incorrect pricing was used for custom llm provider
2024-06-13 15:54:24 -07:00
Ishaan Jaff
944d95d636
Merge pull request #4176 from BerriAI/litellm_fix_redacting_msgs
[Fix] Redacting messages from OTEL + Refactor `utils.py` to use `litellm_core_utils`
2024-06-13 13:50:13 -07:00
Ishaan Jaff
9cb582307a fix - fix redacting messages litellm 2024-06-13 11:52:20 -07:00
Krrish Dholakia
6ba7a0a909 refactor(utils.py): add more clear error logging 2024-06-13 11:49:42 -07:00
Krrish Dholakia
246491e663 fix(utils.py): log cache hit as INFO message 2024-06-13 11:42:16 -07:00
Krish Dholakia
05e21441a6
Merge branch 'main' into litellm_vertex_completion_httpx 2024-06-12 21:19:22 -07:00
Krrish Dholakia
c426d75e91 fix(vertex_httpx.py): add function calling support to httpx route 2024-06-12 21:11:00 -07:00
Ishaan Jaff
e128dc4e1f feat - add azure ai studio models on litellm ui 2024-06-12 20:28:16 -07:00
Krrish Dholakia
3955b058ed fix(vertex_httpx.py): support streaming via httpx client 2024-06-12 19:55:14 -07:00