{"record":{"id":"21f9110ef821d78d","repo":"chroma-core/chroma","slug":"the-region-cannot-be-changed-after-the-embedding-f","errorCode":null,"errorMessage":"The region cannot be changed after the embedding function has been initialized.","messagePattern":"The region cannot be changed after the embedding function has been initialized\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"chromadb/utils/embedding_functions/google_embedding_function.py","lineNumber":627,"sourceCode":"            \"api_key_env_var\": self.api_key_env_var,\n            \"model_name\": self.model_name,\n            \"project_id\": self.project_id,\n            \"region\": self.region,\n        }\n\n    def validate_config_update(\n        self, old_config: Dict[str, Any], new_config: Dict[str, Any]\n    ) -> None:\n        if \"model_name\" in new_config:\n            raise ValueError(\n                \"The model name cannot be changed after the embedding function has been initialized.\"\n            )\n        if \"project_id\" in new_config:\n            raise ValueError(\n                \"The project ID cannot be changed after the embedding function has been initialized.\"\n            )\n        if \"region\" in new_config:\n            raise ValueError(\n                \"The region cannot be changed after the embedding function has been initialized.\"\n            )\n\n    @staticmethod\n    def validate_config(config: Dict[str, Any]) -> None:\n        \"\"\"\n        Validate the configuration using the JSON schema.\n\n        Args:\n            config: Configuration to validate\n\n        Raises:\n            ValidationError: If the configuration does not match the schema\n        \"\"\"\n        validate_config_schema(config, \"google_vertex\")\n","sourceCodeStart":609,"sourceCodeEnd":643,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/utils/embedding_functions/google_embedding_function.py#L609-L643","documentation":"Error \"The region cannot be changed after the embedding function has been initialized.\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/utils/embedding_functions/google_embedding_function.py:627 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}