Commit Graph

21751 Commits

Author SHA1 Message Date
Ishaan Jaff ee8aa23c19 docs VectorStoreRegistry 2025-05-03 12:05:49 -07:00
Ishaan Jaff 42ea608b4b docs add section on bedrock provider to show how to use KBs 2025-05-03 11:55:16 -07:00
Ishaan Jaff a37e4cb0b8 fix typo (#10535) 2025-05-03 11:39:40 -07:00
Ishaan Jaff 071c8a2e26 [Docs] Using LiteLLM with vector stores / knowledge bases (#10534)
* docs vector store registry

* img for kbs

* docs kb with litellm

* fix code qa
2025-05-03 11:28:33 -07:00
Krrish Dholakia 0e91f31908 build: update version + new ui build v1.68.0-stable 2025-05-03 10:53:38 -07:00
Krish Dholakia 552b7e4013 Add customer + model per key level multi-instance tpm/rpm limiting (#10518)
* fix(redis_cache.py): handle multiple event loops

* fix(parallel_request_limiter_v2.py): add customer tpm limiting

* fix(parallel_request_limiter.py): add customer rpm limiting

* fix(parallel_request_limiter_v2.py): add model per key + customer tpm/rpm limiting

* fix(parallel_request_limiter_v2.py): make error more informative

* fix: fix ruff error

* fix: generate new poetry lock
2025-05-03 10:28:55 -07:00
user202729 2138170861 Update contributing-to-documentation documentation to include pnpm guide (#10523) 2025-05-03 10:22:50 -07:00
Takashi Iwamoto 1969e351fe Add Amazon Nova Premier (#10520) 2025-05-03 10:14:39 -07:00
Ishaan Jaff 931c0c760c fix test_anthropic_messages_litellm_router_streaming_with_logging 2025-05-03 09:34:32 -07:00
Ishaan Jaff 9cf2a95640 bump litellm proxy extras 2025-05-03 09:30:10 -07:00
tanjiro f858a7d670 fix edit credentials modal (#10519) v1.67.7-stable 2025-05-03 08:53:25 -07:00
Krish Dholakia 7273bb442a UI - allow reassigning team to other org (#10527)
* feat(team_info.tsx): allow user to reassign team to another org

* style(team_info.tsx): fix org id styling

* feat(team_endpoints.py): add validation check before migrating team to another org

ensure model access, budgets and membership is respected

* fix(team_endpoints.py): update model migration validation to check if org has 'all-proxy-models' access

* fix(organization_view.tsx): show teams belonging to org

* feat(team_endpoints.py): handle wildcard model check on org migration

* fix(team_endpoints.py): nest router check

* test: update testing - use model with higher quota

* build: update poetry lock
2025-05-03 08:44:43 -07:00
Ishaan Jaff 988e20aa36 [QA] Bedrock Vector Stores Integration - Allow using with registry + in OpenAI API spec with tools (#10516)
* refactor KB implementation to use central registry

* allow passing tools when making KB calls

* test fixes

* linting fix

* fix kb tests

* QA for KB stored in DB

* fix, use litellm_credential_name when adding KB on litellm UI

* QA list endpoint vector stores

* allow using UI creds with KBs
2025-05-03 08:30:38 -07:00
Krish Dholakia 6d5f396b59 Playwright test for team admin (#10366) (#10470)
* Playwright test for team admin (#10366)

* Create team_admin.spec.ts

* add todo

* modify test and timeout (#10525)

---------

Co-authored-by: tanjiro <56165694+NANDINI-star@users.noreply.github.com>
2025-05-03 08:20:00 -07:00
Krish Dholakia b412d70232 UI - fix adding vertex models with reusable credentials + fix pagination on keys table + fix showing org budgets on table (#10528)
* feat(provider_specific_fields.tsx): Use correct form instance

Fixes https://github.com/BerriAI/litellm/issues/10115

* Fix broken pagination by correctly passing page and pageSize to keyListCall (#10498)

* [Organization] Include litellm_budget_table in /organization/list response (#10488)

* join litellm_budget_table in /organization/list endpoint

* update test

---------

Co-authored-by: tanjiro <56165694+NANDINI-star@users.noreply.github.com>
2025-05-03 08:16:53 -07:00
Marc Abramowitz 2f3f076079 Fix pytest event loop warning (#10512)
Fixes: GH-9641

This is a Cursor-generated fix for the following warning from pytest:

```
litellm/caching/llm_caching_handler.py:17
  /Users/abramowi/Code/OpenSource/litellm/litellm/caching/llm_caching_handler.py:17: DeprecationWarning: There is no current event loop
    event_loop = asyncio.get_event_loop()
```

Cursor prompt:

  Fix this pytest warning
  ```
  litellm/caching/llm_caching_handler.py:17
    /Users/abramowi/Code/OpenSource/litellm/litellm/caching/llm_caching_handler.py:17: DeprecationWarning: There is no current event loop
      event_loop = asyncio.get_event_loop()
  ```

Fixes https://github.com/BerriAI/litellm/issues/9641
2025-05-02 19:43:18 -07:00
Ishaan Jaff e013d7e529 [Feat] Show Vector Store / KB Request on LiteLLM Logs Page (#10514)
* ensure vector store results are logged in SLP

* fix tests

* fix tests with vector_store_request_metadata

* fix linting

* track duration of vector store, only log content when user opts into it

* working vector store viewer

* fix custom llm provider - Vector Store Requests

* fix vector store viewer

* fix logging redacted vector searches

* testing for storing KB queries in DB
2025-05-02 16:14:09 -07:00
Elijas Dapšauskas 0db5c991d4 fix: PydanticDeprecatedSince20: Support for class-based config is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. (#9372) 2025-05-02 16:10:57 -07:00
Ishaan Jaff a816d64bcf Don't depend on uvloop on windows (#10060) (#10483)
Co-authored-by: Dave Cunningham <sparkprime@gmail.com>
2025-05-02 16:09:27 -07:00
Ishaan Jaff 28cb7cc0ed [Feat] KnowledgeBase/Vector Store - Log StandardLoggingVectorStoreRequest for requests made when a vector store is used (#10509)
* ensure vector store results are logged in SLP

* fix tests

* fix tests with vector_store_request_metadata

* fix linting
2025-05-02 13:43:20 -07:00
Krrish Dholakia 2791b1be1a test: bump limit on flaky load test 2025-05-02 12:10:22 -07:00
Krrish Dholakia c884c9f296 build: update litellm version v1.67.6-nightly 2025-05-02 10:07:53 -07:00
Krrish Dholakia 1e14517e29 bump: version 1.67.5 → 1.67.6 2025-05-02 10:07:53 -07:00
Prathamesh Saraf ac7b1efe5c Refactor budget assertions in tests to improve clarity and accuracy. Updated remaining hours check to ensure positive values and adjusted budget reset time validation for better range checks. (#10500) 2025-05-02 09:02:02 -07:00
Krrish Dholakia 084cdb17f6 fix: fix linting errors 2025-05-02 08:08:39 -07:00
Krrish Dholakia 33814917fe fix(token_counter.py): handle empty lists 2025-05-02 08:07:08 -07:00
Ishaan Jaff 04e6ad7cee test_get_cost_for_built_in_tools_file_search 2025-05-02 07:17:26 -07:00
Ishaan Jaff 2828720c43 [Bug Fix] Ensure Web Search / File Search cost are only added when the response includes the too call (#10476)
* only apply cost if response includes annotations for url/file

* only apply cost if response includes annotations for url/file

* testing fix tool cost tracking

* fix response_includes_annotation_type
2025-05-02 07:06:46 -07:00
Ishaan Jaff 96e75628d6 [Fix + Refactor] Trigger Soft Budget Webhooks When Key Crosses Threshold (#10491)
* fix slack alerting with webhooks

* emit correct event group/entity on webhooks

* refactor to use a common class of alerts with abc methods

* fixes for tests

* refactor to use a common class of alerts with abc methods

* Send a budget alert on slack or webhook

* unit test slack alerting

* fix code qa
2025-05-02 07:06:07 -07:00
Carlos Freund cb177dbd7a Fix and rewrite of token_counter (#10409)
* added tests

messages_with_counts: Made tolerance explicit for each test. But they match the new implementation(which beats the old)

* new token counter impl

* compare old and new implementation in test

* delete old token counter

* moved tests to /tests/litellm/litellm_core_utils

* use existing types

* docstrings

* warn about using default params on unknown model.

* created type for the token_counter_function

* check key == "content"

* throw error on invalid detail-type, ignore type-warning.

* fix imports
2025-05-01 23:34:37 -07:00
Krish Dholakia 9cc39af131 Add vertex ai meta llama 4 support + handle tool call result in content for vertex ai (#10492)
* refactor(vertex_ai/llama): handle response transformation within config

Allows us to handle https://github.com/BerriAI/litellm/issues/10441#issuecomment-2844975599

* fix(vertex_ai/llama): handle tool call in content

Fixes https://github.com/BerriAI/litellm/issues/10441

* fix(vertex_ai/llama): return 'tool_calls' as finish reason if tool call returned

vertex ai returns stop

* feat(vertex_ai/): cost tracking for vertex_ai/meta/llama-4

* ci(test-linting.yml): pin openai version

* build: reorder pinning

* ci(pyproject.toml): limit openai version

temporary patch as new version has linting errors

* ci(pyproject.toml): limit openai version

temporary patch around linting errors

* ci(limit-openai-version): temporary patch

* fix: fix linting errors

* fix: fix linting error

* fix(parallel_request_limiter_v2.py): add team based multi-instance rate limiting

* fix: fix linting errors

* build(pyproject.toml): modify pin

* ci: bump pin
2025-05-01 22:47:06 -07:00
Marc Abramowitz c3d4c9706d mypy tweaks (#10490)
* Move mypy.ini to litellm folder

because that's where GH Actions runs mypy

* Add annotation-unchecked to disable_error_code

so we don't get a zillion of these warnings when running mypy:

```
note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
```
2025-05-01 22:13:14 -07:00
Krish Dholakia 132bdb1380 Add user + team based multi-instance rate limiting (#10497)
* fix(parallel_request_limiter_v2.py): add user multi-instance rate limiting

* fix(parallel_request_limiter_v2.py): add user multi-instance rpm limiting

* fix(parallel_request_limiter_v2.py): add team based multi-instance rate limiting
2025-05-01 22:09:26 -07:00
Krish Dholakia a4c96d5224 Fix return finish_reason = "tool_calls" for gemini tool calling (#10485)
* fix(vertex_and_google_ai_studio.py): fix finish reason to be 'tool_calls' when tool call returned

Vertex returns 'Stop', openai format is 'tool calls'

* test(base_llm_unit_tests.py): bump test to assert tool calls in finish reason
2025-05-01 22:02:56 -07:00
Kevin Montoya 38d1691e20 docs(realtime): yaml config example for realtime model (#10489)
documentation includes outdated example of configuration of realtime
model that does not comply with current healthcheck:
https://github.com/BerriAI/litellm/pull/7453. Provide proper model info
mode in example
2025-05-01 21:43:48 -07:00
Parham Alvani d7632ca56e Update mcp.md (#10493) 2025-05-01 20:54:27 -07:00
Krrish Dholakia 4e44d7f40c ci(test-linting.yml): pin openai version 2025-05-01 18:55:39 -07:00
Ishaan Jaff de7870cb54 Add llamafile as a provider (#10203) (#10482)
* Update docs for OpenAI compatible providers, add Llamafile docs, include Llamafile in the sidebar

* Add Llamafile as an LlmProviders enum

* Add llamafile as a OpenAI compatible provider (in the list of compatible providers)

* Add Llamafile chat config and tests

* Wire up Llamafile

Co-authored-by: Peter Wilson <peter@mozilla.ai>
2025-05-01 18:36:55 -07:00
Krrish Dholakia 66cf75cd5d test: handle internal server errors 2025-05-01 16:47:30 -07:00
Krrish Dholakia cec138c47e test: remove redundant tests 2025-05-01 16:46:21 -07:00
Krrish Dholakia 4ab0ee0b65 test: more testing fixes 2025-05-01 15:36:13 -07:00
Krrish Dholakia 7502a21279 ci(config.yml): bump config 2025-05-01 15:27:16 -07:00
Krrish Dholakia dd5edbc9b6 docs(config_settings.md): document new param 2025-05-01 15:20:33 -07:00
Ruperto A. Martinez 298a3574f4 Add supports_pdf_input: true to Claude 3.7 bedrock models (#9917)
* Add supports_pdf_input: true to Claude 3.7 bedrock models

* update unit test

---------

Co-authored-by: RupertoXTI <rmartinez@xtillion.com>
2025-05-01 14:56:54 -07:00
Ishaan Jaff eebb725416 [Fixes] Azure OpenAI OIDC - allow using litellm defined params for OIDC Auth (#10394)
* fixes for azure OIDC ad token auth

* fixes for test_azure_common_utils.py

* get_azure_ad_token_from_oidc
2025-05-01 14:46:56 -07:00
Krrish Dholakia 03718b8b76 docs(prod.md): clarify usage on read-only file system 2025-05-01 14:46:02 -07:00
Ishaan Jaff ba67ca1f84 fix ensure mcp tools are llm api routes (#10473) 2025-05-01 14:37:30 -07:00
Krrish Dholakia c5b2d4a529 docs(document_understanding.md): clarify 'format' param usage 2025-05-01 14:34:16 -07:00
Krish Dholakia c0a464e4eb fix(all_keys_table.tsx): fix filtering on key alias across multiple p… (#10455)
* fix(all_keys_table.tsx): fix filtering on key alias across multiple pages

* fix(key_management_endpoints.py): enable global sorting on `/key/list`

* feat(all_keys_table.tsx): support sorting on keys table

* feat(all_keys_table.tsx): enable global sorting

* ci(config.yml): add requests mock
2025-04-30 22:21:41 -07:00
Krish Dholakia 6ad483dde7 Litellm dev 04 30 2025 p1 (#10462)
* fix(exception_mapping_utils.py): correctly pass through 504 status code

openai also raises a 504 status code

* build(model_prices_and_context_window.json): add gpt-4o-mini-tts to model cost map

Fixes https://github.com/BerriAI/litellm/issues/9591

* fix(cost_calculator.py): fix input cost calculation for gpt-4o-mini-tts

Fixes https://github.com/BerriAI/litellm/issues/9591

* test: testing updates
2025-04-30 22:11:12 -07:00