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
1 change: 1 addition & 0 deletions sdk/ai/azure-ai-projects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

### Breaking Changes

* Renamed model `AgentEndpoint` to `AgentEndpointConfig`.
* Agent Endpoint beta operations: Removed required parameters `user_isolation_key` and `chat_isolation_key` from the `HeaderIsolationKeySource` class constructor.

### Bugs Fixed
Expand Down
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-projects/apiview-properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"azure.ai.projects.models.AgentDataGenerationJobSource": "Azure.AI.Projects.AgentDataGenerationJobSource",
"azure.ai.projects.models.AgentDefinition": "Azure.AI.Projects.AgentDefinition",
"azure.ai.projects.models.AgentDetails": "Azure.AI.Projects.AgentObject",
"azure.ai.projects.models.AgentEndpoint": "Azure.AI.Projects.AgentEndpoint",
"azure.ai.projects.models.AgentEndpointAuthorizationScheme": "Azure.AI.Projects.AgentEndpointAuthorizationScheme",
"azure.ai.projects.models.AgentEndpointConfig": "Azure.AI.Projects.AgentEndpointConfig",
"azure.ai.projects.models.BaseCredentials": "Azure.AI.Projects.BaseCredentials",
"azure.ai.projects.models.AgenticIdentityPreviewCredentials": "Azure.AI.Projects.AgenticIdentityPreviewCredentials",
"azure.ai.projects.models.AgentIdentity": "Azure.AI.Projects.AgentIdentity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3024,7 +3024,7 @@ async def patch_agent_details(
agent_name: str,
*,
content_type: str = "application/merge-patch+json",
agent_endpoint: Optional[_models.AgentEndpoint] = None,
agent_endpoint: Optional[_models.AgentEndpointConfig] = None,
agent_card: Optional[_models.AgentCard] = None,
**kwargs: Any
) -> _models.AgentDetails:
Expand All @@ -3036,7 +3036,7 @@ async def patch_agent_details(
Default value is "application/merge-patch+json".
:paramtype content_type: str
:keyword agent_endpoint: The endpoint configuration for the agent. Default value is None.
:paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpoint
:paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpointConfig
:keyword agent_card: Optional agent card for the agent. Default value is None.
:paramtype agent_card: ~azure.ai.projects.models.AgentCard
:return: AgentDetails. The AgentDetails is compatible with MutableMapping
Expand Down Expand Up @@ -3086,7 +3086,7 @@ async def patch_agent_details(
agent_name: str,
body: Union[JSON, IO[bytes]] = _Unset,
*,
agent_endpoint: Optional[_models.AgentEndpoint] = None,
agent_endpoint: Optional[_models.AgentEndpointConfig] = None,
agent_card: Optional[_models.AgentCard] = None,
**kwargs: Any
) -> _models.AgentDetails:
Expand All @@ -3097,7 +3097,7 @@ async def patch_agent_details(
:param body: Is either a JSON type or a IO[bytes] type. Required.
:type body: JSON or IO[bytes]
:keyword agent_endpoint: The endpoint configuration for the agent. Default value is None.
:paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpoint
:paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpointConfig
:keyword agent_card: Optional agent card for the agent. Default value is None.
:paramtype agent_card: ~azure.ai.projects.models.AgentCard
:return: AgentDetails. The AgentDetails is compatible with MutableMapping
Expand Down
4 changes: 2 additions & 2 deletions sdk/ai/azure-ai-projects/azure/ai/projects/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
AgentDataGenerationJobSource,
AgentDefinition,
AgentDetails,
AgentEndpoint,
AgentEndpointAuthorizationScheme,
AgentEndpointConfig,
AgentIdentity,
AgentObjectVersions,
AgentSessionResource,
Expand Down Expand Up @@ -373,8 +373,8 @@
"AgentDataGenerationJobSource",
"AgentDefinition",
"AgentDetails",
"AgentEndpoint",
"AgentEndpointAuthorizationScheme",
"AgentEndpointConfig",
"AgentIdentity",
"AgentObjectVersions",
"AgentSessionResource",
Expand Down
74 changes: 37 additions & 37 deletions sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ class AgentDetails(_Model):
:ivar versions: The latest version of the agent. Required.
:vartype versions: ~azure.ai.projects.models.AgentObjectVersions
:ivar agent_endpoint: The endpoint configuration for the agent.
:vartype agent_endpoint: ~azure.ai.projects.models.AgentEndpoint
:vartype agent_endpoint: ~azure.ai.projects.models.AgentEndpointConfig
:ivar instance_identity: The instance identity of the agent.
:vartype instance_identity: ~azure.ai.projects.models.AgentIdentity
:ivar blueprint: The blueprint for the agent.
Expand All @@ -581,7 +581,7 @@ class AgentDetails(_Model):
"""The name of the agent. Required."""
versions: "_models.AgentObjectVersions" = rest_field(visibility=["read", "create", "update", "delete", "query"])
"""The latest version of the agent. Required."""
agent_endpoint: Optional["_models.AgentEndpoint"] = rest_field(
agent_endpoint: Optional["_models.AgentEndpointConfig"] = rest_field(
visibility=["read", "create", "update", "delete", "query"]
)
"""The endpoint configuration for the agent."""
Expand All @@ -601,7 +601,7 @@ def __init__(
id: str, # pylint: disable=redefined-builtin
name: str,
versions: "_models.AgentObjectVersions",
agent_endpoint: Optional["_models.AgentEndpoint"] = None,
agent_endpoint: Optional["_models.AgentEndpointConfig"] = None,
agent_card: Optional["_models.AgentCard"] = None,
) -> None: ...

Expand All @@ -616,8 +616,40 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)


class AgentEndpoint(_Model):
"""AgentEndpoint.
class AgentEndpointAuthorizationScheme(_Model):
"""AgentEndpointAuthorizationScheme.

You probably want to use the sub-classes and not this class directly. Known sub-classes are:
BotServiceAuthorizationScheme, BotServiceRbacAuthorizationScheme, EntraAuthorizationScheme

:ivar type: Required. Known values are: "Entra", "BotService", and "BotServiceRbac".
:vartype type: str or ~azure.ai.projects.models.AgentEndpointAuthorizationSchemeType
"""

__mapping__: dict[str, _Model] = {}
type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
"""Required. Known values are: \"Entra\", \"BotService\", and \"BotServiceRbac\"."""

@overload
def __init__(
self,
*,
type: str,
) -> None: ...

@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""

def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)


class AgentEndpointConfig(_Model):
"""AgentEndpointConfig.

:ivar version_selector: The version selector of the agent endpoint determines how traffic is
routed to different versions of the agent.
Expand Down Expand Up @@ -663,38 +695,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)


class AgentEndpointAuthorizationScheme(_Model):
"""AgentEndpointAuthorizationScheme.

You probably want to use the sub-classes and not this class directly. Known sub-classes are:
BotServiceAuthorizationScheme, BotServiceRbacAuthorizationScheme, EntraAuthorizationScheme

:ivar type: Required. Known values are: "Entra", "BotService", and "BotServiceRbac".
:vartype type: str or ~azure.ai.projects.models.AgentEndpointAuthorizationSchemeType
"""

__mapping__: dict[str, _Model] = {}
type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
"""Required. Known values are: \"Entra\", \"BotService\", and \"BotServiceRbac\"."""

@overload
def __init__(
self,
*,
type: str,
) -> None: ...

@overload
def __init__(self, mapping: Mapping[str, Any]) -> None:
"""
:param mapping: raw JSON to initialize the model.
:type mapping: Mapping[str, Any]
"""

def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)


class BaseCredentials(_Model):
"""A base class for connection credentials.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5329,7 +5329,7 @@ def patch_agent_details(
agent_name: str,
*,
content_type: str = "application/merge-patch+json",
agent_endpoint: Optional[_models.AgentEndpoint] = None,
agent_endpoint: Optional[_models.AgentEndpointConfig] = None,
agent_card: Optional[_models.AgentCard] = None,
**kwargs: Any
) -> _models.AgentDetails:
Expand All @@ -5341,7 +5341,7 @@ def patch_agent_details(
Default value is "application/merge-patch+json".
:paramtype content_type: str
:keyword agent_endpoint: The endpoint configuration for the agent. Default value is None.
:paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpoint
:paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpointConfig
:keyword agent_card: Optional agent card for the agent. Default value is None.
:paramtype agent_card: ~azure.ai.projects.models.AgentCard
:return: AgentDetails. The AgentDetails is compatible with MutableMapping
Expand Down Expand Up @@ -5391,7 +5391,7 @@ def patch_agent_details(
agent_name: str,
body: Union[JSON, IO[bytes]] = _Unset,
*,
agent_endpoint: Optional[_models.AgentEndpoint] = None,
agent_endpoint: Optional[_models.AgentEndpointConfig] = None,
agent_card: Optional[_models.AgentCard] = None,
**kwargs: Any
) -> _models.AgentDetails:
Expand All @@ -5402,7 +5402,7 @@ def patch_agent_details(
:param body: Is either a JSON type or a IO[bytes] type. Required.
:type body: JSON or IO[bytes]
:keyword agent_endpoint: The endpoint configuration for the agent. Default value is None.
:paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpoint
:paramtype agent_endpoint: ~azure.ai.projects.models.AgentEndpointConfig
:keyword agent_card: Optional agent card for the agent. Default value is None.
:paramtype agent_card: ~azure.ai.projects.models.AgentCard
:return: AgentDetails. The AgentDetails is compatible with MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import (
AgentEndpoint,
AgentEndpointConfig,
AgentEndpointProtocol,
FixedRatioVersionSelectionRule,
VersionSelector,
Expand Down Expand Up @@ -74,7 +74,7 @@
try:
# Configure endpoint routing so this agent name serves the created version.
# 100% of traffic is routed to the single created version.
endpoint_config = AgentEndpoint(
endpoint_config = AgentEndpointConfig(
version_selector=VersionSelector(
version_selection_rules=[
FixedRatioVersionSelectionRule(agent_version=agent.version, traffic_percentage=100),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

from azure.ai.projects.aio import AIProjectClient
from azure.ai.projects.models import (
AgentEndpoint,
AgentEndpointConfig,
AgentEndpointProtocol,
FixedRatioVersionSelectionRule,
VersionSelector,
Expand Down Expand Up @@ -77,7 +77,7 @@ async def main():
try:
# Configure endpoint routing so this agent name serves the created version.
# 100% of traffic is routed to the single created version.
endpoint_config = AgentEndpoint(
endpoint_config = AgentEndpointConfig(
version_selector=VersionSelector(
version_selection_rules=[
FixedRatioVersionSelectionRule(agent_version=agent.version, traffic_percentage=100),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import (
AgentEndpoint,
AgentEndpointConfig,
AgentEndpointProtocol,
FixedRatioVersionSelectionRule,
VersionSelector,
Expand Down Expand Up @@ -104,7 +104,7 @@ def _iter_sse_frames(stream, max_log_events: int):
)
print(f"Session created (id: {session.agent_session_id}, status: {session.status})")
try:
endpoint_config = AgentEndpoint(
endpoint_config = AgentEndpointConfig(
version_selector=VersionSelector(
version_selection_rules=[
FixedRatioVersionSelectionRule(agent_version=agent.version, traffic_percentage=100),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

from azure.ai.projects.aio import AIProjectClient
from azure.ai.projects.models import (
AgentEndpoint,
AgentEndpointConfig,
AgentEndpointProtocol,
FixedRatioVersionSelectionRule,
VersionSelector,
Expand Down Expand Up @@ -134,7 +134,7 @@ async def main():
)
print(f"Session created (id: {session.agent_session_id}, status: {session.status})")
try:
endpoint_config = AgentEndpoint(
endpoint_config = AgentEndpointConfig(
version_selector=VersionSelector(
version_selection_rules=[
FixedRatioVersionSelectionRule(agent_version=agent.version, traffic_percentage=100),
Expand Down
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-projects/tsp-location.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/ai-foundry/data-plane/Foundry
commit: 98a44e0fa3d9317725a8fad6e2903fb1787dbbf3
commit: f6fde1c197adf274a4b344ea27ec26490841ab68
repo: Azure/azure-rest-api-specs
additionalDirectories: