{"record":{"id":"337c0a7fbba0d413","repo":"BerriAI/litellm","slug":"unsupported-vertex-ai-search-extra-body-fields-so","errorCode":null,"errorMessage":"Unsupported Vertex AI Search extra_body fields {sorted(unsupported)} for {mode} mode. Supported fields: {sorted(supported)}.","messagePattern":"Unsupported Vertex AI Search extra_body fields (.+?) for (.+?) mode\\. Supported fields: (.+?)\\.","errorType":"exception","errorClass":"BadRequestError","httpStatus":400,"severity":"error","filePath":"litellm/llms/vertex_ai/vector_stores/search_api/transformation.py","lineNumber":108,"sourceCode":"        supported: Final = cls.get_supported_extra_body_fields(is_engine=is_engine)\n        filtered: Final = {key: value for key, value in extra_body.items() if value is not None}\n\n        target_selecting: Final = set(filtered) & VERTEX_SEARCH_TARGET_SELECTING_FIELDS\n        if target_selecting:\n            raise BadRequestError(\n                message=(\n                    \"Vertex AI Search extra_body may not set target-selecting fields \"\n                    f\"{sorted(target_selecting)}: the data store is scoped by \"\n                    \"vector_store_id / vertex_engine_id and cannot be overridden per request.\"\n                ),\n                model=\"vertex_ai/search_api\",\n                llm_provider=\"vertex_ai\",\n            )\n\n        unsupported: Final = set(filtered) - supported\n        if unsupported:\n            mode: Final = \"engine/app\" if is_engine else \"data store\"\n            raise BadRequestError(\n                message=(\n                    f\"Unsupported Vertex AI Search extra_body fields {sorted(unsupported)} \"\n                    f\"for {mode} mode. Supported fields: {sorted(supported)}.\"\n                ),\n                model=\"vertex_ai/search_api\",\n                llm_provider=\"vertex_ai\",\n            )\n\n        return filtered\n\n    def get_auth_credentials(self, litellm_params: dict) -> BaseVectorStoreAuthCredentials:\n        # Get credentials and project info\n        vertex_credentials: Final = self.get_vertex_ai_credentials(dict(litellm_params))\n        vertex_project: Final = self.get_vertex_ai_project(dict(litellm_params))\n\n        # Get access token using the base class method\n        access_token, project_id = self._ensure_access_token(\n            credentials=vertex_credentials,","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/vertex_ai/vector_stores/search_api/transformation.py#L90-L126","documentation":"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.","triggerScenarios":"Thrown at litellm/llms/vertex_ai/vector_stores/search_api/transformation.py:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}