BerriAI/litellm · error · ValueError
Invalid identifier {identifier!r}: path traversal detected
Error message
Invalid identifier {identifier!r}: path traversal detected What it means
Error "Invalid identifier {identifier!r}: path traversal detected" thrown in BerriAI/litellm.
Source
Thrown at litellm/integrations/arize/arize_phoenix_client.py:16
"""
Arize Phoenix API client for fetching prompt versions from Arize Phoenix.
"""
import urllib.parse
from typing import Any, Final
from litellm.llms.custom_httpx.http_handler import HTTPHandler
def _sanitize_id(identifier: str) -> str:
"""Reject path traversal characters and URL-encode the identifier."""
if any(c in identifier for c in ("/", "\\", "#", "?")):
raise ValueError(f"Invalid identifier {identifier!r}: contains disallowed characters")
if ".." in identifier:
raise ValueError(f"Invalid identifier {identifier!r}: path traversal detected")
return urllib.parse.quote(identifier, safe="")
class ArizePhoenixClient:
"""
Client for interacting with Arize Phoenix API to fetch prompt versions.
Supports:
- Authentication with Bearer tokens
- Fetching prompt versions
- Direct API base URL configuration
"""
def __init__(self, api_key: str | None = None, api_base: str | None = None):
"""
Initialize the Arize Phoenix client.
Args:View on GitHub (pinned to 6c2dcb801b)
Solutions
- Remove '..' or path separators from the identifier; use a plain name.
When it happens
Trigger: Thrown at litellm/integrations/arize/arize_phoenix_client.py:16 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/08332ca9b60abf86.
Report an issue: GitHub.