Skip to content

[Translation] Update azure-ai-translation-document to 2026-03-01 API version#47837

Draft
jrjrguo wants to merge 3 commits into
Azure:mainfrom
jrjrguo:translation/document-2026-03-01
Draft

[Translation] Update azure-ai-translation-document to 2026-03-01 API version#47837
jrjrguo wants to merge 3 commits into
Azure:mainfrom
jrjrguo:translation/document-2026-03-01

Conversation

@jrjrguo

@jrjrguo jrjrguo commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

Updates azure-ai-translation-document to the Document Translation 2026-03-01 service API version, mirroring the .NET regeneration in Azure/azure-sdk-for-net#60219. Released as the 2.0.0 GA for Python.

Features Added

  • Custom translation model deployment name support:
    • deployment_name on TranslationTarget and as a keyword on begin_translation (batch).
    • deployment_name keyword on SingleDocumentTranslationClient.translate (single document).
    • deployment_name on DocumentStatus (the deployment used).
  • Image translation support:
    • translate_text_within_image keyword on begin_translation and translate.
    • New BatchOptions model (carries translate_text_within_image) on StartTranslationDetails.options.
    • Image-scan reporting on DocumentStatus (image_characters_detected, images_charged, total_image_scans_succeeded, total_image_scans_failed) and TranslationStatusSummary (total_image_scans_succeeded, total_image_scans_failed, total_images_charged).

Breaking Changes

  • Default service API version changed from 2024-05-01 to 2026-03-01. Pass api_version="2024-05-01" to retain the previous behavior.

Other

  • New samples (custom-model deployment + image translation, sync/async) and README updates.
  • New unit tests for the added model fields/serialization.
  • Version bumped to 2.0.0 (GA); tsp-location.yaml updated to the 2026-03-01 spec. Note: Python follows its own version line (previous GA was 1.1.0), so this is 2.0.0 rather than matching .NET's 3.0.0.

Notes for reviewers

  • Applied as a targeted delta on the existing generated + customization layer rather than a full re-emit, because the currently pinned typespec-python emitter restructures the client and would break this package's customizations. A follow-up full regeneration will require aligning the emitter with the customization layer.
  • Recorded tests will need re-recording against the service due to the api-version change (test assets).

Adds custom translation model deployment name support (deployment_name on
TranslationTarget/begin_translation, DocumentStatus, and single-document
translate) and image translation support (translate_text_within_image plus
image-scan reporting fields). Introduces the BatchOptions model, sets the
default service API version to 2026-03-01, adds samples and unit tests, and
bumps the version to 1.2.0b1.
Jiarui Guo added 2 commits July 4, 2026 17:10
… test harness

Adds deployment_name and image-translation live tests (sync + async) and the
image test document. Refactors the test storage helpers to authenticate to
Azure Storage with a token credential (DefaultAzureCredential) and pass plain
container URLs to the Document Translation service (accessed via the Translator
resource's managed identity), so tests run without account-key/shared-key
access.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant