BerriAI/litellm · error · BadRequestError
Unsupported Vertex AI Search extra_body fields {sorted(unsup
Error message
Unsupported Vertex AI Search extra_body fields {sorted(unsupported)} for {mode} mode. Supported fields: {sorted(supported)}. What it means
BadRequestError raised while filtering extra_body for a Vertex AI Search request: keys that are neither target-selecting nor in the supported set for the current mode (engine vs data store) were passed. The message lists the offending keys and the allowed ones so the caller can trim extra_body.
Source
Thrown at litellm/llms/vertex_ai/vector_stores/search_api/transformation.py:108
supported: Final = cls.get_supported_extra_body_fields(is_engine=is_engine)
filtered: Final = {key: value for key, value in extra_body.items() if value is not None}
target_selecting: Final = set(filtered) & VERTEX_SEARCH_TARGET_SELECTING_FIELDS
if target_selecting:
raise BadRequestError(
message=(
"Vertex AI Search extra_body may not set target-selecting fields "
f"{sorted(target_selecting)}: the data store is scoped by "
"vector_store_id / vertex_engine_id and cannot be overridden per request."
),
model="vertex_ai/search_api",
llm_provider="vertex_ai",
)
unsupported: Final = set(filtered) - supported
if unsupported:
mode: Final = "engine/app" if is_engine else "data store"
raise BadRequestError(
message=(
f"Unsupported Vertex AI Search extra_body fields {sorted(unsupported)} "
f"for {mode} mode. Supported fields: {sorted(supported)}."
),
model="vertex_ai/search_api",
llm_provider="vertex_ai",
)
return filtered
def get_auth_credentials(self, litellm_params: dict) -> BaseVectorStoreAuthCredentials:
# Get credentials and project info
vertex_credentials: Final = self.get_vertex_ai_credentials(dict(litellm_params))
vertex_project: Final = self.get_vertex_ai_project(dict(litellm_params))
# Get access token using the base class method
access_token, project_id = self._ensure_access_token(
credentials=vertex_credentials,View on GitHub (pinned to 77b7c6c40c)
Solutions
- Remove the unsupported extra_body fields listed in the error for the current search mode.
- Use only fields from the supported list shown in the error, or switch to the search mode that supports the field you need.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/llms/vertex_ai/vector_stores/search_api/transformation.py:108 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/337c0a7fbba0d413.
Report an issue: GitHub.