Commit Graph
1768 Commits
Author SHA1 Message Date
Sameer Kankute 14c2932387 Add docs on Zero-Cost Models 2026-02-02 13:29:37 +05:30
yuneng-jiang 93dfac78ed doc fix 2026-01-31 15:27:21 -08:00
yuneng-jiang af015fe4f0 UI spend logs setting docs 2026-01-31 15:16:59 -08:00
Cesar GarciaandGitHub 3fa7ab1012 docs(embeddings): add supported input formats section (#20073)
Document valid input formats for /v1/embeddings endpoint per OpenAI spec.
Clarifies that array of string arrays is not a valid format.
2026-01-31 10:45:56 -08:00
shin-bot-litellmandGitHub 1c757dee14 litellm_docs: add missing environment variable documentation (#20138) 2026-01-31 07:33:24 -08:00
6897d5f59e [Feat] Add async_post_call_response_headers_hook to CustomLogger (#20083)
* Add async_post_call_response_headers_hook to CustomLogger (#20070)

Allow CustomLogger callbacks to inject custom HTTP response headers
into streaming, non-streaming, and failure responses via a new
async_post_call_response_headers_hook method.

* async_post_call_response_headers_hook

---------

Co-authored-by: michelligabriele <gabriele.michelli@icloud.com>
2026-01-30 12:44:44 -08:00
Alexsander HamirandGitHub 0acfcb494b Add mock client factory pattern and mock support for PostHog, Helicone, and Braintrust integrations (#19707)
* Add LangSmith mock client support

- Create langsmith_mock_client.py following GCS and Langfuse patterns
- Add mock mode detection via LANGSMITH_MOCK environment variable
- Intercept LangSmith API calls via AsyncHTTPHandler.post patching
- Add verbose logging throughout mock implementation
- Update LangsmithLogger to initialize mock client when mock mode enabled
- Supports configurable mock latency via LANGSMITH_MOCK_LATENCY_MS

* Add Datadog mock client support

- Create datadog_mock_client.py following GCS, Langfuse, and LangSmith patterns
- Add mock mode detection via DATADOG_MOCK environment variable
- Intercept Datadog API calls via AsyncHTTPHandler.post and httpx.Client.post patching
- Add verbose logging throughout mock implementation
- Update DataDogLogger and DataDogLLMObsLogger to initialize mock client when mock mode enabled
- Supports both async and sync logging paths
- Supports configurable mock latency via DATADOG_MOCK_LATENCY_MS

* refactor: consolidate mock client logic into factory pattern

- Create mock_client_factory.py to centralize common mock HTTP client logic
- Refactor GCS, Langfuse, LangSmith, and Datadog mock clients to use factory
- Improve GET/DELETE mock accuracy for GCS (return valid StandardLoggingPayload)
- Fix DELETE mock to return empty body (204 No Content) instead of JSON
- Reduce code duplication across integration mock clients

* feat: add PostHog mock client support

- Create posthog_mock_client.py using factory pattern
- Integrate mock client into PostHogLogger with mock mode detection
- Add verbose logging for mock mode initialization and batch operations
- Enable mock mode via POSTHOG_MOCK environment variable

* Add Helicone mock client support

- Created helicone_mock_client.py using factory pattern (similar to GCS)
- Integrated mock mode detection and initialization in HeliconeLogger
- Mock client patches HTTPHandler.post to intercept Helicone API calls
- Uses factory pattern for should_use_mock and MockResponse utilities
- Custom HTTPHandler.post patching required since HTTPHandler uses self.client.send()

* Add mock support for Braintrust integration and extend mock client factory

- Add braintrust_mock_client.py with mock HTTP client for Braintrust integration testing
- Integrate mock client into BraintrustLogger with mock mode detection
- Refactor Helicone mock client to fully utilize factory's HTTPHandler.post patching
- Extend mock_client_factory to support patching HTTPHandler.post for sync calls
- Enable endpoint-specific mock responses for Braintrust (/project vs /project_logs)
- All mock clients now properly handle both async (AsyncHTTPHandler) and sync (HTTPHandler) calls

* Fix linter errors: remove unused imports and suppress complexity warning

- Remove unused imports from gcs_bucket_mock_client.py (httpx, json, timedelta, Dict, Optional)
- Remove unused Callable import from mock_client_factory.py
- Add noqa comment to suppress PLR0915 complexity warning for create_mock_client_factory function

* Document mock environment variables for PostHog, Helicone, Braintrust, Datadog, and Langsmith integrations

- Add POSTHOG_MOCK and POSTHOG_MOCK_LATENCY_MS documentation
- Add HELICONE_MOCK and HELICONE_MOCK_LATENCY_MS documentation
- Add BRAINTRUST_MOCK and BRAINTRUST_MOCK_LATENCY_MS documentation
- Add DATADOG_MOCK and DATADOG_MOCK_LATENCY_MS documentation
- Add LANGSMITH_MOCK and LANGSMITH_MOCK_LATENCY_MS documentation

All mock env vars follow the same pattern: enable mock mode for integration testing by intercepting API calls and returning mock responses without making actual network calls.

* Fix security issue
2026-01-30 09:52:53 -08:00
Alexsander HamirandGitHub 69bd4426e8 [Release Day] - Fixed CI/CD issues & changed processes (#19902) 2026-01-28 17:57:24 -08:00
Sameer KankuteandGitHub f5e5569e40 Merge pull request #19636 from BerriAI/litellm_langfuse_callback
Add litellm_callback_logging_failures_metric for Langfuse, Langfuse Otel and other Otel providers
2026-01-28 18:02:17 +05:30
Sameer KankuteandGitHub 7386621d04 Merge pull request #19839 from BerriAI/litellm_oss_staging_01_27_2026
Litellm oss staging 01 27 2026
2026-01-28 17:33:27 +05:30
Ishaan JaffandGitHub 3080e04180 [Feat] UI: Allow Admins to control what pages are visible on LeftNav (#19907)
* feat: enabled_ui_pages_internal_users

* init ui for internal user controsl

* fix ui settings

* fix build

* fix leftnav

* fix leftnav

* test fixes

* fix leftnav

* isPageAccessibleToInternalUsers

* docs fix

* docs ui viz
2026-01-27 19:31:24 -08:00
Sameer KankuteandGitHub 42a0d576f3 Merge pull request #19910 from BerriAI/main
merge 01 27
2026-01-28 08:30:47 +05:30
Ryan WilsonandGitHub 70eb732b41 docs: fix guardrail logging docs (#19833) 2026-01-27 18:13:04 -08:00
Sameer KankuteandGitHub c834d7d1fe Merge branch 'main' into litellm_oss_staging_01_27_2026 2026-01-27 17:11:15 +05:30
Sameer KankuteandGitHub 0214cb04cd Merge branch 'main' into litellm_oss_staging_01_26_2026 2026-01-27 17:00:58 +05:30
6a54dcfa93 feat: Add model_id label to Prometheus metrics (#18048) (#19678)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-01-26 20:32:08 -08:00
Ishaan JaffandGitHub cec1a3c858 [Feat] CLI Auth - Add configurable CLI JWT expiration via environment variable (#19780)
* fix: add CLI_JWT_EXPIRATION_HOURS

* docs: CLI_JWT_EXPIRATION_HOURS

* fix: get_cli_jwt_auth_token

* test_get_cli_jwt_auth_token_custom_expiration
2026-01-26 14:56:17 -08:00
Tamir KivitiandGitHub aa8134fee9 add timeout to onyx guardrail (#19731)
* add timeout to onyx guardrail

* add tests
2026-01-25 23:13:46 -08:00
yuneng-jiang 937ccf1977 UI Keys Teams Router Settings docs 2026-01-24 16:23:46 -08:00
Harshit JainandGitHub f4ba5b9209 docs: add litellm-enterprise requirement for managed files (#19689) 2026-01-23 19:51:39 -08:00
Alexsander HamirandGitHub 5c61586e65 Add GCS mock mode for testing without API calls (#19683) 2026-01-23 16:25:32 -08:00
Alexsander HamirandGitHub 56883add3c Add Langfuse mock mode for testing without API calls (#19676) 2026-01-23 15:33:40 -08:00
Sameer Kankute 11b4c456b4 Add documentation 2026-01-23 19:42:59 +05:30
Ishaan JaffandGitHub c23e4b87dc [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612)
* init PolicyMatcher

* TestPolicyMatcherGetMatchingPolicies

* TestPolicyMatcherGetMatchingPolicies

* feat: init PolicyResolver

* init resolver types

* init policy from config

* inint PolicyValidator

* validate policy

* init Architecture Diagram

* test_add_guardrails_from_policy_engine

* init _init_policy_engine

* test updates

* test fixws

* new attachment config

* simplify types

* TestPolicyResolverInheritance

* fix policy resolver

* fix policies

* fix applied policy

* docs fix

* docs fix

* fix linting + QA checks

* fix linting + QA fixes

* test fixes
2026-01-22 19:49:53 -08:00
Sameer KankuteandGitHub ddaf127b4a Merge pull request #19562 from BerriAI/litellm_stop_setting
feat: Limit stop sequence as per openai spec
2026-01-22 19:44:56 +05:30
Sameer KankuteandGitHub ad1edd38d5 Merge branch 'main' into litellm_staging_01_21_2026 2026-01-22 17:56:40 +05:30
Sameer Kankute 4d20c8fbc0 feat: Limit stop sequence as per openai spec 2026-01-22 17:52:13 +05:30
Harshit JainandGitHub 746414eb9b Fix/per service ssl override v2 (#19538)
* refactor(ssl): support per-service SSL verification overrides

* add test cases for ssl
2026-01-21 20:10:04 -08:00
Sameer KankuteandGitHub 3794f86af0 Merge pull request #19502 from Chesars/docs/base-model-openai-dated-versions
docs(custom_pricing): add base_model usage for OpenAI dated model versions
2026-01-22 09:19:12 +05:30
Chesars f64ff8327d docs(custom_pricing): add base_model usage for OpenAI dated model versions
Document how to use base_model to ensure custom pricing is applied when
OpenAI returns dated model names (e.g., gpt-4o-mini-audio-preview-2024-12-17)
that differ from the configured model name.
2026-01-21 11:18:51 -03:00
Kamil JopekandGitHub ce722ab763 Make grpc dependency optional (#19447)
* Make grpc optional and document gRPC OTEL setup

* Add tests for missing OTLP gRPC imports
2026-01-20 19:03:52 -08:00
Ishaan JaffandGitHub ddebdd47bc [Feat] Add Support for Claude Code Max/OAuth 2 on LiteLLM AI Gateway (#19453)
* fix count_tokens_with_anthropic_api

* remove outdated file

* fix ANTHROPIC_TOKEN_COUNTING_BETA_VERSION

* refactor: get_token_counter

* init test suite for token counter

* init token counters

* fix: fix pyrightI

* fix Code QA issues

* feat: add OAUTH handling ant

* feat: Oauth handling Ant

* test anthopic common utils

* fix code QA

* docs
2026-01-20 17:21:17 -08:00
Alexsander HamirandGitHub 5a06868652 Fix in-flight request termination on SIGTERM when health-check runs in a separate process (#19427) 2026-01-20 12:17:06 -08:00
Krrish Dholakia f95f5563ea docs: document input/output/total tokens behaviour
Closes https://github.com/BerriAI/litellm/issues/17480
2026-01-20 10:45:47 -08:00
Sameer Kankute dc3ee63359 fix: test_env_keys 2026-01-20 18:37:56 +05:30
Igal BoxermanandGitHub d7ac8de832 docs: Migrate Pillar Security to Generic Guardrail API (#19364)
Update Pillar Security integration to use the generic_guardrail_api
instead of the dedicated pillar guardrail type. This aligns with
the Generic Guardrail API specification introduced in previous PRs.

Changes:
- Rewrite pillar_security.md with new generic_guardrail_api config
- Add Pillar Security example to generic_guardrail_api.md
- Add Pillar Security to quick_start.md guardrails examples

Related PRs: #17175, #18647, #18932, #19023
2026-01-19 20:35:56 -08:00
Alexsander HamirandGitHub 3cdeebb5b8 fix(gcs_bucket): prevent unbounded queue growth due to slow API calls (#19297) 2026-01-19 10:47:56 -08:00
0862373b38 docs: add note about no limits on users/keys/teams in LiteLLM OSS (#19367)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-01-19 08:22:18 -08:00
YutaSaitoandGitHub d28bf983eb Merge pull request #19272 from Harshit28j/feature/panw-custom-violation-msg
feat(panw_prisma_airs): add custom violation message support
2026-01-18 06:55:39 +09:00
yuneng-jiangandGitHub 953e2736d4 Merge pull request #19291 from BerriAI/deleted_keys_docs_2
[Docs] Deleted Keys and Teams Docs
2026-01-17 13:20:48 -08:00
yuneng-jiang 19a69a89f0 deleted keys and teams docs 2026-01-17 13:19:48 -08:00
Ishaan Jaffer 58570e5b13 fix doc 2026-01-17 12:28:04 -08:00
Ishaan Jaffer 1115e6b8c7 docs fix 2026-01-17 12:20:09 -08:00
Harshit Jain 0683f29671 feat(panw_prisma_airs): add custom violation message support 2026-01-17 17:52:25 +05:30
Ishaan JaffandGitHub d2a40c8456 [Fix] - Reliability fix OOMs with image url handling (#19257)
* fix MAX_IMAGE_URL_DOWNLOAD_SIZE_MB

* test_image_exceeds_size_limit_with_content_length

* fix: _process_image_response

* add constants 50MB

* fix convert_to_anthropic_image_obj image handling

* test_gemini_image_size_limit_exceeded

* MAX_IMAGE_URL_DOWNLOAD_SIZE_MB fix

* MAX_IMAGE_URL_DOWNLOAD_SIZE_MB

* test_image_size_limit_disabled

* async_convert_url_to_base64

* docs fix

* code QA check

* fix Exception
2026-01-16 16:41:44 -08:00
mubashir1osmaniandGitHub bcc23a32b8 docs: add redis initalization with kwargs
docs: add redis initalization with kwargs
2026-01-16 18:11:07 -05:00
Sameer KankuteandGitHub e54af42774 Merge pull request #19211 from BerriAI/main
merge main in fallback PR
2026-01-16 17:01:10 +05:30
Sameer KankuteandGitHub b0c6a1b308 Merge pull request #19203 from BerriAI/main
merge main
2026-01-16 15:16:29 +05:30
Sameer Kankute d585b760c9 Add fallback endpoints support 2026-01-16 10:51:33 +05:30
mubashir1osmani cbeaca071f docs: add redis initalization with kwargs 2026-01-15 23:15:54 -05:00