Commit graph

53 commits

Author SHA1 Message Date
Krrish Dholakia
86596c53e9 refactor(main.py): migrate vertex gemini calls to vertex_httpx
Completes migration to vertex_httpx
2024-07-06 20:08:52 -07:00
Krrish Dholakia
faa88a1ab1 fix(vertex_httpx.py): support tool calling w/ streaming for vertex ai + gemini 2024-07-06 14:02:25 -07:00
Krrish Dholakia
7618ec43b3 fix(proxy_server.py): support langfuse logging for rejected requests on /v1/chat/completions 2024-07-05 13:07:09 -07:00
Krrish Dholakia
015a398713 fix(vertex_httpx.py): fix assumptions on usagemetadata 2024-07-05 11:01:51 -07:00
Krrish Dholakia
c425cba93a fix(vertex_httpx.py): fix supported vertex params 2024-07-04 21:17:52 -07:00
Krish Dholakia
18d8edc145
Merge pull request #4461 from t968914/litellm-fix-vertexaibeta
fix: Include vertex_ai_beta in vertex_ai param mapping/Do not use google auth project_id
2024-07-04 15:27:20 -07:00
Krish Dholakia
6c5c8bbb28
Revert "fix(vertex_anthropic.py): Vertex Anthropic tool calling - native params " 2024-07-03 17:55:37 -07:00
Krrish Dholakia
7007ace6c2 fix(vertex_anthropic.py): Updates the vertex anthropic endpoint to do tool calling with the anthropic api params 2024-07-03 15:28:31 -07:00
Tiger Yu
26630cd263
Merge branch 'main' into litellm-fix-vertexaibeta 2024-07-02 09:49:44 -07:00
David Manouchehri
5572494801
feat(vertex_httpx.py): Support cachedContent. 2024-07-01 16:59:35 +00:00
Krrish Dholakia
dc0218d34c build(pyproject.toml): remove ijson dep. add jsonschema dep. 2024-06-29 19:24:00 -07:00
Krrish Dholakia
05dfc63b88 feat(vertex_httpx.py): support the 'response_schema' param for older vertex ai models - pass as prompt (user-controlled)
if 'response_schema' is not supported for vertex model (e.g. gemini-1.5-flash) pass in prompt
2024-06-29 13:25:27 -07:00
Krrish Dholakia
e73e9e12bc fix(vertex_httpx.py): support passing response_schema to gemini 2024-06-29 11:33:19 -07:00
Krrish Dholakia
4f32f283a3 fix(vertex_httpx.py): fix streaming for cloudflare proxy calls 2024-06-29 09:09:56 -07:00
Ishaan Jaff
71890609ff fix gemini tool calling issue 2024-06-28 18:03:33 -07:00
Krrish Dholakia
a7122f91a1 fix(support-'alt=sse'-param): Fixes https://github.com/BerriAI/litellm/issues/4459 2024-06-28 10:40:47 -07:00
Tiger Yu
b0c1d235be Include vertex_ai_beta in vertex_ai param mapping 2024-06-28 10:36:58 -07:00
Krrish Dholakia
6b14cf7657 fix(vertex_httpx.py): only use credential project id, if user project id not given 2024-06-27 22:08:14 -07:00
John HU
933101a3f8
Do not resolve project id from creds 2024-06-27 15:26:36 -07:00
Ishaan Jaff
4707c4fccd fix gemini test 2024-06-26 19:00:30 -07:00
Krrish Dholakia
8e6e5a6d37 fix(vertex_httpx.py): Return empty model response for content filter violations 2024-06-24 19:22:20 -07:00
Krrish Dholakia
1ff0129a94 fix(vertex_httpx.py): cover gemini content violation (on prompt) 2024-06-24 19:13:56 -07:00
Krrish Dholakia
0fd9033502 fix(vertex_httpx.py): flush remaining chunks from stream 2024-06-22 20:33:54 -07:00
Krrish Dholakia
73254987da fix(vertex_httpx.py): ignore vertex finish reason - wait for stream to end
Fixes https://github.com/BerriAI/litellm/issues/4339
2024-06-22 20:21:01 -07:00
Krrish Dholakia
04fed2171c fix(vertex_httpx.py): cleanup docstring 2024-06-21 09:11:11 -07:00
Krrish Dholakia
16941eee43 fix(utils.py): re-integrate separate gemini optional param mapping (google ai studio)
Fixes https://github.com/BerriAI/litellm/issues/4333
2024-06-21 09:01:32 -07:00
Krrish Dholakia
dfd5882c31 fix(vertex_httpx.py): allow passing extra headers
Closes https://github.com/BerriAI/litellm/pull/4327
2024-06-20 21:14:44 -07:00
Krrish Dholakia
d3a3146155 fix(vertex_httpx.py): support setting custom api base for vertex ai calls
Closes https://github.com/BerriAI/litellm/issues/4317
2024-06-20 16:33:37 -07:00
Krrish Dholakia
933c3c845e fix(vertex_httpx.py): fix supports system message check for vertex_ai_beta
Fixes https://github.com/BerriAI/litellm/issues/4283
2024-06-19 13:17:22 -07: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
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
Krrish Dholakia
aef5cf3f22 fix(vertex_httpx.py): add better debug logging for vertex httpx 2024-06-18 18:00:29 -07:00
Krrish Dholakia
71f4bf3bb4 fix(vertex_httpx.py): support safety settings on vertex ai
Fixes https://github.com/BerriAI/litellm/issues/4267
2024-06-18 11:43:07 -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
Krrish Dholakia
3d9ef689e7 fix(vertex_httpx.py): check if model supports system messages before sending separately 2024-06-17 17:32:38 -07:00
Krrish Dholakia
e92570534c fix(vertex_httpx.py): support async streaming for google ai studio gemini 2024-06-17 14:59:30 -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
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
42f326a164 fix(vertex_httpx.py): support json schema 2024-06-12 21:46:43 -07:00
Krrish Dholakia
c426d75e91 fix(vertex_httpx.py): add function calling support to httpx route 2024-06-12 21:11:00 -07:00
Krrish Dholakia
995631bd39 fix(vertex_httpx.py): support async completion calls 2024-06-12 20:15:03 -07:00
Krrish Dholakia
3955b058ed fix(vertex_httpx.py): support streaming via httpx client 2024-06-12 19:55:14 -07:00
Krrish Dholakia
3b913443fe feat(vertex_httpx.py): Moving to call vertex ai via httpx (instead of their sdk). Allows us to support all their api updates. 2024-06-12 16:47:00 -07:00
Ishaan Jaff
f3eb832593 fix vertex httpx client 2024-05-20 13:43:54 -07:00
Ishaan Jaff
518db13982 add parameter mapping with vertex ai 2024-05-20 13:28:20 -07:00
Ishaan Jaff
2c25bfa8df fix vertex ai import 2024-05-20 13:13:19 -07:00
Ishaan Jaff
11c9780ff0 fix self.async_handler 2024-05-20 13:11:10 -07:00
Ishaan Jaff
1fe3900800 fix python 3.8 2024-05-20 12:23:27 -07:00
Ishaan Jaff
dabaf5f297 fix python 3.8 Tuple 2024-05-20 12:21:02 -07:00
Ishaan Jaff
91f8443381 fix add debug to vertex httpx image 2024-05-20 11:11:14 -07:00