diff --git a/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.json b/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.json index 3fa3fc7112b3..ff7cf40bb8bb 100644 --- a/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.json +++ b/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.json @@ -221,8 +221,8 @@ "/agent_optimization_jobs": { "post": { "operationId": "AgentOptimizationJobs_create", - "summary": "Create an agent optimization job", - "description": "Creates an agent optimization job and returns the queued job.\nHonors `Operation-Id` for idempotent retry.", + "summary": "Creates an agent optimization job.", + "description": "Create an optimization job. Returns 201 with the queued job. Honours `Operation-Id` for idempotent retry.", "parameters": [ { "name": "Foundry-Features", @@ -232,7 +232,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -312,22 +312,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OptimizationJobInputs" + "$ref": "#/components/schemas/OptimizationJob" } } }, - "description": "The optimization job inputs." + "description": "The job to create." }, "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, "get": { "operationId": "AgentOptimizationJobs_list", - "summary": "List agent optimization jobs", - "description": "Returns agent optimization jobs with cursor pagination and optional lifecycle or agent filters.", + "summary": "Returns a list of agent optimization jobs.", + "description": "List optimization jobs. Supports cursor pagination and optional status / agent_name filters.", "parameters": [ { "name": "Foundry-Features", @@ -337,7 +337,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -429,7 +429,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/OptimizationJob" + "$ref": "#/components/schemas/OptimizationJobListItem" }, "description": "The requested list of items." }, @@ -477,7 +477,7 @@ ], "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } } @@ -485,8 +485,8 @@ "/agent_optimization_jobs/{jobId}": { "get": { "operationId": "AgentOptimizationJobs_get", - "summary": "Get an agent optimization job", - "description": "Retrieves the specified agent optimization job.\nReturns 202 while the job is in progress and 200 after it reaches a terminal state.", + "summary": "Get info about an agent optimization job.", + "description": "Get an optimization job by id.", "parameters": [ { "name": "Foundry-Features", @@ -496,7 +496,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -526,25 +526,7 @@ "headers": { "Retry-After": { "required": false, - "schema": { - "type": "integer", - "format": "int32" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OptimizationJob" - } - } - } - }, - "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", - "headers": { - "Retry-After": { - "required": false, + "description": "Recommended number of seconds to wait before polling again.", "schema": { "type": "integer", "format": "int32" @@ -585,14 +567,14 @@ ], "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, "delete": { "operationId": "AgentOptimizationJobs_delete", - "summary": "Delete an agent optimization job", - "description": "Deletes the specified agent optimization job and its candidate artifacts.\nCancels the job first when it is still in a non-terminal state.", + "summary": "Deletes an agent optimization job.", + "description": "Delete the job and its candidate artifacts. Cancels first if non-terminal.", "parameters": [ { "name": "Foundry-Features", @@ -602,7 +584,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -615,16 +597,6 @@ "type": "string" } }, - { - "name": "force", - "in": "query", - "required": false, - "description": "When true, force-delete even if the job is in a non-terminal state.", - "schema": { - "type": "boolean" - }, - "explode": false - }, { "name": "api-version", "in": "query", @@ -666,16 +638,16 @@ ], "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } } }, - "/agent_optimization_jobs/{jobId}/candidates": { - "get": { - "operationId": "AgentOptimizationJobs_listCandidates", - "summary": "List optimization job candidates", - "description": "Returns the candidates produced by the specified optimization job.", + "/agent_optimization_jobs/{jobId}:cancel": { + "post": { + "operationId": "AgentOptimizationJobs_cancel", + "summary": "Cancels an agent optimization job.", + "description": "Request cancellation of a running or queued job. Returns an error if the job is already in a terminal state.", "parameters": [ { "name": "Foundry-Features", @@ -685,7 +657,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -693,53 +665,11 @@ "name": "jobId", "in": "path", "required": true, - "description": "The optimization job id.", + "description": "The ID of the job to cancel.", "schema": { "type": "string" } }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false - }, - { - "name": "order", - "in": "query", - "required": false, - "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "schema": { - "$ref": "#/components/schemas/PageOrder" - }, - "explode": false - }, - { - "name": "after", - "in": "query", - "required": false, - "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "before", - "in": "query", - "required": false, - "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "schema": { - "type": "string" - }, - "explode": false - }, { "name": "api-version", "in": "query", @@ -757,33 +687,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "data", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationCandidate" - }, - "description": "The requested list of items." - }, - "first_id": { - "type": "string", - "description": "The first ID represented in this list." - }, - "last_id": { - "type": "string", - "description": "The last ID represented in this list." - }, - "has_more": { - "type": "boolean", - "description": "A value indicating whether there are additional values available not captured in this list." - } - }, - "description": "The response data for a requested list of items." + "$ref": "#/components/schemas/OptimizationJob" } } } @@ -814,16 +718,14 @@ ], "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } } }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}": { - "get": { - "operationId": "AgentOptimizationJobs_getCandidate", - "summary": "Get an optimization candidate", - "description": "Retrieves metadata, manifest information, and promotion details for the specified candidate.", + "/agents": { + "post": { + "operationId": "Agents_createAgent_Agents_createAgentFromCode", "parameters": [ { "name": "Foundry-Features", @@ -831,48 +733,48 @@ "required": false, "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] + "$ref": "#/components/schemas/AgentDefinitionOptInKeys" } }, { - "name": "jobId", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The optimization job id.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false }, { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id.", + "name": "x-ms-agent-name", + "in": "header", + "required": false, + "description": "The unique name that identifies the agent. Max 63 chars, must start and end with alphanumeric, hyphens allowed in the middle.", "schema": { - "type": "string" + "type": "string", + "maxLength": 63 } }, { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "name": "x-ms-code-zip-sha256", + "in": "header", + "required": false, + "description": "SHA-256 hex digest of the uploaded code zip. Used for change detection (dedup) and integrity verification.", "schema": { "type": "string" - }, - "explode": false + } } ], + "description": "Creates a new agent or a new version of an existing agent. Creates a new code-based agent. Uploads the code zip and creates the agent in a single call.\nThe agent name is provided in the `x-ms-agent-name` header since POST /agents has no name in the URL path.\nThe SHA-256 hex digest of the zip is provided in the `x-ms-code-zip-sha256` header for integrity and dedup.\nThe request body is multipart/form-data with a JSON metadata part and a binary code part (part order is irrelevant).\nMaximum upload size is 250 MB.", + "summary": "Create an agent Create a new code-based agent", "responses": { "200": { "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CandidateMetadata" + "$ref": "#/components/schemas/AgentObject" } } } @@ -898,51 +800,93 @@ } } }, - "tags": [ - "AgentOptimizationJobs" - ], + "x-ms-description-override": "Creates a new agent or a new version of an existing agent.", + "x-ms-summary-override": "Create an agent", "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" + "required_previews": [ + "CodeAgents=V1Preview" ] + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateAgentFromCodeContent" + }, + "encoding": { + "metadata": { + "contentType": "application/json" + } + } + } + } } - } - }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/config": { + }, "get": { - "operationId": "AgentOptimizationJobs_getCandidateConfig", - "summary": "Get an optimization candidate config", - "description": "Retrieves the deploy configuration JSON for the specified candidate.\nClients can use it to compose `agents.create_version(...)` requests.", + "operationId": "Agents_listAgents", + "summary": "List agents", + "description": "Returns a paged collection of agent resources.", "parameters": [ { - "name": "Foundry-Features", - "in": "header", + "name": "kind", + "in": "query", "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "description": "Filter agents by kind. If not provided, all agents are returned.", "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } + "$ref": "#/components/schemas/AgentKind" + }, + "explode": false }, { - "name": "jobId", - "in": "path", - "required": true, - "description": "The optimization job id.", + "name": "limit", + "in": "query", + "required": false, + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + }, + "explode": false + }, + { + "name": "order", + "in": "query", + "required": false, + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "schema": { + "$ref": "#/components/schemas/PageOrder" + }, + "explode": false + }, + { + "name": "after", + "in": "query", + "required": false, + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "schema": { "type": "string" - } + }, + "explode": false }, { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id.", + "name": "before", + "in": "query", + "required": false, + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "schema": { "type": "string" - } + }, + "explode": false }, { "name": "api-version", @@ -961,619 +905,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CandidateDeployConfig" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/files": { - "get": { - "operationId": "AgentOptimizationJobs_getCandidateFile", - "summary": "Get an optimization candidate file", - "description": "Streams the specified file from the candidate's blob directory.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The optimization job id.", - "schema": { - "type": "string" - } - }, - { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id.", - "schema": { - "type": "string" - } - }, - { - "name": "path", - "in": "query", - "required": true, - "description": "Relative path of the file to download (e.g. 'files/examples.jsonl').", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/octet-stream": { - "schema": { - "contentMediaType": "application/octet-stream" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/results": { - "get": { - "operationId": "AgentOptimizationJobs_getCandidateResults", - "summary": "Get optimization candidate results", - "description": "Retrieves full per-task evaluation results for the specified candidate.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The optimization job id.", - "schema": { - "type": "string" - } - }, - { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id.", - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CandidateResults" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote": { - "post": { - "operationId": "AgentOptimizationJobs_promoteCandidate", - "summary": "Promote an optimization candidate", - "description": "Promotes the specified candidate and records the deployment timestamp and target agent version.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The optimization job id.", - "schema": { - "type": "string" - } - }, - { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id to promote.", - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PromoteCandidateResponse" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PromoteCandidateRequest" - } - } - }, - "description": "Promotion details." - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}:cancel": { - "post": { - "operationId": "AgentOptimizationJobs_cancel", - "summary": "Cancel an agent optimization job", - "description": "Requests cancellation of the specified agent optimization job.\nThe operation remains idempotent after the job reaches a terminal state.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The ID of the job to cancel.", - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OptimizationJob" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agents": { - "post": { - "operationId": "Agents_createAgent_Agents_createAgentFromCode", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "$ref": "#/components/schemas/AgentDefinitionOptInKeys" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "x-ms-agent-name", - "in": "header", - "required": false, - "description": "The unique name that identifies the agent. Max 63 chars, must start and end with alphanumeric, hyphens allowed in the middle.", - "schema": { - "type": "string", - "maxLength": 63 - } - }, - { - "name": "x-ms-code-zip-sha256", - "in": "header", - "required": false, - "description": "SHA-256 hex digest of the uploaded code zip. Used for change detection (dedup) and integrity verification.", - "schema": { - "type": "string" - } - } - ], - "description": "Creates a new agent or a new version of an existing agent. Creates a new code-based agent. Uploads the code zip and creates the agent in a single call.\nThe agent name is provided in the `x-ms-agent-name` header since POST /agents has no name in the URL path.\nThe SHA-256 hex digest of the zip is provided in the `x-ms-code-zip-sha256` header for integrity and dedup.\nThe request body is multipart/form-data with a JSON metadata part and a binary code part (part order is irrelevant).\nMaximum upload size is 250 MB.", - "summary": "Create an agent Create a new code-based agent", - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentObject" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "x-ms-description-override": "Creates a new agent or a new version of an existing agent.", - "x-ms-summary-override": "Create an agent", - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentRequest" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/CreateAgentFromCodeContent" - }, - "encoding": { - "metadata": { - "contentType": "application/json" - } - } - } - } - } - }, - "get": { - "operationId": "Agents_listAgents", - "summary": "List agents", - "description": "Returns a paged collection of agent resources.", - "parameters": [ - { - "name": "kind", - "in": "query", - "required": false, - "description": "Filter agents by kind. If not provided, all agents are returned.", - "schema": { - "$ref": "#/components/schemas/AgentKind" - }, - "explode": false - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false - }, - { - "name": "order", - "in": "query", - "required": false, - "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "schema": { - "$ref": "#/components/schemas/PageOrder" - }, - "explode": false - }, - { - "name": "after", - "in": "query", - "required": false, - "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "before", - "in": "query", - "required": false, - "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentObject" - }, - "description": "The requested list of items." - }, - "first_id": { - "type": "string", - "description": "The first ID represented in this list." - }, - "last_id": { - "type": "string", - "description": "The last ID represented in this list." - }, - "has_more": { - "type": "boolean", - "description": "A value indicating whether there are additional values available not captured in this list." - } - }, - "description": "The response data for a requested list of items." + "type": "object", + "required": [ + "data", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentObject" + }, + "description": "The requested list of items." + }, + "first_id": { + "type": "string", + "description": "The first ID represented in this list." + }, + "last_id": { + "type": "string", + "description": "The last ID represented in this list." + }, + "has_more": { + "type": "boolean", + "description": "A value indicating whether there are additional values available not captured in this list." + } + }, + "description": "The response data for a requested list of items." } } } @@ -18519,23 +17877,6 @@ ], "description": "A trace source that selects traces by agent reference with time-based filtering." }, - "AgentIdentifier": { - "type": "object", - "required": [ - "agent_name" - ], - "properties": { - "agent_name": { - "type": "string", - "description": "Registered Foundry agent name (required)." - }, - "agent_version": { - "type": "string", - "description": "Pinned agent version. Defaults to latest if omitted." - } - }, - "description": "Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and system_prompt are specified in options.optimization_config." - }, "AgentIdentity": { "type": "object", "required": [ @@ -20757,211 +20098,9 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A Bing grounding tool call." - }, - "BingGroundingToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "bing_grounding_call_output" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "output": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallOutputContent" - } - ], - "description": "The output from the Bing grounding tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallStatus" - } - ], - "description": "The status of the tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of a Bing grounding tool call." - }, - "BlobReference": { - "type": "object", - "required": [ - "blobUri", - "storageAccountArmId", - "credential" - ], - "properties": { - "blobUri": { - "type": "string", - "format": "uri", - "description": "Blob URI path for client to upload data. Example: `https://blob.windows.core.net/Container/Path`" - }, - "storageAccountArmId": { - "type": "string", - "description": "ARM ID of the storage account to use." - }, - "credential": { - "allOf": [ - { - "$ref": "#/components/schemas/SasCredential" - } - ], - "description": "Credential info to access the storage account." - } - }, - "description": "Blob reference details." - }, - "BotServiceAuthorizationScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "BotService" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "BotServiceRbacAuthorizationScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "BotServiceRbac" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "BrowserAutomationPreviewTool": { - "type": "object", - "required": [ - "type", - "browser_automation_preview" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "browser_automation_preview" - ], - "description": "The object type, which is always 'browser_automation_preview'." - }, - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." - }, - "description": { - "type": "string", - "description": "Optional user-defined description for this tool or configuration." - }, - "tool_configs": { - "type": "object", - "unevaluatedProperties": { - "$ref": "#/components/schemas/ToolConfig" - }, - "description": "Per-tool configuration map. Keys are tool names or `*` (catch-all default).\nResolution order: exact tool name match takes priority over `*`.\nUnknown tool names are silently ignored at runtime." - }, - "browser_automation_preview": { - "allOf": [ - { - "$ref": "#/components/schemas/BrowserAutomationToolParameters" - } - ], - "description": "The Browser Automation Tool parameters." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for a Browser Automation Tool, as used to configure an Agent." - }, - "BrowserAutomationToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "browser_automation_preview_call" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the tool." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallStatus" - } - ], - "description": "The status of the tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A browser automation tool call." + "description": "A Bing grounding tool call." }, - "BrowserAutomationToolCallOutput": { + "BingGroundingToolCallOutput": { "type": "object", "required": [ "type", @@ -20972,7 +20111,7 @@ "type": { "type": "string", "enum": [ - "browser_automation_preview_call_output" + "bing_grounding_call_output" ] }, "call_id": { @@ -20985,7 +20124,7 @@ "$ref": "#/components/schemas/ToolCallOutputContent" } ], - "description": "The output from the browser automation tool call." + "description": "The output from the Bing grounding tool call." }, "status": { "allOf": [ @@ -21001,191 +20140,239 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "The output of a browser automation tool call." + "description": "The output of a Bing grounding tool call." }, - "BrowserAutomationToolConnectionParameters": { + "BlobReference": { "type": "object", "required": [ - "project_connection_id" + "blobUri", + "storageAccountArmId", + "credential" ], "properties": { - "project_connection_id": { + "blobUri": { "type": "string", - "description": "The ID of the project connection to your Azure Playwright resource." + "format": "uri", + "description": "Blob URI path for client to upload data. Example: `https://blob.windows.core.net/Container/Path`" + }, + "storageAccountArmId": { + "type": "string", + "description": "ARM ID of the storage account to use." + }, + "credential": { + "allOf": [ + { + "$ref": "#/components/schemas/SasCredential" + } + ], + "description": "Credential info to access the storage account." } }, - "description": "Definition of input parameters for the connection used by the Browser Automation Tool." + "description": "Blob reference details." }, - "BrowserAutomationToolParameters": { + "BotServiceAuthorizationScheme": { "type": "object", "required": [ - "connection" + "type" ], "properties": { - "connection": { - "allOf": [ - { - "$ref": "#/components/schemas/BrowserAutomationToolConnectionParameters" - } - ], - "description": "The project connection parameters associated with the Browser Automation Tool." + "type": { + "type": "string", + "enum": [ + "BotService" + ] } }, - "description": "Definition of input parameters for the Browser Automation Tool." + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } }, - "CandidateDeployConfig": { + "BotServiceRbacAuthorizationScheme": { "type": "object", + "required": [ + "type" + ], "properties": { - "instructions": { - "type": "string", - "description": "System prompt / instructions." - }, - "model": { + "type": { "type": "string", - "description": "Foundry deployment name." - }, - "temperature": { - "type": "number", - "format": "float", - "minimum": 0, - "maximum": 2, - "description": "Optional sampling temperature." - }, - "skills": { - "type": "array", - "items": { - "type": "object", - "unevaluatedProperties": {} - }, - "description": "Optional skill overrides." - }, - "tools": { - "type": "array", - "items": { - "type": "object", - "unevaluatedProperties": {} - }, - "description": "Optional tool overrides." + "enum": [ + "BotServiceRbac" + ] } }, - "description": "Deploy-config blob for a candidate. Suitable for setting OPTIMIZATION_CONFIG on a hosted-agent version." + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } }, - "CandidateFileInfo": { + "BrowserAutomationPreviewTool": { "type": "object", "required": [ - "path", "type", - "size_bytes" + "browser_automation_preview" ], "properties": { - "path": { + "type": { "type": "string", - "description": "Relative path of the file." + "enum": [ + "browser_automation_preview" + ], + "description": "The object type, which is always 'browser_automation_preview'." }, - "type": { + "name": { "type": "string", - "description": "File type category (e.g. 'config', 'results')." + "description": "Optional user-defined name for this tool or configuration." }, - "size_bytes": { - "type": "integer", - "format": "int64", - "description": "File size in bytes." + "description": { + "type": "string", + "description": "Optional user-defined description for this tool or configuration." + }, + "tool_configs": { + "type": "object", + "unevaluatedProperties": { + "$ref": "#/components/schemas/ToolConfig" + }, + "description": "Per-tool configuration map. Keys are tool names or `*` (catch-all default).\nResolution order: exact tool name match takes priority over `*`.\nUnknown tool names are silently ignored at runtime." + }, + "browser_automation_preview": { + "allOf": [ + { + "$ref": "#/components/schemas/BrowserAutomationToolParameters" + } + ], + "description": "The Browser Automation Tool parameters." } }, - "description": "File entry in a candidate's blob directory." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "The input definition information for a Browser Automation Tool, as used to configure an Agent." }, - "CandidateMetadata": { + "BrowserAutomationToolCall": { "type": "object", "required": [ - "candidate_id", - "job_id", - "candidate_name", - "status", - "has_results", - "created_at", - "updated_at", - "files" + "type", + "call_id", + "arguments", + "status" ], "properties": { - "candidate_id": { + "type": { "type": "string", - "description": "Server-assigned candidate identifier." + "enum": [ + "browser_automation_preview_call" + ] }, - "job_id": { + "call_id": { "type": "string", - "description": "Owning optimization job id." + "description": "The unique ID of the tool call generated by the model." }, - "candidate_name": { + "arguments": { "type": "string", - "description": "Display name of the candidate." + "description": "A JSON string of the arguments to pass to the tool." }, "status": { - "type": "string", - "description": "Candidate lifecycle status." - }, - "score": { - "type": "number", - "format": "double", - "description": "Candidate's aggregate score." - }, - "has_results": { - "type": "boolean", - "description": "Whether detailed results are available for this candidate." - }, - "created_at": { "allOf": [ { - "$ref": "#/components/schemas/FoundryTimestamp" + "$ref": "#/components/schemas/ToolCallStatus" } ], - "description": "Timestamp when the candidate was created, represented in Unix time." + "description": "The status of the tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A browser automation tool call." + }, + "BrowserAutomationToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "browser_automation_preview_call_output" + ] }, - "updated_at": { + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." + }, + "output": { "allOf": [ { - "$ref": "#/components/schemas/FoundryTimestamp" + "$ref": "#/components/schemas/ToolCallOutputContent" } ], - "description": "Timestamp when the candidate was last updated, represented in Unix time." + "description": "The output from the browser automation tool call." }, - "promotion": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/PromotionInfo" + "$ref": "#/components/schemas/ToolCallStatus" } ], - "description": "Promotion metadata. Null if not promoted." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CandidateFileInfo" - }, - "description": "Files in the candidate's blob directory." + "description": "The status of the tool call." } }, - "description": "Candidate metadata returned by GET /candidates/{id}." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output of a browser automation tool call." }, - "CandidateResults": { + "BrowserAutomationToolConnectionParameters": { "type": "object", "required": [ - "candidate_id", - "results" + "project_connection_id" ], "properties": { - "candidate_id": { + "project_connection_id": { "type": "string", - "description": "Owning candidate id." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationTaskResult" - }, - "description": "Per-task evaluation rows." + "description": "The ID of the project connection to your Azure Playwright resource." } }, - "description": "Full per-task evaluation results for a candidate, returned by GET /candidates/{id}/results." + "description": "Definition of input parameters for the connection used by the Browser Automation Tool." + }, + "BrowserAutomationToolParameters": { + "type": "object", + "required": [ + "connection" + ], + "properties": { + "connection": { + "allOf": [ + { + "$ref": "#/components/schemas/BrowserAutomationToolConnectionParameters" + } + ], + "description": "The project connection parameters associated with the Browser Automation Tool." + } + }, + "description": "Definition of input parameters for the Browser Automation Tool." }, "CaptureStructuredOutputsTool": { "type": "object", @@ -22879,50 +22066,6 @@ ], "description": "Dataset source for evaluator generation jobs — reference to a dataset." }, - "DatasetInfo": { - "type": "object", - "required": [ - "task_count", - "is_inline" - ], - "properties": { - "name": { - "type": "string", - "description": "Dataset name when using a registered dataset reference. Null for inline datasets." - }, - "version": { - "type": "string", - "description": "Dataset version when using a registered dataset reference. Null for inline datasets." - }, - "task_count": { - "type": "integer", - "format": "int32", - "description": "Number of tasks/rows in the dataset." - }, - "is_inline": { - "type": "boolean", - "description": "True when the dataset was provided inline in the request body." - } - }, - "description": "Metadata about the dataset used for optimization, surfaced in the response." - }, - "DatasetRef": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "Dataset name." - }, - "version": { - "type": "string", - "description": "Dataset version. If not specified, the latest version is used." - } - }, - "description": "Reference to a registered dataset in the Foundry Dataset Service." - }, "DatasetReference": { "type": "object", "required": [ @@ -51962,55 +51105,29 @@ ], "description": "The output of an OpenAPI tool call." }, - "OptimizationAgentDefinition": { + "OptimizationAgentIdentifier": { "type": "object", + "required": [ + "agent_name" + ], "properties": { "agent_name": { "type": "string", - "description": "Agent name." + "description": "Registered Foundry agent name (required)." }, "agent_version": { "type": "string", - "description": "Agent version." - }, - "model": { - "type": "string", - "description": "Model deployment name." - }, - "system_prompt": { - "type": "string", - "description": "System prompt / instructions." - }, - "skills": { - "type": "array", - "items": { - "type": "object", - "unevaluatedProperties": {} - }, - "description": "Agent skills." - }, - "tools": { - "type": "array", - "items": { - "type": "object", - "unevaluatedProperties": {} - }, - "description": "Agent tools." + "description": "Pinned agent version. Defaults to latest if omitted." } }, - "description": "Agent definition returned in response payloads (includes resolved config)." + "description": "Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and system_prompt are specified in options.optimization_config." }, "OptimizationCandidate": { "type": "object", "required": [ "name", - "config", - "mutations", "avg_score", - "avg_tokens", - "pass_rate", - "task_scores", - "is_pareto_optimal" + "avg_tokens" ], "properties": { "candidate_id": { @@ -52021,14 +51138,6 @@ "type": "string", "description": "Display name of the candidate (e.g., 'baseline', 'instruction-v2')." }, - "config": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationAgentDefinition" - } - ], - "description": "The agent configuration that produced this candidate." - }, "mutations": { "type": "object", "unevaluatedProperties": {}, @@ -52044,22 +51153,6 @@ "format": "double", "description": "Average token usage across all tasks." }, - "pass_rate": { - "type": "number", - "format": "double", - "description": "Fraction of tasks that met the pass threshold." - }, - "task_scores": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationTaskResult" - }, - "description": "Individual task-level scores." - }, - "is_pareto_optimal": { - "type": "boolean", - "description": "Whether this candidate is on the Pareto frontier (score vs cost)." - }, "eval_id": { "type": "string", "description": "Foundry evaluation identifier used to score this candidate." @@ -52079,12 +51172,144 @@ }, "description": "Aggregated evaluation result for a single candidate agent configuration across all tasks." }, + "OptimizationDatasetCriterion": { + "type": "object", + "required": [ + "name", + "instruction" + ], + "properties": { + "name": { + "type": "string", + "description": "Criterion name." + }, + "instruction": { + "type": "string", + "description": "Criterion instruction / description." + } + }, + "description": "Evaluation criterion: a name + instruction pair used for per-item scoring." + }, + "OptimizationDatasetInput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationDatasetInputType" + } + ], + "description": "Dataset input type discriminator." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "inline": "#/components/schemas/OptimizationInlineDatasetInput", + "reference": "#/components/schemas/OptimizationReferenceDatasetInput" + } + }, + "description": "Base discriminated model for dataset input. Either inline items or a registered reference." + }, + "OptimizationDatasetInputType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "inline", + "reference" + ] + } + ], + "description": "Discriminator values for the dataset input union." + }, + "OptimizationDatasetItem": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The user query / prompt." + }, + "ground_truth": { + "type": "string", + "description": "Expected ground truth answer." + }, + "desired_num_turns": { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 20, + "description": "Desired number of conversation turns for simulation mode (1-20)." + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationDatasetCriterion" + }, + "description": "Per-item evaluation criteria." + } + }, + "description": "A single item in an inline dataset." + }, + "OptimizationEvaluatorRef": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Evaluator name." + }, + "version": { + "type": "string", + "description": "Evaluator version. If not specified, the latest version is used." + } + }, + "description": "Reference to a named evaluator, optionally pinned to a version." + }, + "OptimizationInlineDatasetInput": { + "type": "object", + "required": [ + "type", + "items" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "inline" + ], + "description": "Dataset input type discriminator." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationDatasetItem" + }, + "description": "Dataset items." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationDatasetInput" + } + ], + "description": "Inline dataset — items supplied directly in the request body." + }, "OptimizationJob": { "type": "object", "required": [ "id", "status", - "created_at" + "created_at", + "updated_at" ], "properties": { "id": { @@ -52092,40 +51317,40 @@ "description": "Server-assigned unique identifier.", "readOnly": true }, - "status": { + "inputs": { "allOf": [ { - "$ref": "#/components/schemas/JobStatus" + "$ref": "#/components/schemas/OptimizationJobInputs" } ], - "description": "Current lifecycle status.", - "readOnly": true + "description": "Caller-supplied inputs." }, - "error": { + "result": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Error" + "$ref": "#/components/schemas/OptimizationJobResult" } ], - "description": "Error details — populated only on failure.", + "description": "Result produced on success.", "readOnly": true }, - "result": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationJobResult" + "$ref": "#/components/schemas/JobStatus" } ], - "description": "Result produced on success.", + "description": "Current lifecycle status.", "readOnly": true }, - "inputs": { + "error": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationJobInputs" + "$ref": "#/components/schemas/OpenAI.Error" } ], - "description": "Caller-supplied inputs." + "description": "Error details — populated only on failure.", + "readOnly": true }, "created_at": { "allOf": [ @@ -52142,7 +51367,7 @@ "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "The timestamp when the job was last updated (status, progress, or result change), represented in Unix time.", + "description": "The timestamp when the job was last updated, represented in Unix time.", "readOnly": true }, "progress": { @@ -52151,16 +51376,15 @@ "$ref": "#/components/schemas/OptimizationJobProgress" } ], - "description": "Progress while in flight. Absent in terminal states.", + "description": "Progress snapshot. May be present in terminal states reflecting last-known progress.", "readOnly": true }, - "dataset": { - "allOf": [ - { - "$ref": "#/components/schemas/DatasetInfo" - } - ], - "description": "Metadata about the dataset used for this optimization job.", + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Non-fatal warnings emitted at any point during optimization.", "readOnly": true } }, @@ -52170,29 +51394,30 @@ "type": "object", "required": [ "agent", - "train_dataset_reference" + "train_dataset", + "evaluators" ], "properties": { "agent": { "allOf": [ { - "$ref": "#/components/schemas/AgentIdentifier" + "$ref": "#/components/schemas/OptimizationAgentIdentifier" } ], "description": "The agent (and pinned version) being optimized." }, - "train_dataset_reference": { + "train_dataset": { "allOf": [ { - "$ref": "#/components/schemas/DatasetRef" + "$ref": "#/components/schemas/OptimizationDatasetInput" } ], - "description": "Reference to a registered training dataset (required)." + "description": "Training dataset — either inline items or a reference to a registered dataset. Required." }, - "validation_dataset_reference": { + "validation_dataset": { "allOf": [ { - "$ref": "#/components/schemas/DatasetRef" + "$ref": "#/components/schemas/OptimizationDatasetInput" } ], "description": "Optional held-out validation dataset for measuring generalization of the final candidate." @@ -52200,9 +51425,9 @@ "evaluators": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/OptimizationEvaluatorRef" }, - "description": "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." + "description": "Job-level evaluators referenced by name and optional version. Required; at least one must be provided." }, "options": { "allOf": [ @@ -52215,18 +51440,89 @@ }, "description": "Caller-supplied inputs for an optimization job." }, + "OptimizationJobListItem": { + "type": "object", + "required": [ + "id", + "status", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "description": "Server-assigned unique identifier.", + "readOnly": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/JobStatus" + } + ], + "description": "Current lifecycle status.", + "readOnly": true + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The timestamp when the job was created, represented in Unix time.", + "readOnly": true + }, + "updated_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The timestamp when the job was last updated, represented in Unix time.", + "readOnly": true + }, + "agent": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationAgentIdentifier" + } + ], + "description": "The agent targeted by this optimization job.", + "readOnly": true + }, + "progress": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationJobProgress" + } + ], + "description": "Progress snapshot. May be present in terminal states reflecting last-known progress.", + "readOnly": true + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Error" + } + ], + "description": "Error details — populated only on failure.", + "readOnly": true + } + }, + "description": "Slim job representation returned by the LIST endpoint." + }, "OptimizationJobProgress": { "type": "object", "required": [ - "current_iteration", + "candidates_completed", "best_score", "elapsed_seconds" ], "properties": { - "current_iteration": { + "candidates_completed": { "type": "integer", "format": "int32", - "description": "1-based current iteration index." + "description": "Number of candidates whose evaluation has completed so far." }, "best_score": { "type": "number", @@ -52245,20 +51541,12 @@ "type": "object", "properties": { "baseline": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationCandidate" - } - ], - "description": "Evaluation scores for the original (un-optimized) agent configuration." + "type": "string", + "description": "Candidate ID of the original (un-optimized) baseline evaluation." }, "best": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationCandidate" - } - ], - "description": "The highest-scoring candidate found during optimization." + "type": "string", + "description": "Candidate ID of the highest-scoring candidate found during optimization." }, "candidates": { "type": "array", @@ -52266,25 +51554,6 @@ "$ref": "#/components/schemas/OptimizationCandidate" }, "description": "All evaluated candidates including baseline." - }, - "options": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationOptions" - } - ], - "description": "The options used for this optimization run." - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped)." - }, - "all_target_attributes_failed": { - "type": "boolean", - "description": "True when all target attributes failed — only the baseline was evaluated." } }, "description": "Terminal-state result body. Populated when status is succeeded or failed." @@ -52292,10 +51561,11 @@ "OptimizationOptions": { "type": "object", "properties": { - "max_iterations": { + "max_candidates": { "type": "integer", "format": "int32", - "description": "Maximum optimization iterations per strategy. Must be >= 1. Default: 5.", + "minimum": 1, + "description": "Maximum number of optimization candidates to generate. Must be >= 1. Default: 5.", "default": 5 }, "optimization_config": { @@ -52322,73 +51592,35 @@ }, "description": "Tuning knobs and run-mode for an optimization job." }, - "OptimizationTaskResult": { + "OptimizationReferenceDatasetInput": { "type": "object", "required": [ - "task_name", - "scores", - "composite_score", - "tokens", - "duration_seconds", - "passed" + "type", + "name" ], "properties": { - "task_name": { - "type": "string", - "description": "Task name (from the dataset)." - }, - "query": { - "type": "string", - "description": "The user query / input for the task." - }, - "scores": { - "type": "object", - "unevaluatedProperties": { - "type": "number", - "format": "double" - }, - "description": "Per-evaluator scores keyed by evaluator name." - }, - "composite_score": { - "type": "number", - "format": "double", - "description": "Composite score combining all evaluator scores." - }, - "tokens": { - "type": "integer", - "format": "int64", - "description": "Total tokens consumed during the agent run for this task." - }, - "duration_seconds": { - "type": "number", - "format": "double", - "description": "Wall-clock seconds for this task's agent execution." - }, - "passed": { - "type": "boolean", - "description": "Whether the task met the pass threshold." - }, - "error_message": { + "type": { "type": "string", - "description": "Error message if the task failed during execution." - }, - "rationales": { - "type": "object", - "unevaluatedProperties": { - "type": "string" - }, - "description": "Per-evaluator reasoning keyed by evaluator name." + "enum": [ + "reference" + ], + "description": "Dataset input type discriminator." }, - "response": { + "name": { "type": "string", - "description": "Raw agent response text." + "description": "Registered dataset name." }, - "run_id": { + "version": { "type": "string", - "description": "Identifier of the agent run that produced this result." + "description": "Dataset version. If not specified, the latest version is used." } }, - "description": "Per-task evaluation result for a single candidate." + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationDatasetInput" + } + ], + "description": "Reference to a registered Foundry dataset." }, "OtlpTelemetryEndpoint": { "type": "object", @@ -52805,61 +52037,6 @@ ] } }, - "PromoteCandidateRequest": { - "type": "object", - "required": [ - "agent_name", - "agent_version" - ], - "properties": { - "agent_name": { - "type": "string", - "description": "Name of the Foundry agent to promote to." - }, - "agent_version": { - "type": "string", - "description": "Version of the Foundry agent to promote to." - } - }, - "description": "Request body for promoting a candidate to a Foundry agent version." - }, - "PromoteCandidateResponse": { - "type": "object", - "required": [ - "candidate_id", - "status", - "promoted_at", - "agent_name", - "agent_version" - ], - "properties": { - "candidate_id": { - "type": "string", - "description": "The promoted candidate id." - }, - "status": { - "type": "string", - "description": "Status after promotion." - }, - "promoted_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when promotion occurred, represented in Unix time." - }, - "agent_name": { - "type": "string", - "description": "Name of the Foundry agent promoted to." - }, - "agent_version": { - "type": "string", - "description": "Version of the Foundry agent promoted to." - } - }, - "description": "Response after successfully promoting a candidate." - }, "PromotionInfo": { "type": "object", "required": [ diff --git a/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml b/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml index c9076f0f7451..4db528f145d3 100644 --- a/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml +++ b/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml @@ -116,10 +116,8 @@ paths: /agent_optimization_jobs: post: operationId: AgentOptimizationJobs_create - summary: Create an agent optimization job - description: |- - Creates an agent optimization job and returns the queued job. - Honors `Operation-Id` for idempotent retry. + summary: Creates an agent optimization job. + description: Create an optimization job. Returns 201 with the queued job. Honours `Operation-Id` for idempotent retry. parameters: - name: Foundry-Features in: header @@ -128,7 +126,7 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: Operation-Id in: header required: false @@ -179,15 +177,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OptimizationJobInputs' - description: The optimization job inputs. + $ref: '#/components/schemas/OptimizationJob' + description: The job to create. x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview get: operationId: AgentOptimizationJobs_list - summary: List agent optimization jobs - description: Returns agent optimization jobs with cursor pagination and optional lifecycle or agent filters. + summary: Returns a list of agent optimization jobs. + description: List optimization jobs. Supports cursor pagination and optional status / agent_name filters. parameters: - name: Foundry-Features in: header @@ -196,7 +194,7 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: limit in: query required: false @@ -272,7 +270,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/OptimizationJob' + $ref: '#/components/schemas/OptimizationJobListItem' description: The requested list of items. first_id: type: string @@ -300,14 +298,12 @@ paths: - AgentOptimizationJobs x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview /agent_optimization_jobs/{jobId}: get: operationId: AgentOptimizationJobs_get - summary: Get an agent optimization job - description: |- - Retrieves the specified agent optimization job. - Returns 202 while the job is in progress and 200 after it reaches a terminal state. + summary: Get info about an agent optimization job. + description: Get an optimization job by id. parameters: - name: Foundry-Features in: header @@ -316,7 +312,7 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: jobId in: path required: true @@ -336,18 +332,7 @@ paths: headers: Retry-After: required: false - schema: - type: integer - format: int32 - content: - application/json: - schema: - $ref: '#/components/schemas/OptimizationJob' - '202': - description: The request has been accepted for processing, but processing has not yet completed. - headers: - Retry-After: - required: false + description: Recommended number of seconds to wait before polling again. schema: type: integer format: int32 @@ -371,13 +356,11 @@ paths: - AgentOptimizationJobs x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview delete: operationId: AgentOptimizationJobs_delete - summary: Delete an agent optimization job - description: |- - Deletes the specified agent optimization job and its candidate artifacts. - Cancels the job first when it is still in a non-terminal state. + summary: Deletes an agent optimization job. + description: Delete the job and its candidate artifacts. Cancels first if non-terminal. parameters: - name: Foundry-Features in: header @@ -386,20 +369,13 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: jobId in: path required: true description: The ID of the job to delete. schema: type: string - - name: force - in: query - required: false - description: When true, force-delete even if the job is in a non-terminal state. - schema: - type: boolean - explode: false - name: api-version in: query required: true @@ -426,425 +402,12 @@ paths: - AgentOptimizationJobs x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates: - get: - operationId: AgentOptimizationJobs_listCandidates - summary: List optimization job candidates - description: Returns the candidates produced by the specified optimization job. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: limit - in: query - required: false - description: |- - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the - default is 20. - schema: - type: integer - format: int32 - default: 20 - explode: false - - name: order - in: query - required: false - description: |- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` - for descending order. - schema: - $ref: '#/components/schemas/PageOrder' - explode: false - - name: after - in: query - required: false - description: |- - A cursor for use in pagination. `after` is an object ID that defines your place in the list. - For instance, if you make a list request and receive 100 objects, ending with obj_foo, your - subsequent call can include after=obj_foo in order to fetch the next page of the list. - schema: - type: string - explode: false - - name: before - in: query - required: false - description: |- - A cursor for use in pagination. `before` is an object ID that defines your place in the list. - For instance, if you make a list request and receive 100 objects, ending with obj_foo, your - subsequent call can include before=obj_foo in order to fetch the previous page of the list. - schema: - type: string - explode: false - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - type: object - required: - - data - - has_more - properties: - data: - type: array - items: - $ref: '#/components/schemas/OptimizationCandidate' - description: The requested list of items. - first_id: - type: string - description: The first ID represented in this list. - last_id: - type: string - description: The last ID represented in this list. - has_more: - type: boolean - description: A value indicating whether there are additional values available not captured in this list. - description: The response data for a requested list of items. - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}: - get: - operationId: AgentOptimizationJobs_getCandidate - summary: Get an optimization candidate - description: Retrieves metadata, manifest information, and promotion details for the specified candidate. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id. - schema: - type: string - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/CandidateMetadata' - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}/config: - get: - operationId: AgentOptimizationJobs_getCandidateConfig - summary: Get an optimization candidate config - description: |- - Retrieves the deploy configuration JSON for the specified candidate. - Clients can use it to compose `agents.create_version(...)` requests. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id. - schema: - type: string - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/CandidateDeployConfig' - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}/files: - get: - operationId: AgentOptimizationJobs_getCandidateFile - summary: Get an optimization candidate file - description: Streams the specified file from the candidate's blob directory. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id. - schema: - type: string - - name: path - in: query - required: true - description: Relative path of the file to download (e.g. 'files/examples.jsonl'). - schema: - type: string - explode: false - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/octet-stream: - schema: - contentMediaType: application/octet-stream - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}/results: - get: - operationId: AgentOptimizationJobs_getCandidateResults - summary: Get optimization candidate results - description: Retrieves full per-task evaluation results for the specified candidate. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id. - schema: - type: string - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/CandidateResults' - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote: - post: - operationId: AgentOptimizationJobs_promoteCandidate - summary: Promote an optimization candidate - description: Promotes the specified candidate and records the deployment timestamp and target agent version. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id to promote. - schema: - type: string - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/PromoteCandidateResponse' - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PromoteCandidateRequest' - description: Promotion details. - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview /agent_optimization_jobs/{jobId}:cancel: post: operationId: AgentOptimizationJobs_cancel - summary: Cancel an agent optimization job - description: |- - Requests cancellation of the specified agent optimization job. - The operation remains idempotent after the job reaches a terminal state. + summary: Cancels an agent optimization job. + description: Request cancellation of a running or queued job. Returns an error if the job is already in a terminal state. parameters: - name: Foundry-Features in: header @@ -853,7 +416,7 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: jobId in: path required: true @@ -890,7 +453,7 @@ paths: - AgentOptimizationJobs x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview /agents: post: operationId: Agents_createAgent_Agents_createAgentFromCode @@ -12193,18 +11756,6 @@ components: allOf: - $ref: '#/components/schemas/TraceSource' description: A trace source that selects traces by agent reference with time-based filtering. - AgentIdentifier: - type: object - required: - - agent_name - properties: - agent_name: - type: string - description: Registered Foundry agent name (required). - agent_version: - type: string - description: Pinned agent version. Defaults to latest if omitted. - description: Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and system_prompt are specified in options.optimization_config. AgentIdentity: type: object required: @@ -13847,116 +13398,6 @@ components: - $ref: '#/components/schemas/BrowserAutomationToolConnectionParameters' description: The project connection parameters associated with the Browser Automation Tool. description: Definition of input parameters for the Browser Automation Tool. - CandidateDeployConfig: - type: object - properties: - instructions: - type: string - description: System prompt / instructions. - model: - type: string - description: Foundry deployment name. - temperature: - type: number - format: float - minimum: 0 - maximum: 2 - description: Optional sampling temperature. - skills: - type: array - items: - type: object - unevaluatedProperties: {} - description: Optional skill overrides. - tools: - type: array - items: - type: object - unevaluatedProperties: {} - description: Optional tool overrides. - description: Deploy-config blob for a candidate. Suitable for setting OPTIMIZATION_CONFIG on a hosted-agent version. - CandidateFileInfo: - type: object - required: - - path - - type - - size_bytes - properties: - path: - type: string - description: Relative path of the file. - type: - type: string - description: File type category (e.g. 'config', 'results'). - size_bytes: - type: integer - format: int64 - description: File size in bytes. - description: File entry in a candidate's blob directory. - CandidateMetadata: - type: object - required: - - candidate_id - - job_id - - candidate_name - - status - - has_results - - created_at - - updated_at - - files - properties: - candidate_id: - type: string - description: Server-assigned candidate identifier. - job_id: - type: string - description: Owning optimization job id. - candidate_name: - type: string - description: Display name of the candidate. - status: - type: string - description: Candidate lifecycle status. - score: - type: number - format: double - description: Candidate's aggregate score. - has_results: - type: boolean - description: Whether detailed results are available for this candidate. - created_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when the candidate was created, represented in Unix time. - updated_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when the candidate was last updated, represented in Unix time. - promotion: - allOf: - - $ref: '#/components/schemas/PromotionInfo' - description: Promotion metadata. Null if not promoted. - files: - type: array - items: - $ref: '#/components/schemas/CandidateFileInfo' - description: Files in the candidate's blob directory. - description: Candidate metadata returned by GET /candidates/{id}. - CandidateResults: - type: object - required: - - candidate_id - - results - properties: - candidate_id: - type: string - description: Owning candidate id. - results: - type: array - items: - $ref: '#/components/schemas/OptimizationTaskResult' - description: Per-task evaluation rows. - description: Full per-task evaluation results for a candidate, returned by GET /candidates/{id}/results. CaptureStructuredOutputsTool: type: object required: @@ -15133,38 +14574,6 @@ components: allOf: - $ref: '#/components/schemas/EvaluatorGenerationJobSource' description: Dataset source for evaluator generation jobs — reference to a dataset. - DatasetInfo: - type: object - required: - - task_count - - is_inline - properties: - name: - type: string - description: Dataset name when using a registered dataset reference. Null for inline datasets. - version: - type: string - description: Dataset version when using a registered dataset reference. Null for inline datasets. - task_count: - type: integer - format: int32 - description: Number of tasks/rows in the dataset. - is_inline: - type: boolean - description: True when the dataset was provided inline in the request body. - description: Metadata about the dataset used for optimization, surfaced in the response. - DatasetRef: - type: object - required: - - name - properties: - name: - type: string - description: Dataset name. - version: - type: string - description: Dataset version. If not specified, the latest version is used. - description: Reference to a registered dataset in the Foundry Dataset Service. DatasetReference: type: object required: @@ -35691,45 +35100,24 @@ components: allOf: - $ref: '#/components/schemas/OpenAI.OutputItem' description: The output of an OpenAPI tool call. - OptimizationAgentDefinition: + OptimizationAgentIdentifier: type: object + required: + - agent_name properties: agent_name: type: string - description: Agent name. + description: Registered Foundry agent name (required). agent_version: type: string - description: Agent version. - model: - type: string - description: Model deployment name. - system_prompt: - type: string - description: System prompt / instructions. - skills: - type: array - items: - type: object - unevaluatedProperties: {} - description: Agent skills. - tools: - type: array - items: - type: object - unevaluatedProperties: {} - description: Agent tools. - description: Agent definition returned in response payloads (includes resolved config). + description: Pinned agent version. Defaults to latest if omitted. + description: Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and system_prompt are specified in options.optimization_config. OptimizationCandidate: type: object required: - name - - config - - mutations - avg_score - avg_tokens - - pass_rate - - task_scores - - is_pareto_optimal properties: candidate_id: type: string @@ -35737,10 +35125,6 @@ components: name: type: string description: Display name of the candidate (e.g., 'baseline', 'instruction-v2'). - config: - allOf: - - $ref: '#/components/schemas/OptimizationAgentDefinition' - description: The agent configuration that produced this candidate. mutations: type: object unevaluatedProperties: {} @@ -35753,18 +35137,6 @@ components: type: number format: double description: Average token usage across all tasks. - pass_rate: - type: number - format: double - description: Fraction of tasks that met the pass threshold. - task_scores: - type: array - items: - $ref: '#/components/schemas/OptimizationTaskResult' - description: Individual task-level scores. - is_pareto_optimal: - type: boolean - description: Whether this candidate is on the Pareto frontier (score vs cost). eval_id: type: string description: Foundry evaluation identifier used to score this candidate. @@ -35776,17 +35148,115 @@ components: - $ref: '#/components/schemas/PromotionInfo' description: Promotion metadata. Null if the candidate has not been promoted. description: Aggregated evaluation result for a single candidate agent configuration across all tasks. + OptimizationDatasetCriterion: + type: object + required: + - name + - instruction + properties: + name: + type: string + description: Criterion name. + instruction: + type: string + description: Criterion instruction / description. + description: 'Evaluation criterion: a name + instruction pair used for per-item scoring.' + OptimizationDatasetInput: + type: object + required: + - type + properties: + type: + allOf: + - $ref: '#/components/schemas/OptimizationDatasetInputType' + description: Dataset input type discriminator. + discriminator: + propertyName: type + mapping: + inline: '#/components/schemas/OptimizationInlineDatasetInput' + reference: '#/components/schemas/OptimizationReferenceDatasetInput' + description: Base discriminated model for dataset input. Either inline items or a registered reference. + OptimizationDatasetInputType: + anyOf: + - type: string + - type: string + enum: + - inline + - reference + description: Discriminator values for the dataset input union. + OptimizationDatasetItem: + type: object + properties: + query: + type: string + description: The user query / prompt. + ground_truth: + type: string + description: Expected ground truth answer. + desired_num_turns: + type: integer + format: int32 + minimum: 1 + maximum: 20 + description: Desired number of conversation turns for simulation mode (1-20). + criteria: + type: array + items: + $ref: '#/components/schemas/OptimizationDatasetCriterion' + description: Per-item evaluation criteria. + description: A single item in an inline dataset. + OptimizationEvaluatorRef: + type: object + required: + - name + properties: + name: + type: string + description: Evaluator name. + version: + type: string + description: Evaluator version. If not specified, the latest version is used. + description: Reference to a named evaluator, optionally pinned to a version. + OptimizationInlineDatasetInput: + type: object + required: + - type + - items + properties: + type: + type: string + enum: + - inline + description: Dataset input type discriminator. + items: + type: array + items: + $ref: '#/components/schemas/OptimizationDatasetItem' + description: Dataset items. + allOf: + - $ref: '#/components/schemas/OptimizationDatasetInput' + description: Inline dataset — items supplied directly in the request body. OptimizationJob: type: object required: - id - status - created_at + - updated_at properties: id: type: string description: Server-assigned unique identifier. readOnly: true + inputs: + allOf: + - $ref: '#/components/schemas/OptimizationJobInputs' + description: Caller-supplied inputs. + result: + allOf: + - $ref: '#/components/schemas/OptimizationJobResult' + description: Result produced on success. + readOnly: true status: allOf: - $ref: '#/components/schemas/JobStatus' @@ -35797,15 +35267,6 @@ components: - $ref: '#/components/schemas/OpenAI.Error' description: Error details — populated only on failure. readOnly: true - result: - allOf: - - $ref: '#/components/schemas/OptimizationJobResult' - description: Result produced on success. - readOnly: true - inputs: - allOf: - - $ref: '#/components/schemas/OptimizationJobInputs' - description: Caller-supplied inputs. created_at: allOf: - $ref: '#/components/schemas/FoundryTimestamp' @@ -35814,58 +35275,103 @@ components: updated_at: allOf: - $ref: '#/components/schemas/FoundryTimestamp' - description: The timestamp when the job was last updated (status, progress, or result change), represented in Unix time. + description: The timestamp when the job was last updated, represented in Unix time. readOnly: true progress: allOf: - $ref: '#/components/schemas/OptimizationJobProgress' - description: Progress while in flight. Absent in terminal states. + description: Progress snapshot. May be present in terminal states reflecting last-known progress. readOnly: true - dataset: - allOf: - - $ref: '#/components/schemas/DatasetInfo' - description: Metadata about the dataset used for this optimization job. + warnings: + type: array + items: + type: string + description: Non-fatal warnings emitted at any point during optimization. readOnly: true description: Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills, tools) to maximize evaluation scores. On success, the result contains scored candidates. OptimizationJobInputs: type: object required: - agent - - train_dataset_reference + - train_dataset + - evaluators properties: agent: allOf: - - $ref: '#/components/schemas/AgentIdentifier' + - $ref: '#/components/schemas/OptimizationAgentIdentifier' description: The agent (and pinned version) being optimized. - train_dataset_reference: + train_dataset: allOf: - - $ref: '#/components/schemas/DatasetRef' - description: Reference to a registered training dataset (required). - validation_dataset_reference: + - $ref: '#/components/schemas/OptimizationDatasetInput' + description: Training dataset — either inline items or a reference to a registered dataset. Required. + validation_dataset: allOf: - - $ref: '#/components/schemas/DatasetRef' + - $ref: '#/components/schemas/OptimizationDatasetInput' description: Optional held-out validation dataset for measuring generalization of the final candidate. evaluators: type: array items: - type: string - description: "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." + $ref: '#/components/schemas/OptimizationEvaluatorRef' + description: Job-level evaluators referenced by name and optional version. Required; at least one must be provided. options: allOf: - $ref: '#/components/schemas/OptimizationOptions' description: Tuning knobs and run-mode. description: Caller-supplied inputs for an optimization job. + OptimizationJobListItem: + type: object + required: + - id + - status + - created_at + - updated_at + properties: + id: + type: string + description: Server-assigned unique identifier. + readOnly: true + status: + allOf: + - $ref: '#/components/schemas/JobStatus' + description: Current lifecycle status. + readOnly: true + created_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The timestamp when the job was created, represented in Unix time. + readOnly: true + updated_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The timestamp when the job was last updated, represented in Unix time. + readOnly: true + agent: + allOf: + - $ref: '#/components/schemas/OptimizationAgentIdentifier' + description: The agent targeted by this optimization job. + readOnly: true + progress: + allOf: + - $ref: '#/components/schemas/OptimizationJobProgress' + description: Progress snapshot. May be present in terminal states reflecting last-known progress. + readOnly: true + error: + allOf: + - $ref: '#/components/schemas/OpenAI.Error' + description: Error details — populated only on failure. + readOnly: true + description: Slim job representation returned by the LIST endpoint. OptimizationJobProgress: type: object required: - - current_iteration + - candidates_completed - best_score - elapsed_seconds properties: - current_iteration: + candidates_completed: type: integer format: int32 - description: 1-based current iteration index. + description: Number of candidates whose evaluation has completed so far. best_score: type: number format: double @@ -35879,38 +35385,25 @@ components: type: object properties: baseline: - allOf: - - $ref: '#/components/schemas/OptimizationCandidate' - description: Evaluation scores for the original (un-optimized) agent configuration. + type: string + description: Candidate ID of the original (un-optimized) baseline evaluation. best: - allOf: - - $ref: '#/components/schemas/OptimizationCandidate' - description: The highest-scoring candidate found during optimization. + type: string + description: Candidate ID of the highest-scoring candidate found during optimization. candidates: type: array items: $ref: '#/components/schemas/OptimizationCandidate' description: All evaluated candidates including baseline. - options: - allOf: - - $ref: '#/components/schemas/OptimizationOptions' - description: The options used for this optimization run. - warnings: - type: array - items: - type: string - description: Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped). - all_target_attributes_failed: - type: boolean - description: True when all target attributes failed — only the baseline was evaluated. description: Terminal-state result body. Populated when status is succeeded or failed. OptimizationOptions: type: object properties: - max_iterations: + max_candidates: type: integer format: int32 - description: 'Maximum optimization iterations per strategy. Must be >= 1. Default: 5.' + minimum: 1 + description: 'Maximum number of optimization candidates to generate. Must be >= 1. Default: 5.' default: 5 optimization_config: type: object @@ -35927,58 +35420,26 @@ components: - $ref: '#/components/schemas/EvaluationLevel' description: Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for per-conversation multi-turn simulation scoring. description: Tuning knobs and run-mode for an optimization job. - OptimizationTaskResult: + OptimizationReferenceDatasetInput: type: object required: - - task_name - - scores - - composite_score - - tokens - - duration_seconds - - passed + - type + - name properties: - task_name: - type: string - description: Task name (from the dataset). - query: - type: string - description: The user query / input for the task. - scores: - type: object - unevaluatedProperties: - type: number - format: double - description: Per-evaluator scores keyed by evaluator name. - composite_score: - type: number - format: double - description: Composite score combining all evaluator scores. - tokens: - type: integer - format: int64 - description: Total tokens consumed during the agent run for this task. - duration_seconds: - type: number - format: double - description: Wall-clock seconds for this task's agent execution. - passed: - type: boolean - description: Whether the task met the pass threshold. - error_message: + type: type: string - description: Error message if the task failed during execution. - rationales: - type: object - unevaluatedProperties: - type: string - description: Per-evaluator reasoning keyed by evaluator name. - response: + enum: + - reference + description: Dataset input type discriminator. + name: type: string - description: Raw agent response text. - run_id: + description: Registered dataset name. + version: type: string - description: Identifier of the agent run that produced this result. - description: Per-task evaluation result for a single candidate. + description: Dataset version. If not specified, the latest version is used. + allOf: + - $ref: '#/components/schemas/OptimizationDatasetInput' + description: Reference to a registered Foundry dataset. OtlpTelemetryEndpoint: type: object required: @@ -36263,45 +35724,6 @@ components: x-ms-foundry-meta: required_previews: - MemoryStores=V1Preview - PromoteCandidateRequest: - type: object - required: - - agent_name - - agent_version - properties: - agent_name: - type: string - description: Name of the Foundry agent to promote to. - agent_version: - type: string - description: Version of the Foundry agent to promote to. - description: Request body for promoting a candidate to a Foundry agent version. - PromoteCandidateResponse: - type: object - required: - - candidate_id - - status - - promoted_at - - agent_name - - agent_version - properties: - candidate_id: - type: string - description: The promoted candidate id. - status: - type: string - description: Status after promotion. - promoted_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when promotion occurred, represented in Unix time. - agent_name: - type: string - description: Name of the Foundry agent promoted to. - agent_version: - type: string - description: Version of the Foundry agent promoted to. - description: Response after successfully promoting a candidate. PromotionInfo: type: object required: diff --git a/specification/ai-foundry/data-plane/Foundry/openapi3/virtual-public-preview/microsoft-foundry-openapi3.json b/specification/ai-foundry/data-plane/Foundry/openapi3/virtual-public-preview/microsoft-foundry-openapi3.json index 9372b6f0c250..a2cf6e38b575 100644 --- a/specification/ai-foundry/data-plane/Foundry/openapi3/virtual-public-preview/microsoft-foundry-openapi3.json +++ b/specification/ai-foundry/data-plane/Foundry/openapi3/virtual-public-preview/microsoft-foundry-openapi3.json @@ -224,8 +224,8 @@ "/agent_optimization_jobs": { "post": { "operationId": "AgentOptimizationJobs_create", - "summary": "Create an agent optimization job", - "description": "Creates an agent optimization job and returns the queued job.\nHonors `Operation-Id` for idempotent retry.", + "summary": "Creates an agent optimization job.", + "description": "Create an optimization job. Returns 201 with the queued job. Honours `Operation-Id` for idempotent retry.", "parameters": [ { "name": "Foundry-Features", @@ -235,7 +235,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -315,22 +315,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OptimizationJobInputs" + "$ref": "#/components/schemas/OptimizationJob" } } }, - "description": "The optimization job inputs." + "description": "The job to create." }, "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, "get": { "operationId": "AgentOptimizationJobs_list", - "summary": "List agent optimization jobs", - "description": "Returns agent optimization jobs with cursor pagination and optional lifecycle or agent filters.", + "summary": "Returns a list of agent optimization jobs.", + "description": "List optimization jobs. Supports cursor pagination and optional status / agent_name filters.", "parameters": [ { "name": "Foundry-Features", @@ -340,7 +340,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -432,7 +432,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/OptimizationJob" + "$ref": "#/components/schemas/OptimizationJobListItem" }, "description": "The requested list of items." }, @@ -480,7 +480,7 @@ ], "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } } @@ -488,8 +488,8 @@ "/agent_optimization_jobs/{jobId}": { "get": { "operationId": "AgentOptimizationJobs_get", - "summary": "Get an agent optimization job", - "description": "Retrieves the specified agent optimization job.\nReturns 202 while the job is in progress and 200 after it reaches a terminal state.", + "summary": "Get info about an agent optimization job.", + "description": "Get an optimization job by id.", "parameters": [ { "name": "Foundry-Features", @@ -499,7 +499,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -529,25 +529,7 @@ "headers": { "Retry-After": { "required": false, - "schema": { - "type": "integer", - "format": "int32" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OptimizationJob" - } - } - } - }, - "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", - "headers": { - "Retry-After": { - "required": false, + "description": "Recommended number of seconds to wait before polling again.", "schema": { "type": "integer", "format": "int32" @@ -588,14 +570,14 @@ ], "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, "delete": { "operationId": "AgentOptimizationJobs_delete", - "summary": "Delete an agent optimization job", - "description": "Deletes the specified agent optimization job and its candidate artifacts.\nCancels the job first when it is still in a non-terminal state.", + "summary": "Deletes an agent optimization job.", + "description": "Delete the job and its candidate artifacts. Cancels first if non-terminal.", "parameters": [ { "name": "Foundry-Features", @@ -605,7 +587,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -618,16 +600,6 @@ "type": "string" } }, - { - "name": "force", - "in": "query", - "required": false, - "description": "When true, force-delete even if the job is in a non-terminal state.", - "schema": { - "type": "boolean" - }, - "explode": false - }, { "name": "api-version", "in": "query", @@ -669,16 +641,16 @@ ], "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } } }, - "/agent_optimization_jobs/{jobId}/candidates": { - "get": { - "operationId": "AgentOptimizationJobs_listCandidates", - "summary": "List optimization job candidates", - "description": "Returns the candidates produced by the specified optimization job.", + "/agent_optimization_jobs/{jobId}:cancel": { + "post": { + "operationId": "AgentOptimizationJobs_cancel", + "summary": "Cancels an agent optimization job.", + "description": "Request cancellation of a running or queued job. Returns an error if the job is already in a terminal state.", "parameters": [ { "name": "Foundry-Features", @@ -688,7 +660,7 @@ "schema": { "type": "string", "enum": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } }, @@ -696,53 +668,11 @@ "name": "jobId", "in": "path", "required": true, - "description": "The optimization job id.", + "description": "The ID of the job to cancel.", "schema": { "type": "string" } }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false - }, - { - "name": "order", - "in": "query", - "required": false, - "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "schema": { - "$ref": "#/components/schemas/PageOrder" - }, - "explode": false - }, - { - "name": "after", - "in": "query", - "required": false, - "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "before", - "in": "query", - "required": false, - "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "schema": { - "type": "string" - }, - "explode": false - }, { "name": "api-version", "in": "query", @@ -760,33 +690,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "data", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationCandidate" - }, - "description": "The requested list of items." - }, - "first_id": { - "type": "string", - "description": "The first ID represented in this list." - }, - "last_id": { - "type": "string", - "description": "The last ID represented in this list." - }, - "has_more": { - "type": "boolean", - "description": "A value indicating whether there are additional values available not captured in this list." - } - }, - "description": "The response data for a requested list of items." + "$ref": "#/components/schemas/OptimizationJob" } } } @@ -817,16 +721,14 @@ ], "x-ms-foundry-meta": { "conditional_previews": [ - "AgentsOptimization=V1Preview" + "AgentsOptimization=V2Preview" ] } } }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}": { - "get": { - "operationId": "AgentOptimizationJobs_getCandidate", - "summary": "Get an optimization candidate", - "description": "Retrieves metadata, manifest information, and promotion details for the specified candidate.", + "/agents": { + "post": { + "operationId": "Agents_createAgent_Agents_createAgentFromCode", "parameters": [ { "name": "Foundry-Features", @@ -834,48 +736,48 @@ "required": false, "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] + "$ref": "#/components/schemas/AgentDefinitionOptInKeys" } }, { - "name": "jobId", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The optimization job id.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false }, { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id.", + "name": "x-ms-agent-name", + "in": "header", + "required": false, + "description": "The unique name that identifies the agent. Max 63 chars, must start and end with alphanumeric, hyphens allowed in the middle.", "schema": { - "type": "string" + "type": "string", + "maxLength": 63 } }, { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "name": "x-ms-code-zip-sha256", + "in": "header", + "required": false, + "description": "SHA-256 hex digest of the uploaded code zip. Used for change detection (dedup) and integrity verification.", "schema": { "type": "string" - }, - "explode": false + } } ], + "description": "Creates a new agent or a new version of an existing agent. Creates a new code-based agent. Uploads the code zip and creates the agent in a single call.\nThe agent name is provided in the `x-ms-agent-name` header since POST /agents has no name in the URL path.\nThe SHA-256 hex digest of the zip is provided in the `x-ms-code-zip-sha256` header for integrity and dedup.\nThe request body is multipart/form-data with a JSON metadata part and a binary code part (part order is irrelevant).\nMaximum upload size is 250 MB.", + "summary": "Create an agent Create a new code-based agent", "responses": { "200": { "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CandidateMetadata" + "$ref": "#/components/schemas/AgentObject" } } } @@ -901,51 +803,93 @@ } } }, - "tags": [ - "AgentOptimizationJobs" - ], + "x-ms-description-override": "Creates a new agent or a new version of an existing agent.", + "x-ms-summary-override": "Create an agent", "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" + "required_previews": [ + "CodeAgents=V1Preview" ] + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateAgentFromCodeContent" + }, + "encoding": { + "metadata": { + "contentType": "application/json" + } + } + } + } } - } - }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/config": { + }, "get": { - "operationId": "AgentOptimizationJobs_getCandidateConfig", - "summary": "Get an optimization candidate config", - "description": "Retrieves the deploy configuration JSON for the specified candidate.\nClients can use it to compose `agents.create_version(...)` requests.", + "operationId": "Agents_listAgents", + "summary": "List agents", + "description": "Returns a paged collection of agent resources.", "parameters": [ { - "name": "Foundry-Features", - "in": "header", + "name": "kind", + "in": "query", "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "description": "Filter agents by kind. If not provided, all agents are returned.", "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } + "$ref": "#/components/schemas/AgentKind" + }, + "explode": false }, { - "name": "jobId", - "in": "path", - "required": true, - "description": "The optimization job id.", + "name": "limit", + "in": "query", + "required": false, + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + }, + "explode": false + }, + { + "name": "order", + "in": "query", + "required": false, + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "schema": { + "$ref": "#/components/schemas/PageOrder" + }, + "explode": false + }, + { + "name": "after", + "in": "query", + "required": false, + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", "schema": { "type": "string" - } + }, + "explode": false }, { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id.", + "name": "before", + "in": "query", + "required": false, + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", "schema": { "type": "string" - } + }, + "explode": false }, { "name": "api-version", @@ -964,619 +908,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CandidateDeployConfig" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/files": { - "get": { - "operationId": "AgentOptimizationJobs_getCandidateFile", - "summary": "Get an optimization candidate file", - "description": "Streams the specified file from the candidate's blob directory.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The optimization job id.", - "schema": { - "type": "string" - } - }, - { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id.", - "schema": { - "type": "string" - } - }, - { - "name": "path", - "in": "query", - "required": true, - "description": "Relative path of the file to download (e.g. 'files/examples.jsonl').", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/octet-stream": { - "schema": { - "contentMediaType": "application/octet-stream" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/results": { - "get": { - "operationId": "AgentOptimizationJobs_getCandidateResults", - "summary": "Get optimization candidate results", - "description": "Retrieves full per-task evaluation results for the specified candidate.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The optimization job id.", - "schema": { - "type": "string" - } - }, - { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id.", - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CandidateResults" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote": { - "post": { - "operationId": "AgentOptimizationJobs_promoteCandidate", - "summary": "Promote an optimization candidate", - "description": "Promotes the specified candidate and records the deployment timestamp and target agent version.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The optimization job id.", - "schema": { - "type": "string" - } - }, - { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id to promote.", - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PromoteCandidateResponse" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PromoteCandidateRequest" - } - } - }, - "description": "Promotion details." - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}:cancel": { - "post": { - "operationId": "AgentOptimizationJobs_cancel", - "summary": "Cancel an agent optimization job", - "description": "Requests cancellation of the specified agent optimization job.\nThe operation remains idempotent after the job reaches a terminal state.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "AgentsOptimization=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The ID of the job to cancel.", - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OptimizationJob" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agents": { - "post": { - "operationId": "Agents_createAgent_Agents_createAgentFromCode", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": false, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "$ref": "#/components/schemas/AgentDefinitionOptInKeys" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "x-ms-agent-name", - "in": "header", - "required": false, - "description": "The unique name that identifies the agent. Max 63 chars, must start and end with alphanumeric, hyphens allowed in the middle.", - "schema": { - "type": "string", - "maxLength": 63 - } - }, - { - "name": "x-ms-code-zip-sha256", - "in": "header", - "required": false, - "description": "SHA-256 hex digest of the uploaded code zip. Used for change detection (dedup) and integrity verification.", - "schema": { - "type": "string" - } - } - ], - "description": "Creates a new agent or a new version of an existing agent. Creates a new code-based agent. Uploads the code zip and creates the agent in a single call.\nThe agent name is provided in the `x-ms-agent-name` header since POST /agents has no name in the URL path.\nThe SHA-256 hex digest of the zip is provided in the `x-ms-code-zip-sha256` header for integrity and dedup.\nThe request body is multipart/form-data with a JSON metadata part and a binary code part (part order is irrelevant).\nMaximum upload size is 250 MB.", - "summary": "Create an agent Create a new code-based agent", - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentObject" - } - } - } - }, - "4XX": { - "description": "Client error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - }, - "5XX": { - "description": "Server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "x-ms-description-override": "Creates a new agent or a new version of an existing agent.", - "x-ms-summary-override": "Create an agent", - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentRequest" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/CreateAgentFromCodeContent" - }, - "encoding": { - "metadata": { - "contentType": "application/json" - } - } - } - } - } - }, - "get": { - "operationId": "Agents_listAgents", - "summary": "List agents", - "description": "Returns a paged collection of agent resources.", - "parameters": [ - { - "name": "kind", - "in": "query", - "required": false, - "description": "Filter agents by kind. If not provided, all agents are returned.", - "schema": { - "$ref": "#/components/schemas/AgentKind" - }, - "explode": false - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false - }, - { - "name": "order", - "in": "query", - "required": false, - "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", - "schema": { - "$ref": "#/components/schemas/PageOrder" - }, - "explode": false - }, - { - "name": "after", - "in": "query", - "required": false, - "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include after=obj_foo in order to fetch the next page of the list.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "before", - "in": "query", - "required": false, - "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list.\nFor instance, if you make a list request and receive 100 objects, ending with obj_foo, your\nsubsequent call can include before=obj_foo in order to fetch the previous page of the list.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentObject" - }, - "description": "The requested list of items." - }, - "first_id": { - "type": "string", - "description": "The first ID represented in this list." - }, - "last_id": { - "type": "string", - "description": "The last ID represented in this list." - }, - "has_more": { - "type": "boolean", - "description": "A value indicating whether there are additional values available not captured in this list." - } - }, - "description": "The response data for a requested list of items." + "type": "object", + "required": [ + "data", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentObject" + }, + "description": "The requested list of items." + }, + "first_id": { + "type": "string", + "description": "The first ID represented in this list." + }, + "last_id": { + "type": "string", + "description": "The last ID represented in this list." + }, + "has_more": { + "type": "boolean", + "description": "A value indicating whether there are additional values available not captured in this list." + } + }, + "description": "The response data for a requested list of items." } } } @@ -21969,23 +21327,6 @@ } } }, - "AgentIdentifier": { - "type": "object", - "required": [ - "agent_name" - ], - "properties": { - "agent_name": { - "type": "string", - "description": "Registered Foundry agent name (required)." - }, - "agent_version": { - "type": "string", - "description": "Pinned agent version. Defaults to latest if omitted." - } - }, - "description": "Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and system_prompt are specified in options.optimization_config." - }, "AgentIdentity": { "type": "object", "required": [ @@ -24242,211 +23583,9 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A Bing grounding tool call." - }, - "BingGroundingToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "bing_grounding_call_output" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "output": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallOutputContent" - } - ], - "description": "The output from the Bing grounding tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallStatus" - } - ], - "description": "The status of the tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of a Bing grounding tool call." - }, - "BlobReference": { - "type": "object", - "required": [ - "blobUri", - "storageAccountArmId", - "credential" - ], - "properties": { - "blobUri": { - "type": "string", - "format": "uri", - "description": "Blob URI path for client to upload data. Example: `https://blob.windows.core.net/Container/Path`" - }, - "storageAccountArmId": { - "type": "string", - "description": "ARM ID of the storage account to use." - }, - "credential": { - "allOf": [ - { - "$ref": "#/components/schemas/SasCredential" - } - ], - "description": "Credential info to access the storage account." - } - }, - "description": "Blob reference details." - }, - "BotServiceAuthorizationScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "BotService" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "BotServiceRbacAuthorizationScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "BotServiceRbac" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "BrowserAutomationPreviewTool": { - "type": "object", - "required": [ - "type", - "browser_automation_preview" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "browser_automation_preview" - ], - "description": "The object type, which is always 'browser_automation_preview'." - }, - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." - }, - "description": { - "type": "string", - "description": "Optional user-defined description for this tool or configuration." - }, - "tool_configs": { - "type": "object", - "unevaluatedProperties": { - "$ref": "#/components/schemas/ToolConfig" - }, - "description": "Per-tool configuration map. Keys are tool names or `*` (catch-all default).\nResolution order: exact tool name match takes priority over `*`.\nUnknown tool names are silently ignored at runtime." - }, - "browser_automation_preview": { - "allOf": [ - { - "$ref": "#/components/schemas/BrowserAutomationToolParameters" - } - ], - "description": "The Browser Automation Tool parameters." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for a Browser Automation Tool, as used to configure an Agent." - }, - "BrowserAutomationToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "browser_automation_preview_call" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the tool." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallStatus" - } - ], - "description": "The status of the tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A browser automation tool call." + "description": "A Bing grounding tool call." }, - "BrowserAutomationToolCallOutput": { + "BingGroundingToolCallOutput": { "type": "object", "required": [ "type", @@ -24457,7 +23596,7 @@ "type": { "type": "string", "enum": [ - "browser_automation_preview_call_output" + "bing_grounding_call_output" ] }, "call_id": { @@ -24470,7 +23609,7 @@ "$ref": "#/components/schemas/ToolCallOutputContent" } ], - "description": "The output from the browser automation tool call." + "description": "The output from the Bing grounding tool call." }, "status": { "allOf": [ @@ -24486,191 +23625,239 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "The output of a browser automation tool call." + "description": "The output of a Bing grounding tool call." }, - "BrowserAutomationToolConnectionParameters": { + "BlobReference": { "type": "object", "required": [ - "project_connection_id" + "blobUri", + "storageAccountArmId", + "credential" ], "properties": { - "project_connection_id": { + "blobUri": { "type": "string", - "description": "The ID of the project connection to your Azure Playwright resource." + "format": "uri", + "description": "Blob URI path for client to upload data. Example: `https://blob.windows.core.net/Container/Path`" + }, + "storageAccountArmId": { + "type": "string", + "description": "ARM ID of the storage account to use." + }, + "credential": { + "allOf": [ + { + "$ref": "#/components/schemas/SasCredential" + } + ], + "description": "Credential info to access the storage account." } }, - "description": "Definition of input parameters for the connection used by the Browser Automation Tool." + "description": "Blob reference details." }, - "BrowserAutomationToolParameters": { + "BotServiceAuthorizationScheme": { "type": "object", "required": [ - "connection" + "type" ], "properties": { - "connection": { - "allOf": [ - { - "$ref": "#/components/schemas/BrowserAutomationToolConnectionParameters" - } - ], - "description": "The project connection parameters associated with the Browser Automation Tool." + "type": { + "type": "string", + "enum": [ + "BotService" + ] } }, - "description": "Definition of input parameters for the Browser Automation Tool." + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } }, - "CandidateDeployConfig": { + "BotServiceRbacAuthorizationScheme": { "type": "object", + "required": [ + "type" + ], "properties": { - "instructions": { - "type": "string", - "description": "System prompt / instructions." - }, - "model": { + "type": { "type": "string", - "description": "Foundry deployment name." - }, - "temperature": { - "type": "number", - "format": "float", - "minimum": 0, - "maximum": 2, - "description": "Optional sampling temperature." - }, - "skills": { - "type": "array", - "items": { - "type": "object", - "unevaluatedProperties": {} - }, - "description": "Optional skill overrides." - }, - "tools": { - "type": "array", - "items": { - "type": "object", - "unevaluatedProperties": {} - }, - "description": "Optional tool overrides." + "enum": [ + "BotServiceRbac" + ] } }, - "description": "Deploy-config blob for a candidate. Suitable for setting OPTIMIZATION_CONFIG on a hosted-agent version." + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } }, - "CandidateFileInfo": { + "BrowserAutomationPreviewTool": { "type": "object", "required": [ - "path", "type", - "size_bytes" + "browser_automation_preview" ], "properties": { - "path": { + "type": { "type": "string", - "description": "Relative path of the file." + "enum": [ + "browser_automation_preview" + ], + "description": "The object type, which is always 'browser_automation_preview'." }, - "type": { + "name": { "type": "string", - "description": "File type category (e.g. 'config', 'results')." + "description": "Optional user-defined name for this tool or configuration." }, - "size_bytes": { - "type": "integer", - "format": "int64", - "description": "File size in bytes." + "description": { + "type": "string", + "description": "Optional user-defined description for this tool or configuration." + }, + "tool_configs": { + "type": "object", + "unevaluatedProperties": { + "$ref": "#/components/schemas/ToolConfig" + }, + "description": "Per-tool configuration map. Keys are tool names or `*` (catch-all default).\nResolution order: exact tool name match takes priority over `*`.\nUnknown tool names are silently ignored at runtime." + }, + "browser_automation_preview": { + "allOf": [ + { + "$ref": "#/components/schemas/BrowserAutomationToolParameters" + } + ], + "description": "The Browser Automation Tool parameters." } }, - "description": "File entry in a candidate's blob directory." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "The input definition information for a Browser Automation Tool, as used to configure an Agent." }, - "CandidateMetadata": { + "BrowserAutomationToolCall": { "type": "object", "required": [ - "candidate_id", - "job_id", - "candidate_name", - "status", - "has_results", - "created_at", - "updated_at", - "files" + "type", + "call_id", + "arguments", + "status" ], "properties": { - "candidate_id": { + "type": { "type": "string", - "description": "Server-assigned candidate identifier." + "enum": [ + "browser_automation_preview_call" + ] }, - "job_id": { + "call_id": { "type": "string", - "description": "Owning optimization job id." + "description": "The unique ID of the tool call generated by the model." }, - "candidate_name": { + "arguments": { "type": "string", - "description": "Display name of the candidate." + "description": "A JSON string of the arguments to pass to the tool." }, "status": { - "type": "string", - "description": "Candidate lifecycle status." - }, - "score": { - "type": "number", - "format": "double", - "description": "Candidate's aggregate score." - }, - "has_results": { - "type": "boolean", - "description": "Whether detailed results are available for this candidate." - }, - "created_at": { "allOf": [ { - "$ref": "#/components/schemas/FoundryTimestamp" + "$ref": "#/components/schemas/ToolCallStatus" } ], - "description": "Timestamp when the candidate was created, represented in Unix time." + "description": "The status of the tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A browser automation tool call." + }, + "BrowserAutomationToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "browser_automation_preview_call_output" + ] }, - "updated_at": { + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." + }, + "output": { "allOf": [ { - "$ref": "#/components/schemas/FoundryTimestamp" + "$ref": "#/components/schemas/ToolCallOutputContent" } ], - "description": "Timestamp when the candidate was last updated, represented in Unix time." + "description": "The output from the browser automation tool call." }, - "promotion": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/PromotionInfo" + "$ref": "#/components/schemas/ToolCallStatus" } ], - "description": "Promotion metadata. Null if not promoted." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CandidateFileInfo" - }, - "description": "Files in the candidate's blob directory." + "description": "The status of the tool call." } }, - "description": "Candidate metadata returned by GET /candidates/{id}." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output of a browser automation tool call." }, - "CandidateResults": { + "BrowserAutomationToolConnectionParameters": { "type": "object", "required": [ - "candidate_id", - "results" + "project_connection_id" ], "properties": { - "candidate_id": { + "project_connection_id": { "type": "string", - "description": "Owning candidate id." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationTaskResult" - }, - "description": "Per-task evaluation rows." + "description": "The ID of the project connection to your Azure Playwright resource." + } + }, + "description": "Definition of input parameters for the connection used by the Browser Automation Tool." + }, + "BrowserAutomationToolParameters": { + "type": "object", + "required": [ + "connection" + ], + "properties": { + "connection": { + "allOf": [ + { + "$ref": "#/components/schemas/BrowserAutomationToolConnectionParameters" + } + ], + "description": "The project connection parameters associated with the Browser Automation Tool." } }, - "description": "Full per-task evaluation results for a candidate, returned by GET /candidates/{id}/results." + "description": "Definition of input parameters for the Browser Automation Tool." }, "CaptureStructuredOutputsTool": { "type": "object", @@ -26580,50 +25767,6 @@ ], "description": "Dataset source for evaluator generation jobs — reference to a dataset." }, - "DatasetInfo": { - "type": "object", - "required": [ - "task_count", - "is_inline" - ], - "properties": { - "name": { - "type": "string", - "description": "Dataset name when using a registered dataset reference. Null for inline datasets." - }, - "version": { - "type": "string", - "description": "Dataset version when using a registered dataset reference. Null for inline datasets." - }, - "task_count": { - "type": "integer", - "format": "int32", - "description": "Number of tasks/rows in the dataset." - }, - "is_inline": { - "type": "boolean", - "description": "True when the dataset was provided inline in the request body." - } - }, - "description": "Metadata about the dataset used for optimization, surfaced in the response." - }, - "DatasetRef": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "Dataset name." - }, - "version": { - "type": "string", - "description": "Dataset version. If not specified, the latest version is used." - } - }, - "description": "Reference to a registered dataset in the Foundry Dataset Service." - }, "DatasetReference": { "type": "object", "required": [ @@ -56715,55 +55858,29 @@ ], "description": "The output of an OpenAPI tool call." }, - "OptimizationAgentDefinition": { + "OptimizationAgentIdentifier": { "type": "object", + "required": [ + "agent_name" + ], "properties": { "agent_name": { "type": "string", - "description": "Agent name." + "description": "Registered Foundry agent name (required)." }, "agent_version": { "type": "string", - "description": "Agent version." - }, - "model": { - "type": "string", - "description": "Model deployment name." - }, - "system_prompt": { - "type": "string", - "description": "System prompt / instructions." - }, - "skills": { - "type": "array", - "items": { - "type": "object", - "unevaluatedProperties": {} - }, - "description": "Agent skills." - }, - "tools": { - "type": "array", - "items": { - "type": "object", - "unevaluatedProperties": {} - }, - "description": "Agent tools." + "description": "Pinned agent version. Defaults to latest if omitted." } }, - "description": "Agent definition returned in response payloads (includes resolved config)." + "description": "Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and system_prompt are specified in options.optimization_config." }, "OptimizationCandidate": { "type": "object", "required": [ "name", - "config", - "mutations", "avg_score", - "avg_tokens", - "pass_rate", - "task_scores", - "is_pareto_optimal" + "avg_tokens" ], "properties": { "candidate_id": { @@ -56774,14 +55891,6 @@ "type": "string", "description": "Display name of the candidate (e.g., 'baseline', 'instruction-v2')." }, - "config": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationAgentDefinition" - } - ], - "description": "The agent configuration that produced this candidate." - }, "mutations": { "type": "object", "unevaluatedProperties": {}, @@ -56797,22 +55906,6 @@ "format": "double", "description": "Average token usage across all tasks." }, - "pass_rate": { - "type": "number", - "format": "double", - "description": "Fraction of tasks that met the pass threshold." - }, - "task_scores": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationTaskResult" - }, - "description": "Individual task-level scores." - }, - "is_pareto_optimal": { - "type": "boolean", - "description": "Whether this candidate is on the Pareto frontier (score vs cost)." - }, "eval_id": { "type": "string", "description": "Foundry evaluation identifier used to score this candidate." @@ -56832,12 +55925,144 @@ }, "description": "Aggregated evaluation result for a single candidate agent configuration across all tasks." }, + "OptimizationDatasetCriterion": { + "type": "object", + "required": [ + "name", + "instruction" + ], + "properties": { + "name": { + "type": "string", + "description": "Criterion name." + }, + "instruction": { + "type": "string", + "description": "Criterion instruction / description." + } + }, + "description": "Evaluation criterion: a name + instruction pair used for per-item scoring." + }, + "OptimizationDatasetInput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationDatasetInputType" + } + ], + "description": "Dataset input type discriminator." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "inline": "#/components/schemas/OptimizationInlineDatasetInput", + "reference": "#/components/schemas/OptimizationReferenceDatasetInput" + } + }, + "description": "Base discriminated model for dataset input. Either inline items or a registered reference." + }, + "OptimizationDatasetInputType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "inline", + "reference" + ] + } + ], + "description": "Discriminator values for the dataset input union." + }, + "OptimizationDatasetItem": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The user query / prompt." + }, + "ground_truth": { + "type": "string", + "description": "Expected ground truth answer." + }, + "desired_num_turns": { + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 20, + "description": "Desired number of conversation turns for simulation mode (1-20)." + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationDatasetCriterion" + }, + "description": "Per-item evaluation criteria." + } + }, + "description": "A single item in an inline dataset." + }, + "OptimizationEvaluatorRef": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Evaluator name." + }, + "version": { + "type": "string", + "description": "Evaluator version. If not specified, the latest version is used." + } + }, + "description": "Reference to a named evaluator, optionally pinned to a version." + }, + "OptimizationInlineDatasetInput": { + "type": "object", + "required": [ + "type", + "items" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "inline" + ], + "description": "Dataset input type discriminator." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationDatasetItem" + }, + "description": "Dataset items." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationDatasetInput" + } + ], + "description": "Inline dataset — items supplied directly in the request body." + }, "OptimizationJob": { "type": "object", "required": [ "id", "status", - "created_at" + "created_at", + "updated_at" ], "properties": { "id": { @@ -56845,40 +56070,40 @@ "description": "Server-assigned unique identifier.", "readOnly": true }, - "status": { + "inputs": { "allOf": [ { - "$ref": "#/components/schemas/JobStatus" + "$ref": "#/components/schemas/OptimizationJobInputs" } ], - "description": "Current lifecycle status.", - "readOnly": true + "description": "Caller-supplied inputs." }, - "error": { + "result": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Error" + "$ref": "#/components/schemas/OptimizationJobResult" } ], - "description": "Error details — populated only on failure.", + "description": "Result produced on success.", "readOnly": true }, - "result": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationJobResult" + "$ref": "#/components/schemas/JobStatus" } ], - "description": "Result produced on success.", + "description": "Current lifecycle status.", "readOnly": true }, - "inputs": { + "error": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationJobInputs" + "$ref": "#/components/schemas/OpenAI.Error" } ], - "description": "Caller-supplied inputs." + "description": "Error details — populated only on failure.", + "readOnly": true }, "created_at": { "allOf": [ @@ -56895,7 +56120,7 @@ "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "The timestamp when the job was last updated (status, progress, or result change), represented in Unix time.", + "description": "The timestamp when the job was last updated, represented in Unix time.", "readOnly": true }, "progress": { @@ -56904,16 +56129,15 @@ "$ref": "#/components/schemas/OptimizationJobProgress" } ], - "description": "Progress while in flight. Absent in terminal states.", + "description": "Progress snapshot. May be present in terminal states reflecting last-known progress.", "readOnly": true }, - "dataset": { - "allOf": [ - { - "$ref": "#/components/schemas/DatasetInfo" - } - ], - "description": "Metadata about the dataset used for this optimization job.", + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Non-fatal warnings emitted at any point during optimization.", "readOnly": true } }, @@ -56923,29 +56147,30 @@ "type": "object", "required": [ "agent", - "train_dataset_reference" + "train_dataset", + "evaluators" ], "properties": { "agent": { "allOf": [ { - "$ref": "#/components/schemas/AgentIdentifier" + "$ref": "#/components/schemas/OptimizationAgentIdentifier" } ], "description": "The agent (and pinned version) being optimized." }, - "train_dataset_reference": { + "train_dataset": { "allOf": [ { - "$ref": "#/components/schemas/DatasetRef" + "$ref": "#/components/schemas/OptimizationDatasetInput" } ], - "description": "Reference to a registered training dataset (required)." + "description": "Training dataset — either inline items or a reference to a registered dataset. Required." }, - "validation_dataset_reference": { + "validation_dataset": { "allOf": [ { - "$ref": "#/components/schemas/DatasetRef" + "$ref": "#/components/schemas/OptimizationDatasetInput" } ], "description": "Optional held-out validation dataset for measuring generalization of the final candidate." @@ -56953,9 +56178,9 @@ "evaluators": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/OptimizationEvaluatorRef" }, - "description": "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." + "description": "Job-level evaluators referenced by name and optional version. Required; at least one must be provided." }, "options": { "allOf": [ @@ -56968,18 +56193,89 @@ }, "description": "Caller-supplied inputs for an optimization job." }, + "OptimizationJobListItem": { + "type": "object", + "required": [ + "id", + "status", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "description": "Server-assigned unique identifier.", + "readOnly": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/JobStatus" + } + ], + "description": "Current lifecycle status.", + "readOnly": true + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The timestamp when the job was created, represented in Unix time.", + "readOnly": true + }, + "updated_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The timestamp when the job was last updated, represented in Unix time.", + "readOnly": true + }, + "agent": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationAgentIdentifier" + } + ], + "description": "The agent targeted by this optimization job.", + "readOnly": true + }, + "progress": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationJobProgress" + } + ], + "description": "Progress snapshot. May be present in terminal states reflecting last-known progress.", + "readOnly": true + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Error" + } + ], + "description": "Error details — populated only on failure.", + "readOnly": true + } + }, + "description": "Slim job representation returned by the LIST endpoint." + }, "OptimizationJobProgress": { "type": "object", "required": [ - "current_iteration", + "candidates_completed", "best_score", "elapsed_seconds" ], "properties": { - "current_iteration": { + "candidates_completed": { "type": "integer", "format": "int32", - "description": "1-based current iteration index." + "description": "Number of candidates whose evaluation has completed so far." }, "best_score": { "type": "number", @@ -56998,20 +56294,12 @@ "type": "object", "properties": { "baseline": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationCandidate" - } - ], - "description": "Evaluation scores for the original (un-optimized) agent configuration." + "type": "string", + "description": "Candidate ID of the original (un-optimized) baseline evaluation." }, "best": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationCandidate" - } - ], - "description": "The highest-scoring candidate found during optimization." + "type": "string", + "description": "Candidate ID of the highest-scoring candidate found during optimization." }, "candidates": { "type": "array", @@ -57019,25 +56307,6 @@ "$ref": "#/components/schemas/OptimizationCandidate" }, "description": "All evaluated candidates including baseline." - }, - "options": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationOptions" - } - ], - "description": "The options used for this optimization run." - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped)." - }, - "all_target_attributes_failed": { - "type": "boolean", - "description": "True when all target attributes failed — only the baseline was evaluated." } }, "description": "Terminal-state result body. Populated when status is succeeded or failed." @@ -57045,10 +56314,11 @@ "OptimizationOptions": { "type": "object", "properties": { - "max_iterations": { + "max_candidates": { "type": "integer", "format": "int32", - "description": "Maximum optimization iterations per strategy. Must be >= 1. Default: 5.", + "minimum": 1, + "description": "Maximum number of optimization candidates to generate. Must be >= 1. Default: 5.", "default": 5 }, "optimization_config": { @@ -57075,73 +56345,35 @@ }, "description": "Tuning knobs and run-mode for an optimization job." }, - "OptimizationTaskResult": { + "OptimizationReferenceDatasetInput": { "type": "object", "required": [ - "task_name", - "scores", - "composite_score", - "tokens", - "duration_seconds", - "passed" + "type", + "name" ], "properties": { - "task_name": { - "type": "string", - "description": "Task name (from the dataset)." - }, - "query": { - "type": "string", - "description": "The user query / input for the task." - }, - "scores": { - "type": "object", - "unevaluatedProperties": { - "type": "number", - "format": "double" - }, - "description": "Per-evaluator scores keyed by evaluator name." - }, - "composite_score": { - "type": "number", - "format": "double", - "description": "Composite score combining all evaluator scores." - }, - "tokens": { - "type": "integer", - "format": "int64", - "description": "Total tokens consumed during the agent run for this task." - }, - "duration_seconds": { - "type": "number", - "format": "double", - "description": "Wall-clock seconds for this task's agent execution." - }, - "passed": { - "type": "boolean", - "description": "Whether the task met the pass threshold." - }, - "error_message": { + "type": { "type": "string", - "description": "Error message if the task failed during execution." - }, - "rationales": { - "type": "object", - "unevaluatedProperties": { - "type": "string" - }, - "description": "Per-evaluator reasoning keyed by evaluator name." + "enum": [ + "reference" + ], + "description": "Dataset input type discriminator." }, - "response": { + "name": { "type": "string", - "description": "Raw agent response text." + "description": "Registered dataset name." }, - "run_id": { + "version": { "type": "string", - "description": "Identifier of the agent run that produced this result." + "description": "Dataset version. If not specified, the latest version is used." } }, - "description": "Per-task evaluation result for a single candidate." + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationDatasetInput" + } + ], + "description": "Reference to a registered Foundry dataset." }, "OtlpTelemetryEndpoint": { "type": "object", @@ -57621,61 +56853,6 @@ ] } }, - "PromoteCandidateRequest": { - "type": "object", - "required": [ - "agent_name", - "agent_version" - ], - "properties": { - "agent_name": { - "type": "string", - "description": "Name of the Foundry agent to promote to." - }, - "agent_version": { - "type": "string", - "description": "Version of the Foundry agent to promote to." - } - }, - "description": "Request body for promoting a candidate to a Foundry agent version." - }, - "PromoteCandidateResponse": { - "type": "object", - "required": [ - "candidate_id", - "status", - "promoted_at", - "agent_name", - "agent_version" - ], - "properties": { - "candidate_id": { - "type": "string", - "description": "The promoted candidate id." - }, - "status": { - "type": "string", - "description": "Status after promotion." - }, - "promoted_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when promotion occurred, represented in Unix time." - }, - "agent_name": { - "type": "string", - "description": "Name of the Foundry agent promoted to." - }, - "agent_version": { - "type": "string", - "description": "Version of the Foundry agent promoted to." - } - }, - "description": "Response after successfully promoting a candidate." - }, "PromotionInfo": { "type": "object", "required": [ diff --git a/specification/ai-foundry/data-plane/Foundry/openapi3/virtual-public-preview/microsoft-foundry-openapi3.yaml b/specification/ai-foundry/data-plane/Foundry/openapi3/virtual-public-preview/microsoft-foundry-openapi3.yaml index b1db07e45268..30ffdf221472 100644 --- a/specification/ai-foundry/data-plane/Foundry/openapi3/virtual-public-preview/microsoft-foundry-openapi3.yaml +++ b/specification/ai-foundry/data-plane/Foundry/openapi3/virtual-public-preview/microsoft-foundry-openapi3.yaml @@ -117,10 +117,8 @@ paths: /agent_optimization_jobs: post: operationId: AgentOptimizationJobs_create - summary: Create an agent optimization job - description: |- - Creates an agent optimization job and returns the queued job. - Honors `Operation-Id` for idempotent retry. + summary: Creates an agent optimization job. + description: Create an optimization job. Returns 201 with the queued job. Honours `Operation-Id` for idempotent retry. parameters: - name: Foundry-Features in: header @@ -129,7 +127,7 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: Operation-Id in: header required: false @@ -180,15 +178,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OptimizationJobInputs' - description: The optimization job inputs. + $ref: '#/components/schemas/OptimizationJob' + description: The job to create. x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview get: operationId: AgentOptimizationJobs_list - summary: List agent optimization jobs - description: Returns agent optimization jobs with cursor pagination and optional lifecycle or agent filters. + summary: Returns a list of agent optimization jobs. + description: List optimization jobs. Supports cursor pagination and optional status / agent_name filters. parameters: - name: Foundry-Features in: header @@ -197,7 +195,7 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: limit in: query required: false @@ -273,7 +271,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/OptimizationJob' + $ref: '#/components/schemas/OptimizationJobListItem' description: The requested list of items. first_id: type: string @@ -301,14 +299,12 @@ paths: - AgentOptimizationJobs x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview /agent_optimization_jobs/{jobId}: get: operationId: AgentOptimizationJobs_get - summary: Get an agent optimization job - description: |- - Retrieves the specified agent optimization job. - Returns 202 while the job is in progress and 200 after it reaches a terminal state. + summary: Get info about an agent optimization job. + description: Get an optimization job by id. parameters: - name: Foundry-Features in: header @@ -317,7 +313,7 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: jobId in: path required: true @@ -337,18 +333,7 @@ paths: headers: Retry-After: required: false - schema: - type: integer - format: int32 - content: - application/json: - schema: - $ref: '#/components/schemas/OptimizationJob' - '202': - description: The request has been accepted for processing, but processing has not yet completed. - headers: - Retry-After: - required: false + description: Recommended number of seconds to wait before polling again. schema: type: integer format: int32 @@ -372,13 +357,11 @@ paths: - AgentOptimizationJobs x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview delete: operationId: AgentOptimizationJobs_delete - summary: Delete an agent optimization job - description: |- - Deletes the specified agent optimization job and its candidate artifacts. - Cancels the job first when it is still in a non-terminal state. + summary: Deletes an agent optimization job. + description: Delete the job and its candidate artifacts. Cancels first if non-terminal. parameters: - name: Foundry-Features in: header @@ -387,20 +370,13 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: jobId in: path required: true description: The ID of the job to delete. schema: type: string - - name: force - in: query - required: false - description: When true, force-delete even if the job is in a non-terminal state. - schema: - type: boolean - explode: false - name: api-version in: query required: true @@ -427,425 +403,12 @@ paths: - AgentOptimizationJobs x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates: - get: - operationId: AgentOptimizationJobs_listCandidates - summary: List optimization job candidates - description: Returns the candidates produced by the specified optimization job. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: limit - in: query - required: false - description: |- - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the - default is 20. - schema: - type: integer - format: int32 - default: 20 - explode: false - - name: order - in: query - required: false - description: |- - Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` - for descending order. - schema: - $ref: '#/components/schemas/PageOrder' - explode: false - - name: after - in: query - required: false - description: |- - A cursor for use in pagination. `after` is an object ID that defines your place in the list. - For instance, if you make a list request and receive 100 objects, ending with obj_foo, your - subsequent call can include after=obj_foo in order to fetch the next page of the list. - schema: - type: string - explode: false - - name: before - in: query - required: false - description: |- - A cursor for use in pagination. `before` is an object ID that defines your place in the list. - For instance, if you make a list request and receive 100 objects, ending with obj_foo, your - subsequent call can include before=obj_foo in order to fetch the previous page of the list. - schema: - type: string - explode: false - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - type: object - required: - - data - - has_more - properties: - data: - type: array - items: - $ref: '#/components/schemas/OptimizationCandidate' - description: The requested list of items. - first_id: - type: string - description: The first ID represented in this list. - last_id: - type: string - description: The last ID represented in this list. - has_more: - type: boolean - description: A value indicating whether there are additional values available not captured in this list. - description: The response data for a requested list of items. - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}: - get: - operationId: AgentOptimizationJobs_getCandidate - summary: Get an optimization candidate - description: Retrieves metadata, manifest information, and promotion details for the specified candidate. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id. - schema: - type: string - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/CandidateMetadata' - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}/config: - get: - operationId: AgentOptimizationJobs_getCandidateConfig - summary: Get an optimization candidate config - description: |- - Retrieves the deploy configuration JSON for the specified candidate. - Clients can use it to compose `agents.create_version(...)` requests. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id. - schema: - type: string - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/CandidateDeployConfig' - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}/files: - get: - operationId: AgentOptimizationJobs_getCandidateFile - summary: Get an optimization candidate file - description: Streams the specified file from the candidate's blob directory. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id. - schema: - type: string - - name: path - in: query - required: true - description: Relative path of the file to download (e.g. 'files/examples.jsonl'). - schema: - type: string - explode: false - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/octet-stream: - schema: - contentMediaType: application/octet-stream - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}/results: - get: - operationId: AgentOptimizationJobs_getCandidateResults - summary: Get optimization candidate results - description: Retrieves full per-task evaluation results for the specified candidate. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id. - schema: - type: string - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/CandidateResults' - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote: - post: - operationId: AgentOptimizationJobs_promoteCandidate - summary: Promote an optimization candidate - description: Promotes the specified candidate and records the deployment timestamp and target agent version. - parameters: - - name: Foundry-Features - in: header - required: false - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - AgentsOptimization=V1Preview - - name: jobId - in: path - required: true - description: The optimization job id. - schema: - type: string - - name: candidateId - in: path - required: true - description: The candidate id to promote. - schema: - type: string - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/PromoteCandidateResponse' - 4XX: - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - 5XX: - description: Server error - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - AgentOptimizationJobs - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PromoteCandidateRequest' - description: Promotion details. - x-ms-foundry-meta: - conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview /agent_optimization_jobs/{jobId}:cancel: post: operationId: AgentOptimizationJobs_cancel - summary: Cancel an agent optimization job - description: |- - Requests cancellation of the specified agent optimization job. - The operation remains idempotent after the job reaches a terminal state. + summary: Cancels an agent optimization job. + description: Request cancellation of a running or queued job. Returns an error if the job is already in a terminal state. parameters: - name: Foundry-Features in: header @@ -854,7 +417,7 @@ paths: schema: type: string enum: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview - name: jobId in: path required: true @@ -891,7 +454,7 @@ paths: - AgentOptimizationJobs x-ms-foundry-meta: conditional_previews: - - AgentsOptimization=V1Preview + - AgentsOptimization=V2Preview /agents: post: operationId: Agents_createAgent_Agents_createAgentFromCode @@ -14499,18 +14062,6 @@ components: version: type: string description: The version identifier of the agent. - AgentIdentifier: - type: object - required: - - agent_name - properties: - agent_name: - type: string - description: Registered Foundry agent name (required). - agent_version: - type: string - description: Pinned agent version. Defaults to latest if omitted. - description: Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and system_prompt are specified in options.optimization_config. AgentIdentity: type: object required: @@ -16175,116 +15726,6 @@ components: - $ref: '#/components/schemas/BrowserAutomationToolConnectionParameters' description: The project connection parameters associated with the Browser Automation Tool. description: Definition of input parameters for the Browser Automation Tool. - CandidateDeployConfig: - type: object - properties: - instructions: - type: string - description: System prompt / instructions. - model: - type: string - description: Foundry deployment name. - temperature: - type: number - format: float - minimum: 0 - maximum: 2 - description: Optional sampling temperature. - skills: - type: array - items: - type: object - unevaluatedProperties: {} - description: Optional skill overrides. - tools: - type: array - items: - type: object - unevaluatedProperties: {} - description: Optional tool overrides. - description: Deploy-config blob for a candidate. Suitable for setting OPTIMIZATION_CONFIG on a hosted-agent version. - CandidateFileInfo: - type: object - required: - - path - - type - - size_bytes - properties: - path: - type: string - description: Relative path of the file. - type: - type: string - description: File type category (e.g. 'config', 'results'). - size_bytes: - type: integer - format: int64 - description: File size in bytes. - description: File entry in a candidate's blob directory. - CandidateMetadata: - type: object - required: - - candidate_id - - job_id - - candidate_name - - status - - has_results - - created_at - - updated_at - - files - properties: - candidate_id: - type: string - description: Server-assigned candidate identifier. - job_id: - type: string - description: Owning optimization job id. - candidate_name: - type: string - description: Display name of the candidate. - status: - type: string - description: Candidate lifecycle status. - score: - type: number - format: double - description: Candidate's aggregate score. - has_results: - type: boolean - description: Whether detailed results are available for this candidate. - created_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when the candidate was created, represented in Unix time. - updated_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when the candidate was last updated, represented in Unix time. - promotion: - allOf: - - $ref: '#/components/schemas/PromotionInfo' - description: Promotion metadata. Null if not promoted. - files: - type: array - items: - $ref: '#/components/schemas/CandidateFileInfo' - description: Files in the candidate's blob directory. - description: Candidate metadata returned by GET /candidates/{id}. - CandidateResults: - type: object - required: - - candidate_id - - results - properties: - candidate_id: - type: string - description: Owning candidate id. - results: - type: array - items: - $ref: '#/components/schemas/OptimizationTaskResult' - description: Per-task evaluation rows. - description: Full per-task evaluation results for a candidate, returned by GET /candidates/{id}/results. CaptureStructuredOutputsTool: type: object required: @@ -17612,38 +17053,6 @@ components: allOf: - $ref: '#/components/schemas/EvaluatorGenerationJobSource' description: Dataset source for evaluator generation jobs — reference to a dataset. - DatasetInfo: - type: object - required: - - task_count - - is_inline - properties: - name: - type: string - description: Dataset name when using a registered dataset reference. Null for inline datasets. - version: - type: string - description: Dataset version when using a registered dataset reference. Null for inline datasets. - task_count: - type: integer - format: int32 - description: Number of tasks/rows in the dataset. - is_inline: - type: boolean - description: True when the dataset was provided inline in the request body. - description: Metadata about the dataset used for optimization, surfaced in the response. - DatasetRef: - type: object - required: - - name - properties: - name: - type: string - description: Dataset name. - version: - type: string - description: Dataset version. If not specified, the latest version is used. - description: Reference to a registered dataset in the Foundry Dataset Service. DatasetReference: type: object required: @@ -38897,45 +38306,24 @@ components: allOf: - $ref: '#/components/schemas/OpenAI.OutputItem' description: The output of an OpenAPI tool call. - OptimizationAgentDefinition: + OptimizationAgentIdentifier: type: object + required: + - agent_name properties: agent_name: type: string - description: Agent name. + description: Registered Foundry agent name (required). agent_version: type: string - description: Agent version. - model: - type: string - description: Model deployment name. - system_prompt: - type: string - description: System prompt / instructions. - skills: - type: array - items: - type: object - unevaluatedProperties: {} - description: Agent skills. - tools: - type: array - items: - type: object - unevaluatedProperties: {} - description: Agent tools. - description: Agent definition returned in response payloads (includes resolved config). + description: Pinned agent version. Defaults to latest if omitted. + description: Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and system_prompt are specified in options.optimization_config. OptimizationCandidate: type: object required: - name - - config - - mutations - avg_score - avg_tokens - - pass_rate - - task_scores - - is_pareto_optimal properties: candidate_id: type: string @@ -38943,10 +38331,6 @@ components: name: type: string description: Display name of the candidate (e.g., 'baseline', 'instruction-v2'). - config: - allOf: - - $ref: '#/components/schemas/OptimizationAgentDefinition' - description: The agent configuration that produced this candidate. mutations: type: object unevaluatedProperties: {} @@ -38959,18 +38343,6 @@ components: type: number format: double description: Average token usage across all tasks. - pass_rate: - type: number - format: double - description: Fraction of tasks that met the pass threshold. - task_scores: - type: array - items: - $ref: '#/components/schemas/OptimizationTaskResult' - description: Individual task-level scores. - is_pareto_optimal: - type: boolean - description: Whether this candidate is on the Pareto frontier (score vs cost). eval_id: type: string description: Foundry evaluation identifier used to score this candidate. @@ -38982,17 +38354,115 @@ components: - $ref: '#/components/schemas/PromotionInfo' description: Promotion metadata. Null if the candidate has not been promoted. description: Aggregated evaluation result for a single candidate agent configuration across all tasks. + OptimizationDatasetCriterion: + type: object + required: + - name + - instruction + properties: + name: + type: string + description: Criterion name. + instruction: + type: string + description: Criterion instruction / description. + description: 'Evaluation criterion: a name + instruction pair used for per-item scoring.' + OptimizationDatasetInput: + type: object + required: + - type + properties: + type: + allOf: + - $ref: '#/components/schemas/OptimizationDatasetInputType' + description: Dataset input type discriminator. + discriminator: + propertyName: type + mapping: + inline: '#/components/schemas/OptimizationInlineDatasetInput' + reference: '#/components/schemas/OptimizationReferenceDatasetInput' + description: Base discriminated model for dataset input. Either inline items or a registered reference. + OptimizationDatasetInputType: + anyOf: + - type: string + - type: string + enum: + - inline + - reference + description: Discriminator values for the dataset input union. + OptimizationDatasetItem: + type: object + properties: + query: + type: string + description: The user query / prompt. + ground_truth: + type: string + description: Expected ground truth answer. + desired_num_turns: + type: integer + format: int32 + minimum: 1 + maximum: 20 + description: Desired number of conversation turns for simulation mode (1-20). + criteria: + type: array + items: + $ref: '#/components/schemas/OptimizationDatasetCriterion' + description: Per-item evaluation criteria. + description: A single item in an inline dataset. + OptimizationEvaluatorRef: + type: object + required: + - name + properties: + name: + type: string + description: Evaluator name. + version: + type: string + description: Evaluator version. If not specified, the latest version is used. + description: Reference to a named evaluator, optionally pinned to a version. + OptimizationInlineDatasetInput: + type: object + required: + - type + - items + properties: + type: + type: string + enum: + - inline + description: Dataset input type discriminator. + items: + type: array + items: + $ref: '#/components/schemas/OptimizationDatasetItem' + description: Dataset items. + allOf: + - $ref: '#/components/schemas/OptimizationDatasetInput' + description: Inline dataset — items supplied directly in the request body. OptimizationJob: type: object required: - id - status - created_at + - updated_at properties: id: type: string description: Server-assigned unique identifier. readOnly: true + inputs: + allOf: + - $ref: '#/components/schemas/OptimizationJobInputs' + description: Caller-supplied inputs. + result: + allOf: + - $ref: '#/components/schemas/OptimizationJobResult' + description: Result produced on success. + readOnly: true status: allOf: - $ref: '#/components/schemas/JobStatus' @@ -39003,15 +38473,6 @@ components: - $ref: '#/components/schemas/OpenAI.Error' description: Error details — populated only on failure. readOnly: true - result: - allOf: - - $ref: '#/components/schemas/OptimizationJobResult' - description: Result produced on success. - readOnly: true - inputs: - allOf: - - $ref: '#/components/schemas/OptimizationJobInputs' - description: Caller-supplied inputs. created_at: allOf: - $ref: '#/components/schemas/FoundryTimestamp' @@ -39020,58 +38481,103 @@ components: updated_at: allOf: - $ref: '#/components/schemas/FoundryTimestamp' - description: The timestamp when the job was last updated (status, progress, or result change), represented in Unix time. + description: The timestamp when the job was last updated, represented in Unix time. readOnly: true progress: allOf: - $ref: '#/components/schemas/OptimizationJobProgress' - description: Progress while in flight. Absent in terminal states. + description: Progress snapshot. May be present in terminal states reflecting last-known progress. readOnly: true - dataset: - allOf: - - $ref: '#/components/schemas/DatasetInfo' - description: Metadata about the dataset used for this optimization job. + warnings: + type: array + items: + type: string + description: Non-fatal warnings emitted at any point during optimization. readOnly: true description: Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills, tools) to maximize evaluation scores. On success, the result contains scored candidates. OptimizationJobInputs: type: object required: - agent - - train_dataset_reference + - train_dataset + - evaluators properties: agent: allOf: - - $ref: '#/components/schemas/AgentIdentifier' + - $ref: '#/components/schemas/OptimizationAgentIdentifier' description: The agent (and pinned version) being optimized. - train_dataset_reference: + train_dataset: allOf: - - $ref: '#/components/schemas/DatasetRef' - description: Reference to a registered training dataset (required). - validation_dataset_reference: + - $ref: '#/components/schemas/OptimizationDatasetInput' + description: Training dataset — either inline items or a reference to a registered dataset. Required. + validation_dataset: allOf: - - $ref: '#/components/schemas/DatasetRef' + - $ref: '#/components/schemas/OptimizationDatasetInput' description: Optional held-out validation dataset for measuring generalization of the final candidate. evaluators: type: array items: - type: string - description: "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." + $ref: '#/components/schemas/OptimizationEvaluatorRef' + description: Job-level evaluators referenced by name and optional version. Required; at least one must be provided. options: allOf: - $ref: '#/components/schemas/OptimizationOptions' description: Tuning knobs and run-mode. description: Caller-supplied inputs for an optimization job. + OptimizationJobListItem: + type: object + required: + - id + - status + - created_at + - updated_at + properties: + id: + type: string + description: Server-assigned unique identifier. + readOnly: true + status: + allOf: + - $ref: '#/components/schemas/JobStatus' + description: Current lifecycle status. + readOnly: true + created_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The timestamp when the job was created, represented in Unix time. + readOnly: true + updated_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The timestamp when the job was last updated, represented in Unix time. + readOnly: true + agent: + allOf: + - $ref: '#/components/schemas/OptimizationAgentIdentifier' + description: The agent targeted by this optimization job. + readOnly: true + progress: + allOf: + - $ref: '#/components/schemas/OptimizationJobProgress' + description: Progress snapshot. May be present in terminal states reflecting last-known progress. + readOnly: true + error: + allOf: + - $ref: '#/components/schemas/OpenAI.Error' + description: Error details — populated only on failure. + readOnly: true + description: Slim job representation returned by the LIST endpoint. OptimizationJobProgress: type: object required: - - current_iteration + - candidates_completed - best_score - elapsed_seconds properties: - current_iteration: + candidates_completed: type: integer format: int32 - description: 1-based current iteration index. + description: Number of candidates whose evaluation has completed so far. best_score: type: number format: double @@ -39085,38 +38591,25 @@ components: type: object properties: baseline: - allOf: - - $ref: '#/components/schemas/OptimizationCandidate' - description: Evaluation scores for the original (un-optimized) agent configuration. + type: string + description: Candidate ID of the original (un-optimized) baseline evaluation. best: - allOf: - - $ref: '#/components/schemas/OptimizationCandidate' - description: The highest-scoring candidate found during optimization. + type: string + description: Candidate ID of the highest-scoring candidate found during optimization. candidates: type: array items: $ref: '#/components/schemas/OptimizationCandidate' description: All evaluated candidates including baseline. - options: - allOf: - - $ref: '#/components/schemas/OptimizationOptions' - description: The options used for this optimization run. - warnings: - type: array - items: - type: string - description: Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped). - all_target_attributes_failed: - type: boolean - description: True when all target attributes failed — only the baseline was evaluated. description: Terminal-state result body. Populated when status is succeeded or failed. OptimizationOptions: type: object properties: - max_iterations: + max_candidates: type: integer format: int32 - description: 'Maximum optimization iterations per strategy. Must be >= 1. Default: 5.' + minimum: 1 + description: 'Maximum number of optimization candidates to generate. Must be >= 1. Default: 5.' default: 5 optimization_config: type: object @@ -39133,58 +38626,26 @@ components: - $ref: '#/components/schemas/EvaluationLevel' description: Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for per-conversation multi-turn simulation scoring. description: Tuning knobs and run-mode for an optimization job. - OptimizationTaskResult: + OptimizationReferenceDatasetInput: type: object required: - - task_name - - scores - - composite_score - - tokens - - duration_seconds - - passed + - type + - name properties: - task_name: - type: string - description: Task name (from the dataset). - query: - type: string - description: The user query / input for the task. - scores: - type: object - unevaluatedProperties: - type: number - format: double - description: Per-evaluator scores keyed by evaluator name. - composite_score: - type: number - format: double - description: Composite score combining all evaluator scores. - tokens: - type: integer - format: int64 - description: Total tokens consumed during the agent run for this task. - duration_seconds: - type: number - format: double - description: Wall-clock seconds for this task's agent execution. - passed: - type: boolean - description: Whether the task met the pass threshold. - error_message: + type: type: string - description: Error message if the task failed during execution. - rationales: - type: object - unevaluatedProperties: - type: string - description: Per-evaluator reasoning keyed by evaluator name. - response: + enum: + - reference + description: Dataset input type discriminator. + name: type: string - description: Raw agent response text. - run_id: + description: Registered dataset name. + version: type: string - description: Identifier of the agent run that produced this result. - description: Per-task evaluation result for a single candidate. + description: Dataset version. If not specified, the latest version is used. + allOf: + - $ref: '#/components/schemas/OptimizationDatasetInput' + description: Reference to a registered Foundry dataset. OtlpTelemetryEndpoint: type: object required: @@ -39514,45 +38975,6 @@ components: x-ms-foundry-meta: required_previews: - MemoryStores=V1Preview - PromoteCandidateRequest: - type: object - required: - - agent_name - - agent_version - properties: - agent_name: - type: string - description: Name of the Foundry agent to promote to. - agent_version: - type: string - description: Version of the Foundry agent to promote to. - description: Request body for promoting a candidate to a Foundry agent version. - PromoteCandidateResponse: - type: object - required: - - candidate_id - - status - - promoted_at - - agent_name - - agent_version - properties: - candidate_id: - type: string - description: The promoted candidate id. - status: - type: string - description: Status after promotion. - promoted_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when promotion occurred, represented in Unix time. - agent_name: - type: string - description: Name of the Foundry agent promoted to. - agent_version: - type: string - description: Version of the Foundry agent promoted to. - description: Response after successfully promoting a candidate. PromotionInfo: type: object required: diff --git a/specification/ai-foundry/data-plane/Foundry/src/agents-optimization/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/agents-optimization/models.tsp index 9158a685d176..2c848b3bc469 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/agents-optimization/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/agents-optimization/models.tsp @@ -1,5 +1,5 @@ // Models for the AgentsOptimization data-plane surface. -// Aligned with in-tree C# DTOs (Contracts/V1/Models/). +// Aligned with in-tree C# DTOs (Contracts/V2Preview/Models/). // // Uses shared Foundry job infrastructure from servicepatterns.tsp: // JobLike — base job shape (id, status, inputs, result, error) @@ -44,12 +44,94 @@ union OptimizationMode { optimize: "optimize", } +// --------------------------------------------------------------------------- +// Dataset input — discriminated union (inline items or registered reference) +// --------------------------------------------------------------------------- + +/** Discriminator values for the dataset input union. */ +union OptimizationDatasetInputType { + string, + + @doc("Inline dataset — items are provided directly in the request body.") + inline: "inline", + + @doc("Reference to a registered Foundry dataset by name and version.") + reference: "reference", +} + +/** Base discriminated model for dataset input. Either inline items or a registered reference. */ +@discriminator("type") +model OptimizationDatasetInput { + @doc("Dataset input type discriminator.") + type: OptimizationDatasetInputType; +} + +/** Inline dataset — items supplied directly in the request body. */ +model OptimizationInlineDatasetInput extends OptimizationDatasetInput { + @doc("Dataset input type discriminator.") + type: OptimizationDatasetInputType.inline; + + @doc("Dataset items.") + items: OptimizationDatasetItem[]; +} + +/** Reference to a registered Foundry dataset. */ +model OptimizationReferenceDatasetInput extends OptimizationDatasetInput { + @doc("Dataset input type discriminator.") + type: OptimizationDatasetInputType.reference; + + @doc("Registered dataset name.") + name: string; + + @doc("Dataset version. If not specified, the latest version is used.") + version?: string; +} + +/** A single item in an inline dataset. */ +model OptimizationDatasetItem { + @doc("The user query / prompt.") + query?: string; + + @doc("Expected ground truth answer.") + ground_truth?: string; + + @doc("Desired number of conversation turns for simulation mode (1-20).") + @minValue(1) + @maxValue(20) + desired_num_turns?: int32; + + @doc("Per-item evaluation criteria.") + criteria?: OptimizationDatasetCriterion[]; +} + +/** Evaluation criterion: a name + instruction pair used for per-item scoring. */ +model OptimizationDatasetCriterion { + @doc("Criterion name.") + name: string; + + @doc("Criterion instruction / description.") + instruction: string; +} + +// --------------------------------------------------------------------------- +// Evaluator reference +// --------------------------------------------------------------------------- + +/** Reference to a named evaluator, optionally pinned to a version. */ +model OptimizationEvaluatorRef { + @doc("Evaluator name.") + name: string; + + @doc("Evaluator version. If not specified, the latest version is used.") + version?: string; +} + // --------------------------------------------------------------------------- // Input models // --------------------------------------------------------------------------- @doc("Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and system_prompt are specified in options.optimization_config.") -model AgentIdentifier { +model OptimizationAgentIdentifier { @doc("Registered Foundry agent name (required).") agent_name: string; @@ -78,19 +160,11 @@ model OptimizationAgentDefinition { tools?: Record[]; } -@doc("Reference to a registered dataset in the Foundry Dataset Service.") -model DatasetRef { - @doc("Dataset name.") - name: string; - - @doc("Dataset version. If not specified, the latest version is used.") - version?: string; -} - @doc("Tuning knobs and run-mode for an optimization job.") model OptimizationOptions { - @doc("Maximum optimization iterations per strategy. Must be >= 1. Default: 5.") - max_iterations?: int32 = 5; + @doc("Maximum number of optimization candidates to generate. Must be >= 1. Default: 5.") + @minValue(1) + max_candidates?: int32 = 5; @doc("Per-target-attribute configuration overrides. Contains skills, tools, system_prompt for the agent, plus model space for model optimization.") optimization_config?: Record; @@ -108,16 +182,16 @@ model OptimizationOptions { @doc("Caller-supplied inputs for an optimization job.") model OptimizationJobInputs { @doc("The agent (and pinned version) being optimized.") - agent: AgentIdentifier; + agent: OptimizationAgentIdentifier; - @doc("Reference to a registered training dataset (required).") - train_dataset_reference: DatasetRef; + @doc("Training dataset — either inline items or a reference to a registered dataset. Required.") + train_dataset: OptimizationDatasetInput; @doc("Optional held-out validation dataset for measuring generalization of the final candidate.") - validation_dataset_reference?: DatasetRef; + validation_dataset?: OptimizationDatasetInput; - @doc("Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence'].") - evaluators?: string[]; + @doc("Job-level evaluators referenced by name and optional version. Required; at least one must be provided.") + evaluators: OptimizationEvaluatorRef[]; @doc("Tuning knobs and run-mode.") options?: OptimizationOptions; @@ -129,8 +203,8 @@ model OptimizationJobInputs { @doc("In-flight progress; only populated while status is queued or in_progress.") model OptimizationJobProgress { - @doc("1-based current iteration index.") - current_iteration: int32; + @doc("Number of candidates whose evaluation has completed so far.") + candidates_completed: int32; @doc("Best score observed so far across all candidates.") best_score: float64; @@ -147,11 +221,8 @@ model OptimizationCandidate { @doc("Display name of the candidate (e.g., 'baseline', 'instruction-v2').") name: string; - @doc("The agent configuration that produced this candidate.") - config: OptimizationAgentDefinition; - @doc("What was mutated from the baseline (e.g., {system_prompt: 'new prompt'}).") - mutations: Record; + mutations?: Record; @doc("Average composite score across all tasks.") avg_score: float64; @@ -159,15 +230,6 @@ model OptimizationCandidate { @doc("Average token usage across all tasks.") avg_tokens: float64; - @doc("Fraction of tasks that met the pass threshold.") - pass_rate: float64; - - @doc("Individual task-level scores.") - task_scores: OptimizationTaskResult[]; - - @doc("Whether this candidate is on the Pareto frontier (score vs cost).") - is_pareto_optimal: boolean; - @doc("Foundry evaluation identifier used to score this candidate.") eval_id?: string; @@ -217,66 +279,49 @@ model OptimizationTaskResult { @doc("Terminal-state result body. Populated when status is succeeded or failed.") model OptimizationJobResult { - @doc("Evaluation scores for the original (un-optimized) agent configuration.") - baseline?: OptimizationCandidate; + @doc("Candidate ID of the original (un-optimized) baseline evaluation.") + baseline?: string; - @doc("The highest-scoring candidate found during optimization.") - best?: OptimizationCandidate; + @doc("Candidate ID of the highest-scoring candidate found during optimization.") + best?: string; @doc("All evaluated candidates including baseline.") candidates?: OptimizationCandidate[]; - - @doc("The options used for this optimization run.") - options?: OptimizationOptions; - - @doc("Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped).") - warnings?: string[]; - - @doc("True when all target attributes failed — only the baseline was evaluated.") - all_target_attributes_failed?: boolean; } // --------------------------------------------------------------------------- -// Job resource — flat request body (no `inputs` wrapper) to match vienna contract +// Job resource — extends JobLike per Foundry job guidelines // --------------------------------------------------------------------------- @doc("Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills, tools) to maximize evaluation scores. On success, the result contains scored candidates.") -model OptimizationJob { - @doc("Server-assigned unique identifier.") - @visibility(Lifecycle.Read) - id: string; - - @doc("Current lifecycle status.") - @visibility(Lifecycle.Read) - status: JobStatus; - - @doc("Error details — populated only on failure.") - @visibility(Lifecycle.Read) - error?: ApiError; - - @doc("Result produced on success.") - @visibility(Lifecycle.Read) - result?: OptimizationJobResult; - - // --- Inputs (nested in response, echoing caller-supplied config) --- - @doc("Caller-supplied inputs.") - inputs?: OptimizationJobInputs; - +model OptimizationJob is JobLike { @doc("The timestamp when the job was created, represented in Unix time.") @visibility(Lifecycle.Read) created_at: FoundryTimestamp; - @doc("The timestamp when the job was last updated (status, progress, or result change), represented in Unix time.") + @doc("The timestamp when the job was last updated, represented in Unix time.") @visibility(Lifecycle.Read) - updated_at?: FoundryTimestamp; + updated_at: FoundryTimestamp; - @doc("Progress while in flight. Absent in terminal states.") + @doc("Progress snapshot. May be present in terminal states reflecting last-known progress.") @visibility(Lifecycle.Read) progress?: OptimizationJobProgress; - @doc("Metadata about the dataset used for this optimization job.") + @doc("Non-fatal warnings emitted at any point during optimization.") @visibility(Lifecycle.Read) - dataset?: DatasetInfo; + warnings?: string[]; +} + +// --------------------------------------------------------------------------- +// Slim list item — returned by LIST +// --------------------------------------------------------------------------- + +@doc("Slim job representation returned by the LIST endpoint.") +model OptimizationJobListItem + is OmitProperties { + @doc("The agent targeted by this optimization job.") + @visibility(Lifecycle.Read) + agent?: OptimizationAgentIdentifier; } // --------------------------------------------------------------------------- @@ -293,128 +338,4 @@ model PromotionInfo { @doc("Version of the Foundry agent this candidate was promoted to.") agent_version: string; -} - -@doc("Request body for promoting a candidate to a Foundry agent version.") -model PromoteCandidateRequest { - @doc("Name of the Foundry agent to promote to.") - agent_name: string; - - @doc("Version of the Foundry agent to promote to.") - agent_version: string; -} - -@doc("Response after successfully promoting a candidate.") -model PromoteCandidateResponse { - @doc("The promoted candidate id.") - candidate_id: string; - - @doc("Status after promotion.") - status: string; - - @doc("Timestamp when promotion occurred, represented in Unix time.") - promoted_at: FoundryTimestamp; - - @doc("Name of the Foundry agent promoted to.") - agent_name: string; - - @doc("Version of the Foundry agent promoted to.") - agent_version: string; -} - -// --------------------------------------------------------------------------- -// Dataset info model -// --------------------------------------------------------------------------- - -@doc("Metadata about the dataset used for optimization, surfaced in the response.") -model DatasetInfo { - @doc("Dataset name when using a registered dataset reference. Null for inline datasets.") - name?: string; - - @doc("Dataset version when using a registered dataset reference. Null for inline datasets.") - version?: string; - - @doc("Number of tasks/rows in the dataset.") - task_count: int32; - - @doc("True when the dataset was provided inline in the request body.") - is_inline: boolean; -} - -// --------------------------------------------------------------------------- -// Candidate sub-resource bodies -// --------------------------------------------------------------------------- - -@doc("Deploy-config blob for a candidate. Suitable for setting OPTIMIZATION_CONFIG on a hosted-agent version.") -model CandidateDeployConfig { - @doc("System prompt / instructions.") - instructions?: string; - - @doc("Foundry deployment name.") - `model`?: string; - - @doc("Optional sampling temperature.") - @minValue(0) - @maxValue(2) - temperature?: float32; - - @doc("Optional skill overrides.") - skills?: Record[]; - - @doc("Optional tool overrides.") - tools?: Record[]; -} - -@doc("Full per-task evaluation results for a candidate, returned by GET /candidates/{id}/results.") -model CandidateResults { - @doc("Owning candidate id.") - candidate_id: string; - - @doc("Per-task evaluation rows.") - results: OptimizationTaskResult[]; -} - -@doc("Candidate metadata returned by GET /candidates/{id}.") -model CandidateMetadata { - @doc("Server-assigned candidate identifier.") - candidate_id: string; - - @doc("Owning optimization job id.") - job_id: string; - - @doc("Display name of the candidate.") - candidate_name: string; - - @doc("Candidate lifecycle status.") - status: string; - - @doc("Candidate's aggregate score.") - score?: float64; - - @doc("Whether detailed results are available for this candidate.") - has_results: boolean; - - @doc("Timestamp when the candidate was created, represented in Unix time.") - created_at: FoundryTimestamp; - - @doc("Timestamp when the candidate was last updated, represented in Unix time.") - updated_at: FoundryTimestamp; - - @doc("Promotion metadata. Null if not promoted.") - promotion?: PromotionInfo; - - @doc("Files in the candidate's blob directory.") - files: CandidateFileInfo[]; -} - -@doc("File entry in a candidate's blob directory.") -model CandidateFileInfo { - @doc("Relative path of the file.") - path: string; - - @doc("File type category (e.g. 'config', 'results').") - type: string; - - @doc("File size in bytes.") - size_bytes: int64; -} +} \ No newline at end of file diff --git a/specification/ai-foundry/data-plane/Foundry/src/agents-optimization/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/agents-optimization/routes.tsp index ebfe2af1ae8f..c7e64d82aa3b 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/agents-optimization/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/agents-optimization/routes.tsp @@ -15,7 +15,7 @@ namespace Azure.AI.Projects; const AgentOptimizationRequiredPreviews = #{ conditional_previews: #[ - FoundryFeaturesOptInKeys.agents_optimization_v1_preview + FoundryFeaturesOptInKeys.agents_optimization_v2_preview ], }; @@ -28,55 +28,31 @@ const AgentOptimizationRequiredPreviews = #{ #suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "LRO polling is handled by the client via Operation-Location" @tag("AgentOptimizationJobs") interface AgentOptimizationJobs { - /** - * Creates an agent optimization job and returns the queued job. - * Honors `Operation-Id` for idempotent retry. - */ - @summary("Create an agent optimization job") + @summary("Creates an agent optimization job.") + @doc("Create an optimization job. Returns 201 with the queued job. Honours `Operation-Id` for idempotent retry.") @route("agent_optimization_jobs") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @post - create is FoundryDataPlanePreviewOperation< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - ...WithOperationId; - - @doc("The optimization job inputs.") - @body - inputs: OptimizationJobInputs; - }, - JobCreatedResponse + create is postJobPreview< + FoundryFeaturesOptInKeys.agents_optimization_v2_preview, + OptimizationJob >; - /** - * Retrieves the specified agent optimization job. - * Returns 202 while the job is in progress and 200 after it reaches a terminal state. - */ - @summary("Get an agent optimization job") + @summary("Get info about an agent optimization job.") + @doc("Get an optimization job by id.") @route("agent_optimization_jobs/{jobId}") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @get - get is FoundryDataPlanePreviewOperation< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - /** The ID of the job. */ - @path jobId: string; - }, - OptimizationJob & { - @statusCode _: 200 | 202; - @header("Retry-After") retryAfter?: int32; - } + get is queryJobStatusPreview< + FoundryFeaturesOptInKeys.agents_optimization_v2_preview, + OptimizationJob >; - /** - * Returns agent optimization jobs with cursor pagination and optional lifecycle or agent filters. - */ - @summary("List agent optimization jobs") + @summary("Returns a list of agent optimization jobs.") + @doc("List optimization jobs. Supports cursor pagination and optional status / agent_name filters.") @route("agent_optimization_jobs") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) list is listJobsPreview< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - OptimizationJob, + FoundryFeaturesOptInKeys.agents_optimization_v2_preview, + OptimizationJobListItem, { @doc("Filter to jobs in this lifecycle state.") @query @@ -88,175 +64,19 @@ interface AgentOptimizationJobs { } >; - /** - * Requests cancellation of the specified agent optimization job. - * The operation remains idempotent after the job reaches a terminal state. - */ - @summary("Cancel an agent optimization job") + @summary("Cancels an agent optimization job.") + @doc("Request cancellation of a running or queued job. Returns an error if the job is already in a terminal state.") @route("agent_optimization_jobs/{jobId}:cancel") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) cancel is cancelJobPreview< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, + FoundryFeaturesOptInKeys.agents_optimization_v2_preview, OptimizationJob >; - /** - * Deletes the specified agent optimization job and its candidate artifacts. - * Cancels the job first when it is still in a non-terminal state. - */ - @summary("Delete an agent optimization job") + @summary("Deletes an agent optimization job.") + @doc("Delete the job and its candidate artifacts. Cancels first if non-terminal.") @route("agent_optimization_jobs/{jobId}") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @delete - delete is FoundryDataPlanePreviewOperation< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - @doc("The ID of the job to delete.") - @path - jobId: string; - - @doc("When true, force-delete even if the job is in a non-terminal state.") - @query - force?: boolean; - }, - NoContentResponse - >; - - // --------------------------------------------------------------------------- - // Candidate sub-resource operations - // --------------------------------------------------------------------------- - - /** - * Returns the candidates produced by the specified optimization job. - */ - @summary("List optimization job candidates") - @route("agent_optimization_jobs/{jobId}/candidates") - @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @get - @list - listCandidates is FoundryDataPlanePreviewOperation< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - @doc("The optimization job id.") - @path - jobId: string; + delete is deleteJobPreview; - ...CommonPageQueryParameters; - }, - AgentsPagedResult - >; - - /** - * Retrieves metadata, manifest information, and promotion details for the specified candidate. - */ - @summary("Get an optimization candidate") - @route("agent_optimization_jobs/{jobId}/candidates/{candidateId}") - @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @get - getCandidate is FoundryDataPlanePreviewOperation< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - @doc("The optimization job id.") - @path - jobId: string; - - @doc("The candidate id.") - @path - candidateId: string; - }, - CandidateMetadata - >; - - /** - * Retrieves the deploy configuration JSON for the specified candidate. - * Clients can use it to compose `agents.create_version(...)` requests. - */ - @summary("Get an optimization candidate config") - @route("agent_optimization_jobs/{jobId}/candidates/{candidateId}/config") - @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @get - getCandidateConfig is FoundryDataPlanePreviewOperation< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - @doc("The optimization job id.") - @path - jobId: string; - - @doc("The candidate id.") - @path - candidateId: string; - }, - CandidateDeployConfig - >; - - /** - * Retrieves full per-task evaluation results for the specified candidate. - */ - @summary("Get optimization candidate results") - @route("agent_optimization_jobs/{jobId}/candidates/{candidateId}/results") - @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @get - getCandidateResults is FoundryDataPlanePreviewOperation< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - @doc("The optimization job id.") - @path - jobId: string; - - @doc("The candidate id.") - @path - candidateId: string; - }, - CandidateResults - >; - - /** - * Streams the specified file from the candidate's blob directory. - */ - @summary("Get an optimization candidate file") - @route("agent_optimization_jobs/{jobId}/candidates/{candidateId}/files") - @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @get - getCandidateFile is FoundryDataPlanePreviewOperation< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - @doc("The optimization job id.") - @path - jobId: string; - - @doc("The candidate id.") - @path - candidateId: string; - - @doc("Relative path of the file to download (e.g. 'files/examples.jsonl').") - @query - path: string; - }, - bytes - >; - - /** - * Promotes the specified candidate and records the deployment timestamp and target agent version. - */ - @summary("Promote an optimization candidate") - @route("agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote") - @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @post - promoteCandidate is FoundryDataPlanePreviewOperation< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - @doc("The optimization job id.") - @path - jobId: string; - - @doc("The candidate id to promote.") - @path - candidateId: string; - - @doc("Promotion details.") - @body - candidate_request: PromoteCandidateRequest; - }, - PromoteCandidateResponse - >; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-common/beta-ops-relocation-agents.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-common/beta-ops-relocation-agents.tsp index 4eac67ed8e68..f86601333fb8 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-common/beta-ops-relocation-agents.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-common/beta-ops-relocation-agents.tsp @@ -68,24 +68,3 @@ interface Agents {} @@clientLocation(Azure.AI.Projects.AgentOptimizationJobs.list, Agents); @@clientLocation(Azure.AI.Projects.AgentOptimizationJobs.cancel, Agents); @@clientLocation(Azure.AI.Projects.AgentOptimizationJobs.delete, Agents); -@@clientLocation( - Azure.AI.Projects.AgentOptimizationJobs.listCandidates, - Agents -); -@@clientLocation(Azure.AI.Projects.AgentOptimizationJobs.getCandidate, Agents); -@@clientLocation( - Azure.AI.Projects.AgentOptimizationJobs.getCandidateConfig, - Agents -); -@@clientLocation( - Azure.AI.Projects.AgentOptimizationJobs.getCandidateResults, - Agents -); -@@clientLocation( - Azure.AI.Projects.AgentOptimizationJobs.getCandidateFile, - Agents -); -@@clientLocation( - Azure.AI.Projects.AgentOptimizationJobs.promoteCandidate, - Agents -); diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-python-js-azure-ai-projects/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-python-js-azure-ai-projects/client.tsp index 584cd4412431..b550344bcf7a 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-python-js-azure-ai-projects/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-python-js-azure-ai-projects/client.tsp @@ -191,19 +191,6 @@ using Azure.AI.Projects; @@clientName(AgentOptimizationJobs.list, "listOptimizationJobs"); @@clientName(AgentOptimizationJobs.cancel, "cancelOptimizationJob"); @@clientName(AgentOptimizationJobs.delete, "deleteOptimizationJob"); -@@clientName( - AgentOptimizationJobs.listCandidates, - "listOptimizationCandidates" -); -@@clientName(AgentOptimizationJobs.getCandidate, "getOptimizationCandidate"); -@@clientName( - AgentOptimizationJobs.getCandidateConfig, - "getOptimizationCandidateConfig" -); -@@clientName( - AgentOptimizationJobs.getCandidateResults, - "getOptimizationCandidateResults" -); // DatasetItem model has a property `response_items?: OpenAI.OutputItem[]`. It is used // to define Agent optimization request. If emitted as-is, it pulls in a lot of diff --git a/specification/ai-foundry/data-plane/Foundry/src/servicepatterns.tsp b/specification/ai-foundry/data-plane/Foundry/src/servicepatterns.tsp index 7092b5c8bc8b..23e480d4cb0d 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/servicepatterns.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/servicepatterns.tsp @@ -125,7 +125,7 @@ union FoundryFeaturesOptInKeys { skills_v1_preview: "Skills=V1Preview", data_generation_jobs_v1_preview: "DataGenerationJobs=V1Preview", models_v1_preview: "Models=V1Preview", - agents_optimization_v1_preview: "AgentsOptimization=V1Preview", + agents_optimization_v2_preview: "AgentsOptimization=V2Preview", } alias WithRequiredFoundryPreviewHeader