Skip to content

[azure-ai-projects] Regenerate from spec commit ff6c484 (add draft flag to Agent versions)#47692

Closed
akaila wants to merge 1 commit into
Azure:mainfrom
akaila:akaila/tsp-update-draft-flag
Closed

[azure-ai-projects] Regenerate from spec commit ff6c484 (add draft flag to Agent versions)#47692
akaila wants to merge 1 commit into
Azure:mainfrom
akaila:akaila/tsp-update-draft-flag

Conversation

@akaila

@akaila akaila commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What

Regenerates \�zure-ai-projects\ from spec commit ff6c484105183f5dc963cff8e29d71f86e693d95 which adds:

  • \draft\ parameter on \create_version\ — marks agent versions as draft/candidate so they don't appear in default listings or shift production traffic
  • \include_drafts\ query parameter on \list_versions\ — opt-in to see draft versions

These were added via spec PR: Azure/azure-rest-api-specs#43979

Emitter version bump

The spec at this commit uses TypeSpec 1.13 tuple literal syntax (#[...]) in \ ag-definitions.tsp, which requires bumping:

  • @azure-tools/typespec-python: 0.62.1 → 0.63.2
  • @typespec/compiler: 1.12.0 → 1.13.0
  • Related peer dependencies updated accordingly

Testing

  • TypeSpec compilation succeeds with 314 warnings (all pre-existing \�xample-value-no-mapping\ warnings)
  • Generated code includes \draft: Optional[bool] = None\ on \create_version\ and \include_drafts: Optional[bool] = None\ on \list_versions\

…raft flag)

Bumps tsp-location.yaml to spec commit ff6c484105183f5dc963cff8e29d71f86e693d95
which adds:
- 'draft' parameter on create_version
- 'include_drafts' query parameter on list_versions

Spec PR: Azure/azure-rest-api-specs#43979

Note: Regeneration requires emitter 0.63.2+ (@typespec/compiler 1.13.0)
because the spec now uses TypeSpec 1.13 tuple literal syntax in
tag-definitions.tsp. The eng/emitter-package.json bump should be
handled separately as a repo-wide change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@akaila akaila force-pushed the akaila/tsp-update-draft-flag branch from 14d7147 to a51ac18 Compare June 26, 2026 18:44
@akaila

akaila commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Essential reviewers: @catalinaperalta @iscai-msft @dargilco

This is a minimal 1-line change (tsp-location.yaml commit bump only). Regeneration from the new spec commit requires an emitter bump to 0.63.2+ which should be handled as a separate repo-wide PR. Others can unsubscribe if not needed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR regenerates azure-ai-projects from spec commit ff6c484 with the stated narrow intent of adding a draft flag to agent-version creation and an include_drafts query parameter to agent-version listing, along with an emitter/TypeSpec dependency bump. However, the regeneration produced a much broader, breaking diff: the generated client is renamed AIProjectClientProjectsClient, the generated config drops the allow_preview parameter, BetaOperations is removed, a new top-level openai namespace package is introduced, many OpenAI models move out of azure.ai.projects.models, and package metadata is downgraded — none of which is reflected in the hand-written customization layer (_patch.py, operations/_patch.py, _patch_agents.py) that defines the package's public API. As a result the package would fail to import, and the GA 2.2.0 package would be mislabeled as Beta.

Changes:

  • Adds the intended draft body field and include_drafts query parameter to the generated agent-version operations.
  • Performs a wholesale regeneration that renames the generated client, removes allow_preview/BetaOperations, adds a top-level openai namespace, and rewrites the models surface — out of sync with the customization layer.
  • Downgrades package metadata (Production/Stable → Beta, lowercased "AI", dropped Python 3.9, reverted repository URL) and bumps the emitter/TypeSpec toolchain while deleting emitter-package-lock.json.

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Show a summary per file
File Description
azure/ai/projects/_client.py Generated client renamed to ProjectsClient and allow_preview dropped — breaks _patch.py import/subclass.
azure/ai/projects/_configuration.py Config renamed to ProjectsClientConfiguration, allow_preview removed — _patch.py reads config.allow_preview.
azure/ai/projects/operations/__init__.py Removes BetaOperations export; operations/_patch.py still imports/subclasses it.
azure/ai/projects/_types.py Invalid 4-dot relative import to openai models and a duplicate Filters alias.
openai/__init__.py (+ models) New top-level openai namespace package conflicts with the real openai dependency.
aio/_client.py, aio/_configuration.py, aio/operations/__init__.py Async equivalents of the same breaking renames/removals.
pyproject.toml Dev Status → Beta (GA pkg), "AI"→"Ai" casing, dropped Python 3.9, reverted repository URL.
tsp-location.yaml, eng/emitter-package.json Spec commit bump and emitter/TypeSpec dependency upgrade (lockfile deleted).
tests/samples/llm_instructions.py, samples/evaluations/*smart_filter.py Cosmetic formatting only (paren-wrapped strings, trailing commas).

@akaila

akaila commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Closing — the azure-ai-agentserver-optimization package doesn't need this TypeSpec update (it only loads config, doesn't create versions). The draft flag is handled server-side in vienna's agent-optimizers.

@akaila akaila closed this Jun 26, 2026
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.

2 participants