-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Determine this is the right repository
- I determined this is the correct repository in which to report this bug.
Summary of the issue
Context
I am currently working with the Google Cloud Discovery Engine Python client. I noticed that the RelevanceScoreSpec class is missing from the v1alpha module (google.cloud.discoveryengine_v1alpha), whereas it is present and functioning correctly in the stable v1 module (google.cloud.discoveryengine_v1).
This issue complicates the implementation when I need to use other alpha-only features, such as NaturalLanguageQueryUnderstandingSpec. Since those features are not available in v1, I am currently forced to mix imports from both v1 and v1alpha to use them together. This leads to redundant and messy code.
Expected Behavior:
RelevanceScoreSpec should be available in google.cloud.discoveryengine_v1alpha just as it is in google.cloud.discoveryengine_v1.
Actual Behavior:
The code raises an AttributeError when accessing the class in v1alpha.
API client name and version
google-cloud-discoveryengine v0.15.0
Reproduction steps: code
file: main.py
from google.cloud import discoveryengine_v1
from google.cloud import discoveryengine_v1alpha
# 1. This works as expected
try:
spec_v1 = discoveryengine_v1.SearchRequest.RelevanceScoreSpec()
print("v1: RelevanceScoreSpec found.")
except AttributeError:
print("v1: RelevanceScoreSpec NOT found.")
# 2. This raises an AttributeError
try:
spec_alpha = discoveryengine_v1alpha.SearchRequest.RelevanceScoreSpec()
print("v1alpha: RelevanceScoreSpec found.")
except AttributeError as e:
print(f"v1alpha: Failed - {e}")Reproduction steps: supporting files
No response
Reproduction steps: actual results
- Install google-cloud-discoveryengine.
- Attempt to import or access RelevanceScoreSpec from both v1 and v1alpha.
Reproduction steps: expected results
- Install google-cloud-discoveryengine.
- Attempt to import or access RelevanceScoreSpec from both v1 and v1alpha.
OS & version + platform
macOS 14.8.1
Python environment
Python 3.12.7
Python dependencies
Package Version
cachetools 6.2.2
certifi 2025.11.12
charset-normalizer 3.4.4
google-api-core 2.28.1
google-auth 2.43.0
google-cloud-discoveryengine 0.15.0
googleapis-common-protos 1.72.0
grpcio 1.76.0
grpcio-status 1.76.0
idna 3.11
proto-plus 1.26.1
protobuf 6.33.2
pyasn1 0.6.1
pyasn1-modules 0.4.2
requests 2.32.5
rsa 4.9.1
typing-extensions 4.15.0
urllib3 2.6.1
Additional context
No response