Commit graph

16 commits

Author SHA1 Message Date
Ishaan Jaff
5fd5bb615c (feat) Add usage tracking for streaming /anthropic passthrough routes (#6842)
* use 1 file for AnthropicPassthroughLoggingHandler

* add support for anthropic streaming usage tracking

* ci/cd run again

* fix - add real streaming for anthropic pass through

* remove unused function stream_response

* working anthropic streaming logging

* fix code quality

* fix use 1 file for vertex success handler

* use helper for _handle_logging_vertex_collected_chunks

* enforce vertex streaming to use sse for streaming

* test test_basic_vertex_ai_pass_through_streaming_with_spendlog

* fix type hints

* add comment

* fix linting

* add pass through logging unit testing
2024-11-21 19:36:03 -08:00
Krish Dholakia
f7e896bdc5 Add pyright to ci/cd + Fix remaining type-checking errors (#6082)
* fix: fix type-checking errors

* fix: fix additional type-checking errors

* fix: additional type-checking error fixes

* fix: fix additional type-checking errors

* fix: additional type-check fixes

* fix: fix all type-checking errors + add pyright to ci/cd

* fix: fix incorrect import

* ci(config.yml): use mypy on ci/cd

* fix: fix type-checking errors in utils.py

* fix: fix all type-checking errors on main.py

* fix: fix mypy linting errors

* fix(anthropic/cost_calculator.py): fix linting errors

* fix: fix mypy linting errors

* fix: fix linting errors
2024-10-05 17:04:00 -04:00
Ishaan Jaff
c8fe600dbf fix case when gemini is used 2024-09-10 17:06:45 -07:00
Ishaan Jaff
7891b3742c fix vertex use async func to set auth creds 2024-09-10 16:12:18 -07:00
Ishaan Jaff
ea30be2d91 fix pass through construct_target_url when vertex_proj is None 2024-09-02 12:51:30 -07:00
Krish Dholakia
ca4e746545 LiteLLM minor fixes + improvements (31/08/2024) (#5464)
* fix(vertex_endpoints.py): fix vertex ai pass through endpoints

* test(test_streaming.py): skip model due to end of life

* feat(custom_logger.py): add special callback for model hitting tpm/rpm limits

Closes https://github.com/BerriAI/litellm/issues/4096
2024-09-01 13:31:42 -07:00
Ishaan Jaff
1b9aa7b357 vertex forward all headers from vertex 2024-08-30 11:05:23 -07:00
Ishaan Jaff
6491e461d6 vertex add vertex endpoints 2024-08-29 15:49:25 -07:00
Ishaan Jaff
bfb5136489 refactor vertex endpoints to pass through all routes 2024-08-21 17:08:42 -07:00
Ishaan Jaff
b9e1d60357 add native cachedContents endpoint 2024-08-08 15:32:07 -07:00
Ishaan Jaff
5afb55576e docs default vertex 2024-08-03 18:09:48 -07:00
Ishaan Jaff
e6e539fc4a add vertex ai countTokens endpoint 2024-08-03 17:34:10 -07:00
Ishaan Jaff
01cd07fa75 add vertex embeddings endpoints 2024-08-03 17:26:49 -07:00
Ishaan Jaff
beb7f1b2c6 add vertex generateContent 2024-08-03 17:17:54 -07:00
Ishaan Jaff
a293bebdb1 working code for vertex ai routes 2024-08-03 16:56:33 -07:00
Ishaan Jaff
568fd8aa63 use native endpoints 2024-08-03 16:52:43 -07:00