Commit graph

3126 commits

Author SHA1 Message Date
Ishaan Jaff
b6376a1a64 (Docs) OpenWeb x LiteLLM Docker compose + Instructions on spend tracking + logging (#9059)
* docs improve open web ui litellm doc

* docs openweb show teams + keys

* docs open web ui litellm
2025-03-07 17:01:39 -08:00
Krrish Dholakia
a3e8452f78 docs: update docs 2025-03-07 11:00:12 -08:00
Jascha Beste
49f64fe007 docs: Add project page for pgai (#8576)
* docs: Add project page for pgai

* Add pgai to sidebar.js
2025-03-07 08:08:01 -08:00
Krrish Dholakia
ba0831a49c docs(release_cycle.md): add stable tag info to release cycle 2025-03-06 23:22:45 -08:00
Krrish Dholakia
828fc0a6a3 docs: add doc for rotating master key 2025-03-06 23:22:01 -08:00
Mandana Vaziri
2e52c0064e Added PDL project (#8925)
* Added PDL project

Signed-off-by: Mandana Vaziri <mvaziri@us.ibm.com>

* Added PDL to projects sidebar

Signed-off-by: Mandana Vaziri <mvaziri@us.ibm.com>

* change to sidebar

Signed-off-by: Mandana Vaziri <mvaziri@us.ibm.com>

---------

Signed-off-by: Mandana Vaziri <mvaziri@us.ibm.com>
2025-03-06 21:13:39 -08:00
Ishaan Jaff
6ec1f82521 (Docs) connect litellm to open web ui (#9040)
* init doc

* working thinking tutorial

* docs open web ui with litellm

* minor edits

* docs one tab for tutorials
2025-03-06 21:13:00 -08:00
Ishaan Jaff
5b2eb1f6bb (AWS Secret Manager) - Using K/V pairs in 1 AWS Secret (#9039)
* fixes for primary_secret_kv_pairs

* _parse_primary_secret

* Using K/V pairs in 1 AWS Secret

* test_primary_secret_functionality
2025-03-06 19:30:18 -08:00
Krrish Dholakia
c4c2bb3af6 docs(sidebars.js): add supported_endpoints slug 2025-03-06 14:46:50 -08:00
Krrish Dholakia
5ab29de9d1 docs: cleanup 2025-03-06 00:22:57 -08:00
Krrish Dholakia
e0fdc21426 docs: cleanup docs 2025-03-06 00:16:32 -08:00
Krrish Dholakia
bb31c35718 docs: cleanup doc 2025-03-06 00:16:15 -08:00
Krrish Dholakia
e6a619d17f docs: cleanup 'signature_delta' from docs 2025-03-05 23:53:38 -08:00
Krrish Dholakia
7558d69089 docs(index.md): add release note for anthropic update 2025-03-05 23:50:26 -08:00
Ishaan Jaff
3d5b578fac docs fix router default settings 2025-03-05 08:29:21 -08:00
Krrish Dholakia
e0345b9406 docs(data_security.md): cleanup docs 2025-03-04 06:15:15 -08:00
Krrish Dholakia
ed1df0bda3 docs(data_security.md): update docs 2025-03-04 06:14:54 -08:00
Krrish Dholakia
29679c6766 docs: fix dates 2025-03-01 11:00:46 -08:00
Krish Dholakia
7f176bba9c docs(index.md): add demo instance to docs for easy testing (#8931) 2025-03-01 10:59:50 -08:00
Krish Dholakia
bb2c57bbdd Litellm stable release notes v1 61 20 (#8929)
* docs(index.md): add initial release notes

* docs(infinity.md): update docs with supported cohere rerank params

* style: cleanup

* docs(vllm.md): add doc on sending video to vllm

* docs(index.md): add vllm video logic to release notes

* docs(reasoning_content.md): cleanup docs
2025-03-01 10:45:40 -08:00
Krrish Dholakia
1be0b8392c docs(release_cycle.md): document release cycle 2025-02-28 23:05:29 -08:00
Ishaan Jaff
37e116235a (Feat) - Show Error Logs on LiteLLM UI (#8904)
* fix test_moderations_bad_model

* use async_post_call_failure_hook

* basic logging errors in DB

* show status on ui

* show status on ui

* ui show request / response side by side

* stash fixes

* working, track raw request

* track error info in metadata

* fix showing error / request / response logs

* show traceback on error viewer

* ui with traceback of error

* fix async_post_call_failure_hook

* fix(http_parsing_utils.py): orjson can throw errors on some emoji's in text, default to json.loads

* test_get_error_information

* fix code quality

* rename proxy track cost callback test

* _should_store_errors_in_spend_logs

* feature flag error logs

* Revert "_should_store_errors_in_spend_logs"

This reverts commit 7f345df477.

* Revert "feature flag error logs"

This reverts commit 0e90c022bb.

* test_spend_logs_payload

* fix OTEL log_db_metrics

* fix import json

* fix ui linting error

* test_async_post_call_failure_hook

* test_chat_completion_bad_model_with_spend_logs

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
2025-02-28 20:10:09 -08:00
Jorge Piedrahita Ortiz
59b142788f update sambanova docs (#8875) 2025-02-27 20:23:33 -08:00
Mehdi
375ad734c9 Update model path and documentation for cerebras API call (#8862) 2025-02-27 20:23:03 -08:00
Krrish Dholakia
cc1af621a7 docs(bedrock.md): cleanup doc 2025-02-27 12:35:03 -08:00
Krrish Dholakia
fb8492f4ea docs(reasoning_content.md): add more info to docs 2025-02-26 23:51:07 -08:00
Krrish Dholakia
a66677a89f docs: add reasoning content to docs 2025-02-26 23:49:41 -08:00
Krrish Dholakia
1798ca278f fix(main.py): pass 'thinking' param on async completion call 2025-02-26 23:16:39 -08:00
Ishaan Jaff
11fd5094c7 (Bug fix) - allow using Assistants GET, DELETE on /openai pass through routes (#8818)
* test_openai_assistants_e2e_operations

* test openai assistants pass through

* fix GET request on pass through handler

* _make_non_streaming_http_request

* _is_assistants_api_request

* test_openai_assistants_e2e_operations

* test_openai_assistants_e2e_operations

* openai_proxy_route

* docs openai pass through

* docs openai pass through

* docs openai pass through

* test pass through handler

* Potential fix for code scanning alert no. 2240: Incomplete URL substring sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-02-25 19:19:00 -08:00
Ishaan Jaff
684d6c8c42 (Bug Fix) Using LiteLLM Python SDK with model=litellm_proxy/ for embedding, image_generation, transcription, speech, rerank (#8815)
* test_litellm_gateway_from_sdk

* fix embedding check for openai

* test litellm proxy provider

* fix image generation openai compatible models

* fix litellm.transcription

* test_litellm_gateway_from_sdk_rerank

* docs litellm python sdk

* docs litellm python sdk with proxy

* test_litellm_gateway_from_sdk_rerank

* ci/cd run again

* test_litellm_gateway_from_sdk_image_generation

* test_litellm_gateway_from_sdk_embedding

* test_litellm_gateway_from_sdk_embedding
2025-02-25 16:22:37 -08:00
Krrish Dholakia
6c00ebe8d8 docs(anthropic.md): add claude-3-7-sonnet support 2025-02-25 00:06:30 -08:00
Nitin Patel
e5820b9e0b fix incorrect variable name in reliability section of docs (#8753) 2025-02-24 14:51:20 -08:00
Krish Dholakia
d82fa10f93 Add cohere v2/rerank support (#8421) (#8605)
* Add cohere v2/rerank support (#8421)

* Support v2 endpoint cohere rerank

* Add tests and docs

* Make v1 default if old params used

* Update docs

* Update docs pt 2

* Update tests

* Add e2e test

* Clean up code

* Use inheritence for new config

* Fix linting issues (#8608)

* Fix cohere v2 failing test + linting (#8672)

* Fix test and unused imports

* Fix tests

* fix: fix linting errors

* test: handle tgai instability

* fix: skip service unavailable err

* test: print logs for unstable test

* test: skip unreliable tests

---------

Co-authored-by: vibhavbhat <vibhavb00@gmail.com>
2025-02-22 22:25:29 -08:00
Krish Dholakia
c4d5b65e7b Support arize phoenix on litellm proxy (#7756) (#8715)
* Update opentelemetry.py

wip

* Update test_opentelemetry_unit_tests.py

* fix a few paths and tests

* fix path

* Update litellm_logging.py

* accidentally removed code

* Add type for protocol

* Add and update tests

* minor changes

* update and add additional arize phoenix test

* update existing test

* address feedback

* use standard_logging_object

* address feedback

Co-authored-by: Nate Mar <67926244+nate-mar@users.noreply.github.com>
2025-02-22 20:55:11 -08:00
Oskar Austegard
c730fbe3e9 Correct spelling in user_management_heirarchy.md (#8716)
Fixing irritating typo -- page and image names would also need to be updated
2025-02-21 09:23:29 -08:00
Krish Dholakia
30a4f2abc2 Add cost tracking for rerank via bedrock (#8691)
* feat(bedrock/rerank): infer model region if model given as arn

* test: add unit testing to ensure bedrock region name inferred from arn on rerank

* feat(bedrock/rerank/transformation.py): include search units for bedrock rerank result

Resolves https://github.com/BerriAI/litellm/issues/7258#issuecomment-2671557137

* test(test_bedrock_completion.py): add testing for bedrock cohere rerank

* feat(cost_calculator.py): refactor rerank cost tracking to support bedrock cost tracking

* build(model_prices_and_context_window.json): add amazon.rerank model to model cost map

* fix(cost_calculator.py): bedrock/common_utils.py

get base model from model w/ arn -> handles rerank model

* build(model_prices_and_context_window.json): add bedrock cohere rerank pricing

* feat(bedrock/rerank): migrate bedrock config to basererank config

* Revert "feat(bedrock/rerank): migrate bedrock config to basererank config"

This reverts commit 84fae1f167.

* test: add testing to ensure large doc / queries are correctly counted

* Revert "test: add testing to ensure large doc / queries are correctly counted"

This reverts commit 4337f1657e.

* fix(migrate-jina-ai-to-rerank-config): enables cost tracking

* refactor(jina_ai/): finish migrating jina ai to base rerank config

enables cost tracking

* fix(jina_ai/rerank): e2e jina ai rerank cost tracking

* fix: cleanup dead code

* fix: fix python3.8 compatibility error

* test: fix test

* test: add e2e testing for azure ai rerank

* fix: fix linting error

* test: mark cohere as flaky
2025-02-20 21:00:18 -08:00
elroy-bot
cd1daaac42 Add Elroy to projects built with litellm (#8642)
Co-authored-by: Tom Bedor <tombedor@gmail.com>
2025-02-18 16:43:30 -08:00
Ishaan Jaff
77561d2cda [Feature]: Redis Caching - Allow setting a namespace for redis cache (#8624)
* use _add_namespace_to_cache_key

* fix cache_control_args

* test_redis_caching_multiple_namespaces

* test_add_namespace_to_cache_key

* test_redis_caching_multiple_namespaces

* docs redis name space

* test_add_namespace_to_cache_key
2025-02-18 14:47:34 -08:00
Krish Dholakia
e6c69c9a6f Pass router tags in request headers - x-litellm-tags (#8609)
* feat(litellm_pre_call_utils.py): support `x-litellm-tags` request header

allow tag based routing + spend tracking via request headers

* docs(request_headers.md): document new `x-litellm-tags` for tag based routing and spend tracking

* docs(tag_routing.md): add to docs

* fix(utils.py): only pass str values for openai metadata param

* fix(utils.py): drop non-str values for metadata param to openai

preview-feature, otel span was being sent in
2025-02-18 08:26:22 -08:00
Krrish Dholakia
5b84d11597 build: merge commit 1b15568af7
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Feb 17 21:37:36 2025 -0800

    fix(proxy/_types.py): fix linting error

commit dc4d5cffa6
Author: Krrish Dholakia <krrishdholakia@gmail.com>
2025-02-17 21:56:00 -08:00
Krrish Dholakia
9826f76288 docs(routing.md): add section on weighted deployments 2025-02-17 17:02:06 -08:00
Krrish Dholakia
bf7d1d678e docs: update litellm user management heirarchy doc 2025-02-16 00:31:13 -08:00
Krrish Dholakia
86c7b4f0e0 docs(request_headers.md): document openai org id header handling in request_headers.md 2025-02-16 00:04:38 -08:00
Ishaan Jaff
7a3723b999 (Feat) - return x-litellm-attempted-fallbacks in responses from litellm proxy (#8558)
* add_fallback_headers_to_response

* test x-litellm-attempted-fallbacks

* unit test attempted fallbacks

* fix add_fallback_headers_to_response

* docs document response headers

* fix file name
2025-02-15 14:54:23 -08:00
miraclebakelaser
7710162d02 docs(perplexity.md): removing return_citations documentation (#8527)
Deprecation Notice:

Effective immediately, all API users will see citations returned as part of their requests by default. This is not a breaking change. The return_citations parameter will no longer have any effect.

[source](https://docs.perplexity.ai/changelog/changelog#citations-public-release-and-increased-default-rate-limits)
2025-02-13 22:09:54 -08:00
Krish Dholakia
e33543ae4f Litellm dev 02 13 2025 p2 (#8525)
* fix(azure/chat/gpt_transformation.py): add 'prediction' as a support azure param

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

* build(model_prices_and_context_window.json): add new 'gemini-2.0-pro-exp-02-05' model

* style: cleanup invalid json trailing commma

* feat(utils.py): support passing 'tokenizer_config' to register_prompt_template

enables passing complete tokenizer config of model to litellm

 Allows calling deepseek on bedrock with the correct prompt template

* fix(utils.py): fix register_prompt_template for custom model names

* test(test_prompt_factory.py): fix test

* test(test_completion.py): add e2e test for bedrock invoke deepseek ft model

* feat(base_invoke_transformation.py): support hf_model_name param for bedrock invoke calls

enables proxy admin to set base model for ft bedrock deepseek model

* feat(bedrock/invoke): support deepseek_r1 route for bedrock

makes it easy to apply the right chat template to that call

* feat(constants.py): store deepseek r1 chat template - allow user to get correct response from deepseek r1 without extra work

* test(test_completion.py): add e2e mock test for bedrock deepseek

* docs(bedrock.md): document new deepseek_r1 route for bedrock

allows us to use the right config

* fix(exception_mapping_utils.py): catch read operation timeout
2025-02-13 20:28:42 -08:00
vivek-athina
50e075b2a3 Added custom_attributes to additional_keys which can be sent to athina (#8518) 2025-02-13 13:19:24 -08:00
exiao
2f1c34fcfd add phoenix docs for observability integration (#8522)
* Add files via upload

* Update arize_integration.md

* Update arize_integration.md

* add Phoenix docs
2025-02-13 13:18:37 -08:00
Krish Dholakia
a78dd1cf97 Litellm dev 02 12 2025 p1 (#8494)
* Resolves https://github.com/BerriAI/litellm/issues/6625 (#8459)

- enables no auth for SMTP

Signed-off-by: Regli Daniel <daniel.regli1@sanitas.com>

* add sonar pricings (#8476)

* add sonar pricings

* Update model_prices_and_context_window.json

* Update model_prices_and_context_window.json

* Update model_prices_and_context_window_backup.json

* test: fix test

---------

Signed-off-by: Regli Daniel <daniel.regli1@sanitas.com>
Co-authored-by: Dani Regli <1daniregli@gmail.com>
Co-authored-by: Lucca Zenóbio <luccazen@gmail.com>
2025-02-12 22:39:29 -08:00
Krrish Dholakia
0c902c3ed6 docs: fix docs 2025-02-12 07:28:21 -08:00