BerriAI/litellm · error · ValueError
files_settings is not set, set it on your config.yaml file.
Error message
files_settings is not set, set it on your config.yaml file.
What it means
ValueError raised by get_files_provider_config: a files operation was requested for a non-vertex provider, but the global files_config was never set — 'files_settings' is missing from config.yaml. The operator must add the files settings block before using file endpoints.
Source
Thrown at litellm/proxy/openai_files_endpoints/files_endpoints.py:95
raise ValueError("invalid files config, expected a list is not a list")
for element in config:
if isinstance(element, dict):
for key, value in element.items():
if isinstance(value, str) and value.startswith("os.environ/"):
element[key] = get_secret_str(value)
files_config = config
def get_files_provider_config(
custom_llm_provider: str,
):
global files_config
if custom_llm_provider == "vertex_ai":
return None
if files_config is None:
raise ValueError("files_settings is not set, set it on your config.yaml file.")
for setting in files_config:
if setting.get("custom_llm_provider") == custom_llm_provider:
return setting
return None
def get_first_json_object(file_source: bytes | BinaryIO) -> dict | None:
try:
if isinstance(file_source, (bytes, bytearray)):
newline: Final = file_source.find(b"\n")
raw: Final = file_source if newline == -1 else file_source[:newline]
first_line = raw.decode("utf-8")
else:
file_source.seek(0)
first_line = file_source.readline().decode("utf-8")
file_source.seek(0)
return json.loads(first_line.strip())
except (json.JSONDecodeError, UnicodeDecodeError, OSError, ValueError):View on GitHub (pinned to 77b7c6c40c)
Solutions
- Set files_settings in config.yaml for the target provider.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/openai_files_endpoints/files_endpoints.py:95 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/96225eb4b50fdfea.
Report an issue: GitHub.