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
2 changes: 2 additions & 0 deletions sdk/ai/azure-ai-projects/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ SHAREPOINT_USER_INPUT=
FABRIC_USER_INPUT=
BING_CUSTOM_USER_INPUT=
A2A_USER_INPUT=
WORK_IQ_PROJECT_CONNECTION_ID=
WORK_IQ_USER_INPUT=

#######################################################################
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,9 @@ git push -u origin <topic-branch>

## Step 7: Run post-emitter fixes

After a successful emit, run the post-emitter fix script located in the `sdk/ai/azure-ai-projects` folder:
After a successful emit, run the PowerShell script named `PostEmitter.ps1` located in the `sdk/ai/azure-ai-projects` folder.

```
post-emitter-fixes.cmd
```

This script applies azure-ai-projects-specific corrections to the emitted code (restores `pyproject.toml`, fixes enum names, patches Sphinx doc-string issues, and runs `black` formatting).
This script applies azure-ai-projects specific corrections to the emitted code (restores `pyproject.toml`, fixes enum names, patches Sphinx doc-string issues, and runs `black` formatting).

**If the script fails**, stop and report the error to the user. Do not continue. Do not attempt to analyze the script failures and fix them with Copilot. The script should be fixed by the engineering team if it is not working.

Expand Down Expand Up @@ -174,7 +170,20 @@ In the folder `sdk\ai\azure-ai-projects`, run `pip install -e .` to install the

---

## Step 12: Commit and push
## Step 12: Run `apiview-stub-generator` to update api.md and api.metadata.yml files

In the root of the `azure-sdk-for-python` folder run the following commands

```
azpysdk apistub --md --extract-metadata azure-ai-projects --dest-dir .
```

This will update the `api.md` and `api.metadata.yml` files under in the package folder `sdk\ai\azure-ai-projects`. Now change directory
back to the package folder.

---

## Step 13: Commit and push

Stage all changes (excluding file names that start with `.env`), commit, and push the topic branch:

Expand All @@ -188,7 +197,7 @@ git push -u origin <topic-branch>

---

## Step 13: Create a Pull Request
## Step 14: Create a Pull Request

Create a draft PR from the **topic branch** to the **base branch** (recorded in Step 2):

Expand All @@ -205,7 +214,7 @@ Open a new tab in the default browser and navigate to the PR URL.

---

## Step 14: Optionally run tests locally
## Step 15: Optionally run tests locally

Prompt the user with this message: "Tests will run as part of the Pull Request. However, you can optionally run tests locally in a Python virtual environment, right now. It will take a few minutes. Do you want to run tests locally? (yes/no)"

Expand Down
3 changes: 2 additions & 1 deletion sdk/ai/azure-ai-projects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

### Features Added

* Hosted agents are now stable. There is need to set `allow_preview=True` on the `AIProjectClient` constructor to create a Hosted agent.
* Two new methods `enable` and `disable` on the `.agents` subclient.
* Hosted agents are now stable. There is no need to set `allow_preview=True` on the `AIProjectClient` constructor to create a Hosted agent.
* Toolboxes operations are now stable. The have moved from `.beta.toolboxes` subclient to the `.toolboxes` subclient.
* Session and Session files operations are now stable. They have moved from the `.beta.agents` subclient to the `.agents` subclient.
* Agent code operations are now stable. This includes `create_version_from_code` and `download_code`. They have moved from the `.beta.agents` subclient to the `.agents` subclient.
Expand Down
75 changes: 54 additions & 21 deletions sdk/ai/azure-ai-projects/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ namespace azure.ai.projects.aio.operations
**kwargs: Any
) -> DeleteAgentVersionResponse: ...

@distributed_trace_async
async def disable(
self,
agent_name: str,
**kwargs: Any
) -> None: ...

@distributed_trace_async
async def download_code(
self,
Expand All @@ -270,6 +277,13 @@ namespace azure.ai.projects.aio.operations
**kwargs: Any
) -> AsyncIterator[bytes]: ...

@distributed_trace_async
async def enable(
self,
agent_name: str,
**kwargs: Any
) -> None: ...

@distributed_trace_async
async def get(
self,
Expand Down Expand Up @@ -2504,6 +2518,7 @@ namespace azure.ai.projects.models
instance_identity: Optional[AgentIdentity]
name: str
object: Literal[AgentObjectType.AGENT]
state: Union[str, AgentState]
versions: AgentObjectVersions

@overload
Expand Down Expand Up @@ -2674,6 +2689,11 @@ namespace azure.ai.projects.models
UPDATING = "updating"


class azure.ai.projects.models.AgentState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
DISABLED = "disabled"
ENABLED = "enabled"


class azure.ai.projects.models.AgentTaxonomyInput(EvaluationTaxonomyInput, discriminator='agent'):
risk_categories: list[Union[str, RiskCategory]]
target: EvaluationTarget
Expand Down Expand Up @@ -6599,7 +6619,6 @@ namespace azure.ai.projects.models
lora_config: Optional[LoraConfig]
name: str
source: Optional[ModelSourceData]
system_data: Optional[SystemDataV3]
tags: Optional[dict[str, str]]
version: str
warnings: Optional[list[FoundryModelWarning]]
Expand Down Expand Up @@ -7474,6 +7493,25 @@ namespace azure.ai.projects.models
def __init__(self, mapping: Mapping[str, Any]) -> None: ...


class azure.ai.projects.models.ReminderPreviewTool(Tool, discriminator='reminder_preview'):
description: Optional[str]
name: Optional[str]
tool_configs: Optional[dict[str, ToolConfig]]
type: Literal[ToolType.REMINDER_PREVIEW]

@overload
def __init__(
self,
*,
description: Optional[str] = ...,
name: Optional[str] = ...,
tool_configs: Optional[dict[str, ToolConfig]] = ...
) -> None: ...

@overload
def __init__(self, mapping: Mapping[str, Any]) -> None: ...


class azure.ai.projects.models.ResponseRetrievalItemGenerationParams(TypedDict, total=False):
key "data_mapping": Required[Dict[str, str]]
key "max_num_turns": int
Expand Down Expand Up @@ -8087,26 +8125,6 @@ namespace azure.ai.projects.models
def __init__(self, mapping: Mapping[str, Any]) -> None: ...


class azure.ai.projects.models.SystemDataV3(_Model):
created_at: Optional[datetime]
created_by: Optional[str]
created_by_type: Optional[str]
last_modified_at: Optional[datetime]

@overload
def __init__(
self,
*,
created_at: Optional[datetime] = ...,
created_by: Optional[str] = ...,
created_by_type: Optional[str] = ...,
last_modified_at: Optional[datetime] = ...
) -> None: ...

@overload
def __init__(self, mapping: Mapping[str, Any]) -> None: ...


class azure.ai.projects.models.TargetCompletionEvalRunDataSource(TypedDict, total=False):
key "input_messages": Required[InputMessagesItemReference]
key "source": Required[Union[SourceFileContent, SourceFileID]]
Expand Down Expand Up @@ -8597,6 +8615,7 @@ namespace azure.ai.projects.models
MEMORY_SEARCH_PREVIEW = "memory_search_preview"
NAMESPACE = "namespace"
OPENAPI = "openapi"
REMINDER_PREVIEW = "reminder_preview"
SHAREPOINT_GROUNDING_PREVIEW = "sharepoint_grounding_preview"
SHELL = "shell"
TOOLBOX_SEARCH_PREVIEW = "toolbox_search_preview"
Expand Down Expand Up @@ -9297,6 +9316,13 @@ namespace azure.ai.projects.operations
**kwargs: Any
) -> DeleteAgentVersionResponse: ...

@distributed_trace
def disable(
self,
agent_name: str,
**kwargs: Any
) -> None: ...

@distributed_trace
def download_code(
self,
Expand All @@ -9317,6 +9343,13 @@ namespace azure.ai.projects.operations
**kwargs: Any
) -> Iterator[bytes]: ...

@distributed_trace
def enable(
self,
agent_name: str,
**kwargs: Any
) -> None: ...

@distributed_trace
def get(
self,
Expand Down
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-projects/api.metadata.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiMdSha256: 2515589fc688e1a9369aadfd0922bb686ddc1081f2fc8e4ebbd4241238336162
apiMdSha256: b60afd274d28a27c40d16bedb18fe1688ea2b4013d226a5ebc12d01d649b7221
parserVersion: 0.3.28
pythonVersion: 3.14.3
9 changes: 7 additions & 2 deletions sdk/ai/azure-ai-projects/apiview-properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@
"azure.ai.projects.models.Reasoning": "OpenAI.Reasoning",
"azure.ai.projects.models.RecurrenceTrigger": "Azure.AI.Projects.RecurrenceTrigger",
"azure.ai.projects.models.RedTeam": "Azure.AI.Projects.RedTeam",
"azure.ai.projects.models.ReminderPreviewTool": "Azure.AI.Projects.ReminderPreviewTool",
"azure.ai.projects.models.ResponseUsageInputTokensDetails": "OpenAI.ResponseUsageInputTokensDetails",
"azure.ai.projects.models.ResponseUsageOutputTokensDetails": "OpenAI.ResponseUsageOutputTokensDetails",
"azure.ai.projects.models.Routine": "Azure.AI.Projects.Routine",
Expand All @@ -291,7 +292,6 @@
"azure.ai.projects.models.SpecificFunctionShellParam": "OpenAI.SpecificFunctionShellParam",
"azure.ai.projects.models.StructuredInputDefinition": "Azure.AI.Projects.StructuredInputDefinition",
"azure.ai.projects.models.StructuredOutputDefinition": "Azure.AI.Projects.StructuredOutputDefinition",
"azure.ai.projects.models.SystemDataV3": "Azure.AI.Projects.SystemDataV3",
"azure.ai.projects.models.TaxonomyCategory": "Azure.AI.Projects.TaxonomyCategory",
"azure.ai.projects.models.TaxonomySubCategory": "Azure.AI.Projects.TaxonomySubCategory",
"azure.ai.projects.models.TelemetryConfig": "Azure.AI.Projects.TelemetryConfig",
Expand Down Expand Up @@ -400,6 +400,7 @@
"azure.ai.projects.models.DataGenerationJobOutputType": "Azure.AI.Projects.DataGenerationJobOutputType",
"azure.ai.projects.models.OptimizationDatasetInputType": "Azure.AI.Projects.OptimizationDatasetInputType",
"azure.ai.projects.models.AgentObjectType": "Azure.AI.Projects.AgentObjectType",
"azure.ai.projects.models.AgentState": "Azure.AI.Projects.AgentState",
"azure.ai.projects.models.AgentKind": "Azure.AI.Projects.AgentKind",
"azure.ai.projects.models.AgentProtocol": "Azure.AI.Projects.AgentProtocol",
"azure.ai.projects.models.CodeDependencyResolution": "Azure.AI.Projects.CodeDependencyResolution",
Expand Down Expand Up @@ -448,6 +449,10 @@
"azure.ai.projects.aio.operations.AgentsOperations.create_version_from_code": "Azure.AI.Projects.Agents.createAgentVersionFromCode",
"azure.ai.projects.operations.AgentsOperations.download_code": "Azure.AI.Projects.Agents.downloadAgentCode",
"azure.ai.projects.aio.operations.AgentsOperations.download_code": "Azure.AI.Projects.Agents.downloadAgentCode",
"azure.ai.projects.operations.AgentsOperations.enable": "Azure.AI.Projects.Agents.enableAgent",
"azure.ai.projects.aio.operations.AgentsOperations.enable": "Azure.AI.Projects.Agents.enableAgent",
"azure.ai.projects.operations.AgentsOperations.disable": "Azure.AI.Projects.Agents.disableAgent",
"azure.ai.projects.aio.operations.AgentsOperations.disable": "Azure.AI.Projects.Agents.disableAgent",
"azure.ai.projects.operations.AgentsOperations.create_session": "Azure.AI.Projects.Agents.createSession",
"azure.ai.projects.aio.operations.AgentsOperations.create_session": "Azure.AI.Projects.Agents.createSession",
"azure.ai.projects.operations.AgentsOperations.get_session": "Azure.AI.Projects.Agents.getSession",
Expand Down Expand Up @@ -521,5 +526,5 @@
"azure.ai.projects.operations.ToolboxesOperations.delete_version": "Azure.AI.Projects.Toolboxes.deleteToolboxVersion",
"azure.ai.projects.aio.operations.ToolboxesOperations.delete_version": "Azure.AI.Projects.Toolboxes.deleteToolboxVersion"
},
"CrossLanguageVersion": "a252b3ce0280"
"CrossLanguageVersion": "623ba64ba559"
}
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-projects/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/ai/azure-ai-projects",
"Tag": "python/ai/azure-ai-projects_3ec4cc5f02"
"Tag": "python/ai/azure-ai-projects_44980e76d0"
}
Loading
Loading