mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
test: document gemini file URI handling
This commit is contained in:
parent
bf5a8968ba
commit
dc3e0739fb
2 changed files with 6 additions and 4 deletions
|
|
@ -67,7 +67,11 @@ def encode_url_path_segment(value: Any, *, field_name: str = "path parameter") -
|
|||
|
||||
|
||||
def encode_url_path_segments(value: Any, *, field_name: str = "path") -> str:
|
||||
"""Percent-encode a user-controlled URL path made of multiple segments."""
|
||||
"""Percent-encode a user-controlled URL path made of multiple segments.
|
||||
|
||||
Empty segments are rejected, so leading, trailing, or consecutive slashes
|
||||
fail closed instead of being normalized by the HTTP client.
|
||||
"""
|
||||
if value is None:
|
||||
raise ValueError(f"{field_name} is required")
|
||||
|
||||
|
|
|
|||
|
|
@ -320,9 +320,7 @@ class TestGoogleAIStudioFilesTransformation:
|
|||
litellm_params=litellm_params,
|
||||
)
|
||||
|
||||
# Verify URL extraction
|
||||
assert "files/test123" in url
|
||||
assert "generativelanguage.googleapis.com" in url
|
||||
assert url == "https://generativelanguage.googleapis.com/v1beta/files/test123"
|
||||
|
||||
# Params should be empty (API key goes in header via validate_environment)
|
||||
assert params == {}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue