Azure / Azure/azure-sdk-for-python
azure-search-documents ContentUnderstandingSkill is missing model_name and model_deployment
- Vorherrschende Sprache
- Python
- Sterne
- 5.6k
- Forks
- 3.4k
- Ø Merge
- 2 T. 2 Std.
- Gemergte PRs (30 T.)
- 213
Beschreibung
- **Package Name**: azure-search-documents
- **Package Version**: 12.1.0b1
- **Operating System**: macOS 26.6.1 (arm64)
- **Python Version**: 3.13.13
**Describe the bug**
The `ContentUnderstandingSkill` model does not expose the `model_name` and `model_deployment` properties that correspond to the Azure AI Search `2026-05-01-preview` REST properties `modelName` and `modelDeployment`.
These properties enable AI-generated descriptions for document-embedded images, charts, and diagrams. The package defaults to `2026-05-01-preview`, and the same release includes the preview semantic chunking additions, but the Python model cannot represent the image-description configuration.
Service documentation: https://learn.microsoft.com/azure/search/cognitive-search-skill-content-understanding#skill-parameters
**To Reproduce**
1. Install `azure-search-documents==12.1.0b1`.
2. Run:
```python
from azure.search.documents.indexes.models import ContentUnderstandingSkill
ContentUnderstandingSkill(
name="content-understanding",
description="Extract content and describe figures",
context="/document",
inputs=[],
outputs=[],
model_name="gpt-5.4",
model_deployment="gpt-5.4",
)
```
The constructor fails with:
```text
TypeError: ContentUnderstandingSkill.__init__() got an unexpected keyword argument 'model_name'
```
`model_deployment` is likewise absent from the generated model.
**Expected behavior**
`ContentUnderstandingSkill` should expose:
```python
model_name: str | None
model_deployment: str | None
```
and serialize them as:
```json
{
"modelName": "gpt-5.4",
"modelDeployment": "gpt-5.4"
}
```
The service requires both properties to be supplied together.
**Screenshots**
N/A
**Additional context**
The current workaround is to create or update the skillset with a raw `2026-05-01-preview` REST payload through an authenticated SDK client `send_request` call. That works but loses the validation, discoverability, and type safety provided by the generated model.
Beitragsleitfaden
Rechercherichtung
Beginnen Sie beim ContentUnderstandingSkill-Modell im Paket azure-search-documents und vergleichen Sie dessen generierte Eigenschaften mit den Skill-Parametern von Azure AI Search 2026-05-01-preview. Fügen Sie Unterstützung für modelName und modelDeployment hinzu, stellen Sie sicher, dass beide korrekt serialisiert werden, und überprüfen Sie, dass der Konstruktor und die serialisierte Payload mit den Beispielen im Issue übereinstimmen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- azure, python
- Bereich
- api, backend-api-design
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Ruhig
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 74/100