Commit graph

37639 commits

Author SHA1 Message Date
Praveen Ghuge
d2ecce7529 style: black format uploader.py 2026-04-26 22:02:43 +05:30
Praveen Ghuge
ecfeebc79c fix(mavvrik): two P1s — delete for env-var deployments + GCS session leak
P1: Service.delete() fails for env-var-only deployments
  settings.delete() raised LookupError (no DB row) before remove_job()
  was reached — the scheduler kept running with no way to stop it via API.
  Fix: deregister scheduler job first (independent of DB), then only
  delete the DB row when credentials are NOT from env vars.

P1: GCS resumable session left open on _put_chunk failure
  A mid-stream exception abandoned the session URI; GCS held it open for
  up to 1 week, accumulating stale sessions on repeated transient failures.
  Fix: wrap the chunk loop in try/except — on any exception, send DELETE
  to the session URI (best-effort via contextlib.suppress) then re-raise.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 22:02:43 +05:30
Praveen Ghuge
4962c1d62a fix(mavvrik): fix dry_run TypeError on NULL spend and missing column guard
Bug 1: float(df["spend"].sum()) raises TypeError when all spend values
are NULL — polars .sum() returns None for an all-null series.
Fix: float(df["spend"].sum() or 0.0)

Bug 2: df["completion_tokens"].sum() accessed without checking the column
exists — only "prompt_tokens" was guarded. Raises ColumnNotFoundError if
schema omits completion_tokens.
Fix: guard both columns together before summing.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 21:53:10 +05:30
Praveen Ghuge
2f6742a700 fix(mavvrik): reschedule background job after update_settings
PUT /mavvrik/settings saved new credentials to DB but the running
Orchestrator kept its old Client with stale api_endpoint/connection_id —
directly contradicting "update credentials without restarting".

Fix: after saving merged credentials, reschedule the job with a new
Client/Uploader/Orchestrator built from the merged values using
replace_existing=True — same pattern as initialize(). The updated
credentials take effect on the next scheduler tick.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 21:43:57 +05:30
Praveen Ghuge
cff49b8a01 fix(mavvrik): lazy import Service in mavvrik_endpoints to avoid polars at startup
Importing 'from litellm.integrations.mavvrik import Service' at module level
caused the entire mavvrik package to load at proxy startup, which could
transitively import polars (optional [proxy] dep) for SDK-only users.

Fix: lazy import via _get_service() helper — Service (and the polars dep chain)
is only loaded when a Mavvrik endpoint is actually called, not at import time.

Note: cloudzero_endpoints.py and vantage_endpoints.py use the same
unconditional pattern; we've proactively fixed ours to be stricter.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 21:36:49 +05:30
Praveen Ghuge
04dd7c345f fix(mavvrik): add dus.id as final tiebreaker in ORDER BY for stable pagination
Previous fix added api_key but the @@unique constraint on
LiteLLM_DailyUserSpend is (user_id, date, api_key, model,
custom_llm_provider, mcp_namespaced_tool_name, endpoint). Two rows
sharing (date, user_id, api_key, model) but differing in provider or
endpoint still have indeterminate order, causing OFFSET pagination to
duplicate or drop rows at page boundaries.

Fix: add dus.id (primary key, always unique) as the final tiebreaker.
Cleaner than enumerating all 7 constraint columns.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 08:37:29 +05:30
Praveen Ghuge
2bee264939 fix(mavvrik): raise on DB not connected in Service.export/dry_run
Service.export() and Service.dry_run() called exporter.export() which
silently returns an empty DataFrame when prisma_client is None, causing
the endpoint to return {"status": "success", "records_exported": 0} —
identical to a legitimate zero-traffic day. Admins had no way to tell
the difference.

Fix: call Settings._ensure_prisma_client() before reaching the exporter
in both methods. This raises an Exception with a clear message when the
DB is not connected, surfacing as a 500 response to the caller.

Also fixes the misleading exporter.py module docstring which claimed
"user-triggered endpoints surface the missing-DB error through
Settings._ensure_prisma_client() before reaching here" — that was wrong
until this commit.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 08:31:09 +05:30
Praveen Ghuge
b0a140647f fix(mavvrik): add api_key to ORDER BY for stable OFFSET pagination
Without dus.api_key in the ORDER BY, pagination is unstable: multiple rows
can share the same (date, user_id, model) with different api_key values.
When page boundaries fall inside such a group the DB can return those rows
in any order, causing duplicates or silent drops across pages.

Fix: add dus.api_key to the sort key, matching the table's @@unique
constraint: (user_id, date, api_key, model, custom_llm_provider, ...).
This guarantees a stable total order for all OFFSET-based pagination.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 08:23:49 +05:30
Praveen Ghuge
5af15a2b59 style(mavvrik): address pattern conformance findings 3 and 4
Finding 3 — proxy_server.py: remove inline `import os as _os`
  Every other integration block in _initialize_spend_tracking_background_jobs
  uses the module-level os import already in scope. Changed _os.getenv(...)
  to os.getenv(...) and removed the mid-function import alias.

Finding 4 — custom_logger_registry.py: fix MavvrikLogger import order
  MavvrikLogger was inserted between cloudzero and datadog imports.
  Alphabetically mavvrik sorts after datadog/datadog_llm_obs/datadog_metrics
  and before deepeval. Moved import to the correct alphabetical position.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 07:58:35 +05:30
Praveen Ghuge
fee9c1023c fix(mavvrik): replace real-network e2e test with mock-based integration tests
BerriAI rule: tests/test_litellm/ must contain only mock-based tests.
The previous test_e2e_upload.py hit the live Mavvrik API.

Replaced with fully mock-based integration tests covering:
  - Client: register, advance_marker, get_signed_url, report_error
  - Uploader: upload bulk path, empty payload skip, idempotency
  - Full pipeline: register → upload → advance in sequence

No credentials required, always runs in CI. 164 tests passing.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-25 22:06:00 +05:30
Praveen Ghuge
7a24f4ec6c fix(mavvrik): address new P1 issues from Greptile review
P1 — exporter.py: lazy polars import (SDK users)
  polars is optional [proxy] dep. Importing at module level caused SDK users
  to get ModuleNotFoundError via the import chain:
  custom_logger_registry → mavvrik/__init__ → exporter → polars.
  Now imported inside each method that uses it. TYPE_CHECKING guard for
  type annotations only.

P1 — orchestrator.py + exporter.py: distinguish DB error vs zero-traffic day
  _stream_pages now raises RuntimeError when DB is None instead of silently
  returning. This propagates through _export → caught by _run_pipeline →
  report_error, marker NOT advanced. Zero-traffic days yield nothing without
  raising → advance IS called (correct).

P1 — uploader.py: accept 200 or 201 for GCS session initiation
  Standard GCS returns 200 OK for resumable upload initiation, not 201.

P1 — test_e2e_upload.py: moved to tests/local_testing/test_mavvrik_e2e.py
  BerriAI rule: tests/test_litellm/ must contain only mock-based tests.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-24 17:26:35 +05:30
Praveen Ghuge
b320f949fa fix(mavvrik): address P0/P1/P2 issues from Greptile + CI failures
P1 — orchestrator: gate _advance on total_bytes > 0
  When DB is unavailable, _export returns 0 bytes. Previously _advance was
  called unconditionally, permanently skipping those dates (marker advances
  past them). Now raises RuntimeError on 0 bytes so the single try/except
  catches it, calls report_error, and leaves the marker unchanged — the
  date is retried on the next scheduled run.

P1 — __init__.py: remove top-level `import polars as pl`
  polars is an optional [proxy] dependency. `custom_logger_registry.py`
  imports Logger from this package at module level, which triggered the
  polars import for all SDK users. polars is not used directly in __init__.py
  (Exporter uses it internally) so the import can be removed entirely.

P2 — uploader: add Content-Range header to _finalize_upload
  GCS resumable upload spec requires Content-Range: bytes 0-{last}/{total}
  on the final PUT. _finalize_upload was omitting it. Now consistent with
  _put_chunk(final=True) which already sends Content-Range correctly.

CI — documentation_test_env_keys: env vars already in config_settings.md
  (lines 607-611), failure was from an older commit.

CI — lint: factory.py Black format — pre-existing upstream issue, not our code.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-24 17:08:37 +05:30
Praveen Ghuge
376d9a59ee fix(mavvrik): use get_async_httpx_client instead of httpx.AsyncClient per request
BerriAI enforce_async_clients check requires using the shared cached client
from get_async_httpx_client() instead of creating httpx.AsyncClient() per
request. Creating per-request clients adds +500ms latency overhead.

_http.py now calls get_async_httpx_client(LoggingCallback).client to get the
shared httpx.AsyncClient from LiteLLM's in-memory client cache, then calls
.request() on it directly (AsyncHTTPHandler only has verb-specific wrappers,
not a generic request() method).

Test mocks updated to patch get_async_httpx_client instead of httpx.AsyncClient.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-24 17:00:50 +05:30
Praveen Ghuge
4e0b1907d4 feat(mavvrik): add Mavvrik integration for automatic LLM spend export (#12) 2026-04-24 16:43:05 +05:30
shubham-arora-clear
e5786c6c35
fix(bedrock): preserve cache_control TTL on tools for Claude 4.5+ (#25855)
Bedrock enforces non-increasing TTL ordering across cache_control blocks
(tools → system → messages). The tool cache_control TTL was being
unconditionally dropped to the default 5m, while system blocks preserved
the user-specified TTL for Claude 4.5+ models. This mismatch caused
"a ttl='1h' block must not come after a ttl='5m' block" errors when
users set ttl='1h' on both tools and system.

Converse path: add_cache_point_tool_block() now accepts a model param
and preserves TTL for Claude 4.5+, matching _get_cache_point_block().

Invoke path: _remove_ttl_from_cache_control() now also processes tools
(was only processing system and messages).

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 21:54:26 -07:00
yuneng-jiang
e9e86ed956
Merge pull request #26298 from BerriAI/litellm_internal_staging
[Infra] Promote interal staging to main
2026-04-22 19:16:23 -07:00
yuneng-jiang
6a25866f51
Merge pull request #26295 from BerriAI/yj_bump_apr22
Some checks are pending
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (proxy-utils, tests/proxy_unit_tests/test_proxy_utils.py, 20, 8) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --ignore=tests/proxy_unit_tests/test_p… (push) Waiting to run
Unit Tests: Security / security (push) Waiting to run
[Infra] bump versions
2026-04-22 18:33:03 -07:00
yuneng-jiang
8bc6948a5e
Merge pull request #26290 from BerriAI/litellm_/bold-goldstine-b86b67
[Fix] Stabilize spend accuracy test transport flakes
2026-04-22 18:30:10 -07:00
Yuneng Jiang
95fa7678af
uv lock 2026-04-22 18:25:37 -07:00
Yuneng Jiang
9f46d838fd
bump: version 1.83.11 → 1.83.12 2026-04-22 18:21:47 -07:00
Yuneng Jiang
3ddb3cbdf6
bump: version 0.4.67 → 0.4.68 2026-04-22 18:20:21 -07:00
ryan-crabbe-berri
c4c1861389
Merge pull request #26195 from BerriAI/litellm_team_member_total_spend
Track per-member total spend on team memberships
2026-04-22 18:20:16 -07:00
michelligabriele
c67d193400
fix(docker.non_root): use numeric UID 65534 for K8s runAsNonRoot (#26268) 2026-04-22 18:00:04 -07:00
Yuneng Jiang
a292845dcf
[Fix] Harden spend accuracy test against transient aiohttp connection errors
Two changes, both test-only:

- Configure the aiohttp session with TCPConnector(force_close=True) and an
  explicit ClientTimeout(total=30, connect=10). Prevents reuse of idle TCP
  connections that the proxy/kernel may have closed during the long window
  between setup POSTs and the later poll loop, and surfaces a blocked proxy
  event loop quickly instead of hanging on aiohttp's 5-minute default.

- In poll_key_spend_until, catch aiohttp.ClientError and asyncio.TimeoutError
  around the single /key/info call. A transient transport hiccup now logs and
  retries on the next tick instead of failing the entire polling loop.

Addresses the ConnectionTimeoutError observed on the first /key/info call
after the 20 chat completions.
2026-04-22 17:40:42 -07:00
yuneng-jiang
fb39683521
Merge pull request #25772 from BerriAI/litellm_wildcard_order_fallback
fix(router): wildcard order fallback to higher-order deployments
2026-04-22 15:05:14 -07:00
shin-berri
b6fdd46636
Merge pull request #26270 from BerriAI/litellm_/lucid-kowalevski-de832f
[Fix] Stabilize flaky spend accuracy tests + patch Redis buffer data-loss path
2026-04-22 15:02:24 -07:00
shin-berri
8340f6fc47
Merge pull request #26261 from BerriAI/litellm_code_quality_to_gha
[Infra] Migrate more CI jobs from CircleCI to GitHub Actions
2026-04-22 14:37:25 -07:00
yuneng-jiang
41145e2205
Merge pull request #26266 from BerriAI/litellm_bedrock_guardrail_spend_logging_reapply
fix(proxy): Bedrock guardrail spend logs - hook mode, match redaction, streaming request_data
2026-04-22 14:32:10 -07:00
Yuneng Jiang
3f42295d93
[Fix] Satisfy mypy on spend buffer restore helper
The daily queue parameter types on _restore_spend_updates_to_in_memory_queues
were narrowed to specific subtypes (DailyUserSpendTransaction, etc), but
the caller passes Dict[str, BaseDailySpendTransaction] — the return type
of flush_and_get_aggregated_daily_spend_update_transactions. Widen the
parameters to the base type.

Also replace dynamic TypedDict key lookup (which returned object) with
explicit literal-keyed get() calls so mypy can type-narrow each field.
2026-04-22 14:31:25 -07:00
Milan
3df9780c02
fix(core_helpers): make redact_nested_match_and_regex_keys iterative
Replace recursive `_walk` helper with a stack-based traversal so the
recursive_detector CI check passes without adding to the ignore list,
and avoid Python recursion limits on deeply nested payloads.

Made-with: Cursor
2026-04-23 00:12:30 +03:00
Yuneng Jiang
288d403529
[Fix] Preserve in-memory spend updates when Redis rpush fails
store_in_memory_spend_updates_in_redis drained the in-memory queues
into local variables before the rpush pipeline. If rpush raised (cloud
Redis hiccup, timeout, connection blip), those already-drained
transactions were garbage-collected with the scheduler job, silently
losing all spend aggregated during that tick.

Wrap the rpush in try/except. On failure, re-enqueue the aggregated
transactions into their respective in-memory queues so the next
scheduler tick retries.

Add a unit test that seeds real queues, simulates an rpush failure,
and asserts the transactions land back in-memory.
2026-04-22 14:10:40 -07:00
Yuneng Jiang
5445297da9
[Fix] Stabilize flaky spend accuracy tests with local ground truth
Replace the calibration step (one request + 10-minute poll) with an
independent ground truth computed from response usage via
litellm.cost_per_token. All N requests are made up front, so a single
dropped Redis write no longer kills the test.

Add /health/readiness checks at test start and on poll timeout so the
failure message surfaces proxy state (db, cache) instead of "calibration
timed out".

Set PROXY_BATCH_WRITE_AT=2 in the spend tracking CI job to shorten the
scheduler flush window.
2026-04-22 13:45:00 -07:00
Yuneng Jiang
1b74c35b89
[Infra] Move non-API-key CCI jobs to GitHub Actions
Principle: GHA handles work that doesn't need external API keys; CCI
stays for integration tests that hit real API endpoints.

Four CCI jobs moved to new or extended GHA workflows:

1. check_code_and_doc_quality (was 25 runs: ruff + import-safety +
   21 code_coverage_tests + 3 documentation_tests + circular-imports).
   - The 21 tests/code_coverage_tests/*.py scripts and the 3
     tests/documentation_tests/*.py scripts run in the new
     .github/workflows/test-code-quality.yml workflow.
   - ruff, import-safety, and circular-imports were already run by
     .github/workflows/test-linting.yml — no new migration needed.
   - The 3 documentation_tests scripts read
     docs/my-website/docs/proxy/config_settings.md. Since docs have
     moved to BerriAI/litellm-docs, the GHA workflow checks out that
     repo and symlinks docs/my-website -> the checkout so the
     existing hardcoded paths resolve without touching the scripts.
     The stale local docs/my-website/ copy in this repo will be
     removed in a separate PR.

2. semgrep (custom-rule SAST against .semgrep/rules).
   - New .github/workflows/test-semgrep.yml.

3. installing_litellm_on_python + installing_litellm_on_python_3_13
   (pip install compat checks on Python 3.12 and 3.13).
   - New .github/workflows/test-install-litellm.yml as a matrix job.
   - 3.12 run also verifies litellm_enterprise import; 3.13 run
     skips that check (matches previous CCI behavior).
   - installing_litellm_on_python_v2_migration_resolver stays in CCI
     because it requires a postgres service.

CCI .circleci/config.yml: -112 lines, 4 jobs and their workflow refs
removed.
2026-04-22 13:38:00 -07:00
Milan
9577d87158
fix(proxy): guardrail header dedupe, mypy during_call, test mock kwargs
- Dedupe names in add_guardrail_to_applied_guardrails_header (matches policies).
- Inline unified during_call condition so mypy narrows UserAPIKeyAuth.
- Extend bedrock guardrails test mock for logging_event_type.

Made-with: Cursor
2026-04-22 23:22:35 +03:00
Milan
ec735074a2
fix(proxy): reapply Bedrock guardrail spend logging (#25854)
Restore guardrail spend/UI event_type wiring, request_data on streaming
OUTPUT paths, and centralized match redaction after the upstream revert.

Made-with: Cursor
2026-04-22 23:00:45 +03:00
shin-berri
c95cac5d46
Merge pull request #26226 from BerriAI/litellm_/stoic-shamir-0ab13f
[Infra] CircleCI config cleanup and consolidation
2026-04-22 12:06:59 -07:00
yuneng-jiang
fc4fe34512
Merge pull request #26201 from BerriAI/litellm_prismaCacheRuntime
[Fix] Docker: restore pre-uv Prisma cache path
2026-04-22 11:33:27 -07:00
yuneng-jiang
24aec61e4b
Merge pull request #26049 from BerriAI/litellm_adaptive_routing
Litellm adaptive routing
2026-04-22 08:52:51 -07:00
Yuneng Jiang
61fd4e985e
[Infra] CCI config cleanup — dead step, filter dupe, cache keys, machine image
Follow-up cleanup after an independent review pass surfaced a few
loose ends:

- Delete a 6x-duplicated filter block in litellm_mapped_tests_proxy_part2
  (same kind of copy-paste residue we fixed earlier in
  langfuse_logging_unit_tests).
- Delete the empty "Install Semgrep" run step in the semgrep job — the
  command body was empty because semgrep is installed on-demand via
  uv tool run in the next step.
- Standardize machine-executor image: one job was on ubuntu-2204:2023.10.1
  while build_docker_database_image was already on ubuntu-2204:2024.04.1.
  Bumped everything to 2024.04.1.
- Remove the legacy "version: 2" inside the workflows: block — CircleCI
  2.1 top-level already declares the version.
- Drop `{{ checksum ".circleci/config.yml" }}` from cache keys (13 sites).
  It was busting the cache on every unrelated config edit; the uv.lock
  checksum alone is the right dependency cache key.
- Add partial-restore fallbacks to every restore_cache with a single
  templated key (10 sites). Jobs now fall back to the latest cache with
  a matching prefix if the exact uv.lock hash isn't cached yet.

Net: -14 lines.
2026-04-21 23:31:01 -07:00
Yuneng Jiang
0a65d2c535
[Infra] Standardize default Python to 3.12 and remove miniconda setup
Docker-executor jobs:
- Consolidate base images on cimg/python:3.12. Jobs previously on
  3.11 (26 jobs), 3.9 (1 historical: upload-coverage), and an
  incidental 3.13.1 (litellm_assistants_api_testing) now use 3.12.
- installing_litellm_on_python_3_13 keeps cimg/python:3.13.1 as its
  explicit "latest Python supported" install-check matrix job.

Machine-executor jobs:
- Delete the miniconda install step from 10 jobs. uv now manages
  Python directly: uv sync --python 3.12 auto-downloads a
  python-build-standalone interpreter if the ubuntu-2204 base
  image's default python doesn't match.
- Remove 37 "if [ -f conda.sh ]; then conda activate myenv" wrappers
  and 2 unconditional conda activate blocks left behind from the
  conda days.
- proxy_build_from_pip_tests keeps its 3.13 target (it was
  conda create -n myenv python=3.13) via uv sync --python 3.13.

Net: -301 lines.
2026-04-21 23:19:21 -07:00
Yuneng Jiang
344be27e83
[Refactor] Add start_postgres reusable command and migrate call sites
Add a start_postgres command parameterized on db_name (default
circle_test) that runs the postgres-db container and waits for port
5432 to accept connections. Replace all 11 inline docker run /
wait_for_service blocks with a single - start_postgres call.

The helm chart test overrides db_name to litellm_test; everything
else uses the default.

One of the 11 sites previously used a bespoke pg_isready loop instead
of wait_for_service; it now goes through the same TCP-probe path
everyone else uses, which is sufficient for test ordering purposes.

Net: -112 lines.
2026-04-21 23:14:46 -07:00
Yuneng Jiang
f490340a52
[Refactor] Add install_uv reusable command and migrate all call sites
Add a single install_uv command in the commands: section that encodes
the uv version (0.10.9) and its SHA256 in one place, then replace all
42 inline curl|sha256|install blocks across every job that needs uv.

setup_litellm_test_deps now calls install_uv too, so the shared
test-dep bootstrap goes through the same path.

Bumping uv version or SHA is now a one-line change instead of 43.

Net: -203 lines.
2026-04-21 23:13:42 -07:00
Yuneng Jiang
439bbd223b
[Infra] Clean up unused CCI jobs and pin docker images by digest
- Remove mypy_linting job (GHA test-linting.yml already runs this)
- Remove three redundant "Install curl" apt-get steps (curl is
  already present on the ubuntu-2204 machine image and used
  successfully earlier in each affected job)
- Dedupe langfuse_logging_unit_tests filter block (6x copy of the
  same two branch filters collapsed to 1)
- Pin all docker image references by @sha256 digest so builds stay
  reproducible when upstream tags are updated:
  cimg/python:3.9, 3.11, 3.12, 3.12-browsers, 3.13.1, cimg/node:20.19,
  cimg/postgres:16.0, and postgres:14 used via docker run

Net: -62 lines, 49 image references pinned.
2026-04-21 23:09:41 -07:00
ishaan-berri
0e42d4cb08
April 21st Ishaan Branch (#26213)
* fix(otel): preserve Splunk Observability Cloud trace OTLP endpoint (#26183)

* fix(otel): preserve Splunk Observability Cloud trace OTLP URL

Splunk ingest uses /v2/trace/otlp; _normalize_otel_endpoint must not append /v1/traces.

- Return trace endpoints unchanged when they match Splunk OTLP path patterns
- Add unit tests for observability.splunkcloud.com, signalfx.com, and /trace/otlp suffix
- Set OTEL_EXPORTER_OTLP_PROTOCOL in protocol selection tests (from_env precedence over OTEL_EXPORTER)

Made-with: Cursor

* test(otel): use parameterized.expand for Splunk OTLP URL cases

Made-with: Cursor

* fix(otel): narrow Splunk trace URL guard to /v2/trace/otlp only

Made-with: Cursor

* test(otel): cover OTEL_EXPORTER fallback when OTLP protocol env unset

Made-with: Cursor

* Add Openrouter Opus 4.7 Entry (#26130)

---------

Co-authored-by: milan-berri <milan@berri.ai>
Co-authored-by: Matt Greathouse <matt5316@gmail.com>
2026-04-21 20:18:56 -07:00
ishaan-berri
e6897f5510
add moonshot/kimi-k2.6 to model registry (#26203)
* add moonshot/kimi-k2.6 to model registry

* add moonshot/kimi-k2.6 to backup model registry

* add tests for moonshot/kimi-k2.6 model registry

* fix moonshot/kimi-k2.6 pricing and add reasoning support

* fix moonshot/kimi-k2.6 pricing and add reasoning support in backup

* update kimi-k2.6 tests: fix pricing, add tool_choice and reasoning checks

* fix: load kimi-k2.6 registry tests from local backup instead of remote cost map
2026-04-21 19:58:43 -07:00
shin-berri
09cd7e383e
Merge pull request #26211 from BerriAI/litellm_internal_staging
Some checks failed
Read Version from pyproject.toml / read-version (push) Has been cancelled
Unit Tests: Security / security (push) Has been cancelled
GitHub Actions Security Analysis / zizmor (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
CodSpeed Benchmarks / benchmarks (push) Has been cancelled
Helm unit test / unit-test (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (proxy-utils, tests/proxy_unit_tests/test_proxy_utils.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --ignore=tests/proxy_unit_tests/test_p… (push) Has been cancelled
[Infra] Promote internal staging to main
2026-04-21 18:57:59 -07:00
yuneng-jiang
eebb80fbef
Merge pull request #26208 from BerriAI/litellm_individual-team-member-budgets
Some checks are pending
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (proxy-utils, tests/proxy_unit_tests/test_proxy_utils.py, 20, 8) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --ignore=tests/proxy_unit_tests/test_p… (push) Waiting to run
Unit Tests: Security / security (push) Waiting to run
Litellm individual team member budgets
2026-04-21 18:38:00 -07:00
yuneng-jiang
e3ed136f52
Merge pull request #26209 from BerriAI/yj_bump_apr21_2
[Infra] Bump version
2026-04-21 18:29:41 -07:00
Yuneng Jiang
e65d547c4d
adding uv lock 2026-04-21 18:10:47 -07:00
Yuneng Jiang
5837d4a9ac
bump: version 1.83.10 → 1.83.11 2026-04-21 18:10:31 -07:00