googleapis / googleapis/google-cloud-python

[Discovery Engine] RelevanceScoreSpec missing in google.cloud.discoveryengine_v1alpha

オープン
#14,959 コメント 2 件 リアクション 0 件 担当者 1 名 @daniel-sanche が担当を希望しています GitHub で見る
api: discoveryengine type: bug type: process
主要言語
Python
スター
5.4k
フォーク
1.8k
平均マージ
3日 4時間
マージ済み PR(30日)
122

説明

### Determine this is the right repository

- [x] 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
```python
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

1. Install google-cloud-discoveryengine.
2. Attempt to import or access RelevanceScoreSpec from both v1 and v1alpha.

### Reproduction steps: expected results

1. Install google-cloud-discoveryengine.
2. 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_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。