Azure / Azure/azure-sdk-for-python

azure-search-documents ContentUnderstandingSkill is missing model_name and model_deployment

Aperta Adatta ai principianti
#48,555 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
needs-triage
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
213

Descrizione

- **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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Partite dal modello ContentUnderstandingSkill nel package azure-search-documents e confrontate le relative proprietà generate con i parametri di skill di Azure AI Search 2026-05-01-preview. Aggiungete il supporto per modelName e modelDeployment, assicuratevi che entrambi vengano serializzati correttamente e verificate che il costruttore e la payload serializzata corrispondano agli esempi nell'issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, python
Ambito
api, backend-api-design
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
74/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.