Skip to content

[Search 2026-08-01-preview] python SDK codegen - #48349

Draft
efrainretana with Copilot wants to merge 2 commits into
mainfrom
copilot/generate-azure-search-sdk-python-2026-08-01-previe
Draft

[Search 2026-08-01-preview] python SDK codegen#48349
efrainretana with Copilot wants to merge 2 commits into
mainfrom
copilot/generate-azure-search-sdk-python-2026-08-01-previe

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Regenerate azure-search-documents for Azure Search API 2026-08-01-preview from spec commit c19e358860e3cb89a8c7021e8c5a181ab6ef7f62.

Blocker: generator emits non-importable code (spec defect)

Running the documented generator (tsp-client update, emitter @azure-tools/typespec-python@0.63.3) against this commit yields a package that fails to import:

  • The new 2026-08-01-preview request/response bodies are emitter-synthesized models (EntraAppAuthentication, FileUploadMetadata, KnowledgeBaseRetrieveDefaults, UploadKnowledgeSourceFileMultipartRequest, …) that resolve to the root Search TypeSpec namespace.
  • That namespace has no blanket @@clientNamespace("Azure.Search.Documents") in client.tsp, so the emitter writes them to a top-level search/ package (sibling of azure/) and references them via from ......search import modelsImportError: attempted relative import beyond top-level package. The namespace=azure.search.documents emitter option makes it worse (azure.azure double-prefix).

The fix lives in the spec's client.tsp (Azure/azure-rest-api-specs), outside the allowed path sdk/search/azure-search-documents/**. Per "report blockers instead of hand-editing generated code to mask spec issues," the broken generated surface is not committed.

Changes (importable subset)

  • _patch.py — add ApiVersion.V2026_08_01_PREVIEW, making the new version selectable on every client via the api_version keyword.
  • Default unchanged — the effective client default comes from generated _configuration.py (a generated file, not hand-edited); bumping only the _patch.py DEFAULT_VERSION would desync SearchClient/SearchIndexingBufferedSender from the index/indexer/knowledgebase clients, so it's left at V2026_05_01_PREVIEW.
  • tsp-location.yaml / _metadata.json — retarget spec commit c19e358 / 2026-08-01-preview.
  • Tests — assert the enum member exists and flows to client config.
  • CHANGELOG — new selectable version under Features Added; blocker documented under Other Changes.
from azure.search.documents import SearchClient, ApiVersion

client = SearchClient(endpoint, index_name, credential,
                      api_version=ApiVersion.V2026_08_01_PREVIEW)

Not included (needs spec fix first)

  • Full model/operation regeneration from c19e358 (blocked by the client.tsp @@clientNamespace defect).
  • Samples/tests for new 2026-08-01-preview features (SSE streaming retrieval, auto reasoning tier, multipart upload, WorkIQ auth, listing pagination).

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

…nt codegen blocker

Co-authored-by: efrainretana <141282336+efrainretana@users.noreply.github.com>
Copilot AI changed the title [WIP] Generate Azure Search SDK for Python API version 2026-08-01-preview [Search 2026-08-01-preview] python SDK codegen Jul 29, 2026
Copilot AI requested a review from efrainretana July 29, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants