Commit graph

53 commits

Author SHA1 Message Date
Krrish Dholakia
d6149bcffb 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
9f900a1bed fix(vertex_httpx.py): support tool calling w/ streaming for vertex ai + gemini 2024-07-06 14:02:25 -07:00
Krrish Dholakia
56410cfcd0 fix(proxy_server.py): support langfuse logging for rejected requests on /v1/chat/completions 2024-07-05 13:07:09 -07:00
Krrish Dholakia
8a8dde6622 fix(vertex_httpx.py): fix assumptions on usagemetadata 2024-07-05 11:01:51 -07:00
Krrish Dholakia
d0862697b8 fix(vertex_httpx.py): fix supported vertex params 2024-07-04 21:17:52 -07:00
Krish Dholakia
2fa9a1f3cf 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
4e1b247c1d Revert "fix(vertex_anthropic.py): Vertex Anthropic tool calling - native params " 2024-07-03 17:55:37 -07:00
Krrish Dholakia
46800ba20a 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
58bd8a4afb Merge branch 'main' into litellm-fix-vertexaibeta 2024-07-02 09:49:44 -07:00
David Manouchehri
760b1dd5fa feat(vertex_httpx.py): Support cachedContent. 2024-07-01 16:59:35 +00:00
Krrish Dholakia
c2bc344ff8 build(pyproject.toml): remove ijson dep. add jsonschema dep. 2024-06-29 19:24:00 -07:00
Krrish Dholakia
ad6625ae47 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
d9177f189e fix(vertex_httpx.py): support passing response_schema to gemini 2024-06-29 11:33:19 -07:00
Krrish Dholakia
510826c457 fix(vertex_httpx.py): fix streaming for cloudflare proxy calls 2024-06-29 09:09:56 -07:00
Ishaan Jaff
9c2baac28c fix gemini tool calling issue 2024-06-28 18:03:33 -07:00
Krrish Dholakia
66e3a4f30e fix(support-'alt=sse'-param): Fixes https://github.com/BerriAI/litellm/issues/4459 2024-06-28 10:40:47 -07:00
Tiger Yu
6893c836c5 Include vertex_ai_beta in vertex_ai param mapping 2024-06-28 10:36:58 -07:00
Krrish Dholakia
1d690fd3f3 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
a48b2799bd Do not resolve project id from creds 2024-06-27 15:26:36 -07:00
Ishaan Jaff
8398065404 fix gemini test 2024-06-26 19:00:30 -07:00
Krrish Dholakia
cdf56dd320 fix(vertex_httpx.py): Return empty model response for content filter violations 2024-06-24 19:22:20 -07:00
Krrish Dholakia
62ff12c0b6 fix(vertex_httpx.py): cover gemini content violation (on prompt) 2024-06-24 19:13:56 -07:00
Krrish Dholakia
14fdbf26a6 fix(vertex_httpx.py): flush remaining chunks from stream 2024-06-22 20:33:54 -07:00
Krrish Dholakia
2d8135231f 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
80f405780f fix(vertex_httpx.py): cleanup docstring 2024-06-21 09:11:11 -07:00
Krrish Dholakia
60b4249767 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
c88c3002a4 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
1f87f45709 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
0a96865c48 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
4c5eb58fc9 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
71e882f4a2 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
27f7c69df7 fix(vertex_httpx.py): add better debug logging for vertex httpx 2024-06-18 18:00:29 -07:00
Krrish Dholakia
72c6c47fa3 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
f745245ad5 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
cc1ec55e5b fix(vertex_httpx.py): check if model supports system messages before sending separately 2024-06-17 17:32:38 -07:00
Krrish Dholakia
d4ce17b87c fix(vertex_httpx.py): support async streaming for google ai studio gemini 2024-06-17 14:59:30 -07:00
Krrish Dholakia
e31465d940 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
9d7f5d503c 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
ab4b1d931b fix(vertex_httpx.py): support json schema 2024-06-12 21:46:43 -07:00
Krrish Dholakia
e60b0e96e4 fix(vertex_httpx.py): add function calling support to httpx route 2024-06-12 21:11:00 -07:00
Krrish Dholakia
afebf867f6 fix(vertex_httpx.py): support async completion calls 2024-06-12 20:15:03 -07:00
Krrish Dholakia
1dac2aa59f fix(vertex_httpx.py): support streaming via httpx client 2024-06-12 19:55:14 -07:00
Krrish Dholakia
29169b3039 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
6fef49d1f6 fix vertex httpx client 2024-05-20 13:43:54 -07:00
Ishaan Jaff
883a9eb69a add parameter mapping with vertex ai 2024-05-20 13:28:20 -07:00
Ishaan Jaff
97dc366402 fix vertex ai import 2024-05-20 13:13:19 -07:00
Ishaan Jaff
9d12a570a5 fix self.async_handler 2024-05-20 13:11:10 -07:00
Ishaan Jaff
5e64e76594 fix python 3.8 2024-05-20 12:23:27 -07:00
Ishaan Jaff
c309c9d82c fix python 3.8 Tuple 2024-05-20 12:21:02 -07:00
Ishaan Jaff
d2bc2259cc fix add debug to vertex httpx image 2024-05-20 11:11:14 -07:00