Commit graph

25 commits

Author SHA1 Message Date
Ishaan Jaff
3c898e23ea refactor secret managers 2024-09-03 10:58:02 -07:00
Krish Dholakia
9f3fa29624
feat(router.py): Support Loadbalancing batch azure api endpoints (#5469)
* feat(router.py): initial commit for loadbalancing azure batch api endpoints

Closes https://github.com/BerriAI/litellm/issues/5396

* fix(router.py): working `router.acreate_file()`

* feat(router.py): working router.acreate_batch endpoint

* feat(router.py): expose router.aretrieve_batch function

Make it easy for user to retrieve the batch information

* feat(router.py): support 'router.alist_batches' endpoint

Adds support for getting all batches across all endpoints

* feat(router.py): working loadbalancing on `/v1/files`

* feat(proxy_server.py): working loadbalancing on `/v1/batches`

* feat(proxy_server.py): working loadbalancing on Retrieve + List batch
2024-09-02 21:32:55 -07:00
Krish Dholakia
02f288a8a3
Azure Service Principal with Secret authentication workflow. (#5131) (#5437)
* Azure Service Principal with Secret authentication workflow. (#5131)

* Implement Azure Service Principal with Secret authentication workflow.

* Use `ClientSecretCredential` instead of `DefaultAzureCredential`.

* Move imports into the function.

* Add type hint for `azure_ad_token_provider`.

* Add unit test for router initialization and sample completion using Azure Service Principal with Secret authentication workflow.

* Add unit test for router initialization with neither API key nor using Azure Service Principal with Secret authentication workflow.

* fix(client_initializtion_utils.py): fix typing + overrides

* test: fix linting errors

* fix(client_initialization_utils.py): fix client init azure ad token logic

* fix(router_client_initialization.py): add flag check for reading azure ad token from environment

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

* test(test_router_client_init.py): add correct flag to test

---------

Co-authored-by: kzych-inpost <142029278+kzych-inpost@users.noreply.github.com>
2024-09-02 14:29:00 -07:00
Krrish Dholakia
cd7dd2a511 fix(cooldown_cache.py): fix linting errors 2024-08-27 07:40:28 -07:00
Krrish Dholakia
5572ad7241 fix(cooldown_cache.py): fix linting errors 2024-08-24 17:11:32 -07:00
Krrish Dholakia
33972cc79c fix(router.py): enable dynamic retry after in exception string
Updates cooldown logic to cooldown individual models

 Closes https://github.com/BerriAI/litellm/issues/1339
2024-08-24 16:59:30 -07:00
Ishaan Jaff
f13a65be2d fix azure_ad_token_provider 2024-08-22 16:15:53 -07:00
Ishaan Jaff
08fa3f346a add new litellm params for client_id, tenant_id etc 2024-08-22 11:37:30 -07:00
Ishaan Jaff
8f657b40f5 use azure_ad_token_provider to init clients 2024-08-22 11:03:49 -07:00
Ishaan Jaff
f6d97c25f2 fix run sync fallbacks 2024-08-20 12:55:36 -07:00
Ishaan Jaff
e4b5e88a57 fix fallbacks dont recurse on the same fallback 2024-08-20 12:50:20 -07:00
Marc Abramowitz
ac9aa1ab67 Use AZURE_API_VERSION as default azure openai version
Without this change, the default version of the Azure OpenAI API is hardcoded in
the code as an old version, `"2024-02-01"`. This change allows the user to set
the default version of the Azure OpenAI API by setting the environment variable
`AZURE_API_VERSION` or by using the command-line parameter `--api_version`.
2024-08-14 15:47:57 -07:00
Ishaan Jaff
2a54be4a43 feat - log fallbacks events on prometheus 2024-08-10 13:57:25 -07:00
Ishaan Jaff
45186718aa v0 add event handlers for logging fallback events 2024-08-10 13:28:08 -07:00
Ishaan Jaff
0b9ad45790 refactor prom metrics 2024-08-09 09:02:23 -07:00
Ishaan Jaff
579f09b334 fix logging cool down deployment 2024-08-07 11:27:05 -07:00
Ishaan Jaff
d1e519afd1 use router_cooldown_handler 2024-08-07 10:40:55 -07:00
Ishaan Jaff
9a545c1ff8
Revert "[Ui] add together AI, Mistral, PerplexityAI, OpenRouter models on Admin UI " 2024-07-20 19:04:22 -07:00
Ishaan Jaff
3708355f91 router fix init openai compatible providers 2024-07-19 19:42:04 -07:00
Krrish Dholakia
0710c167ab fix(client_initialization_utils.py): fix import logic 2024-07-06 19:28:38 -07:00
Krrish Dholakia
14ab1e5d2d fix(client_initialization_utils.py): fix merge conflicts 2024-07-06 19:20:28 -07:00
Ishaan Jaff
984cc4722e fix should_initialize_sync_client 2024-07-06 13:10:22 -07:00
Ishaan Jaff
2609de43d0 use helper for init client + check if we should init sync clients 2024-07-06 12:52:41 -07:00
Ishaan Jaff
2d2650a2b6 fix use safe access for router alerting 2024-06-14 15:17:32 -07:00
Ishaan Jaff
a0ecc6f414 fix - send alert on router level exceptions 2024-06-14 08:41:12 -07:00