From 6fa81254d1ec50c8a4a9f533d221256abd0ab24f Mon Sep 17 00:00:00 2001 From: Neehar Duvvuri Date: Mon, 17 Mar 2025 14:06:56 -0400 Subject: [PATCH 1/3] Remove unnecessary deployments contracts --- .../Azure.AI.Projects/deployments/models.tsp | 26 +++++++------------ .../Azure.AI.Projects/deployments/routes.tsp | 4 +-- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/specification/ai/Azure.AI.Projects/deployments/models.tsp b/specification/ai/Azure.AI.Projects/deployments/models.tsp index f2ccf1104221..c1bdaf3121a2 100644 --- a/specification/ai/Azure.AI.Projects/deployments/models.tsp +++ b/specification/ai/Azure.AI.Projects/deployments/models.tsp @@ -18,42 +18,34 @@ namespace Azure.AI.Projects; @doc("Model Deployment Definition") @resource("deployments") model Deployment { - @doc("Name of the deployment for the model") + @doc("Name of the deployment") @visibility("read") - @key("deploymentName") - deploymentName: string; + @key("name") + name: string; - @doc("Publisher-specific name of the model") + @doc("Publisher-specific name of the deployed model") @visibility("read") modelName: string; - @doc("Publisher-specific version of the model") + @doc("Publisher-specific version of the deployed model") @visibility("read") modelVersion: string; - @doc("Name of the model publisher") + @doc("Name of the deployed model's publisher") @visibility("read") - publisher: string; + modelPublisher: string; - @doc("Capabilities of model") + @doc("Capabilities of deployed model") @visibility("read") capabilities: Record; - @doc("RAI policy enabled for model") - @visibility("read") - raiPolicyName: string; - @doc("Sku of the model deployment") @visibility("read") sku: Sku; - @doc("Name of the connection the model comes from") + @doc("Name of the connection the deployment comes from") @visibility("read") connectionName?: string; - - @doc("System data of the resource") - @visibility("read") - systemData: SystemData; } #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" diff --git a/specification/ai/Azure.AI.Projects/deployments/routes.tsp b/specification/ai/Azure.AI.Projects/deployments/routes.tsp index 990bd2f3e406..4c72cb22e9d1 100644 --- a/specification/ai/Azure.AI.Projects/deployments/routes.tsp +++ b/specification/ai/Azure.AI.Projects/deployments/routes.tsp @@ -13,9 +13,7 @@ using Azure.Core.Foundations; namespace Azure.AI.Projects; -alias DeploymentServiceTraits = SupportsClientRequestId & - SupportsRepeatableRequests & - SupportsConditionalRequests; +alias DeploymentServiceTraits = SupportsClientRequestId; alias DeploymentOperations = Azure.Core.ResourceOperations; From 64e9b062909caf32bb2ed7a464aa47f260606b00 Mon Sep 17 00:00:00 2001 From: Neehar Duvvuri Date: Mon, 17 Mar 2025 14:08:08 -0400 Subject: [PATCH 2/3] remove unnecessary connection fields --- specification/ai/Azure.AI.Projects/connections/models.tsp | 4 ---- specification/ai/Azure.AI.Projects/connections/routes.tsp | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/specification/ai/Azure.AI.Projects/connections/models.tsp b/specification/ai/Azure.AI.Projects/connections/models.tsp index 76fd20ef1366..4442be9f0ce1 100644 --- a/specification/ai/Azure.AI.Projects/connections/models.tsp +++ b/specification/ai/Azure.AI.Projects/connections/models.tsp @@ -18,10 +18,6 @@ namespace Azure.AI.Projects; @doc("Response from the listSecrets operation") @resource("connections") model Connection { - @doc("Fully qualified resource identifier") - @visibility("read") - id: string; - @doc("The name of the resource") @visibility("read") @key("connectionName") diff --git a/specification/ai/Azure.AI.Projects/connections/routes.tsp b/specification/ai/Azure.AI.Projects/connections/routes.tsp index dc8d7612d455..31db2ce31137 100644 --- a/specification/ai/Azure.AI.Projects/connections/routes.tsp +++ b/specification/ai/Azure.AI.Projects/connections/routes.tsp @@ -13,9 +13,7 @@ using Azure.Core.Foundations; namespace Azure.AI.Projects; -alias ConnectionServiceTraits = SupportsClientRequestId & - SupportsRepeatableRequests & - SupportsConditionalRequests; +alias ConnectionServiceTraits = SupportsClientRequestId; alias ConnectionOperations = Azure.Core.ResourceOperations; From 742b3f02bda54684fb836aa2d8d64728f540a638 Mon Sep 17 00:00:00 2001 From: Neehar Duvvuri Date: Mon, 17 Mar 2025 14:33:09 -0400 Subject: [PATCH 3/3] Run npx tsv . --- .../Azure.AI.Projects/connections/routes.tsp | 4 +- .../Azure.AI.Projects/deployments/routes.tsp | 4 +- .../azure-ai-projects-1dp.json | 119 +++--------------- 3 files changed, 22 insertions(+), 105 deletions(-) diff --git a/specification/ai/Azure.AI.Projects/connections/routes.tsp b/specification/ai/Azure.AI.Projects/connections/routes.tsp index 31db2ce31137..90a1cab79109 100644 --- a/specification/ai/Azure.AI.Projects/connections/routes.tsp +++ b/specification/ai/Azure.AI.Projects/connections/routes.tsp @@ -13,7 +13,9 @@ using Azure.Core.Foundations; namespace Azure.AI.Projects; -alias ConnectionServiceTraits = SupportsClientRequestId; +alias ConnectionServiceTraits = SupportsClientRequestId & + NoRepeatableRequests & + NoConditionalRequests; alias ConnectionOperations = Azure.Core.ResourceOperations; diff --git a/specification/ai/Azure.AI.Projects/deployments/routes.tsp b/specification/ai/Azure.AI.Projects/deployments/routes.tsp index 4c72cb22e9d1..15f8287fe44b 100644 --- a/specification/ai/Azure.AI.Projects/deployments/routes.tsp +++ b/specification/ai/Azure.AI.Projects/deployments/routes.tsp @@ -13,7 +13,9 @@ using Azure.Core.Foundations; namespace Azure.AI.Projects; -alias DeploymentServiceTraits = SupportsClientRequestId; +alias DeploymentServiceTraits = SupportsClientRequestId & + NoRepeatableRequests & + NoConditionalRequests; alias DeploymentOperations = Azure.Core.ResourceOperations; diff --git a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-01-preview/azure-ai-projects-1dp.json b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-01-preview/azure-ai-projects-1dp.json index a8b86bd6a227..67a5d1fcee02 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-01-preview/azure-ai-projects-1dp.json +++ b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-01-preview/azure-ai-projects-1dp.json @@ -455,18 +455,6 @@ }, { "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" - }, - { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifMatch" - }, - { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifNoneMatch" - }, - { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince" - }, - { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifModifiedSince" } ], "responses": { @@ -476,10 +464,6 @@ "$ref": "#/definitions/Connection" }, "headers": { - "ETag": { - "type": "string", - "description": "The entity tag for the response." - }, "x-ms-client-request-id": { "type": "string", "format": "uuid", @@ -862,7 +846,7 @@ } } }, - "/deployments/{deploymentName}": { + "/deployments/{name}": { "get": { "operationId": "Deployments_Get", "description": "Get a deployed model.", @@ -871,26 +855,14 @@ "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "deploymentName", + "name": "name", "in": "path", - "description": "Name of the deployment for the model", + "description": "Name of the deployment", "required": true, "type": "string" }, { "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" - }, - { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifMatch" - }, - { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifNoneMatch" - }, - { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince" - }, - { - "$ref": "#/parameters/Azure.Core.ConditionalRequestHeaders.ifModifiedSince" } ], "responses": { @@ -900,10 +872,6 @@ "$ref": "#/definitions/Deployment" }, "headers": { - "ETag": { - "type": "string", - "description": "The entity tag for the response." - }, "x-ms-client-request-id": { "type": "string", "format": "uuid", @@ -9343,11 +9311,6 @@ "type": "object", "description": "Response from the listSecrets operation", "properties": { - "id": { - "type": "string", - "description": "Fully qualified resource identifier", - "readOnly": true - }, "name": { "type": "string", "description": "The name of the resource", @@ -9372,7 +9335,6 @@ } }, "required": [ - "id", "name", "type", "target", @@ -9600,39 +9562,34 @@ "type": "object", "description": "Model Deployment Definition", "properties": { - "deploymentName": { + "name": { "type": "string", - "description": "Name of the deployment for the model", + "description": "Name of the deployment", "readOnly": true }, "modelName": { "type": "string", - "description": "Publisher-specific name of the model", + "description": "Publisher-specific name of the deployed model", "readOnly": true }, "modelVersion": { "type": "string", - "description": "Publisher-specific version of the model", + "description": "Publisher-specific version of the deployed model", "readOnly": true }, - "publisher": { + "modelPublisher": { "type": "string", - "description": "Name of the model publisher", + "description": "Name of the deployed model's publisher", "readOnly": true }, "capabilities": { "type": "object", - "description": "Capabilities of model", + "description": "Capabilities of deployed model", "additionalProperties": { "type": "string" }, "readOnly": true }, - "raiPolicyName": { - "type": "string", - "description": "RAI policy enabled for model", - "readOnly": true - }, "sku": { "$ref": "#/definitions/Sku", "description": "Sku of the model deployment", @@ -9640,24 +9597,17 @@ }, "connectionName": { "type": "string", - "description": "Name of the connection the model comes from", - "readOnly": true - }, - "systemData": { - "$ref": "#/definitions/SystemData", - "description": "System data of the resource", + "description": "Name of the connection the deployment comes from", "readOnly": true } }, "required": [ - "deploymentName", + "name", "modelName", "modelVersion", - "publisher", + "modelPublisher", "capabilities", - "raiPolicyName", - "sku", - "systemData" + "sku" ] }, "EmbeddingConfiguration": { @@ -10059,7 +10009,8 @@ "description": "The Connection items on this page", "items": { "$ref": "#/definitions/Connection" - } + }, + "x-ms-identifiers": [] }, "nextLink": { "type": "string", @@ -10391,44 +10342,6 @@ "x-ms-parameter-location": "method", "x-ms-client-name": "clientRequestId" }, - "Azure.Core.ConditionalRequestHeaders.ifMatch": { - "name": "If-Match", - "in": "header", - "description": "The request should only proceed if an entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifModifiedSince": { - "name": "If-Modified-Since", - "in": "header", - "description": "The request should only proceed if the entity was modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifModifiedSince" - }, - "Azure.Core.ConditionalRequestHeaders.ifNoneMatch": { - "name": "If-None-Match", - "in": "header", - "description": "The request should only proceed if no entity matches this string.", - "required": false, - "type": "string", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifNoneMatch" - }, - "Azure.Core.ConditionalRequestHeaders.ifUnmodifiedSince": { - "name": "If-Unmodified-Since", - "in": "header", - "description": "The request should only proceed if the entity was not modified after this time.", - "required": false, - "type": "string", - "format": "date-time", - "x-ms-parameter-location": "method", - "x-ms-client-name": "ifUnmodifiedSince" - }, "Azure.Core.Foundations.ApiVersionParameter": { "name": "api-version", "in": "query",