{"record":{"id":"6eac141c05f58e43","repo":"apache/beam","slug":"multiple-values-received-for-api-endpoint-in-api-endpoint","errorCode":null,"errorMessage":"Multiple values received for api_endpoint in api_endpoint and client_options parameters.","messagePattern":"Multiple values received for api_endpoint in api_endpoint and client_options parameters\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store.py","lineNumber":106,"sourceCode":"        `apache_beam.transforms.enrichment_handlers.utils.ExceptionLevel`\n        to set the level when an empty row is returned from the BigTable query.\n        Defaults to `ExceptionLevel.WARN`.\n      kwargs: Optional keyword arguments to configure the\n        `aiplatform.gapic.FeatureOnlineStoreServiceClient`.\n    \"\"\"\n    self.project = project\n    self.location = location\n    self.api_endpoint = api_endpoint\n    self.feature_store_name = feature_store_name\n    self.feature_view_name = feature_view_name\n    self.row_key = row_key\n    self.exception_level = exception_level\n    self.kwargs = kwargs if kwargs else {}\n    if 'client_options' in self.kwargs:\n      if not self.kwargs['client_options']['api_endpoint']:\n        self.kwargs['client_options']['api_endpoint'] = self.api_endpoint\n      elif self.kwargs['client_options']['api_endpoint'] != self.api_endpoint:\n        raise ValueError(\n            'Multiple values received for api_endpoint in '\n            'api_endpoint and client_options parameters.')\n    else:\n      self.kwargs['client_options'] = {\"api_endpoint\": self.api_endpoint}\n\n    # check if the feature store exists\n    try:\n      admin_client = aiplatform.gapic.FeatureOnlineStoreAdminServiceClient(\n          **self.kwargs)\n    except Exception:\n      _LOGGER.warning(\n          'Due to insufficient admin permission, could not verify '\n          'the existence of feature store. If the `exception_level` '\n          'is set to WARN then make sure the feature store exists '\n          'otherwise the data enrichment will not happen without '\n          'throwing an error.')\n    else:\n      location_path = admin_client.common_location_path(","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/transforms/enrichment_handlers/vertex_ai_feature_store.py#L88-L124","documentation":"Raised in `VertexAIFeatureStoreEnrichmentHandler.__init__` when kwargs contain a `client_options` dict whose `api_endpoint` differs from the `api_endpoint` parameter. The handler refuses conflicting endpoint configuration because a single client endpoint must be unambiguous.","triggerScenarios":"Constructing the handler with both `api_endpoint='us-central1-aiplatform.googleapis.com'` and `kwargs={'client_options': {'api_endpoint': '...other...'}}`, where the two values differ.","commonSituations":"Generic kwargs plumbing forwarding a client_options dict from another client while also setting api_endpoint explicitly; regional vs global endpoint mismatch copied from docs.","solutions":["Remove the explicit `api_endpoint` argument and keep only `client_options`, or vice versa.","Make the `api_endpoint` value inside `client_options` identical to the `api_endpoint` argument.","Omit `client_options` entirely so the handler injects the configured `api_endpoint` automatically."],"exampleFix":"// before\nhandler = VertexAIFeatureStoreEnrichmentHandler(api_endpoint='us-central1-aiplatform.googleapis.com', kwargs={'client_options': {'api_endpoint': 'europe-west1-aiplatform.googleapis.com'}})\n// after\nhandler = VertexAIFeatureStoreEnrichmentHandler(api_endpoint='us-central1-aiplatform.googleapis.com')","handlingStrategy":"validation","validationCode":"co = kwargs.get('client_options') or {}\nif 'api_endpoint' in co and api_endpoint and co['api_endpoint'] != api_endpoint:\n    raise ValueError('conflicting api_endpoint values')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set the endpoint in exactly one place — prefer client_options only.","Review kwargs forwarding so duplicate client config is not merged in.","Document which argument wins in wrapper libraries."],"tags":["python","apache-beam","vertex-ai","configuration-conflict"],"backgroundTag":"conflicting-config-options","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}