Skip to content
Open
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
18 changes: 13 additions & 5 deletions sdk/ai/azure-ai-projects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@

* New Agent tool `FabricIQPreviewTool`.
* New Agent tool `ToolboxSearchPreviewTool`.
* New optional string properties `description` and `name` added to Agent tools which did not have them before.
* New `.beta.datasets` sub-client with data generation job operations: `create_generation_job`, `get_generation_job`, `list_generation_jobs`, `cancel_generation_job`, `delete_generation_job`.
* New evaluator generation job operations on `.beta.evaluators`: `create_generation_job`, `get_generation_job`, `list_generation_jobs`, `cancel_generation_job`, `delete_generation_job`.
* Toolboxes operations promoted from beta to GA: access via `project_client.toolboxes` (was `project_client.beta.toolboxes`).
* New methods on `.beta.agents` sub-client for code-based hosted agents: `update_agent_from_code()`, `create_agent_version_from_code()`, `download_agent_version_code()`, `download_agent_code()`.
* New agent optimization operations on `.beta.agents`: `create_optimization_job`, `get_optimization_job`, `list_optimization_jobs`, `cancel_optimization_job`, `list_optimization_candidates`.
* New evaluator suite operations on `.beta.evaluators`: `create_evaluation_suite`, `list_evaluation_suite_versions`, `get_evaluation_suite`, `delete_evaluation_suite`, `create_generation_suite_job`, `get_generation_suite_job`, `list_generation_suite_jobs`, `cancel_generation_suite_job`.
* New evaluator generation job operations on `.beta.evaluators`: `create_generation_job`, `get_generation_job`, `list_generation_jobs`, `cancel_generation_job`, `delete_generation_job`.
* New `.beta.models` sub-client with model weights management operations: `list_versions`, `list`, `get`, `delete`, `create_version`, `upload_file`, `get_pending_upload`.
* New `.beta.routines` sub-client with routine management operations: `create_or_update`, `get`, `enable`, `disable`, `list`, `delete`, `dispatch_async`.
* New individual memory operations on `.beta.memory_stores`: `get_memory`, `delete_memory`.
* New `.beta.datasets` sub-client with data generation job operations: `create_generation_job`, `get_generation_job`, `list_generation_jobs`, `cancel_generation_job`, `delete_generation_job`.
* New read-only property `content_hash` on `CodeConfiguration`, returning the SHA-256 hex digest of the uploaded code zip.
* New optional string properties `description` and `name` added to Agent tools which did not have them before.

### Breaking Changes

Breaking changes in beta methods:
* `.beta.toolboxes` sub-client removed (promoted to GA as `project_client.toolboxes`).
* Required keyword `isolation_key` removed from `.beta.agents.create_session()` and `.beta.agents.delete_session()` methods.
* Argument `body` in methods `.beta.evaluation_taxonomies.create()` and `.beta.evaluation_taxonomies.update()` renamed to `taxonomy`.
* Argument `body` in method `.beta.skills.create_from_package()` renamed to `content`.
Expand All @@ -27,15 +34,16 @@ Breaking changes in beta classes:
* Renamed class `SessionDirectoryListResponse` to `SessionDirectoryListResult`.
* Renamed class `SessionFileWriteResponse` to `SessionFileWriteResult`.
* Renamed class `SkillObject` to `SkillDetails`.
* Removed class `FabricIQPreviewToolParameters`.
* Removed class `WorkIQPreviewToolParameters`.
* Renamed class `Target` to `EvaluationTarget`.
* Renamed class `TargetConfig` to `RedTeamTargetConfig`.

### Bugs Fixed

* Fixed telemetry instrumentor to correctly call is_recording() as a method on spans, ensuring non-recording spans are properly skipped (e.g., when sampling is configured) ([GitHub issue 46544](https://github.com/Azure/azure-sdk-for-python/issues/46544)).

### Sample updates

* Updated Toolbox samples to use GA `project_client.toolboxes` instead of `project_client.beta.toolboxes`.
* Added Hosted Agent creation samples `sample_create_hosted_agent.py` and `sample_create_hosted_agent_async.py`, demonstrating hosted agent version creation and retrieval with `AIProjectClient`.
* Added Hosted Agent code-upload samples `sample_create_hosted_agent_from_code.py` and `sample_create_hosted_agent_from_code_async.py`, demonstrating uploading a code package (zip) as a new hosted agent version.
* The Hosted Agent creation sample also demonstrates assigning the hosted agent managed identity the Azure AI User RBAC role on the backing Azure AI account.
Expand Down
235 changes: 228 additions & 7 deletions sdk/ai/azure-ai-projects/apiview-properties.json

Large diffs are not rendered by default.

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_b8c168cd69"
"Tag": "python/ai/azure-ai-projects_d5ecfcf953"
}
4 changes: 4 additions & 0 deletions sdk/ai/azure-ai-projects/azure/ai/projects/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
DeploymentsOperations,
EvaluationRulesOperations,
IndexesOperations,
ToolboxesOperations,
)

if TYPE_CHECKING:
Expand All @@ -47,6 +48,8 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes
:vartype deployments: azure.ai.projects.operations.DeploymentsOperations
:ivar indexes: IndexesOperations operations
:vartype indexes: azure.ai.projects.operations.IndexesOperations
:ivar toolboxes: ToolboxesOperations operations
:vartype toolboxes: azure.ai.projects.operations.ToolboxesOperations
:param endpoint: Foundry Project endpoint in the form
"https://{ai-services-account-name}.services.ai.azure.com/api/projects/{project-name}". If you
only have one Project in your Foundry Hub, or to target the default Project in your Hub, use
Expand Down Expand Up @@ -102,6 +105,7 @@ def __init__(
self.datasets = DatasetsOperations(self._client, self._config, self._serialize, self._deserialize)
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)
self.toolboxes = ToolboxesOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
5 changes: 4 additions & 1 deletion sdk/ai/azure-ai-projects/azure/ai/projects/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING, Union
from typing import Any, TYPE_CHECKING, Union

if TYPE_CHECKING:
from . import models as _models
Filters = Union["_models.ComparisonFilter", "_models.CompoundFilter"]
ToolCallOutputContent = Union[dict[str, Any], str, list[Any]]
EvalItemContentItem = Union[str, "_models.EvalItemContentItemObject"]
EvalItemContent = Union["EvalItemContentItem", list["EvalItemContentItem"]]
4 changes: 4 additions & 0 deletions sdk/ai/azure-ai-projects/azure/ai/projects/aio/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
DeploymentsOperations,
EvaluationRulesOperations,
IndexesOperations,
ToolboxesOperations,
)

if TYPE_CHECKING:
Expand All @@ -47,6 +48,8 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes
:vartype deployments: azure.ai.projects.aio.operations.DeploymentsOperations
:ivar indexes: IndexesOperations operations
:vartype indexes: azure.ai.projects.aio.operations.IndexesOperations
:ivar toolboxes: ToolboxesOperations operations
:vartype toolboxes: azure.ai.projects.aio.operations.ToolboxesOperations
:param endpoint: Foundry Project endpoint in the form
"https://{ai-services-account-name}.services.ai.azure.com/api/projects/{project-name}". If you
only have one Project in your Foundry Hub, or to target the default Project in your Hub, use
Expand Down Expand Up @@ -102,6 +105,7 @@ def __init__(
self.datasets = DatasetsOperations(self._client, self._config, self._serialize, self._deserialize)
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)
self.toolboxes = ToolboxesOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from ._operations import DatasetsOperations # type: ignore
from ._operations import DeploymentsOperations # type: ignore
from ._operations import IndexesOperations # type: ignore
from ._operations import ToolboxesOperations # type: ignore

from ._patch import __all__ as _patch_all
from ._patch import *
Expand All @@ -32,6 +33,7 @@
"DatasetsOperations",
"DeploymentsOperations",
"IndexesOperations",
"ToolboxesOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
Loading