Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ class ToolType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
OPENAPI = "openapi"
BING_CUSTOM_SEARCH_PREVIEW = "bing_custom_search_preview"
CAPTURE_STRUCTURED_OUTPUTS = "capture_structured_outputs"
A2_A_PREVIEW = "a2a_preview"
A2A_PREVIEW = "a2a_preview"
AZURE_FUNCTION = "azure_function"
MEMORY_SEARCH = "memory_search"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class A2ATool(Tool, discriminator="a2a_preview"):
"""An agent implementing the A2A protocol.

:ivar type: The type of the tool. Always ``a2a``. Required.
:vartype type: str or ~azure.ai.projects.models.A2_A_PREVIEW
:vartype type: str or ~azure.ai.projects.models.A2A_PREVIEW
:ivar base_url: Base URL of the agent.
:vartype base_url: str
:ivar agent_card_path: The path to the agent card relative to the ``base_url``.
Expand All @@ -111,7 +111,7 @@ class A2ATool(Tool, discriminator="a2a_preview"):
:vartype project_connection_id: str
"""

type: Literal[ToolType.A2_A_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
type: Literal[ToolType.A2A_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) # type: ignore
"""The type of the tool. Always ``a2a``. Required."""
base_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""Base URL of the agent."""
Expand Down Expand Up @@ -141,7 +141,7 @@ def __init__(self, mapping: Mapping[str, Any]) -> None:

def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
self.type = ToolType.A2_A_PREVIEW # type: ignore
self.type = ToolType.A2A_PREVIEW # type: ignore


class InsightResult(_Model):
Expand Down
10 changes: 3 additions & 7 deletions sdk/ai/azure-ai-projects/post-emitter-fixes.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ REM Revert this, as we want to keep some edits to these file.
git restore pyproject.toml
git restore azure\ai\projects\_version.py

REM We don't use auto-generated tests. Can this TypeSpec be change to no generate them?
REM rmdir /s /q generated_tests
REM Rename "A2_A_PREVIEW" to "A2A_PREVIEW". Since this value is an extension to OpenAI.ToolType enum, we can't use @className in client.tsp to do the rename.
powershell -Command "(Get-Content azure\ai\projects\models\_models.py) -replace 'A2_A_PREVIEW', 'A2A_PREVIEW' | Set-Content azure\ai\projects\models\_models.py"
powershell -Command "(Get-Content azure\ai\projects\models\_enums.py) -replace 'A2_A_PREVIEW', 'A2A_PREVIEW' | Set-Content azure\ai\projects\models\_enums.py"

REM Add quotation marks around "str" in the expression: content: Union[str, list["_models.ItemContent"]] = rest_field(
REM This fixes the serialization of this expression: item_param: ItemParam = ResponsesUserMessageItemParam(content="my text")
Expand All @@ -25,10 +26,5 @@ powershell -Command "(Get-Content azure\ai\projects\models\_models.py) -replace
REM Add additional pylint disables to the model_base.py file
powershell -Command "(Get-Content azure\ai\projects\_utils\model_base.py) -replace '# pylint: disable=protected-access, broad-except', '# pylint: disable=protected-access, broad-except, import-error, no-value-for-parameter' | Set-Content azure\ai\projects\_utils\model_base.py"

REM Disable the version validation
REM No longer needed, since the service now supports api-version "2025-11-15-preview"
REM powershell -Command "(Get-Content azure\ai\projects\_validation.py) -replace 'if _index_with_default\(method_added_on\) > _index_with_default\(client_api_version\):', 'if False: # pylint: disable=using-constant-test' | Set-Content azure\ai\projects\_validation.py"
REM powershell -Command "(Get-Content azure\ai\projects\_validation.py) -replace 'if unsupported:', 'if False: # pylint: disable=using-constant-test' | Set-Content azure\ai\projects\_validation.py"

echo Now do these additional changes manually, if you want the "Generate docs" job to succeed in PR pipeline
REM 1. Remove `generate_summary` from class `Reasoning`. It's deprecated but causes two types of errors. Consider removing it from TypeSpec.
Loading