Commit graph

3421 commits

Author SHA1 Message Date
Krrish Dholakia
5e71dbbf8b docs: cleanup doc 2025-03-06 00:16:15 -08:00
Krrish Dholakia
320cb1d51a docs: cleanup 'signature_delta' from docs 2025-03-05 23:53:38 -08:00
Krrish Dholakia
823f4dcd9d docs(index.md): add release note for anthropic update 2025-03-05 23:50:26 -08:00
Ishaan Jaff
207f41cbea docs fix router default settings 2025-03-05 08:29:21 -08:00
Sunny Wan
ce55a2d06e
Merge branch 'BerriAI:main' into main 2025-03-04 18:00:58 -05:00
Sunny Wan
02dd126be9 added documentation for snowflake 2025-03-04 17:13:00 -05:00
Krrish Dholakia
e40218513b docs(data_security.md): cleanup docs
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 14s
2025-03-04 06:15:15 -08:00
Krrish Dholakia
5f1cac8930 docs(data_security.md): update docs 2025-03-04 06:14:54 -08:00
Krrish Dholakia
6af37d66b5 docs: fix dates 2025-03-01 11:00:46 -08:00
Krish Dholakia
69593cd7db
docs(index.md): add demo instance to docs for easy testing (#8931) 2025-03-01 10:59:50 -08:00
Krish Dholakia
ecb97ff65e
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
e6711235a2 docs(release_cycle.md): document release cycle 2025-02-28 23:05:29 -08:00
Ishaan Jaff
3a086cee06
(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
Vivek Aditya
ed75dd61c2 Removed prints and added unit tests 2025-02-28 21:48:13 +05:30
Jorge Piedrahita Ortiz
ad1357dd0e
update sambanova docs (#8875) 2025-02-27 20:23:33 -08:00
Mehdi
1226d318fc
Update model path and documentation for cerebras API call (#8862) 2025-02-27 20:23:03 -08:00
Krrish Dholakia
88ef3b41b6 docs(bedrock.md): cleanup doc 2025-02-27 12:35:03 -08:00
Krrish Dholakia
fe5ab0d9ad docs(reasoning_content.md): add more info to docs 2025-02-26 23:51:07 -08:00
Krrish Dholakia
166423dc89 docs: add reasoning content to docs 2025-02-26 23:49:41 -08:00
Krrish Dholakia
5b804e5d9b fix(main.py): pass 'thinking' param on async completion call
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 38s
2025-02-26 23:16:39 -08:00
Vivek Aditya
c40d45ae09 Added tags to additional keys that can be sent to athina 2025-02-26 21:00:56 +05:30
Ishaan Jaff
81039d8faf
(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
f9cee4c46b
(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
de8497309b docs(anthropic.md): add claude-3-7-sonnet support
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 15s
2025-02-25 00:06:30 -08:00
Nitin Patel
46cbaa8c0c
fix incorrect variable name in reliability section of docs (#8753) 2025-02-24 14:51:20 -08:00
Krish Dholakia
09462ba80c
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
21ea52105a
Support arize phoenix on litellm proxy (#7756) (#8715)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 12s
* 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
fd1070a7d1
Correct spelling in user_management_heirarchy.md (#8716)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 13s
Fixing irritating typo -- page and image names would also need to be updated
2025-02-21 09:23:29 -08:00
Krish Dholakia
b682dc4ec8
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
7f47ae88b7
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
d1ba04d9d9
[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
2340f1b31f
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
7bfd816d3b build: merge commit 1b15568af7
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 14s
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
d0413ec96b docs(routing.md): add section on weighted deployments 2025-02-17 17:02:06 -08:00
Krrish Dholakia
048dd995dc docs: update litellm user management heirarchy doc
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 36s
2025-02-16 00:31:13 -08:00
Krrish Dholakia
c2e0c2f0bc docs(request_headers.md): document openai org id header handling in request_headers.md 2025-02-16 00:04:38 -08:00
Ishaan Jaff
6b3bfa2b42
(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
3c197b9925
docs(perplexity.md): removing return_citations documentation (#8527)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 12s
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
58141df65d
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
fd0769f2ed
Added custom_attributes to additional_keys which can be sent to athina (#8518) 2025-02-13 13:19:24 -08:00
exiao
fa3136c391
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
305049a968
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
9f93ed110a docs: fix docs
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 13s
2025-02-12 07:28:21 -08:00
Krrish Dholakia
c4a5e2c5c7 docs(token_auth.md): clarify scopes can be a list or comma separated string 2025-02-12 07:26:47 -08:00
Krish Dholakia
9c4c7813fb
Allow org admin to create teams on UI (#8407)
* fix(client_initialization_utils.py): handle custom llm provider set with valid value not from model name

* fix(handle_jwt.py): handle groups not existing in jwt token

if user not in group, this won't exist

* fix(handle_jwt.py): add new `enforce_team_based_model_access` flag to jwt auth

allows proxy admin to enforce user can only call model if team has access

* feat(navbar.tsx): expose new dropdown in navbar - allow org admin to create teams within org context

* fix(navbar.tsx): remove non-functional cogicon

* fix(proxy/utils.py): include user-org memberships in `/user/info` response

return orgs user is a member of and the user role within org

* feat(organization_endpoints.py): allow internal user to query `/organizations/list` and get all orgs they belong to

enables org admin to select org they belong to, to create teams

* fix(navbar.tsx): show change in ui when org switcher clicked

* feat(page.tsx): update user role based on org they're in

allows org admin to create teams in the org context

* feat(teams.tsx): working e2e flow for allowing org admin to add new teams

* style(navbar.tsx): clarify switching orgs on UI is in BETA

* fix(organization_endpoints.py): handle getting but not setting members

* test: fix test

* fix(client_initialization_utils.py): revert custom llm provider handling fix - causing unintended issues

* docs(token_auth.md): cleanup docs
2025-02-09 00:07:15 -08:00
Mubashir Osmani
bc2ac8264e
added gemini 2.0 models (#8412) 2025-02-08 22:34:22 -08:00
Krish Dholakia
1dd3713f1a
Anthropic Citations API Support (#8382)
* test(test_anthropic_completion.py): add test ensuring anthropic structured output response is consistent

Resolves https://github.com/BerriAI/litellm/issues/8291

* feat(anthropic.py): support citations api with new user document message format

Resolves https://github.com/BerriAI/litellm/issues/7970

* fix(anthropic/chat/transformation.py): return citations as a provider-specific-field

Resolves https://github.com/BerriAI/litellm/issues/7970

* feat(anthropic/chat/handler.py): add streaming citations support

Resolves https://github.com/BerriAI/litellm/issues/7970

* fix(handler.py): fix code qa error

* fix(handler.py): only set provider specific fields if non-empty dict

* docs(anthropic.md): add citations api to anthropic docs
2025-02-07 22:27:01 -08:00
Krish Dholakia
d720744656
Litellm dev 02 06 2025 p3 (#8343)
* feat(handle_jwt.py): initial commit to allow scope based model access

* feat(handle_jwt.py): allow model access based on token scopes

allow admin to control model access from IDP

* test(test_jwt.py): add unit testing for scope based model access

* docs(token_auth.md): add scope based model access to docs

* docs(token_auth.md): update docs

* docs(token_auth.md): update docs

* build: add gemini commercial rate limits

* fix: fix linting error
2025-02-06 23:15:33 -08:00
Ishaan Jaff
e3aab50ab3 docs assembly ai
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 16s
2025-02-06 21:30:36 -08:00
Ishaan Jaff
229f270dd6 docs assembly ai eu endpoints 2025-02-06 21:13:40 -08:00