Repository: Azure/azure-rest-api-specs
Pull request #34627: Address the agents v1 typespec PR comments
Author: login: ninghu
Labels: name: data-plane
name: TypeSpec
description: Authored with TypeSpec
Created: 2025-05-13T03:02:04Z | Merged: 2025-05-13T18:28:40Z

# Choose a PR Template

Switch to "Preview" on this description then select one of the choices below.

<a href="?expand=1&template=data_plane_template.md">Click here</a> to open a PR for a Data Plane API.

<a href="?expand=1&template=control_plane_template.md">Click here</a> to open a PR for a Control Plane (ARM) API.

<a href="?expand=1&template=sdk_configuration_template.md">Click here</a> to open a PR for only SDK configuration.



Diff:
diff --git a/specification/ai/Azure.AI.Agents/client.tsp b/specification/ai/Azure.AI.Agents/client.tsp
index f22e644ac861..981a8610594d 100644
--- a/specification/ai/Azure.AI.Agents/client.tsp
+++ b/specification/ai/Azure.AI.Agents/client.tsp
@@ -416,19 +416,37 @@ using Azure.AI.Agents;
   "csharp"
 );
 // Run stream events
-@@clientName(RunStepStreamEvent.ThreadRunStepCompleted, "RunStepCompleted", "csharp");
-@@clientName(RunStepStreamEvent.ThreadRunStepCreated, "RunStepCreated", "csharp");
+@@clientName(RunStepStreamEvent.ThreadRunStepCompleted,
+  "RunStepCompleted",
+  "csharp"
+);
+@@clientName(RunStepStreamEvent.ThreadRunStepCreated,
+  "RunStepCreated",
+  "csharp"
+);
 @@clientName(RunStepStreamEvent.ThreadRunStepDelta, "RunStepDelta", "csharp");
-@@clientName(RunStepStreamEvent.ThreadRunStepExpired, "RunStepExpired", "csharp");
+@@clientName(RunStepStreamEvent.ThreadRunStepExpired,
+  "RunStepExpired",
+  "csharp"
+);
 @@clientName(RunStepStreamEvent.ThreadRunStepFailed, "RunStepFailed", "csharp");
 @@clientName(RunStepStreamEvent.ThreadRunStepInProgress,
   "RunStepInProgress",
   "csharp"
 );
-@@clientName(RunStepStreamEvent.ThreadRunStepCancelled, "RunStepCancelled", "csharp");
+@@clientName(RunStepStreamEvent.ThreadRunStepCancelled,
+  "RunStepCancelled",
+  "csharp"
+);
 // Message stream events
-@@clientName(MessageStreamEvent.ThreadMessageCompleted, "MessageCompleted", "csharp");
-@@clientName(MessageStreamEvent.ThreadMessageCreated, "MessageCreated", "csharp");
+@@clientName(MessageStreamEvent.ThreadMessageCompleted,
+  "MessageCompleted",
+  "csharp"
+);
+@@clientName(MessageStreamEvent.ThreadMessageCreated,
+  "MessageCreated",
+  "csharp"
+);
 @@clientName(MessageStreamEvent.ThreadMessageDelta, "MessageDelta", "csharp");
 @@clientName(MessageStreamEvent.ThreadMessageIncomplete,
   "MessageIncomplete",
diff --git a/specification/ai/Azure.AI.Agents/runs/models.tsp b/specification/ai/Azure.AI.Agents/runs/models.tsp
index 810935e50782..7e4d63377ed7 100644
--- a/specification/ai/Azure.AI.Agents/runs/models.tsp
+++ b/specification/ai/Azure.AI.Agents/runs/models.tsp
@@ -141,7 +141,7 @@ model ThreadRun {
   #suppress "@azure-tools/typespec-azure-core/no-nullable" "OpenAI uses explicit nullability, distinct from optionality"
   @doc("Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis")
   @encodedName("application/json", "tool_resources")
-  toolResources?: UpdateToolResourcesOptions | null;
+  toolResources?: ToolResources | null;
 
   @doc("Determines if tools can be executed in parallel within the run.")
   @encodedName("application/json", "parallel_tool_calls")
@@ -385,7 +385,7 @@ model CreateAndRunThreadOptions {
   #suppress "@azure-tools/typespec-azure-core/no-nullable" "OpenAI uses explicit nullability, distinct from optionality"
   @doc("Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis")
   @encodedName("application/json", "tool_resources")
-  toolResources?: UpdateToolResourcesOptions | null;
+  toolResources?: ToolResources | null;
 
   /**
    * If `true`, returns a stream of events that happen during the Run as server-sent events,
diff --git a/specification/ai/Azure.AI.Agents/servicepatterns.tsp b/specification/ai/Azure.AI.Agents/servicepatterns.tsp
index 77ff08938ae1..4565ee0f89df 100644
--- a/specification/ai/Azure.AI.Agents/servicepatterns.tsp
+++ b/specification/ai/Azure.AI.Agents/servicepatterns.tsp
@@ -1,7 +1,6 @@
 import "@azure-tools/typespec-azure-core";
 
-@Versioning.useDependency(Azure.Core.Versions.v1_0_Preview_2)
-namespace ServicePatterns;
+namespace Azure.AI.Agents.ServicePatterns;
 
 @doc("Error payload returned by the agents API.")
 @error
diff --git a/specification/ai/Azure.AI.Agents/tools/tool_resources.tsp b/specification/ai/Azure.AI.Agents/tools/tool_resources.tsp
index 05acfd7c08f9..0ae0928f82ae 100644
--- a/specification/ai/Azure.AI.Agents/tools/tool_resources.tsp
+++ b/specification/ai/Azure.AI.Agents/tools/tool_resources.tsp
@@ -29,7 +29,7 @@ model ToolResources {
 
   /** Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */
   @encodedName("application/json", "azure_ai_search")
-  azureAISearch?: AzureAISearchResource;
+  azureAISearch?: AzureAISearchToolResource;
 }
 
 /**
@@ -78,7 +78,7 @@ model FileSearchToolResource {
  * A set of index resources used by the `azure_ai_search` tool.
  */
 @added(Versions.v2025_05_01)
-model AzureAISearchResource {
+model AzureAISearchToolResource {
   /**
    * The indices attached to this agent. There can be a maximum of 1 index
    * resource attached to the agent.
@@ -97,13 +97,13 @@ model IndexResource {
    * An index connection id in an IndexResource attached to this agent.
    */
   @encodedName("application/json", "index_connection_id")
-  indexConnectionId: string;
+  indexConnectionId?: string;
 
   /**
    * The name of an index in an IndexResource attached to this agent.
    */
   @encodedName("application/json", "index_name")
-  indexName: string;
+  indexName?: string;
 }
 
 /**
@@ -130,7 +130,6 @@ model AISearchIndexResource {
    */
   filter?: string;
 
-  // TODO: Jose: Change to union type
   /**
    * Index asset id for search resource.
    */
@@ -138,130 +137,6 @@ model AISearchIndexResource {
   indexAssetId?: string;
 }
 
-//
-// Creation request objects
-//
-
-/**
- * Request object. A set of resources that are used by the agent's tools. The resources are specific to the
- * type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search`
- * tool requires a list of vector store IDs.
- */
-@added(Versions.v2025_05_01)
-model CreateToolResourcesOptions {
-  /**
-   * A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files
-   * associated with the tool.
-   */
-  @encodedName("application/json", "code_interpreter")
-  codeInterpreter?: CreateCodeInterpreterToolResourceOptions;
-
-  /** A list of vector stores or their IDs made available to the `file_search` tool. */
-  @encodedName("application/json", "file_search")
-  fileSearch?: CreateFileSearchToolResourceOptions;
-
-  /** Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */
-  @encodedName("application/json", "azure_ai_search")
-  azureAISearch?: AzureAISearchToolResourceOptions;
-}
-
-alias AzureAISearchToolResourceOptions = AzureAISearchResource;
-
-/**
- * A set of resources that will be used by the `code_interpreter` tool. Request object.
- */
-@added(Versions.v2025_05_01)
-model CreateCodeInterpreterToolResourceOptions {
-  /** A list of file IDs made available to the `code_interpreter` tool. */
-  @maxItems(20)
-  @encodedName("application/json", "file_ids")
-  fileIds?: string[] = #[];
-}
-
-/**
- * A set of resources that are used by the agent's tools. The resources are specific to the type of tool.
- * For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires
- * a list of vector store IDs.
- */
-#suppress "@azure-tools/typespec-autorest/union-unsupported" "This union is defined according to the OpenAI API"
-union CreateFileSearchToolResourceOptions {
-  /** The vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. */
-  @encodedName("application/json", "vector_store_ids")
-  // @maxItems(1) // this can't be applied to string[]
-  vectorStoreIds: string[],
-
-  /** A helper to create a vector store with file_ids and attach it to this agent. There can be a maximum of 1 vector
-   * store attached to the agent. */
-  @encodedName("application/json", "vector_stores")
-  // @maxItems(1) // this can't be applied to string[]
-  vectorStores: CreateFileSearchToolResourceVectorStoreOptions[],
-}
-
-/** File IDs associated to the vector store to be passed to the helper. */
-@added(Versions.v2025_05_01)
-model CreateFileSearchToolResourceVectorStoreOptions {
-  /** A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. */
-  @encodedName("application/json", "file_ids")
-  @maxItems(10000)
-  fileIds: string[];
-
-  /** The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. */
-  @encodedName("application/json", "chunking_strategy")
-  chunkingStrategy: VectorStoreChunkingStrategyRequest;
-
-  /**
-   * Set of up to 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional
-   * information about the vector store in a structured format. Keys can be a maximum of 64 characters long and
-   * values can be a maximum of 512 characters long.
-   */
-  ...OptionalNullableMetadata;
-}
-
-//
-// Update request objects
-//
-
-/**
- * Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool.
- * For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of
- * vector store IDs.
- */
-@added(Versions.v2025_05_01)
-model UpdateToolResourcesOptions {
-  /**
-   * Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files
-   * associated with the tool.
-   */
-  @encodedName("application/json", "code_interpreter")
-  codeInterpreter?: UpdateCodeInterpreterToolResourceOptions;
-
-  /** Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. */
-  @encodedName("application/json", "file_search")
-  fileSearch?: UpdateFileSearchToolResourceOptions;
-
-  /** Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names. */
-  @encodedName("application/json", "azure_ai_search")
-  azureAISearch?: AzureAISearchToolResourceOptions;
-}
-
-/** Request object to update `code_interpreted` tool resources. */
-@added(Versions.v2025_05_01)
-model UpdateCodeInterpreterToolResourceOptions {
-  /** A list of file IDs to override the current list of the agent. */
-  @encodedName("application/json", "file_ids")
-  @maxItems(20)
-  fileIds?: string[];
-}
-
-/** Request object to update `file_search` tool resources. */
-@added(Versions.v2025_05_01)
-model UpdateFileSearchToolResourceOptions {
-  /** A list of vector store IDs to override the current list of the agent. */
-  @maxItems(1)
-  @encodedName("application/json", "vector_store_ids")
-  vectorStoreIds?: string[];
-}
-
 /** Available query types for Azure AI Search tool. */
 union AzureAISearchQueryType {
   string,
diff --git a/specification/ai/Azure.AI.Agents/tspconfig.yaml b/specification/ai/Azure.AI.Agents/tspconfig.yaml
index 2ffa402d20da..580edc718528 100644
--- a/specification/ai/Azure.AI.Agents/tspconfig.yaml
+++ b/specification/ai/Azure.AI.Agents/tspconfig.yaml
@@ -10,7 +10,7 @@ options:
     emit-lro-options: "none"
     output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azure-ai-agents.json"
   "@azure-tools/typespec-python":
-    api-version: "2025-05-15-preview"
+    api-version: "v1"
     package-mode: "dataplane"
     package-dir: "azure-ai-agents"
     package-name: "{package-dir}"
@@ -19,7 +19,7 @@ options:
     generate-sample: false
     examples-dir: "{project-root}/examples"
   "@azure-tools/typespec-csharp":
-    api-version: "2025-05-15-preview"
+    api-version: "v1"
     package-mode: "dataplane"
     package-dir: "Azure.AI.Agents.Persistent"
     namespace: "{package-dir}"
@@ -31,7 +31,7 @@ options:
     examples-dir: "{project-root}/examples"
     clear-output-folder: true
   "@azure-tools/typespec-ts":
-    api-version: "2025-05-15-preview"
+    api-version: "v1"
     generateTest: true
     generateMetadata: false
     packageDetails:
diff --git a/specification/ai/data-plane/Azure.AI.Agents/preview/2025-05-15-preview/azure-ai-agents.json b/specification/ai/data-plane/Azure.AI.Agents/preview/2025-05-15-preview/azure-ai-agents.json
index afefbce82a62..0d030ea9fba6 100644
--- a/specification/ai/data-plane/Azure.AI.Agents/preview/2025-05-15-preview/azure-ai-agents.json
+++ b/specification/ai/data-plane/Azure.AI.Agents/preview/2025-05-15-preview/azure-ai-agents.json
@@ -2764,11 +2764,7 @@
           "description": "Index asset id for search resource.",
           "x-ms-client-name": "indexAssetId"
         }
-      },
-      "required": [
-        "index_connection_id",
-        "index_name"
-      ]
+      }
     },
     "Agent": {
       "type": "object",
@@ -2823,14 +2819,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter`\ntool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "temperature": {
@@ -3094,14 +3085,9 @@
           "x-ms-client-name": "createdAt"
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type\nof tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list\nof vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "metadata": {
@@ -3134,14 +3120,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\na list of vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "metadata": {
@@ -3360,7 +3341,17 @@
         ]
       }
     },
-    "AzureAISearchResource": {
+    "AzureAISearchToolDefinition": {
+      "type": "object",
+      "description": "The input definition information for an Azure AI search tool as used to configure an agent.",
+      "allOf": [
+        {
+          "$ref": "#/definitions/ToolDefinition"
+        }
+      ],
+      "x-ms-discriminator-value": "azure_ai_search"
+    },
+    "AzureAISearchToolResource": {
       "type": "object",
       "description": "A set of index resources used by the `azure_ai_search` tool.",
       "properties": {
@@ -3376,16 +3367,6 @@
         }
       }
     },
-    "AzureAISearchToolDefinition": {
-      "type": "object",
-      "description": "The input definition information for an Azure AI search tool as used to configure an agent.",
-      "allOf": [
-        {
-          "$ref": "#/definitions/ToolDefinition"
-        }
-      ],
-      "x-ms-discriminator-value": "azure_ai_search"
-    },
     "AzureFunctionBinding": {
       "type": "object",
       "description": "The structure for keeping storage queue name and URI.",
@@ -3735,14 +3716,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter`\ntool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "temperature": {
@@ -3812,14 +3788,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/UpdateToolResourcesOptions"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "stream": {
@@ -3856,14 +3827,9 @@
           "x-ms-client-name": "maxCompletionTokens"
         },
         "truncation_strategy": {
-          "type": "object",
+          "$ref": "#/definitions/TruncationObject",
           "description": "The strategy to use for dropping messages as the context windows moves forward.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/TruncationObject"
-            }
-          ],
           "x-ms-client-name": "truncationStrategy"
         },
         "tool_choice": {
@@ -3896,55 +3862,6 @@
         "assistant_id"
       ]
     },
-    "CreateCodeInterpreterToolResourceOptions": {
-      "type": "object",
-      "description": "A set of resources that will be used by the `code_interpreter` tool. Request object.",
-      "properties": {
-        "file_ids": {
-          "type": "array",
-          "description": "A list of file IDs made available to the `code_interpreter` tool.",
-          "default": [],
-          "maxItems": 20,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "fileIds"
-        }
-      }
-    },
-    "CreateFileSearchToolResourceOptions": {},
-    "CreateFileSearchToolResourceVectorStoreOptions": {
-      "type": "object",
-      "description": "File IDs associated to the vector store to be passed to the helper.",
-      "properties": {
-        "file_ids": {
-          "type": "array",
-          "description": "A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.",
-          "maxItems": 10000,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "fileIds"
-        },
-        "chunking_strategy": {
-          "$ref": "#/definitions/VectorStoreChunkingStrategyRequest",
-          "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.",
-          "x-ms-client-name": "chunkingStrategy"
-        },
-        "metadata": {
-          "type": "object",
-          "description": "A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.",
-          "x-nullable": true,
-          "additionalProperties": {
-            "type": "string"
-          }
-        }
-      },
-      "required": [
-        "file_ids",
-        "chunking_strategy"
-      ]
-    },
     "CreateRunOptions": {
       "type": "object",
       "description": "The details used when creating a new run of an agent thread.",
@@ -4023,14 +3940,9 @@
           "x-ms-client-name": "maxCompletionTokens"
         },
         "truncation_strategy": {
-          "type": "object",
+          "$ref": "#/definitions/TruncationObject",
           "description": "The strategy to use for dropping messages as the context windows moves forward.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/TruncationObject"
-            }
-          ],
           "x-ms-client-name": "truncationStrategy"
         },
         "tool_choice": {
@@ -4063,27 +3975,6 @@
         "assistant_id"
       ]
     },
-    "CreateToolResourcesOptions": {
-      "type": "object",
-      "description": "Request object. A set of resources that are used by the agent's tools. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search`\ntool requires a list of vector store IDs.",
-      "properties": {
-        "code_interpreter": {
-          "$ref": "#/definitions/CreateCodeInterpreterToolResourceOptions",
-          "description": "A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files\nassociated with the tool.",
-          "x-ms-client-name": "codeInterpreter"
-        },
-        "file_search": {
-          "$ref": "#/definitions/CreateFileSearchToolResourceOptions",
-          "description": "A list of vector stores or their IDs made available to the `file_search` tool.",
-          "x-ms-client-name": "fileSearch"
-        },
-        "azure_ai_search": {
-          "$ref": "#/definitions/AzureAISearchResource",
-          "description": "Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.",
-          "x-ms-client-name": "azureAISearch"
-        }
-      }
-    },
     "DoneEvent": {
       "type": "string",
       "description": "Terminal event indicating the successful end of a stream.",
@@ -4579,11 +4470,7 @@
           "description": "The name of an index in an IndexResource attached to this agent.",
           "x-ms-client-name": "indexName"
         }
-      },
-      "required": [
-        "index_connection_id",
-        "index_name"
-      ]
+      }
     },
     "ListSortOrder": {
       "type": "string",
@@ -5984,14 +5871,9 @@
           "x-ms-client-name": "stepDetails"
         },
         "last_error": {
-          "type": "object",
+          "$ref": "#/definitions/RunStepError",
           "description": "If applicable, information about the last error encountered by this run step.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunStepError"
-            }
-          ],
           "x-ms-client-name": "lastError"
         },
         "created_at": {
@@ -6029,14 +5911,9 @@
           "x-ms-client-name": "failedAt"
         },
         "usage": {
-          "type": "object",
+          "$ref": "#/definitions/RunStepCompletionUsage",
           "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.",
-          "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunStepCompletionUsage"
-            }
-          ]
+          "x-nullable": true
         },
         "metadata": {
           "type": "object",
@@ -7211,14 +7088,9 @@
           "description": "The status of the message."
         },
         "incomplete_details": {
-          "type": "object",
+          "$ref": "#/definitions/MessageIncompleteDetails",
           "description": "On an incomplete message, details about why the message is incomplete.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/MessageIncompleteDetails"
-            }
-          ],
           "x-ms-client-name": "incompleteDetails"
         },
         "completed_at": {
@@ -7362,25 +7234,15 @@
           "description": "The status of the agent thread run."
         },
         "required_action": {
-          "type": "object",
+          "$ref": "#/definitions/RequiredAction",
           "description": "The details of the action required for the agent thread run to continue.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RequiredAction"
-            }
-          ],
           "x-ms-client-name": "requiredAction"
         },
         "last_error": {
-          "type": "object",
+          "$ref": "#/definitions/RunError",
           "description": "The last error, if any, encountered by this agent thread run.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunError"
-            }
-          ],
           "x-ms-client-name": "lastError"
         },
         "model": {
@@ -7442,25 +7304,15 @@
           "x-ms-client-name": "failedAt"
         },
         "incomplete_details": {
-          "type": "object",
+          "$ref": "#/definitions/IncompleteRunDetails",
           "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/IncompleteRunDetails"
-            }
-          ],
           "x-ms-client-name": "incompleteDetails"
         },
         "usage": {
-          "type": "object",
+          "$ref": "#/definitions/RunCompletionUsage",
           "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).",
-          "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunCompletionUsage"
-            }
-          ]
+          "x-nullable": true
         },
         "temperature": {
           "type": "number",
@@ -7490,14 +7342,9 @@
           "x-ms-client-name": "maxCompletionTokens"
         },
         "truncation_strategy": {
-          "type": "object",
+          "$ref": "#/definitions/TruncationObject",
           "description": "The strategy to use for dropping messages as the context windows moves forward.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/TruncationObject"
-            }
-          ],
           "x-ms-client-name": "truncationStrategy"
         },
         "tool_choice": {
@@ -7521,14 +7368,9 @@
           }
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/UpdateToolResourcesOptions"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "parallel_tool_calls": {
@@ -7656,7 +7498,7 @@
           "x-ms-client-name": "fileSearch"
         },
         "azure_ai_search": {
-          "$ref": "#/definitions/AzureAISearchResource",
+          "$ref": "#/definitions/AzureAISearchToolResource",
           "description": "Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.",
           "x-ms-client-name": "azureAISearch"
         }
@@ -7800,14 +7642,9 @@
       "description": "The details used to update an existing agent thread",
       "properties": {
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\na list of vector store IDs",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "metadata": {
@@ -7820,57 +7657,6 @@
         }
       }
     },
-    "UpdateCodeInterpreterToolResourceOptions": {
-      "type": "object",
-      "description": "Request object to update `code_interpreted` tool resources.",
-      "properties": {
-        "file_ids": {
-          "type": "array",
-          "description": "A list of file IDs to override the current list of the agent.",
-          "maxItems": 20,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "fileIds"
-        }
-      }
-    },
-    "UpdateFileSearchToolResourceOptions": {
-      "type": "object",
-      "description": "Request object to update `file_search` tool resources.",
-      "properties": {
-        "vector_store_ids": {
-          "type": "array",
-          "description": "A list of vector store IDs to override the current list of the agent.",
-          "maxItems": 1,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "vectorStoreIds"
-        }
-      }
-    },
-    "UpdateToolResourcesOptions": {
-      "type": "object",
-      "description": "Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool.\nFor example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of\nvector store IDs.",
-      "properties": {
-        "code_interpreter": {
-          "$ref": "#/definitions/UpdateCodeInterpreterToolResourceOptions",
-          "description": "Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files\nassociated with the tool.",
-          "x-ms-client-name": "codeInterpreter"
-        },
-        "file_search": {
-          "$ref": "#/definitions/UpdateFileSearchToolResourceOptions",
-          "description": "Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.",
-          "x-ms-client-name": "fileSearch"
-        },
-        "azure_ai_search": {
-          "$ref": "#/definitions/AzureAISearchResource",
-          "description": "Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names.",
-          "x-ms-client-name": "azureAISearch"
-        }
-      }
-    },
     "VectorStore": {
       "type": "object",
       "description": "A vector store is a collection of processed files can be used by the `file_search` tool.",
@@ -8236,14 +8022,9 @@
           "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use."
         },
         "last_error": {
-          "type": "object",
+          "$ref": "#/definitions/VectorStoreFileError",
           "description": "The last error associated with this vector store file. Will be `null` if there are no errors.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/VectorStoreFileError"
-            }
-          ],
           "x-ms-client-name": "lastError"
         },
         "chunking_strategy": {
@@ -8679,14 +8460,9 @@
           "x-nullable": true
         },
         "expires_after": {
-          "type": "object",
+          "$ref": "#/definitions/VectorStoreExpirationPolicy",
           "description": "Details on when this vector store expires",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/VectorStoreExpirationPolicy"
-            }
-          ],
           "x-ms-client-name": "expiresAfter"
         },
         "metadata": {
diff --git a/specification/ai/data-plane/Azure.AI.Agents/stable/2025-05-01/azure-ai-agents.json b/specification/ai/data-plane/Azure.AI.Agents/stable/2025-05-01/azure-ai-agents.json
index c36e3fb83579..0815dd6ecc49 100644
--- a/specification/ai/data-plane/Azure.AI.Agents/stable/2025-05-01/azure-ai-agents.json
+++ b/specification/ai/data-plane/Azure.AI.Agents/stable/2025-05-01/azure-ai-agents.json
@@ -2764,11 +2764,7 @@
           "description": "Index asset id for search resource.",
           "x-ms-client-name": "indexAssetId"
         }
-      },
-      "required": [
-        "index_connection_id",
-        "index_name"
-      ]
+      }
     },
     "Agent": {
       "type": "object",
@@ -2823,14 +2819,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter`\ntool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "temperature": {
@@ -3094,14 +3085,9 @@
           "x-ms-client-name": "createdAt"
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type\nof tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list\nof vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "metadata": {
@@ -3134,14 +3120,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\na list of vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "metadata": {
@@ -3342,7 +3323,17 @@
         ]
       }
     },
-    "AzureAISearchResource": {
+    "AzureAISearchToolDefinition": {
+      "type": "object",
+      "description": "The input definition information for an Azure AI search tool as used to configure an agent.",
+      "allOf": [
+        {
+          "$ref": "#/definitions/ToolDefinition"
+        }
+      ],
+      "x-ms-discriminator-value": "azure_ai_search"
+    },
+    "AzureAISearchToolResource": {
       "type": "object",
       "description": "A set of index resources used by the `azure_ai_search` tool.",
       "properties": {
@@ -3358,16 +3349,6 @@
         }
       }
     },
-    "AzureAISearchToolDefinition": {
-      "type": "object",
-      "description": "The input definition information for an Azure AI search tool as used to configure an agent.",
-      "allOf": [
-        {
-          "$ref": "#/definitions/ToolDefinition"
-        }
-      ],
-      "x-ms-discriminator-value": "azure_ai_search"
-    },
     "AzureFunctionBinding": {
       "type": "object",
       "description": "The structure for keeping storage queue name and URI.",
@@ -3697,14 +3678,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter`\ntool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "temperature": {
@@ -3774,14 +3750,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/UpdateToolResourcesOptions"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "stream": {
@@ -3818,14 +3789,9 @@
           "x-ms-client-name": "maxCompletionTokens"
         },
         "truncation_strategy": {
-          "type": "object",
+          "$ref": "#/definitions/TruncationObject",
           "description": "The strategy to use for dropping messages as the context windows moves forward.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/TruncationObject"
-            }
-          ],
           "x-ms-client-name": "truncationStrategy"
         },
         "tool_choice": {
@@ -3858,55 +3824,6 @@
         "assistant_id"
       ]
     },
-    "CreateCodeInterpreterToolResourceOptions": {
-      "type": "object",
-      "description": "A set of resources that will be used by the `code_interpreter` tool. Request object.",
-      "properties": {
-        "file_ids": {
-          "type": "array",
-          "description": "A list of file IDs made available to the `code_interpreter` tool.",
-          "default": [],
-          "maxItems": 20,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "fileIds"
-        }
-      }
-    },
-    "CreateFileSearchToolResourceOptions": {},
-    "CreateFileSearchToolResourceVectorStoreOptions": {
-      "type": "object",
-      "description": "File IDs associated to the vector store to be passed to the helper.",
-      "properties": {
-        "file_ids": {
-          "type": "array",
-          "description": "A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.",
-          "maxItems": 10000,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "fileIds"
-        },
-        "chunking_strategy": {
-          "$ref": "#/definitions/VectorStoreChunkingStrategyRequest",
-          "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.",
-          "x-ms-client-name": "chunkingStrategy"
-        },
-        "metadata": {
-          "type": "object",
-          "description": "A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.",
-          "x-nullable": true,
-          "additionalProperties": {
-            "type": "string"
-          }
-        }
-      },
-      "required": [
-        "file_ids",
-        "chunking_strategy"
-      ]
-    },
     "CreateRunOptions": {
       "type": "object",
       "description": "The details used when creating a new run of an agent thread.",
@@ -3985,14 +3902,9 @@
           "x-ms-client-name": "maxCompletionTokens"
         },
         "truncation_strategy": {
-          "type": "object",
+          "$ref": "#/definitions/TruncationObject",
           "description": "The strategy to use for dropping messages as the context windows moves forward.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/TruncationObject"
-            }
-          ],
           "x-ms-client-name": "truncationStrategy"
         },
         "tool_choice": {
@@ -4025,27 +3937,6 @@
         "assistant_id"
       ]
     },
-    "CreateToolResourcesOptions": {
-      "type": "object",
-      "description": "Request object. A set of resources that are used by the agent's tools. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search`\ntool requires a list of vector store IDs.",
-      "properties": {
-        "code_interpreter": {
-          "$ref": "#/definitions/CreateCodeInterpreterToolResourceOptions",
-          "description": "A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files\nassociated with the tool.",
-          "x-ms-client-name": "codeInterpreter"
-        },
-        "file_search": {
-          "$ref": "#/definitions/CreateFileSearchToolResourceOptions",
-          "description": "A list of vector stores or their IDs made available to the `file_search` tool.",
-          "x-ms-client-name": "fileSearch"
-        },
-        "azure_ai_search": {
-          "$ref": "#/definitions/AzureAISearchResource",
-          "description": "Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.",
-          "x-ms-client-name": "azureAISearch"
-        }
-      }
-    },
     "DoneEvent": {
       "type": "string",
       "description": "Terminal event indicating the successful end of a stream.",
@@ -4541,11 +4432,7 @@
           "description": "The name of an index in an IndexResource attached to this agent.",
           "x-ms-client-name": "indexName"
         }
-      },
-      "required": [
-        "index_connection_id",
-        "index_name"
-      ]
+      }
     },
     "ListSortOrder": {
       "type": "string",
@@ -5927,14 +5814,9 @@
           "x-ms-client-name": "stepDetails"
         },
         "last_error": {
-          "type": "object",
+          "$ref": "#/definitions/RunStepError",
           "description": "If applicable, information about the last error encountered by this run step.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunStepError"
-            }
-          ],
           "x-ms-client-name": "lastError"
         },
         "created_at": {
@@ -5972,14 +5854,9 @@
           "x-ms-client-name": "failedAt"
         },
         "usage": {
-          "type": "object",
+          "$ref": "#/definitions/RunStepCompletionUsage",
           "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.",
-          "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunStepCompletionUsage"
-            }
-          ]
+          "x-nullable": true
         },
         "metadata": {
           "type": "object",
@@ -7066,14 +6943,9 @@
           "description": "The status of the message."
         },
         "incomplete_details": {
-          "type": "object",
+          "$ref": "#/definitions/MessageIncompleteDetails",
           "description": "On an incomplete message, details about why the message is incomplete.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/MessageIncompleteDetails"
-            }
-          ],
           "x-ms-client-name": "incompleteDetails"
         },
         "completed_at": {
@@ -7217,25 +7089,15 @@
           "description": "The status of the agent thread run."
         },
         "required_action": {
-          "type": "object",
+          "$ref": "#/definitions/RequiredAction",
           "description": "The details of the action required for the agent thread run to continue.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RequiredAction"
-            }
-          ],
           "x-ms-client-name": "requiredAction"
         },
         "last_error": {
-          "type": "object",
+          "$ref": "#/definitions/RunError",
           "description": "The last error, if any, encountered by this agent thread run.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunError"
-            }
-          ],
           "x-ms-client-name": "lastError"
         },
         "model": {
@@ -7297,25 +7159,15 @@
           "x-ms-client-name": "failedAt"
         },
         "incomplete_details": {
-          "type": "object",
+          "$ref": "#/definitions/IncompleteRunDetails",
           "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/IncompleteRunDetails"
-            }
-          ],
           "x-ms-client-name": "incompleteDetails"
         },
         "usage": {
-          "type": "object",
+          "$ref": "#/definitions/RunCompletionUsage",
           "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).",
-          "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunCompletionUsage"
-            }
-          ]
+          "x-nullable": true
         },
         "temperature": {
           "type": "number",
@@ -7345,14 +7197,9 @@
           "x-ms-client-name": "maxCompletionTokens"
         },
         "truncation_strategy": {
-          "type": "object",
+          "$ref": "#/definitions/TruncationObject",
           "description": "The strategy to use for dropping messages as the context windows moves forward.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/TruncationObject"
-            }
-          ],
           "x-ms-client-name": "truncationStrategy"
         },
         "tool_choice": {
@@ -7376,14 +7223,9 @@
           }
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/UpdateToolResourcesOptions"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "parallel_tool_calls": {
@@ -7511,7 +7353,7 @@
           "x-ms-client-name": "fileSearch"
         },
         "azure_ai_search": {
-          "$ref": "#/definitions/AzureAISearchResource",
+          "$ref": "#/definitions/AzureAISearchToolResource",
           "description": "Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.",
           "x-ms-client-name": "azureAISearch"
         }
@@ -7655,14 +7497,9 @@
       "description": "The details used to update an existing agent thread",
       "properties": {
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\na list of vector store IDs",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "metadata": {
@@ -7675,57 +7512,6 @@
         }
       }
     },
-    "UpdateCodeInterpreterToolResourceOptions": {
-      "type": "object",
-      "description": "Request object to update `code_interpreted` tool resources.",
-      "properties": {
-        "file_ids": {
-          "type": "array",
-          "description": "A list of file IDs to override the current list of the agent.",
-          "maxItems": 20,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "fileIds"
-        }
-      }
-    },
-    "UpdateFileSearchToolResourceOptions": {
-      "type": "object",
-      "description": "Request object to update `file_search` tool resources.",
-      "properties": {
-        "vector_store_ids": {
-          "type": "array",
-          "description": "A list of vector store IDs to override the current list of the agent.",
-          "maxItems": 1,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "vectorStoreIds"
-        }
-      }
-    },
-    "UpdateToolResourcesOptions": {
-      "type": "object",
-      "description": "Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool.\nFor example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of\nvector store IDs.",
-      "properties": {
-        "code_interpreter": {
-          "$ref": "#/definitions/UpdateCodeInterpreterToolResourceOptions",
-          "description": "Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files\nassociated with the tool.",
-          "x-ms-client-name": "codeInterpreter"
-        },
-        "file_search": {
-          "$ref": "#/definitions/UpdateFileSearchToolResourceOptions",
-          "description": "Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.",
-          "x-ms-client-name": "fileSearch"
-        },
-        "azure_ai_search": {
-          "$ref": "#/definitions/AzureAISearchResource",
-          "description": "Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names.",
-          "x-ms-client-name": "azureAISearch"
-        }
-      }
-    },
     "VectorStore": {
       "type": "object",
       "description": "A vector store is a collection of processed files can be used by the `file_search` tool.",
@@ -8091,14 +7877,9 @@
           "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use."
         },
         "last_error": {
-          "type": "object",
+          "$ref": "#/definitions/VectorStoreFileError",
           "description": "The last error associated with this vector store file. Will be `null` if there are no errors.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/VectorStoreFileError"
-            }
-          ],
           "x-ms-client-name": "lastError"
         },
         "chunking_strategy": {
@@ -8534,14 +8315,9 @@
           "x-nullable": true
         },
         "expires_after": {
-          "type": "object",
+          "$ref": "#/definitions/VectorStoreExpirationPolicy",
           "description": "Details on when this vector store expires",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/VectorStoreExpirationPolicy"
-            }
-          ],
           "x-ms-client-name": "expiresAfter"
         },
         "metadata": {
diff --git a/specification/ai/data-plane/Azure.AI.Agents/stable/v1/azure-ai-agents.json b/specification/ai/data-plane/Azure.AI.Agents/stable/v1/azure-ai-agents.json
index 84b629f14fc2..63d7903cd1aa 100644
--- a/specification/ai/data-plane/Azure.AI.Agents/stable/v1/azure-ai-agents.json
+++ b/specification/ai/data-plane/Azure.AI.Agents/stable/v1/azure-ai-agents.json
@@ -2764,11 +2764,7 @@
           "description": "Index asset id for search resource.",
           "x-ms-client-name": "indexAssetId"
         }
-      },
-      "required": [
-        "index_connection_id",
-        "index_name"
-      ]
+      }
     },
     "Agent": {
       "type": "object",
@@ -2823,14 +2819,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter`\ntool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "temperature": {
@@ -3094,14 +3085,9 @@
           "x-ms-client-name": "createdAt"
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type\nof tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list\nof vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "metadata": {
@@ -3134,14 +3120,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\na list of vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "metadata": {
@@ -3342,7 +3323,17 @@
         ]
       }
     },
-    "AzureAISearchResource": {
+    "AzureAISearchToolDefinition": {
+      "type": "object",
+      "description": "The input definition information for an Azure AI search tool as used to configure an agent.",
+      "allOf": [
+        {
+          "$ref": "#/definitions/ToolDefinition"
+        }
+      ],
+      "x-ms-discriminator-value": "azure_ai_search"
+    },
+    "AzureAISearchToolResource": {
       "type": "object",
       "description": "A set of index resources used by the `azure_ai_search` tool.",
       "properties": {
@@ -3358,16 +3349,6 @@
         }
       }
     },
-    "AzureAISearchToolDefinition": {
-      "type": "object",
-      "description": "The input definition information for an Azure AI search tool as used to configure an agent.",
-      "allOf": [
-        {
-          "$ref": "#/definitions/ToolDefinition"
-        }
-      ],
-      "x-ms-discriminator-value": "azure_ai_search"
-    },
     "AzureFunctionBinding": {
       "type": "object",
       "description": "The structure for keeping storage queue name and URI.",
@@ -3697,14 +3678,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter`\ntool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "temperature": {
@@ -3774,14 +3750,9 @@
           "x-ms-identifiers": []
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/UpdateToolResourcesOptions"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "stream": {
@@ -3818,14 +3789,9 @@
           "x-ms-client-name": "maxCompletionTokens"
         },
         "truncation_strategy": {
-          "type": "object",
+          "$ref": "#/definitions/TruncationObject",
           "description": "The strategy to use for dropping messages as the context windows moves forward.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/TruncationObject"
-            }
-          ],
           "x-ms-client-name": "truncationStrategy"
         },
         "tool_choice": {
@@ -3858,55 +3824,6 @@
         "assistant_id"
       ]
     },
-    "CreateCodeInterpreterToolResourceOptions": {
-      "type": "object",
-      "description": "A set of resources that will be used by the `code_interpreter` tool. Request object.",
-      "properties": {
-        "file_ids": {
-          "type": "array",
-          "description": "A list of file IDs made available to the `code_interpreter` tool.",
-          "default": [],
-          "maxItems": 20,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "fileIds"
-        }
-      }
-    },
-    "CreateFileSearchToolResourceOptions": {},
-    "CreateFileSearchToolResourceVectorStoreOptions": {
-      "type": "object",
-      "description": "File IDs associated to the vector store to be passed to the helper.",
-      "properties": {
-        "file_ids": {
-          "type": "array",
-          "description": "A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.",
-          "maxItems": 10000,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "fileIds"
-        },
-        "chunking_strategy": {
-          "$ref": "#/definitions/VectorStoreChunkingStrategyRequest",
-          "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.",
-          "x-ms-client-name": "chunkingStrategy"
-        },
-        "metadata": {
-          "type": "object",
-          "description": "A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.",
-          "x-nullable": true,
-          "additionalProperties": {
-            "type": "string"
-          }
-        }
-      },
-      "required": [
-        "file_ids",
-        "chunking_strategy"
-      ]
-    },
     "CreateRunOptions": {
       "type": "object",
       "description": "The details used when creating a new run of an agent thread.",
@@ -3985,14 +3902,9 @@
           "x-ms-client-name": "maxCompletionTokens"
         },
         "truncation_strategy": {
-          "type": "object",
+          "$ref": "#/definitions/TruncationObject",
           "description": "The strategy to use for dropping messages as the context windows moves forward.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/TruncationObject"
-            }
-          ],
           "x-ms-client-name": "truncationStrategy"
         },
         "tool_choice": {
@@ -4025,27 +3937,6 @@
         "assistant_id"
       ]
     },
-    "CreateToolResourcesOptions": {
-      "type": "object",
-      "description": "Request object. A set of resources that are used by the agent's tools. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search`\ntool requires a list of vector store IDs.",
-      "properties": {
-        "code_interpreter": {
-          "$ref": "#/definitions/CreateCodeInterpreterToolResourceOptions",
-          "description": "A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files\nassociated with the tool.",
-          "x-ms-client-name": "codeInterpreter"
-        },
-        "file_search": {
-          "$ref": "#/definitions/CreateFileSearchToolResourceOptions",
-          "description": "A list of vector stores or their IDs made available to the `file_search` tool.",
-          "x-ms-client-name": "fileSearch"
-        },
-        "azure_ai_search": {
-          "$ref": "#/definitions/AzureAISearchResource",
-          "description": "Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.",
-          "x-ms-client-name": "azureAISearch"
-        }
-      }
-    },
     "DoneEvent": {
       "type": "string",
       "description": "Terminal event indicating the successful end of a stream.",
@@ -4541,11 +4432,7 @@
           "description": "The name of an index in an IndexResource attached to this agent.",
           "x-ms-client-name": "indexName"
         }
-      },
-      "required": [
-        "index_connection_id",
-        "index_name"
-      ]
+      }
     },
     "ListSortOrder": {
       "type": "string",
@@ -5927,14 +5814,9 @@
           "x-ms-client-name": "stepDetails"
         },
         "last_error": {
-          "type": "object",
+          "$ref": "#/definitions/RunStepError",
           "description": "If applicable, information about the last error encountered by this run step.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunStepError"
-            }
-          ],
           "x-ms-client-name": "lastError"
         },
         "created_at": {
@@ -5972,14 +5854,9 @@
           "x-ms-client-name": "failedAt"
         },
         "usage": {
-          "type": "object",
+          "$ref": "#/definitions/RunStepCompletionUsage",
           "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.",
-          "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunStepCompletionUsage"
-            }
-          ]
+          "x-nullable": true
         },
         "metadata": {
           "type": "object",
@@ -7066,14 +6943,9 @@
           "description": "The status of the message."
         },
         "incomplete_details": {
-          "type": "object",
+          "$ref": "#/definitions/MessageIncompleteDetails",
           "description": "On an incomplete message, details about why the message is incomplete.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/MessageIncompleteDetails"
-            }
-          ],
           "x-ms-client-name": "incompleteDetails"
         },
         "completed_at": {
@@ -7217,25 +7089,15 @@
           "description": "The status of the agent thread run."
         },
         "required_action": {
-          "type": "object",
+          "$ref": "#/definitions/RequiredAction",
           "description": "The details of the action required for the agent thread run to continue.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RequiredAction"
-            }
-          ],
           "x-ms-client-name": "requiredAction"
         },
         "last_error": {
-          "type": "object",
+          "$ref": "#/definitions/RunError",
           "description": "The last error, if any, encountered by this agent thread run.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunError"
-            }
-          ],
           "x-ms-client-name": "lastError"
         },
         "model": {
@@ -7297,25 +7159,15 @@
           "x-ms-client-name": "failedAt"
         },
         "incomplete_details": {
-          "type": "object",
+          "$ref": "#/definitions/IncompleteRunDetails",
           "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/IncompleteRunDetails"
-            }
-          ],
           "x-ms-client-name": "incompleteDetails"
         },
         "usage": {
-          "type": "object",
+          "$ref": "#/definitions/RunCompletionUsage",
           "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).",
-          "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/RunCompletionUsage"
-            }
-          ]
+          "x-nullable": true
         },
         "temperature": {
           "type": "number",
@@ -7345,14 +7197,9 @@
           "x-ms-client-name": "maxCompletionTokens"
         },
         "truncation_strategy": {
-          "type": "object",
+          "$ref": "#/definitions/TruncationObject",
           "description": "The strategy to use for dropping messages as the context windows moves forward.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/TruncationObject"
-            }
-          ],
           "x-ms-client-name": "truncationStrategy"
         },
         "tool_choice": {
@@ -7376,14 +7223,9 @@
           }
         },
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/UpdateToolResourcesOptions"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "parallel_tool_calls": {
@@ -7511,7 +7353,7 @@
           "x-ms-client-name": "fileSearch"
         },
         "azure_ai_search": {
-          "$ref": "#/definitions/AzureAISearchResource",
+          "$ref": "#/definitions/AzureAISearchToolResource",
           "description": "Resources to be used by the `azure_ai_search` tool consisting of index IDs and names.",
           "x-ms-client-name": "azureAISearch"
         }
@@ -7655,14 +7497,9 @@
       "description": "The details used to update an existing agent thread",
       "properties": {
         "tool_resources": {
-          "type": "object",
+          "$ref": "#/definitions/ToolResources",
           "description": "A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\ntype of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\na list of vector store IDs",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/ToolResources"
-            }
-          ],
           "x-ms-client-name": "toolResources"
         },
         "metadata": {
@@ -7675,57 +7512,6 @@
         }
       }
     },
-    "UpdateCodeInterpreterToolResourceOptions": {
-      "type": "object",
-      "description": "Request object to update `code_interpreted` tool resources.",
-      "properties": {
-        "file_ids": {
-          "type": "array",
-          "description": "A list of file IDs to override the current list of the agent.",
-          "maxItems": 20,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "fileIds"
-        }
-      }
-    },
-    "UpdateFileSearchToolResourceOptions": {
-      "type": "object",
-      "description": "Request object to update `file_search` tool resources.",
-      "properties": {
-        "vector_store_ids": {
-          "type": "array",
-          "description": "A list of vector store IDs to override the current list of the agent.",
-          "maxItems": 1,
-          "items": {
-            "type": "string"
-          },
-          "x-ms-client-name": "vectorStoreIds"
-        }
-      }
-    },
-    "UpdateToolResourcesOptions": {
-      "type": "object",
-      "description": "Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool.\nFor example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of\nvector store IDs.",
-      "properties": {
-        "code_interpreter": {
-          "$ref": "#/definitions/UpdateCodeInterpreterToolResourceOptions",
-          "description": "Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files\nassociated with the tool.",
-          "x-ms-client-name": "codeInterpreter"
-        },
-        "file_search": {
-          "$ref": "#/definitions/UpdateFileSearchToolResourceOptions",
-          "description": "Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.",
-          "x-ms-client-name": "fileSearch"
-        },
-        "azure_ai_search": {
-          "$ref": "#/definitions/AzureAISearchResource",
-          "description": "Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names.",
-          "x-ms-client-name": "azureAISearch"
-        }
-      }
-    },
     "VectorStore": {
       "type": "object",
       "description": "A vector store is a collection of processed files can be used by the `file_search` tool.",
@@ -8091,14 +7877,9 @@
           "description": "The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use."
         },
         "last_error": {
-          "type": "object",
+          "$ref": "#/definitions/VectorStoreFileError",
           "description": "The last error associated with this vector store file. Will be `null` if there are no errors.",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/VectorStoreFileError"
-            }
-          ],
           "x-ms-client-name": "lastError"
         },
         "chunking_strategy": {
@@ -8534,14 +8315,9 @@
           "x-nullable": true
         },
         "expires_after": {
-          "type": "object",
+          "$ref": "#/definitions/VectorStoreExpirationPolicy",
           "description": "Details on when this vector store expires",
           "x-nullable": true,
-          "allOf": [
-            {
-              "$ref": "#/definitions/VectorStoreExpirationPolicy"
-            }
-          ],
           "x-ms-client-name": "expiresAfter"
         },
         "metadata": {


Reviews:
user: login: dargilco
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-13T03:12:17Z
user: login: jhakulin
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-13T06:40:18Z
user: login: jhakulin
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-13T15:11:36Z
user: login: glharper
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-13T15:30:51Z
user: login: sarah-widder
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-13T15:33:35Z
user: login: jhakulin
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-13T15:35:57Z
user: login: ninghu
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-13T16:18:17Z

Review comments:
diff_hunk: @@ -129,137 +129,6 @@ model AISearchIndexResource {
    *  filter string for search resource.
    */
   filter?: string;
-
-  // TODO: Jose: Change to union type
-  /**
-   * Index asset id for search resource.
-   */
-  @encodedName("application/json", "index_asset_id")
-  indexAssetId?: string;
path: specification/ai/Azure.AI.Agents/tools/tool_resources.tsp
user: login: jhakulin
body: Is this not needed?
created_at: 2025-05-13T06:40:18Z
author_association: NONE
diff_hunk: @@ -129,137 +129,6 @@ model AISearchIndexResource {
    *  filter string for search resource.
    */
   filter?: string;
-
-  // TODO: Jose: Change to union type
-  /**
-   * Index asset id for search resource.
-   */
-  @encodedName("application/json", "index_asset_id")
-  indexAssetId?: string;
path: specification/ai/Azure.AI.Agents/tools/tool_resources.tsp
user: login: jhakulin
body: @glharper please check this also
created_at: 2025-05-13T15:11:35Z
author_association: NONE
diff_hunk: @@ -129,137 +129,6 @@ model AISearchIndexResource {
    *  filter string for search resource.
    */
   filter?: string;
-
-  // TODO: Jose: Change to union type
-  /**
-   * Index asset id for search resource.
-   */
-  @encodedName("application/json", "index_asset_id")
-  indexAssetId?: string;
path: specification/ai/Azure.AI.Agents/tools/tool_resources.tsp
user: login: glharper
body: Attn @sarah-widder , AFAIK indexAssetId should not be removed.
created_at: 2025-05-13T15:30:51Z
author_association: MEMBER
diff_hunk: @@ -129,137 +129,6 @@ model AISearchIndexResource {
    *  filter string for search resource.
    */
   filter?: string;
-
-  // TODO: Jose: Change to union type
-  /**
-   * Index asset id for search resource.
-   */
-  @encodedName("application/json", "index_asset_id")
-  indexAssetId?: string;
path: specification/ai/Azure.AI.Agents/tools/tool_resources.tsp
user: login: sarah-widder
body: @jhakulin @glharper Correct, indexAssetId should be kept. The API will accept either (index name + index connection id) OR index asset ID. 
created_at: 2025-05-13T15:33:34Z
author_association: NONE
diff_hunk: @@ -129,137 +129,6 @@ model AISearchIndexResource {
    *  filter string for search resource.
    */
   filter?: string;
-
-  // TODO: Jose: Change to union type
-  /**
-   * Index asset id for search resource.
-   */
-  @encodedName("application/json", "index_asset_id")
-  indexAssetId?: string;
path: specification/ai/Azure.AI.Agents/tools/tool_resources.tsp
user: login: jhakulin
body: Thanks for confirming, @ninghu we need to add this back
created_at: 2025-05-13T15:35:57Z
author_association: NONE
diff_hunk: @@ -129,137 +129,6 @@ model AISearchIndexResource {
    *  filter string for search resource.
    */
   filter?: string;
-
-  // TODO: Jose: Change to union type
-  /**
-   * Index asset id for search resource.
-   */
-  @encodedName("application/json", "index_asset_id")
-  indexAssetId?: string;
path: specification/ai/Azure.AI.Agents/tools/tool_resources.tsp
user: login: ninghu
body: from AK: 

remove it from this (because this typespec model has 3 params)
fast follow with a new model that has only asset id
include a union[connection, asset] as the config on the tool
created_at: 2025-05-13T16:18:17Z
author_association: CONTRIBUTOR

PR comments:
user: login: openapi-pipeline-app[bot]
created_at: 2025-05-13T03:02:08Z
body: <h2>Next Steps to Merge</h2>✅ All automated merging requirements have been met! To get your PR merged, see <a href="https://aka.ms/azsdk/specreview/merge">aka.ms/azsdk/specreview/merge</a>.
author_association: NONE
user: login: openapi-pipeline-app[bot]
created_at: 2025-05-13T03:02:09Z
body: PR validation pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-05-13T03:05:45Z
body: ## API Change Check

APIView identified API level changes in this PR and created the following API reviews

| Language | API Review for Package |
|----------|---------|
| TypeSpec | [Azure.AI.Agents](https://spa.apiview.dev/review/39329cab443c4577b8f74289dadaf9dc?activeApiRevisionId=4a4893858ec54f92b1b04180ca0bdca7) |
<!-- Fetch URI: https://apiview.dev/api/pullrequests?pullRequestNumber=34627&repoName=Azure/azure-rest-api-specs&commitSHA=f70f1e5c06aec598e0f03a49e9203bfd9bb5cec5 -->
author_association: NONE