Commit Graph
76 Commits
Author SHA1 Message Date
Krish DholakiaandGitHub 664c83cfb5 Merge branch 'litellm_contributor_prs_09_18_2025_p2' into litellm_dev_09_17_2025_p2_v2 2025-09-18 19:50:55 -07:00
katsuhiro mutoandGitHub ec61a7152a Support for is_streamed_request widh datadog (#14673) 2025-09-18 15:55:16 -07:00
Krrish Dholakia adc71ad2e7 fix(langsmith.py): add langsmith_sampling_rate as a dynamic param
Closes LIT-879
2025-09-17 17:32:26 -07:00
Krish DholakiaandGitHub fcf84027e8 Merge pull request #14555 from mubashir1osmani/dd_spend_metric
DataDog shows spend metrics
2025-09-16 22:44:47 -07:00
Mubashir OsmaniandGitHub 0fde408e35 added langfuse logging for responses api (#14597)
* added langfuse logging for responses api

* tests added
2025-09-16 21:43:19 -07:00
mubashir1osmani e56b11cb54 added tests 2025-09-17 00:19:03 -04:00
mubashir1osmani f5f00043ce fixed tests 2025-09-16 00:14:48 -04:00
Mubashir OsmaniandGitHub 321d5299b2 s3_endpoint_url returned 404 (#14559)
* added spend metrics

* feat: Add Spend metrics in datadog

* fix: lint errors

* fix: s3 endpoint url logging

* fixed lint errors

* remove from branch

This reverts commit e123cae06e.

* Remove from branch

This reverts commit e694cc102a.

* remove "added spend metrics"

This reverts commit 6156590190.
2025-09-15 12:08:18 -07:00
mubashir1osmani e694cc102a feat: Add Spend metrics in datadog 2025-09-14 14:42:26 -04:00
Krish DholakiaandGitHub 510332b886 Merge pull request #14491 from Rasmusafj/main
Resolve cache key collision issue where all soft budget alerts use identical cache keys
2025-09-14 00:51:27 -07:00
Krish DholakiaandGitHub dc4bbba0a5 Merge pull request #14520 from boopesh07/email_prometheus
Added user_email labels to the prometheus monitoring.
2025-09-13 23:19:46 -07:00
mubashir1osmani 6156590190 added spend metrics 2025-09-13 01:38:08 -04:00
mubashir1osmani fd11159148 fix: DD tool calls passed in metadata 2025-09-13 00:11:18 -04:00
boopesh07 36299dbc73 Added user_email labels to the prometheus monitoring. 2025-09-12 15:38:23 -07:00
rasmus.arpe@gmail.comandruek b8c362e443 add tests for the fix 2025-09-12 12:07:08 +02:00
Ishaan Jaff b1552cae46 fix mocked CZ tests 2025-09-06 14:33:02 -07:00
Ishaan Jaff fc7accad74 test_dry_run_export_usage_data_cbf_transformation_failure 2025-09-06 13:59:28 -07:00
Ishaan JaffandGitHub 5310bba35b [Feat] Litellm x CloudZero Integration - Cost Tracking (#14296)
* fix: just pull LiteLLM_DailyUserSpend

* get the team_id from user daily spend table

* cloudzero_dry_run_export

* fix CZ endpoints

* trace entity_id

* fix: get_usage_data

* fix get_usage_data

* fix _create_cbf_record

* fix get_usage_data

* ensure start and end time is used for exporting data

* fix init_cloudzero_background_job

* fix CloudZeroExportRequest

* fix initialize_cloudzero_export_job

* fix initialize_cloudzero_export_job

* allow init with env + config.yaml for cloudzero

* fix: init CZ through config.yaml

* fix DRY run on CZ

* TestCloudZeroDryRunEndpoint

* fix: CLOUDZERO_EXPORT_INTERVAL_MINUTES

* fix init_cloudzero_background_job

* fix exporting data

* fix transform

* stash cloudzero docs

* docs: CloudZero

* ruff fix

* fix rendering key alias

* fix polars
2025-09-05 21:29:41 -07:00
Ishaan Jaff 0a60390521 Revert "[Feat] LiteLLM CloudZero Integration updates - using LiteLLM_SpendLogs Table (#12922)"
This reverts commit e3b752d3dc.
2025-09-05 10:04:07 -07:00
Krish DholakiaandGitHub 62d4623d1c Merge pull request #14107 from uc4w6c/feat/add_guardrails_anthropic
feat: Add guardrail to the Anthropic API endpoint
2025-09-04 20:50:43 -07:00
Ishaan JaffandGitHub 1352545617 [Fix] DD LLM Observability - Ensure apm_id is set on traces (#14272)
* add apm_id for DD LLM

* feat: add _get_apm_trace_id
2025-09-04 14:35:41 -07:00
Krish DholakiaandGitHub 35b501b8d5 Merge pull request #14176 from mjmendo/feat/alert_type_in_slack_message
feat: added alert type to alert messate to slack for easier handling
2025-09-02 23:05:41 -07:00
Marcelo Mendoza db1b418b15 fix: update alert type formatting to handle enum names in Slack messages 2025-09-02 17:54:54 +02:00
Keith Decker 5dcdbb35da add metrics and logs (events) with semconv attributes 2025-09-02 09:20:25 -06:00
Marcelo Mendoza 92f631d57c fix: correct formatting of alert messages in Slack notifications 2025-09-02 15:12:11 +00:00
Krrish Dholakia 4a422ca897 fix: support logging dynamic metadata values to braintrust 2025-09-01 17:38:15 -07:00
Yuta Saito d83c420d48 feat: Add guardrail for the Anthropic API endpoint 2025-08-31 16:44:01 +09:00
Krish DholakiaandGitHub ead7e7259b Merge pull request #13152 from betterthanbreakfast/bug-openmeter-user-id-from-token
[Bug]: Set user from token user_id for OpenMeter integration
2025-08-29 22:21:26 -07:00
Ishaan JaffandGitHub 165242e31f [Feat] langfuse_otel logger - allow using LANGFUSE_OTEL_HOST for configuring host (#14013)
* feat - add _get_langfuse_otel_host

* test_get_langfuse_otel_config_with_otel_host_priority

* docs: LANGFUSE_OTEL_HOST
2025-08-27 14:43:47 -07:00
Cole FrenchandGitHub 6696955506 [Bug]: Fix tests to reference moved attributes in braintrust_logging module (#13978)
* Mock instance attribute moved from globals

* Support looking up mock message on mock choice
2025-08-26 18:58:16 -07:00
Krish DholakiaandGitHub ae678a6642 Merge pull request #13573 from Ivy-Interactive/feature/braintrust-span-name-metadata
Feature/braintrust span name metadata
2025-08-25 23:19:56 -07:00
Tomu Hirata 5879f6e930 comment 2025-08-20 15:46:53 +09:00
Tomu Hirata d64b579131 Include predicted output in tracing
Signed-off-by: Tomu Hirata <tomu.hirata@gmail.com>
2025-08-20 15:39:32 +09:00
Ishaan JaffandGitHub 195ea6515e [Feat] Datadog LLM Observability - Add support for tracing guardrail input/output (#13767)
* add guardrail information on DD LLM Obs

* test_guardrail_information_in_metadata
2025-08-19 10:26:25 -07:00
Ishaan JaffandGitHub ba1d2e8749 [Feat] DD LLM Observability - Add time to first token, litellm overhead, guardrail overhead latency metrics (#13734)
* fixes for DDLLMObsLatencyMetrics

* use _get_latency_metrics

* DD LLM Obs - track latency metrics

* fixes for bedrock guardrails

* DD unit tests

* test DD
2025-08-18 17:38:04 -07:00
Ishaan JaffandGitHub ef08e18c66 [Feat] Datadog LLM Observability - Add support for Failure Logging (#13726)
* add async_log_failure_event for DD LLM Obs

* update types

* DataDogLLMObsLogger  add failure logging support

* test_async_log_failure_event

* dd test failure
2025-08-18 15:19:48 -07:00
TomuHirataandGitHub f6e53deacd Update mlflow logger usage span attributes (#13561)
* test: sync mlflow request tags

* fix test
2025-08-14 15:20:50 -07:00
nielsbosma fe54da79a1 test(braintrust-logging): add span_name tests for events
Add tests to verify custom and default span_name in BraintrustLogger,
including async, metadata merging, and span name behavior.
2025-08-13 12:26:14 +02:00
Ishaan JaffandGitHub 008ea864a7 [Feat] - Add key/team logging for Langfuse OTEL Logger (#13512)
* feat - add key/team logging for LF

* test_construct_dynamic_otel_headers_with_langfuse_keys

* update LangfuseOtelLogger

* test_construct_dynamic_otel_headers_with_langfuse_keys

* cleanup

* OpenTelemetryConfig fixes

* fix code qa checks

* TestLangfuseOtelIntegration
2025-08-11 22:06:25 -07:00
Edward D'AmatoandGitHub 30fc5b871c feat(integrations): allow setting of braintrust callback base url (#13368)
* feat(integrations): allow setting of braintrust callback base url

* chore(misc): remove extra additions due to merge
2025-08-07 08:40:11 -07:00
Krish DholakiaandGitHub 3119064e94 Prompt Management - add prompts on UI (#13240)
* fix(create_key_button.tsx): add prompts on UI

* feat(key_management_endpoints.py): support adding prompt to key via `/key/update`

* fix(key_info_view.tsx): show existing prompts on key in key_info_view.tsx

* fix(key_edit_view.tsx): UX - disable premium feature for non-premium users

prevent accidental clicking

* fix(create_key_button.tsx): disable premium features behind flag, prevent errors

* feat(prompts.tsx): add new ui component to view created prompts

enables viewing prompts created on config

* feat(prompt_info.tsx): add component for viewing the prompt information

* feat(prompt_endpoints.py): support converting dotprompt to json structure + accept json structure in promptmanager

allows prompt manager to work with api endpoints

* test(test_prompt_manager.py): add unit tests for json data input

* feat(dotprompt/__init__.py): add prompt data to dotpromptmanager

* fix(prompt_endpoints.py): working crud endpoints for prompt management

* feat(prompts/): support `prompt_file` for dotprompt

allows to precisely point to the prompt file a prompt should use

* feat(proxy/utils.py): resolve prompt id correctly

resolves user sent prompt id with internal prompt id

* feat(schema.prisma): initial pr with db schema for prompt management table

allows post endpoints to work with backend

* feat(prompt_endpoints.py): use db in patch_prompt endpoint

* feat(prompt_endpoints.py): use db for update_prompt endpoint

* feat(prompt_endpoints.py): use db on prompt delete endpoint

* build(schema.prisma): add prompt tale to schema.prisma in litellm-proxy-extras

* build(migration.sql): add new sql migration file

* fix(init_prompts.py): fix init

* feat(prompt_info_view.tsx): show the raw prompt template on ui

allows developer to know the prompt template they'll be calling

* feat(add_prompt_form.tsx): working ui add prompt flow

allows user to add prompts to litellm via ui

* build(ui/): styling fixes

* build(ui/): prompts.tsx

styling improvements

* fix(add_prompt_form.tsx): styling improvements

* build(prompts.tsx): styling improvements

* build(ui/): styling improvements

* build(ui/): fix ui error

* fix: fix ruff check

* docs: document new api params

* test: update tests
2025-08-02 22:33:37 -07:00
Krrish Dholakia d158a0344d test: update unit tests 2025-08-01 13:37:51 -07:00
Krrish Dholakia 72fd4e3d55 test: remove bad unit tests 2025-08-01 13:34:23 -07:00
Krrish Dholakia e3c9fc458d test: update tests 2025-08-01 09:19:31 -07:00
Krrish Dholakia fe24c270de Prompt Management - add local dotprompt file support 2025-07-31 22:28:29 -07:00
Cole McIntoshandGitHub 0666ede8e3 fix: correct patch path in langfuse test for MAX_LANGFUSE_INITIALIZED_CLIENTS (#13192)
The test was failing because it was trying to patch MAX_LANGFUSE_INITIALIZED_CLIENTS
at the wrong path. The constant is imported from litellm.constants into the langfuse
module namespace, so we need to use patch.object on the imported module reference.

Changes:
- Import langfuse module explicitly for patching
- Use patch.object instead of patch string path
- This fixes the AttributeError that was causing CI failures
2025-07-31 17:11:28 -07:00
Ishaan JaffandGitHub ee70d593c1 [Feat] Allow redacting message / response content for specific logging integrations - DD LLM Observability (#13158)
* fix redact_standard_logging_payload

* add StandardCustomLoggerInitParams

* allow defining DatadogLLMObsInitParams

* fix init DataDogLLMObsLogger

* fix import

* update redact_standard_logging_payload_from_model_call_details

* test_dd_llms_obs_redaction

* docs DD logging

* docs DD

* docs DD

* Redacting Messages, Response docs DD LLM Obs

* fix redaction logic

* fix create_llm_obs_payload

* fix logging response

* fixes

* ruff fix

* fix test

* test_dd_llms_obs_redaction

* test_create_llm_obs_payload

* redact_standard_logging_payload_from_model_call_details

* img - dd_llm_obs

* docs DD

* fix linting

* fix linting

* fix mypy

* test_create_llm_obs_payload

* test_create_llm_obs_payload

* fix mock_env_vars

* fix _handle_anthropic_messages_response_logging
2025-07-31 16:44:16 -07:00
Anand KhinvasaraandGitHub 212a339954 fix: support negative indexes in cache_control_injection_points for Anthropic Claude (#10226) (#13187) 2025-07-31 15:50:53 -07:00
betterthanbreakfast 51a103c351 [Bug]: Set user from token user_id for OpenMeter integration 2025-07-30 22:23:30 +02:00
Ishaan Jaff d10a5a69af fix test_mlflow_request_tags_functionality 2025-07-29 17:33:24 -07:00