Skip to content

Conversation

@krrishdholakia
Copy link
Contributor


fix(docker): add libsndfile to Alpine image for audio processing (#18092)

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test

Changes

)

ARM64 Alpine image was missing libsndfile library causing soundfile
module to fail with "cannot load library" error.
@vercel
Copy link

vercel bot commented Dec 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
litellm Ready Ready Preview, Comment Dec 17, 2025 4:48pm

)

extract model id from vertex ai passthrough routes that follow the pattern:
/vertex_ai/*/models/{model_id}:*

the model extraction now handles vertex ai routes by regex matching the model
segment from the url path, which allows proper model identification for
authentication and authorization in proxy pass-through endpoints.

adds comprehensive test coverage for vertex ai model extraction including:
- various vertex api versions (v1, v1beta1)
- different locations (us-central1, asia-southeast1)
- model names with special suffixes (gemini-1.5-pro, gemini-2.0-flash)
- precedence verification (request body model over url)
- non-vertex route isolation
@CLAassistant
Copy link

CLAassistant commented Dec 17, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
6 out of 7 committers have signed the CLA.

✅ krisxia0506
✅ Chesars
✅ Sameerlite
✅ castrapel
✅ jk-f5
✅ Reapor-Yurnero
❌ shivamrawat1
You have signed the CLA already but the status is still pending? Let us recheck it.

…ng) and introduce the option to send all chunked responses in stream towards the guardrail. (#18085)
…rovider_chat_config (#18086)

Claude models on Azure AI were incorrectly using AzureAIStudioConfig,
causing tool calls to fail with invalid_request_error because tools
remained in OpenAI format instead of being transformed to Anthropic format.
"vertex_location": "global",
},
)
assert "aiplatform.googleapis.com" in url

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High test

The string
aiplatform.googleapis.com
may be at an arbitrary position in the sanitized URL.

Copilot Autofix

AI about 23 hours ago

To fix the problem, substring checks for a host/domain in a URL should be replaced by parsing the URL with a well-known library and checking its hostname explicitly. For Python, urllib.parse.urlparse can be used to extract the hostname attribute from the URL, after which the test should assert that hostname is the expected domain (aiplatform.googleapis.com). For the test on line 166, replace assert "aiplatform.googleapis.com" in url with parsing the URL and asserting on its hostname.

This will require importing urlparse from urllib.parse, if not already present in the file.

Only the assertion code in the affected test function needs to be changed; other environment checks and logic are unaffected.


Suggested changeset 1
tests/test_litellm/llms/vertex_ai/image_edit/test_vertex_ai_image_edit_transformation.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/tests/test_litellm/llms/vertex_ai/image_edit/test_vertex_ai_image_edit_transformation.py b/tests/test_litellm/llms/vertex_ai/image_edit/test_vertex_ai_image_edit_transformation.py
--- a/tests/test_litellm/llms/vertex_ai/image_edit/test_vertex_ai_image_edit_transformation.py
+++ b/tests/test_litellm/llms/vertex_ai/image_edit/test_vertex_ai_image_edit_transformation.py
@@ -7,7 +7,7 @@
 
 import httpx
 import pytest
-
+from urllib.parse import urlparse
 from litellm.llms.vertex_ai.image_edit.vertex_gemini_transformation import (
     VertexAIGeminiImageEditConfig,
 )
@@ -163,7 +163,8 @@
                 "vertex_location": "global",
             },
         )
-        assert "aiplatform.googleapis.com" in url
+        hostname = urlparse(url).hostname
+        assert hostname == "aiplatform.googleapis.com"
         assert "global-aiplatform.googleapis.com" not in url
         assert "/locations/global/" in url
 
EOF
@@ -7,7 +7,7 @@

import httpx
import pytest

from urllib.parse import urlparse
from litellm.llms.vertex_ai.image_edit.vertex_gemini_transformation import (
VertexAIGeminiImageEditConfig,
)
@@ -163,7 +163,8 @@
"vertex_location": "global",
},
)
assert "aiplatform.googleapis.com" in url
hostname = urlparse(url).hostname
assert hostname == "aiplatform.googleapis.com"
assert "global-aiplatform.googleapis.com" not in url
assert "/locations/global/" in url

Copilot is powered by AI and may make mistakes. Always verify output.
@Sameerlite Sameerlite merged commit 95b2e72 into main Dec 17, 2025
17 of 59 checks passed
@Sameerlite Sameerlite deleted the litellm_staging_12_17_2025 branch December 17, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants