From c63598fa9cf556376a4d21fded4907507bd20f7e Mon Sep 17 00:00:00 2001 From: kaylieee Date: Thu, 7 May 2026 23:30:20 -0700 Subject: [PATCH 01/37] rename evaluator gen ops --- .../ai-foundry/data-plane/Foundry/client.java.tsp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index f7f3fa9fb919..717a82ec6476 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -108,6 +108,13 @@ namespace Azure.AI.Projects; @@clientName(Models.startPendingUpload, "startModelPendingUpload"); @@clientName(Models.getCredentials, "getModelCredentials"); +//Evaluator generation jobs +@@clientName(EvaluatorGenerationJobs.create, "createGenerationJob"); +@@clientName(EvaluatorGenerationJobs.get, "getGenerationJob"); +@@clientName(EvaluatorGenerationJobs.list, "listGenerationJobs"); +@@clientName(EvaluatorGenerationJobs.cancel, "cancelGenerationJob"); +@@clientName(EvaluatorGenerationJobs.delete, "deleteGenerationJob"); + // -------------------------------------------------------------------------------- // Renames - models // -------------------------------------------------------------------------------- From 46c66cf7018a613b5f99c50868ddddb0746f92a2 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 12 May 2026 10:29:56 -0700 Subject: [PATCH 02/37] remove async from name --- specification/ai-foundry/data-plane/Foundry/client.java.tsp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 717a82ec6476..226667a06da4 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -104,7 +104,7 @@ namespace Azure.AI.Projects; @@clientName(Models.listLatest, "listLatestModelVersions"); @@clientName(Models.deleteVersion, "deleteModelVersion"); @@clientName(Models.createOrUpdateVersion, "updateModelVersion"); -@@clientName(Models.createAsync, "createModelVersionAsync"); +@@clientName(Models.createAsync, "createModelVersion"); @@clientName(Models.startPendingUpload, "startModelPendingUpload"); @@clientName(Models.getCredentials, "getModelCredentials"); @@ -247,4 +247,5 @@ model TimeZoneType {} @@clientDoc(Skills.downloadSkill, "Downloads a skill package as a ZIP archive containing {@code SKILL.md}. Returns the original uploaded archive for skills created via {@code createSkillFromPackage}; materializes a ZIP from stored instructions for skills created via {@code createSkill}.", - DocumentationMode.replace); + DocumentationMode.replace +); From 02327dd94f04d598c59d7703aaca24552be834f9 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 12 May 2026 11:38:39 -0700 Subject: [PATCH 03/37] revert targetconfig rename --- specification/ai-foundry/data-plane/Foundry/client.java.tsp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 226667a06da4..f65b2001f116 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -155,6 +155,8 @@ namespace Azure.AI.Projects; // and `MemoryStoreUpdateResponse`. @@clientName(OpenAI.Error, "ApiError"); +@@clientName(RedTeamTargetConfig, "TargetConfig"); + // -------------------------------------------------------------------------------- // Usage / Public accessibility overrides // -------------------------------------------------------------------------------- From 9cca5c54a2c61304b7ff72d90ef444ee23326928 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 12 May 2026 17:27:01 -0700 Subject: [PATCH 04/37] undo rename --- specification/ai-foundry/data-plane/Foundry/client.java.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index f65b2001f116..4e163aeab0a4 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -104,7 +104,7 @@ namespace Azure.AI.Projects; @@clientName(Models.listLatest, "listLatestModelVersions"); @@clientName(Models.deleteVersion, "deleteModelVersion"); @@clientName(Models.createOrUpdateVersion, "updateModelVersion"); -@@clientName(Models.createAsync, "createModelVersion"); +@@clientName(Models.createAsync, "createModelVersionAsync"); @@clientName(Models.startPendingUpload, "startModelPendingUpload"); @@clientName(Models.getCredentials, "getModelCredentials"); From f36afb8972025ddf47c119c91cda5a9c686126e9 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Mon, 18 May 2026 18:11:27 -0700 Subject: [PATCH 05/37] rename listsessionfiles --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index aa7e13604857..f2d6d47bde6d 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -144,6 +144,9 @@ using Azure.AI.Projects; @@clientName(WorkIQPreviewTool, "WorkIqPreviewTool", "java"); +// Rename listSessionFiles to getSessionFiles for better accuracy, since it's a GET operation and returns the list of files in the response. +@@clientName(AgentSessionFiles.listSessionFiles, "getSessionFiles"); + // -------------------------------------------------------------------------------- // Usage / Public accessibility overrides // -------------------------------------------------------------------------------- @@ -205,7 +208,6 @@ using Azure.AI.Projects; @@usage(CreateAgentVersionRequest, Usage.input); @@access(CreateAgentVersionRequest, Access.public); - // Ensure SessionLogEvent and SessionLogEventType are emitted @@usage(SessionLogEvent, Usage.output); @@access(SessionLogEvent, Access.public); From af96d48d94f032565435cf4e1f4885167d9ca94a Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 19 May 2026 17:23:58 -0700 Subject: [PATCH 06/37] add agents-optimization to agents client, add evaluation-suites, suppress createAgentFromCode --- .../data-plane/Foundry/client.java.tsp | 1 + .../Foundry/src/sdk-agents/client.tsp | 37 +++++++++++++++++++ .../Foundry/src/sdk-agents/main.tsp | 1 + 3 files changed, 39 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 05ee8d9ea842..5bc40ce360ff 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -16,6 +16,7 @@ import "./src/schedules/routes.tsp"; import "./src/routines/routes.tsp"; import "./src/skills/routes.tsp"; import "./src/data_generation_jobs/routes.tsp"; +import "./src/evaluation-suites/routes.tsp"; using Azure.ClientGenerator.Core; namespace Azure.AI.Projects; diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index f2d6d47bde6d..40d0305b4387 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -147,6 +147,28 @@ using Azure.AI.Projects; // Rename listSessionFiles to getSessionFiles for better accuracy, since it's a GET operation and returns the list of files in the response. @@clientName(AgentSessionFiles.listSessionFiles, "getSessionFiles"); +@@clientName(AgentOptimizationJobs.create, "createOptimizationJob", "java"); +@@clientName(AgentOptimizationJobs.get, "getOptimizationJob", "java"); +@@clientName(AgentOptimizationJobs.list, "listOptimizationJobs", "java"); +@@clientName(AgentOptimizationJobs.cancel, "cancelOptimizationJob", "java"); +@@clientName(AgentOptimizationJobs.delete, "deleteOptimizationJob", "java"); +@@clientName(AgentOptimizationJobs.listCandidates, + "listOptimizationCandidates", + "java" +); +@@clientName(AgentOptimizationJobs.getCandidate, + "getOptimizationCandidate", + "java" +); +@@clientName(AgentOptimizationJobs.getCandidateConfig, + "getOptimizationCandidateConfig", + "java" +); +@@clientName(AgentOptimizationJobs.getCandidateResults, + "getOptimizationCandidateResults", + "java" +); + // -------------------------------------------------------------------------------- // Usage / Public accessibility overrides // -------------------------------------------------------------------------------- @@ -155,6 +177,7 @@ using Azure.AI.Projects; @@access(Agents.updateAgent, Access.internal); @@access(Agents.createAgentFromManifest, Access.internal); @@access(Agents.updateAgentFromManifest, Access.internal); +@@access(Agents.createAgentFromCode, Access.internal); // making methods private to add a public shim using the OpenAI types. @@access(MemoryStores.searchMemories, Access.internal); @@ -515,3 +538,17 @@ union WebSearchToolSearchContextSizeExpandable { // of our own, to prevent confusion. @@clientName(Conversations.listConversations, "listAgentConversations", "java"); @@clientLocation(Conversations.listConversations, Agents); + +// -------------------------------------------------------------------------------- +// AgentOptimizationJobs: relocate operations onto the Agents sub-client +// -------------------------------------------------------------------------------- + +@@clientLocation(AgentOptimizationJobs.create, Agents); +@@clientLocation(AgentOptimizationJobs.get, Agents); +@@clientLocation(AgentOptimizationJobs.list, Agents); +@@clientLocation(AgentOptimizationJobs.cancel, Agents); +@@clientLocation(AgentOptimizationJobs.delete, Agents); +@@clientLocation(AgentOptimizationJobs.listCandidates, Agents); +@@clientLocation(AgentOptimizationJobs.getCandidate, Agents); +@@clientLocation(AgentOptimizationJobs.getCandidateConfig, Agents); +@@clientLocation(AgentOptimizationJobs.getCandidateResults, Agents); diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/main.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/main.tsp index d5389c00723f..d4ed52fdc342 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/main.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/main.tsp @@ -5,6 +5,7 @@ import "../agents/routes.tsp"; import "../memory-stores/routes.tsp"; import "../toolboxes/routes.tsp"; import "../agents-session-files/routes.tsp"; +import "../agents-optimization/routes.tsp"; // We don't need the operations for these subclients, just the models // so we can customize visibility where necessary. import "../openai-responses/models.tsp"; From 805b765006553e40daa2ef731051f741a78e70c8 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 19 May 2026 17:31:27 -0700 Subject: [PATCH 07/37] move evaluation suite operations to evaluators, rename --- .../data-plane/Foundry/client.java.tsp | 65 +++++++++++++++++-- 1 file changed, 60 insertions(+), 5 deletions(-) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 5bc40ce360ff..4b4f7f7ebb68 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -111,11 +111,41 @@ namespace Azure.AI.Projects; @@clientName(Models.getCredentials, "getModelCredentials"); //Evaluator generation jobs -@@clientName(EvaluatorGenerationJobs.create, "createGenerationJob"); -@@clientName(EvaluatorGenerationJobs.get, "getGenerationJob"); -@@clientName(EvaluatorGenerationJobs.list, "listGenerationJobs"); -@@clientName(EvaluatorGenerationJobs.cancel, "cancelGenerationJob"); -@@clientName(EvaluatorGenerationJobs.delete, "deleteGenerationJob"); +@@clientName(EvaluatorGenerationJobs.create, "createEvaluatorGenerationJob"); +@@clientName(EvaluatorGenerationJobs.get, "getEvaluatorGenerationJob"); +@@clientName(EvaluatorGenerationJobs.list, "listEvaluatorGenerationJobs"); +@@clientName(EvaluatorGenerationJobs.cancel, "cancelEvaluatorGenerationJob"); +@@clientName(EvaluatorGenerationJobs.delete, "deleteEvaluatorGenerationJob"); + +// Evaluation Suite operations +@@clientName(EvaluationSuites.listVersions, "listEvaluationSuiteVersions"); +@@clientName(EvaluationSuites.listLatest, "listEvaluationSuites"); +@@clientName(EvaluationSuites.getVersion, "getEvaluationSuite"); +@@clientName(EvaluationSuites.deleteVersion, "deleteEvaluationSuite"); +@@clientName(EvaluationSuites.createOrUpdateVersion, + "createOrUpdateEvaluationSuite" +); +@@clientName(EvaluationSuites.createEvaluationSuiteVersion, + "createEvaluationSuite" +); +@@clientName(EvaluationSuites.run, "runEvaluationSuite"); + +// Evaluation Suite Generation Jobs +@@clientName(EvaluationSuiteGenerationJobs.create, + "createEvaluationSuiteGenerationJob" +); +@@clientName(EvaluationSuiteGenerationJobs.get, + "getEvaluationSuiteGenerationJob" +); +@@clientName(EvaluationSuiteGenerationJobs.list, + "listEvaluationSuiteGenerationJobs" +); +@@clientName(EvaluationSuiteGenerationJobs.cancel, + "cancelEvaluationSuiteGenerationJob" +); +@@clientName(EvaluationSuiteGenerationJobs.delete, + "deleteEvaluationSuiteGenerationJob" +); // -------------------------------------------------------------------------------- // Renames - models @@ -253,3 +283,28 @@ model TimeZoneType {} "Downloads a skill package as a ZIP archive containing {@code SKILL.md}. Returns the original uploaded archive for skills created via {@code createSkillFromPackage}; materializes a ZIP from stored instructions for skills created via {@code createSkill}.", DocumentationMode.replace ); + +// -------------------------------------------------------------------------------- +// Relocate EvaluatorGenerationJobs, EvaluationSuites, and +// EvaluationSuiteGenerationJobs onto the Evaluators sub-client +// -------------------------------------------------------------------------------- + +@@clientLocation(EvaluatorGenerationJobs.create, Evaluators); +@@clientLocation(EvaluatorGenerationJobs.get, Evaluators); +@@clientLocation(EvaluatorGenerationJobs.list, Evaluators); +@@clientLocation(EvaluatorGenerationJobs.cancel, Evaluators); +@@clientLocation(EvaluatorGenerationJobs.delete, Evaluators); + +@@clientLocation(EvaluationSuites.listVersions, Evaluators); +@@clientLocation(EvaluationSuites.listLatest, Evaluators); +@@clientLocation(EvaluationSuites.getVersion, Evaluators); +@@clientLocation(EvaluationSuites.deleteVersion, Evaluators); +@@clientLocation(EvaluationSuites.createOrUpdateVersion, Evaluators); +@@clientLocation(EvaluationSuites.createEvaluationSuiteVersion, Evaluators); +@@clientLocation(EvaluationSuites.run, Evaluators); + +@@clientLocation(EvaluationSuiteGenerationJobs.create, Evaluators); +@@clientLocation(EvaluationSuiteGenerationJobs.get, Evaluators); +@@clientLocation(EvaluationSuiteGenerationJobs.list, Evaluators); +@@clientLocation(EvaluationSuiteGenerationJobs.cancel, Evaluators); +@@clientLocation(EvaluationSuiteGenerationJobs.delete, Evaluators); From 1e8c4c9ff13811e42d00b897a36b19fa4c95bc4c Mon Sep 17 00:00:00 2001 From: kaylieee Date: Wed, 20 May 2026 23:13:42 -0700 Subject: [PATCH 08/37] remove evaluationsuites --- .../data-plane/Foundry/client.java.tsp | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 4b4f7f7ebb68..44f8b6434664 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -16,7 +16,6 @@ import "./src/schedules/routes.tsp"; import "./src/routines/routes.tsp"; import "./src/skills/routes.tsp"; import "./src/data_generation_jobs/routes.tsp"; -import "./src/evaluation-suites/routes.tsp"; using Azure.ClientGenerator.Core; namespace Azure.AI.Projects; @@ -117,36 +116,6 @@ namespace Azure.AI.Projects; @@clientName(EvaluatorGenerationJobs.cancel, "cancelEvaluatorGenerationJob"); @@clientName(EvaluatorGenerationJobs.delete, "deleteEvaluatorGenerationJob"); -// Evaluation Suite operations -@@clientName(EvaluationSuites.listVersions, "listEvaluationSuiteVersions"); -@@clientName(EvaluationSuites.listLatest, "listEvaluationSuites"); -@@clientName(EvaluationSuites.getVersion, "getEvaluationSuite"); -@@clientName(EvaluationSuites.deleteVersion, "deleteEvaluationSuite"); -@@clientName(EvaluationSuites.createOrUpdateVersion, - "createOrUpdateEvaluationSuite" -); -@@clientName(EvaluationSuites.createEvaluationSuiteVersion, - "createEvaluationSuite" -); -@@clientName(EvaluationSuites.run, "runEvaluationSuite"); - -// Evaluation Suite Generation Jobs -@@clientName(EvaluationSuiteGenerationJobs.create, - "createEvaluationSuiteGenerationJob" -); -@@clientName(EvaluationSuiteGenerationJobs.get, - "getEvaluationSuiteGenerationJob" -); -@@clientName(EvaluationSuiteGenerationJobs.list, - "listEvaluationSuiteGenerationJobs" -); -@@clientName(EvaluationSuiteGenerationJobs.cancel, - "cancelEvaluationSuiteGenerationJob" -); -@@clientName(EvaluationSuiteGenerationJobs.delete, - "deleteEvaluationSuiteGenerationJob" -); - // -------------------------------------------------------------------------------- // Renames - models // -------------------------------------------------------------------------------- @@ -294,17 +263,3 @@ model TimeZoneType {} @@clientLocation(EvaluatorGenerationJobs.list, Evaluators); @@clientLocation(EvaluatorGenerationJobs.cancel, Evaluators); @@clientLocation(EvaluatorGenerationJobs.delete, Evaluators); - -@@clientLocation(EvaluationSuites.listVersions, Evaluators); -@@clientLocation(EvaluationSuites.listLatest, Evaluators); -@@clientLocation(EvaluationSuites.getVersion, Evaluators); -@@clientLocation(EvaluationSuites.deleteVersion, Evaluators); -@@clientLocation(EvaluationSuites.createOrUpdateVersion, Evaluators); -@@clientLocation(EvaluationSuites.createEvaluationSuiteVersion, Evaluators); -@@clientLocation(EvaluationSuites.run, Evaluators); - -@@clientLocation(EvaluationSuiteGenerationJobs.create, Evaluators); -@@clientLocation(EvaluationSuiteGenerationJobs.get, Evaluators); -@@clientLocation(EvaluationSuiteGenerationJobs.list, Evaluators); -@@clientLocation(EvaluationSuiteGenerationJobs.cancel, Evaluators); -@@clientLocation(EvaluationSuiteGenerationJobs.delete, Evaluators); From d9ead557066144db5eb1794cc36ac206288aec16 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Wed, 20 May 2026 23:39:43 -0700 Subject: [PATCH 09/37] Revert "remove evaluationsuites" This reverts commit 1e8c4c9ff13811e42d00b897a36b19fa4c95bc4c. --- .../data-plane/Foundry/client.java.tsp | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 44f8b6434664..4b4f7f7ebb68 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -16,6 +16,7 @@ import "./src/schedules/routes.tsp"; import "./src/routines/routes.tsp"; import "./src/skills/routes.tsp"; import "./src/data_generation_jobs/routes.tsp"; +import "./src/evaluation-suites/routes.tsp"; using Azure.ClientGenerator.Core; namespace Azure.AI.Projects; @@ -116,6 +117,36 @@ namespace Azure.AI.Projects; @@clientName(EvaluatorGenerationJobs.cancel, "cancelEvaluatorGenerationJob"); @@clientName(EvaluatorGenerationJobs.delete, "deleteEvaluatorGenerationJob"); +// Evaluation Suite operations +@@clientName(EvaluationSuites.listVersions, "listEvaluationSuiteVersions"); +@@clientName(EvaluationSuites.listLatest, "listEvaluationSuites"); +@@clientName(EvaluationSuites.getVersion, "getEvaluationSuite"); +@@clientName(EvaluationSuites.deleteVersion, "deleteEvaluationSuite"); +@@clientName(EvaluationSuites.createOrUpdateVersion, + "createOrUpdateEvaluationSuite" +); +@@clientName(EvaluationSuites.createEvaluationSuiteVersion, + "createEvaluationSuite" +); +@@clientName(EvaluationSuites.run, "runEvaluationSuite"); + +// Evaluation Suite Generation Jobs +@@clientName(EvaluationSuiteGenerationJobs.create, + "createEvaluationSuiteGenerationJob" +); +@@clientName(EvaluationSuiteGenerationJobs.get, + "getEvaluationSuiteGenerationJob" +); +@@clientName(EvaluationSuiteGenerationJobs.list, + "listEvaluationSuiteGenerationJobs" +); +@@clientName(EvaluationSuiteGenerationJobs.cancel, + "cancelEvaluationSuiteGenerationJob" +); +@@clientName(EvaluationSuiteGenerationJobs.delete, + "deleteEvaluationSuiteGenerationJob" +); + // -------------------------------------------------------------------------------- // Renames - models // -------------------------------------------------------------------------------- @@ -263,3 +294,17 @@ model TimeZoneType {} @@clientLocation(EvaluatorGenerationJobs.list, Evaluators); @@clientLocation(EvaluatorGenerationJobs.cancel, Evaluators); @@clientLocation(EvaluatorGenerationJobs.delete, Evaluators); + +@@clientLocation(EvaluationSuites.listVersions, Evaluators); +@@clientLocation(EvaluationSuites.listLatest, Evaluators); +@@clientLocation(EvaluationSuites.getVersion, Evaluators); +@@clientLocation(EvaluationSuites.deleteVersion, Evaluators); +@@clientLocation(EvaluationSuites.createOrUpdateVersion, Evaluators); +@@clientLocation(EvaluationSuites.createEvaluationSuiteVersion, Evaluators); +@@clientLocation(EvaluationSuites.run, Evaluators); + +@@clientLocation(EvaluationSuiteGenerationJobs.create, Evaluators); +@@clientLocation(EvaluationSuiteGenerationJobs.get, Evaluators); +@@clientLocation(EvaluationSuiteGenerationJobs.list, Evaluators); +@@clientLocation(EvaluationSuiteGenerationJobs.cancel, Evaluators); +@@clientLocation(EvaluationSuiteGenerationJobs.delete, Evaluators); From 08825b6d47fcbec7ac272749a692b2819988931e Mon Sep 17 00:00:00 2001 From: kaylieee Date: Wed, 20 May 2026 23:40:16 -0700 Subject: [PATCH 10/37] Reapply "remove evaluationsuites" This reverts commit d9ead557066144db5eb1794cc36ac206288aec16. --- .../data-plane/Foundry/client.java.tsp | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 4b4f7f7ebb68..44f8b6434664 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -16,7 +16,6 @@ import "./src/schedules/routes.tsp"; import "./src/routines/routes.tsp"; import "./src/skills/routes.tsp"; import "./src/data_generation_jobs/routes.tsp"; -import "./src/evaluation-suites/routes.tsp"; using Azure.ClientGenerator.Core; namespace Azure.AI.Projects; @@ -117,36 +116,6 @@ namespace Azure.AI.Projects; @@clientName(EvaluatorGenerationJobs.cancel, "cancelEvaluatorGenerationJob"); @@clientName(EvaluatorGenerationJobs.delete, "deleteEvaluatorGenerationJob"); -// Evaluation Suite operations -@@clientName(EvaluationSuites.listVersions, "listEvaluationSuiteVersions"); -@@clientName(EvaluationSuites.listLatest, "listEvaluationSuites"); -@@clientName(EvaluationSuites.getVersion, "getEvaluationSuite"); -@@clientName(EvaluationSuites.deleteVersion, "deleteEvaluationSuite"); -@@clientName(EvaluationSuites.createOrUpdateVersion, - "createOrUpdateEvaluationSuite" -); -@@clientName(EvaluationSuites.createEvaluationSuiteVersion, - "createEvaluationSuite" -); -@@clientName(EvaluationSuites.run, "runEvaluationSuite"); - -// Evaluation Suite Generation Jobs -@@clientName(EvaluationSuiteGenerationJobs.create, - "createEvaluationSuiteGenerationJob" -); -@@clientName(EvaluationSuiteGenerationJobs.get, - "getEvaluationSuiteGenerationJob" -); -@@clientName(EvaluationSuiteGenerationJobs.list, - "listEvaluationSuiteGenerationJobs" -); -@@clientName(EvaluationSuiteGenerationJobs.cancel, - "cancelEvaluationSuiteGenerationJob" -); -@@clientName(EvaluationSuiteGenerationJobs.delete, - "deleteEvaluationSuiteGenerationJob" -); - // -------------------------------------------------------------------------------- // Renames - models // -------------------------------------------------------------------------------- @@ -294,17 +263,3 @@ model TimeZoneType {} @@clientLocation(EvaluatorGenerationJobs.list, Evaluators); @@clientLocation(EvaluatorGenerationJobs.cancel, Evaluators); @@clientLocation(EvaluatorGenerationJobs.delete, Evaluators); - -@@clientLocation(EvaluationSuites.listVersions, Evaluators); -@@clientLocation(EvaluationSuites.listLatest, Evaluators); -@@clientLocation(EvaluationSuites.getVersion, Evaluators); -@@clientLocation(EvaluationSuites.deleteVersion, Evaluators); -@@clientLocation(EvaluationSuites.createOrUpdateVersion, Evaluators); -@@clientLocation(EvaluationSuites.createEvaluationSuiteVersion, Evaluators); -@@clientLocation(EvaluationSuites.run, Evaluators); - -@@clientLocation(EvaluationSuiteGenerationJobs.create, Evaluators); -@@clientLocation(EvaluationSuiteGenerationJobs.get, Evaluators); -@@clientLocation(EvaluationSuiteGenerationJobs.list, Evaluators); -@@clientLocation(EvaluationSuiteGenerationJobs.cancel, Evaluators); -@@clientLocation(EvaluationSuiteGenerationJobs.delete, Evaluators); From 2789e8cfaef88306d0916a8e7370bd7ef93167ea Mon Sep 17 00:00:00 2001 From: kaylieee Date: Wed, 20 May 2026 23:55:11 -0700 Subject: [PATCH 11/37] add evals dependency for agent optimizations --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/tspconfig.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/tspconfig.yaml b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/tspconfig.yaml index d084ed52c043..d45bce07ca2a 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/tspconfig.yaml +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/tspconfig.yaml @@ -53,6 +53,7 @@ imports: - "@azure-tools/typespec-azure-core/experimental" - "@azure-tools/typespec-client-generator-core" # Note: Imports for OpenAI types may use alternate views per tspconfig.yaml + - "@azure-tools/openai-typespec/models/evals" - "@azure-tools/openai-typespec/models/responses" linter: extends: From bd618202ac42e97bcb3fdb7da09a47d9fa391d54 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Thu, 21 May 2026 10:23:20 -0700 Subject: [PATCH 12/37] suppress openai outputitem --- .../Foundry/src/sdk-agents/client.tsp | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index 40d0305b4387..261455c6859b 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -204,6 +204,73 @@ using Azure.AI.Projects; @@access(MemoryStoreSearchResponse, Access.public); @@usage(MemoryStoreSearchResponse, Usage.output); +// Emit Azure-specific OutputItem subtypes as public Java classes +@@access(BingGroundingToolCall, Access.public); +@@usage(BingGroundingToolCall, Usage.input); + +@@access(BingGroundingToolCallOutput, Access.public); +@@usage(BingGroundingToolCallOutput, Usage.input); + +@@access(SharepointGroundingToolCall, Access.public); +@@usage(SharepointGroundingToolCall, Usage.input); + +@@access(SharepointGroundingToolCallOutput, Access.public); +@@usage(SharepointGroundingToolCallOutput, Usage.input); + +@@access(AzureAISearchToolCall, Access.public); +@@usage(AzureAISearchToolCall, Usage.input); + +@@access(AzureAISearchToolCallOutput, Access.public); +@@usage(AzureAISearchToolCallOutput, Usage.input); + +@@access(BingCustomSearchToolCall, Access.public); +@@usage(BingCustomSearchToolCall, Usage.input); + +@@access(BingCustomSearchToolCallOutput, Access.public); +@@usage(BingCustomSearchToolCallOutput, Usage.input); + +@@access(OpenApiToolCall, Access.public); +@@usage(OpenApiToolCall, Usage.input); + +@@access(OpenApiToolCallOutput, Access.public); +@@usage(OpenApiToolCallOutput, Usage.input); + +@@access(BrowserAutomationToolCall, Access.public); +@@usage(BrowserAutomationToolCall, Usage.input); + +@@access(BrowserAutomationToolCallOutput, Access.public); +@@usage(BrowserAutomationToolCallOutput, Usage.input); + +@@access(FabricDataAgentToolCall, Access.public); +@@usage(FabricDataAgentToolCall, Usage.input); + +@@access(FabricDataAgentToolCallOutput, Access.public); +@@usage(FabricDataAgentToolCallOutput, Usage.input); + +@@access(AzureFunctionToolCall, Access.public); +@@usage(AzureFunctionToolCall, Usage.input); + +@@access(AzureFunctionToolCallOutput, Access.public); +@@usage(AzureFunctionToolCallOutput, Usage.input); + +@@access(A2AToolCall, Access.public); +@@usage(A2AToolCall, Usage.input); + +@@access(A2AToolCallOutput, Access.public); +@@usage(A2AToolCallOutput, Usage.input); + +@@access(MemorySearchToolCall, Access.public); +@@usage(MemorySearchToolCall, Usage.input); + +@@access(MemoryCommandToolCall, Access.public); +@@usage(MemoryCommandToolCall, Usage.input); + +@@access(MemoryCommandToolCallOutput, Access.public); +@@usage(MemoryCommandToolCallOutput, Usage.input); + +@@access(ToolCallStatus, Access.public); +@@usage(ToolCallStatus, Usage.input); + @@access(FoundryFeaturesOptInKeys, Access.public); @@access(AgentDefinitionOptInKeys, Access.public); @@ -283,6 +350,8 @@ using Azure.AI.Projects; "java" ); +@@alternateType(OpenAI.OutputItem, unknown, "java"); + // TimeZone property override via model indirection @alternateType( { From fffba63105aca23bd8123e53f77accd77be08653 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Fri, 22 May 2026 01:13:20 -0700 Subject: [PATCH 13/37] suppress inputitem --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index 261455c6859b..ae8d7b003269 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -351,6 +351,7 @@ using Azure.AI.Projects; ); @@alternateType(OpenAI.OutputItem, unknown, "java"); +@@alternateType(OpenAI.InputItem, unknown, "java"); // TimeZone property override via model indirection @alternateType( From 8d41b329aa3b400034815b2facbff1e281fd9dba Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 26 May 2026 02:22:43 -0700 Subject: [PATCH 14/37] customization for naming collision --- .../data-plane/Foundry/client.java.tsp | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 44f8b6434664..e739706ed514 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -204,6 +204,34 @@ namespace Azure.AI.Projects; // Type replacements / encodings // -------------------------------------------------------------------------------- +// OpenAI de-dup: suppress ComparisonFilter & CompoundFilter (and their anonymous +// enum types FileSearchToolFiltersType / FileSearchToolFiltersType1) in favour of +// the equivalent openai-java models. +@@alternateType(OpenAI.ComparisonFilter, + { + identity: "com.openai.models.ComparisonFilter", + }, + "java" +); +@@alternateType(OpenAI.CompoundFilter, + { + identity: "com.openai.models.CompoundFilter", + }, + "java" +); + +// GrammarSyntax1 → expandable GrammarSyntax enum +// The OpenAI TypeSpec names this enum "GrammarSyntax1"; replace with an open union +// so it generates as the extensible "GrammarSyntax" string enum in Java. +union GrammarSyntaxExpandable { + string, + lark: "lark", + regex: "regex", +} + +@@clientName(GrammarSyntaxExpandable, "GrammarSyntax", "java"); +@@alternateType(OpenAI.GrammarSyntax1, GrammarSyntaxExpandable, "java"); + @@alternateType(DayOfWeek, { identity: "java.time.DayOfWeek", From 2b538a263c45694f2fb4a150b1053694360b87f2 Mon Sep 17 00:00:00 2001 From: Kaylie <50653231+kaylieee@users.noreply.github.com> Date: Tue, 26 May 2026 15:31:08 -0700 Subject: [PATCH 15/37] Ingest spec 52626 (#43522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix which 'fromCode' method we emit. Thanks Howie! * feat(agents-session-files): add has_more, @list, and optional path to ListSessionFiles (#43280) * Update specification/ai-foundry/data-plane/Foundry/src/agents-session-files/models.tsp * Update specification/ai-foundry/data-plane/Foundry/src/agents-session-files/routes.tsp * fix * missing change * inline page result * Revert "Merge branch 'feature/foundry-release' of https://github.com/Azure/azure-rest-api-specs into feature/foundry-release" This reverts commit 1027f31a437215ae41453cb0b9c184dcc1a5dc56, reversing changes made to f67e0697da58478ee35a4ed96ee6cf3ebbc2dc31. * Move Toolboxes operations back to a .beta client for JS and Python SDKs * Map OpenAI.OutputItem to Record for JS and Python emitters. (#43354) * Remove evaluation suites from JS and Python SDKs (#43356) * Add isolation key header to session crud (#43348) * Add isolation key header to session crud * regen openapi3 --------- Co-authored-by: Gerardo Lecaros <10088504+glecaros@users.noreply.github.com> * Fix typespec (#43316) * Expose CreateAgentFromCodeOptions (#43392) * Add target and input_messages to evaluation suite generation inputs (#43282) * Add target and input_messages to evaluation suite generation inputs - Added optional target field to EvaluationSuiteGenerationJobInputs - Added optional input_messages field (template or item_reference) - Target is stored on the generated suite so it can be run immediately - input_messages defaults to template with {{item.query}} if omitted Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add evaluation_level to generation job inputs Optional field defaults to turn. When set to conversation, dataset generation is skipped and user provides their own multi-turn dataset. Target is required for turn-level but optional for conversation-level. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Clean up doc comments — remove internal implementation details Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove level-specific details from target and input_messages docs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add @removed(Versions.v1) to evaluation suite interfaces for private preview Mark EvaluationSuites and EvaluationSuiteGenerationJobs interfaces as removed from v1 so they remain private preview only and are not included in the public GA surface. Models don't need the tag since they are unreachable without the routes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Doc string missing defaults. Minor updates to Python surface. (#43431) * Minor TypeSpec, Python & JS renames. Does not affect OpenAPI3 files (#43438) * Add type spec for stop sessions (#43206) * add typespec for stop sessions. * add stop session example. * openai3 * correct verb for stop api. * correct comment structure. * Revert "correct comment structure." This reverts commit 1c5669d081f79ec37bcdd456f1b05d2909f1b474. * update comment decorator, * update spec for stop. * fix comment + regen * updated comment --------- Co-authored-by: Harsheet Shah Co-authored-by: Gerardo Lecaros <10088504+glecaros@users.noreply.github.com> * Remove image and container_protocol_versions from HostedAgentDefinition (#43410) These properties are not part of the v1 (GA) surface. Per review feedback, remove them from the model entirely rather than using @removed(Versions.v1). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Delete specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml,json * Skills API: Versioned Skills aligned with OpenAI and agentskills.io (#43283) * Add versioned Skills API alongside existing flat API Add version support to Skills API mirroring the Toolbox pattern: - SkillVersionObject model for immutable version snapshots - default_version field on SkillObject - New versioned routes: createSkillVersion, listSkillVersions, getSkillVersion, downloadSkillVersion, deleteSkillVersion, updateSkillDefaultVersion, createSkillVersionFromPackage - All existing flat routes preserved Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add versioned Skills API and skill references in Toolboxes Skills API: - Add SkillVersionObject model aligned with OpenAI skills API - Add default_version, latest_version, created_at to SkillObject - New versioned routes: createSkillVersion, listSkillVersions, getSkillVersion, getSkillContent, getSkillVersionContent, updateSkillDefaultVersion, deleteSkillVersion - Use /content pattern (OpenAI-style) instead of :download - All existing flat skill routes preserved Toolboxes: - Add SkillReference model (name + optional version) - Add skills field to CreateToolboxVersionRequest and ToolboxVersionObject - When version is specified, reference is pinned to that immutable version Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Align Skills API with OpenAI format: clean models, remove legacy routes - Replace SkillObject/SkillVersionObject with clean Skill/SkillVersion models - Remove old flat routes (createSkillFromPackage, downloadSkill, updateSkill) - Switch updateSkillDefaultVersion from PATCH to POST (matching OpenAI) - Add files upload to createSkill and createSkillVersion - Remove metadata from create requests - Remove SkillObject clientName mapping Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Align Skills API with OpenAI: remove zip_content/description from create, add SkillsPagedResult, DeleteSkillVersionResponse, type discriminator on SkillReference - Remove zip_content and description from CreateSkillVersionRequest (match OpenAI) - Remove description from CreateSkillVersionMetadata (match OpenAI) - Add independent SkillsPagedResult type for clean SDK naming - Add DeleteSkillVersionResponse with id, deleted, version (match OpenAI) - Add type discriminator to SkillReference for future union extensibility - Update routes to use SkillsPagedResult and DeleteSkillVersionResponse Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add object discriminators, make description required, add agentskills.io fields to inline content - Add object discriminators to SkillsPagedResult, DeleteSkillResponse, DeleteSkillVersionResponse - Make description required on Skill and SkillVersion (matches OpenAI) - Add license and metadata fields to SkillInlineContent (agentskills.io spec) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add id and name to both delete responses for consistency Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Simplify multipart: remove metadata wrapper, add upload behavior docs - Remove CreateSkillVersionMetadata model, make default a top-level form field - Add documentation for zip vs directory upload behavior - Matches OpenAI's flat files + default pattern Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Rename updateSkillDefaultVersion to updateSkill for future extensibility Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update toolbox skill source model Model toolbox skills as a discriminated base type with a skill reference variant so future skill sources can be added without reshaping the API. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address skills API review feedback Use the shared paged result type for skills lists, align timestamp modeling with FoundryTimestamp, remove object discriminator fields from skill responses, and make the update request a composed alias. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address remaining skills review feedback Rename Skill in the Projects Agents SDK customization, document multipart default behavior, and model allowed tools as a string array. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Vishwanath Balaji Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * add missed invocations_ws into AgentProtocol (#43324) Co-authored-by: Yulin Li Co-authored-by: Gerardo Lecaros <10088504+glecaros@users.noreply.github.com> * Agents Optimization Alignment with APIs (#43436) * set latest alignment fields * add multi-turn simulation support (evaluationLevel, DatasetItem scenario fields) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * use shared OpenAI eval types (EvalRunOutputItemResult, EvalRunOutputItemSampleOutput) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * remove duplicate EvaluationLevel union (use shared definition from openai-evaluations) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * remove currentTargetAttribute from progress model Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * remove orphaned models and simplify deploy config types * fix evalModel type to string * flatten request body - remove inputs wrapper to match vienna contract * remove dead response fields and add response-side AgentDefinitionResponse * rename to AgentIdentifier for request, OptimizationAgentDefinition for response * fix response structure: nest inputs in response, flat request body, update create operation * remove read-only visibility from inputs to allow create+read * add 202 Accepted response for GET while job in progress * regen --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Gerardo Lecaros <10088504+glecaros@users.noreply.github.com> * Remove dataset source from data generation jobs (#43448) * Remove dataset source from data generation jobs Removes the DatasetDataGenerationJobSource model and the dataset member of the DataGenerationJobSourceType union in the data generation jobs spec, and regenerates openapi3 outputs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove scenario and type filters from listJobsPreview for data generation jobs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add Dan to CODEOWNERS (#43017) * remove downloadskill override * remove skillobject override * relocate promote candidate * relocate get candidate --------- Co-authored-by: Darren Cohen <39422044+dargilco@users.noreply.github.com> Co-authored-by: Gerardo Lecaros <10088504+glecaros@users.noreply.github.com> Co-authored-by: Andrew Schonhoffer Co-authored-by: Nikolay Rovinskiy <30440255+nick863@users.noreply.github.com> Co-authored-by: vebudumu <93553661+vebudumu@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Harsheet Shah <50236780+harsheet-shah@users.noreply.github.com> Co-authored-by: Harsheet Shah Co-authored-by: Santhosh Kumar Gunasekaran Co-authored-by: Vincent Biret Co-authored-by: Viswa Balaji <138743504+viswabalaji@users.noreply.github.com> Co-authored-by: Vishwanath Balaji Co-authored-by: Yulin Li Co-authored-by: Yulin Li Co-authored-by: Justin Gonzales <115047469+jugonzales@users.noreply.github.com> Co-authored-by: aprilk-ms <55356546+aprilk-ms@users.noreply.github.com> --- .github/CODEOWNERS | 2 +- .../data-plane/Foundry/client.csharp.tsp | 6 + .../data-plane/Foundry/client.java.tsp | 12 - .../ai-foundry/data-plane/Foundry/client.tsp | 100 +- ...ntSessions_StopSession_MaximumSet_Gen.json | 14 + .../v1/microsoft-foundry-openapi3.json | 6501 +-- .../v1/microsoft-foundry-openapi3.yaml | 2604 +- .../v1/microsoft-foundry-openapi3.yaml,json | 45601 ---------------- .../microsoft-foundry-openapi3.json | 1957 +- .../microsoft-foundry-openapi3.yaml | 1434 +- .../Foundry/relocate-beta-operations.tsp | 37 +- .../src/agents-optimization/models.tsp | 382 +- .../src/agents-optimization/routes.tsp | 95 +- .../data-plane/Foundry/src/agents/models.tsp | 28 +- .../data-plane/Foundry/src/agents/routes.tsp | 36 +- .../src/data_generation_jobs/models.tsp | 8 - .../src/data_generation_jobs/routes.tsp | 11 +- .../Foundry/src/evaluation-suites/models.tsp | 22 + .../Foundry/src/evaluation-suites/routes.tsp | 2 + .../Foundry/src/evaluators/models.tsp | 2 +- .../Foundry/src/evaluators/routes.tsp | 10 +- .../Foundry/src/memory-stores/models.tsp | 6 +- .../data-plane/Foundry/src/models/routes.tsp | 6 +- .../Foundry/src/schedules/models.tsp | 6 +- .../Foundry/src/sdk-agents/client.tsp | 2 + .../src/sdk-extensions-openai/client.tsp | 5 +- .../src/sdk-projects-agents/client.tsp | 6 +- .../data-plane/Foundry/src/skills/models.tsp | 204 +- .../data-plane/Foundry/src/skills/routes.tsp | 147 +- .../Foundry/src/toolboxes/models.tsp | 26 + 30 files changed, 6876 insertions(+), 52396 deletions(-) create mode 100644 specification/ai-foundry/data-plane/Foundry/examples/2025-11-15-preview/AgentSessions_StopSession_MaximumSet_Gen.json delete mode 100644 specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml,json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 052bd9fe89a4..c685afa22a57 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -16,7 +16,7 @@ /dev/cognitiveservices/data-plane/Language/ @assafi @rokulka @ChongTang @annatisch @heaths @deyaaeldeen @joseharriaga @minhanh-phan # PRLabel: %Foundry %Client -/specification/ai-foundry/data-plane/Foundry @johanste @trrwilson @glecaros @balapv @dargilco +/specification/ai-foundry/data-plane/Foundry @johanste @trrwilson @glecaros @balapv @dargilco @qubitron # PRLabel: %Analysis Services /specification/analysisservices/ @taiwu diff --git a/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp b/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp index a51b2165da4d..7df9ddf5fa9c 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp @@ -217,3 +217,9 @@ namespace Azure.AI.Projects; @@clientName(Models.createAsync, "createModelVersionAsync", "csharp"); @@clientName(Models.startPendingUpload, "startModelPendingUpload", "csharp"); @@clientName(Models.getCredentials, "getModelCredentials", "csharp"); + +// -------------------------------------------------------------------------------- +// Routines sub‐client +// -------------------------------------------------------------------------------- +@@clientName(Routines, "AIProjectRoutines"); +@@clientName(Routine, "ProjectsRoutine"); diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index e739706ed514..1591ec29dd52 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -138,9 +138,6 @@ namespace Azure.AI.Projects; @@clientName(EvalRunResultComparison, "EvaluationRunResultComparison"); @@clientName(EvalRunResultSummary, "EvaluationRunResultSummary"); -@@clientName(SkillObject, "SkillDetails"); -@@clientName(SkillObject.has_blob, "blobPresent"); - @@clientName(Index, "AIProjectIndex", "java"); @@clientName(Azure.Core.Foundations.ResourceBody.resource, "schedule"); @@ -272,15 +269,6 @@ model TimeZoneType {} @@alternateType(RecurrenceTrigger.timeZone, TimeZoneType, "java"); -// -------------------------------------------------------------------------------- -// Javadoc / Documentation overrides -// -------------------------------------------------------------------------------- - -@@clientDoc(Skills.downloadSkill, - "Downloads a skill package as a ZIP archive containing {@code SKILL.md}. Returns the original uploaded archive for skills created via {@code createSkillFromPackage}; materializes a ZIP from stored instructions for skills created via {@code createSkill}.", - DocumentationMode.replace -); - // -------------------------------------------------------------------------------- // Relocate EvaluatorGenerationJobs, EvaluationSuites, and // EvaluationSuiteGenerationJobs onto the Evaluators sub-client diff --git a/specification/ai-foundry/data-plane/Foundry/client.tsp b/specification/ai-foundry/data-plane/Foundry/client.tsp index 0e4d07c16df7..7ab36d7a58cd 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.tsp @@ -26,7 +26,7 @@ import "./src/toolboxes/routes.tsp"; import "./src/skills/routes.tsp"; import "./src/agents-session-files/routes.tsp"; import "./src/data_generation_jobs/routes.tsp"; -import "./src/evaluation-suites/routes.tsp"; +//import "./src/evaluation-suites/routes.tsp"; import "./src/agents-optimization/routes.tsp"; // Create a ".beta" subclient for the above beta operations @@ -222,13 +222,26 @@ using Azure.AI.Projects; @@clientName(AgentOptimizationJobs.getCandidateConfig, "getOptimizationCandidateConfig", "javascript"); @@clientName(AgentOptimizationJobs.getCandidateResults, "getOptimizationCandidateResults", "javascript"); +// 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 +// OpenAI responses classes. We want Foundry SDK to be free of those, therefore for the +// time being we define output item as a generic dictionary. +@@alternateType(OpenAI.OutputItem, Record); + // Make this method internal, since it's patched with a new one that supports either binary or file-path input @@access(AgentSessionFiles.uploadSessionFile, Access.internal, "python"); @@usage(SessionFileWriteResponse, Usage.output); @@access(SessionFileWriteResponse, Access.public); -// Exclude these operations entirely from emitted Python SDK -@@scope(Agents.createAgentFromCode, "!(python)"); +// Exclude these operations entirely from emitted SDK. These are convenience REST APIs that we don't think bring +// real value on SDK surface. We can do everything using createAgentVersionFromCode. +@@scope(Agents.createAgentFromCode, "!(python, javascript)"); +@@scope(Agents.updateAgentFromCode, "!(python, javascript)"); + +@@clientName(Agents.downloadAgentCode, "download_code", "python"); + +@@clientName(Agents.createAgentVersionFromCode, "create_version_from_code", "python"); +@@clientName(Agents.createAgentVersionFromCode, "createVersionFromCode", "javascript"); @@clientName(DownloadAgentCodeResponse, "DownloadAgentCodeResult", "python"); @@clientName(SessionDirectoryListResponse, @@ -264,6 +277,7 @@ using Azure.AI.Projects; @@clientName(MemoryStores.deleteMemoryStore, "delete"); @@clientName(MemoryStoreSearchResponse, "MemoryStoreSearchResult", "python"); @@clientName(DeleteMemoryStoreResponse, "DeleteMemoryStoreResult", "python"); +@@clientName(DeleteMemoryResponse, "DeleteMemoryResult", "python"); @@clientName(MemoryStoreUpdateResponse, "MemoryStoreUpdateResult", "python"); @@clientName(MemoryStoreDeleteScopeResponse, "MemoryStoreDeleteScopeResult", @@ -274,6 +288,9 @@ using Azure.AI.Projects; // define OpenAI.InputItem as inputs. This pulls in ~100 OpenAI classes related to input items. We want the // Foundry SDK to be free of those, therefore for the time being we define input item as a generic dictionary. @@alternateType(OpenAI.InputItem, Record); + +// Note the doc string replacement below is for JavaScript only, because for Python we hand-write the +// relevant methods with proper doc strings (see `begin_update_memories` and `search_memories` methods) @@clientDoc(MemoryStoreUpdateRequest.items, "A list of messages to store in memory, each one represented as an object with `role`, `content` and `type` keys. Similar to how OpenAI defines input items in Responses operations. Example of an item: {\"role\": \"user\", \"type\": \"message\", \"content\": \"my user message\"}. Only messages with `type` equals `message` are currently processed. Others are ignored.", DocumentationMode.replace, @@ -302,8 +319,6 @@ using Azure.AI.Projects; // Rename models ending with 'Object' to end with 'Details' for Python @@clientName(MemoryStoreObject, "MemoryStoreDetails", "python"); -@@clientName(PendingUploadResponse, "PendingUploadResult", "python"); - // Remove 'Object' suffix for JS client @@clientName(MemoryStoreObject, "MemoryStore", "javascript"); @@ -320,8 +335,8 @@ using Azure.AI.Projects; @@clientName(Routines.deleteRoutine, "delete"); @@clientName(Routines.listRoutineRuns, "list_runs", "python"); @@clientName(Routines.listRoutineRuns, "listRuns", "javascript"); -@@clientName(Routines.dispatchRoutineAsync, "dispatch_async", "python"); -@@clientName(Routines.dispatchRoutineAsync, "dispatchAsync", "javascript"); +@@clientName(Routines.dispatchRoutineAsync, "dispatch"); +@@clientName(DispatchRoutineResponse, "DispatchRoutineResult", "python"); // -------------------------------------------------------------------------------- // Beta Evaluators sub‐client @@ -356,36 +371,6 @@ using Azure.AI.Projects; "javascript" ); -// Evaluation Suite Generation Jobs — unscoped names (fixes AllScopes conflict) -@@clientName(EvaluationSuiteGenerationJobs.create, "create_generation_suite_job"); -@@clientName(EvaluationSuiteGenerationJobs.get, "get_generation_suite_job"); -@@clientName(EvaluationSuiteGenerationJobs.list, "list_generation_suite_jobs"); -@@clientName(EvaluationSuiteGenerationJobs.cancel, "cancel_generation_suite_job"); -@@clientName(EvaluationSuiteGenerationJobs.delete, "delete_generation_suite_job"); - -// Evaluation Suite Generation Jobs — renamed for JavaScript SDK discoverability -@@clientName(EvaluationSuiteGenerationJobs.create, "createGenerationSuiteJob", "javascript"); -@@clientName(EvaluationSuiteGenerationJobs.get, "getGenerationSuiteJob", "javascript"); -@@clientName(EvaluationSuiteGenerationJobs.list, "listGenerationSuiteJobs", "javascript"); -@@clientName(EvaluationSuiteGenerationJobs.cancel, "cancelGenerationSuiteJob", "javascript"); -@@clientName(EvaluationSuiteGenerationJobs.delete, "deleteGenerationSuiteJob", "javascript"); - -// EvaluationSuites versioned operations -@@clientName(EvaluationSuites.listVersions, "list_evaluation_suite_versions"); -@@clientName(EvaluationSuites.listLatest, "list_evaluation_suites"); -@@clientName(EvaluationSuites.getVersion, "get_evaluation_suite"); -@@clientName(EvaluationSuites.deleteVersion, "delete_evaluation_suite"); -@@clientName(EvaluationSuites.createOrUpdateVersion, "create_or_update_evaluation_suite"); -@@clientName(EvaluationSuites.createEvaluationSuiteVersion, "create_evaluation_suite"); -@@clientName(EvaluationSuites.run, "run_evaluation_suite"); - -@@clientName(EvaluationSuites.listVersions, "listEvaluationSuiteVersions", "javascript"); -@@clientName(EvaluationSuites.listLatest, "listEvaluationSuites", "javascript"); -@@clientName(EvaluationSuites.getVersion, "getEvaluationSuite", "javascript"); -@@clientName(EvaluationSuites.deleteVersion, "deleteEvaluationSuite", "javascript"); -@@clientName(EvaluationSuites.createOrUpdateVersion, "createOrUpdateEvaluationSuite", "javascript"); -@@clientName(EvaluationSuites.createEvaluationSuiteVersion, "createEvaluationSuite", "javascript"); -@@clientName(EvaluationSuites.run, "runEvaluationSuite", "javascript"); // EvaluatorVersion datetime fields are typed as string in the spec but carry ISO-8601 timestamps @@alternateType(EvaluatorVersion.created_at, utcDateTime, "python"); @@alternateType(EvaluatorVersion.modified_at, utcDateTime, "python"); @@ -396,12 +381,37 @@ using Azure.AI.Projects; @@clientName(EvaluatorGenerationJobs.list, "list_generation_jobs", "python"); @@clientName(EvaluatorGenerationJobs.cancel, "cancel_generation_job", "python"); @@clientName(EvaluatorGenerationJobs.delete, "delete_generation_job", "python"); -// Evaluation Suite Generation Jobs — unique names to avoid collision with evaluator gen methods -@@clientName(EvaluationSuiteGenerationJobs.create, "create_generation_suite_job", "python"); -@@clientName(EvaluationSuiteGenerationJobs.get, "get_generation_suite_job", "python"); -@@clientName(EvaluationSuiteGenerationJobs.list, "list_generation_suite_jobs", "python"); -@@clientName(EvaluationSuiteGenerationJobs.cancel, "cancel_generation_suite_job", "python"); -@@clientName(EvaluationSuiteGenerationJobs.delete, "delete_generation_suite_job", "python"); + +// // EvaluationSuites versioned operations +// @@clientName(EvaluationSuites.listVersions, "list_evaluation_suite_versions"); +// @@clientName(EvaluationSuites.listLatest, "list_evaluation_suites"); +// @@clientName(EvaluationSuites.getVersion, "get_evaluation_suite"); +// @@clientName(EvaluationSuites.deleteVersion, "delete_evaluation_suite"); +// @@clientName(EvaluationSuites.createOrUpdateVersion, "create_or_update_evaluation_suite"); +// @@clientName(EvaluationSuites.createEvaluationSuiteVersion, "create_evaluation_suite"); +// @@clientName(EvaluationSuites.run, "run_evaluation_suite"); + +// @@clientName(EvaluationSuites.listVersions, "listEvaluationSuiteVersions", "javascript"); +// @@clientName(EvaluationSuites.listLatest, "listEvaluationSuites", "javascript"); +// @@clientName(EvaluationSuites.getVersion, "getEvaluationSuite", "javascript"); +// @@clientName(EvaluationSuites.deleteVersion, "deleteEvaluationSuite", "javascript"); +// @@clientName(EvaluationSuites.createOrUpdateVersion, "createOrUpdateEvaluationSuite", "javascript"); +// @@clientName(EvaluationSuites.createEvaluationSuiteVersion, "createEvaluationSuite", "javascript"); +// @@clientName(EvaluationSuites.run, "runEvaluationSuite", "javascript"); + +// // Evaluation Suite Generation Jobs — unscoped names (fixes AllScopes conflict) +// @@clientName(EvaluationSuiteGenerationJobs.create, "create_generation_suite_job"); +// @@clientName(EvaluationSuiteGenerationJobs.get, "get_generation_suite_job"); +// @@clientName(EvaluationSuiteGenerationJobs.list, "list_generation_suite_jobs"); +// @@clientName(EvaluationSuiteGenerationJobs.cancel, "cancel_generation_suite_job"); +// @@clientName(EvaluationSuiteGenerationJobs.delete, "delete_generation_suite_job"); + +// // Evaluation Suite Generation Jobs — renamed for JavaScript SDK discoverability +// @@clientName(EvaluationSuiteGenerationJobs.create, "createGenerationSuiteJob", "javascript"); +// @@clientName(EvaluationSuiteGenerationJobs.get, "getGenerationSuiteJob", "javascript"); +// @@clientName(EvaluationSuiteGenerationJobs.list, "listGenerationSuiteJobs", "javascript"); +// @@clientName(EvaluationSuiteGenerationJobs.cancel, "cancelGenerationSuiteJob", "javascript"); +// @@clientName(EvaluationSuiteGenerationJobs.delete, "deleteGenerationSuiteJob", "javascript"); // -------------------------------------------------------------------------------- // Beta Insights sub‐client @@ -421,6 +431,10 @@ using Azure.AI.Projects; @@clientName(Models.createOrUpdateVersion, "update"); @@clientName(Models.startPendingUpload, "pendingUpload"); @@clientName(Models.getCredentials, "getCredentials"); +@@clientName(Models.createAsync, "pendingCreateVersion"); + +@@clientName(CreateModelVersionAsyncResponse, "ModelPendingCreateVersionResult", "python"); +@@clientName(CreateModelVersionAsyncResponse, "ModelPendingCreateVersionResponse", "javascript"); // -------------------------------------------------------------------------------- // Beta Schedules sub‐client diff --git a/specification/ai-foundry/data-plane/Foundry/examples/2025-11-15-preview/AgentSessions_StopSession_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/2025-11-15-preview/AgentSessions_StopSession_MaximumSet_Gen.json new file mode 100644 index 000000000000..d2d57caec351 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/2025-11-15-preview/AgentSessions_StopSession_MaximumSet_Gen.json @@ -0,0 +1,14 @@ +{ + "title": "AgentSessions_StopSession_MaximumSet", + "operationId": "Agents_StopSession", + "parameters": { + "api-version": "2025-11-15-preview", + "agent_name": "my-agent", + "session_id": "my-session", + "x-session-isolation-key": "sk-abc123", + "Foundry-Features": "AgentEndpoints=V1Preview" + }, + "responses": { + "204": {} + } +} 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 9c48d6a9b0b9..e577097995e9 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 @@ -29,9 +29,6 @@ { "name": "Evaluation Rules" }, - { - "name": "EvaluationSuiteGenerationJobs" - }, { "name": "Evaluators" }, @@ -169,11 +166,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OptimizationJob" + "$ref": "#/components/schemas/OptimizationJobInputs" } } }, - "description": "The job to create." + "description": "The optimization job inputs." }, "x-ms-foundry-meta": { "conditional_previews": [ @@ -184,7 +181,7 @@ "get": { "operationId": "AgentOptimizationJobs_list", "summary": "Returns a list of agent optimization jobs.", - "description": "List optimization jobs. Supports cursor pagination and optional `status` / `agent_name` filters.", + "description": "List optimization jobs. Supports cursor pagination and optional status / agentName filters.", "parameters": [ { "name": "Foundry-Features", @@ -251,7 +248,7 @@ "explode": false }, { - "name": "agent_name", + "name": "agentName", "in": "query", "required": false, "description": "Filter to jobs targeting this agent name.", @@ -333,7 +330,7 @@ "get": { "operationId": "AgentOptimizationJobs_get", "summary": "Get info about an agent optimization job.", - "description": "Get an optimization job by id. Emits `Retry-After` while the job is non-terminal.", + "description": "Get an optimization job by id. Returns 202 while in progress, 200 when terminal.", "parameters": [ { "name": "Foundry-Features", @@ -373,7 +370,25 @@ "headers": { "Retry-After": { "required": false, - "description": "Recommended number of seconds to wait before polling again.", + "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, "schema": { "type": "integer", "format": "int32" @@ -434,6 +449,16 @@ "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", @@ -612,7 +637,7 @@ "get": { "operationId": "AgentOptimizationJobs_getCandidate", "summary": "Get a candidate by id.", - "description": "Get a single candidate manifest and aggregated evaluation summary.", + "description": "Get a single candidate's metadata, manifest, and promotion info.", "parameters": [ { "name": "Foundry-Features", @@ -661,7 +686,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OptimizationCandidate" + "$ref": "#/components/schemas/CandidateMetadata" } } } @@ -766,11 +791,11 @@ } } }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/results": { + "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/files": { "get": { - "operationId": "AgentOptimizationJobs_getCandidateResults", - "summary": "Get candidate evaluation results.", - "description": "Get full per-task evaluation results for a candidate.", + "operationId": "AgentOptimizationJobs_getCandidateFile", + "summary": "Get a candidate file.", + "description": "Stream a specific file from the candidate's blob directory.", "parameters": [ { "name": "Foundry-Features", @@ -802,6 +827,16 @@ "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", @@ -817,9 +852,10 @@ "200": { "description": "The request has succeeded.", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/CandidateResults" + "type": "string", + "format": "binary" } } } @@ -845,11 +881,11 @@ } } }, - "/agent_optimization_jobs/{jobId}:cancel": { - "post": { - "operationId": "AgentOptimizationJobs_cancel", - "summary": "Cancels an agent optimization job.", - "description": "Request cancellation. Idempotent on terminal states.", + "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/results": { + "get": { + "operationId": "AgentOptimizationJobs_getCandidateResults", + "summary": "Get candidate evaluation results.", + "description": "Get full per-task evaluation results for a candidate.", "parameters": [ { "name": "Foundry-Features", @@ -867,7 +903,16 @@ "name": "jobId", "in": "path", "required": true, - "description": "The ID of the job to cancel.", + "description": "The optimization job id.", + "schema": { + "type": "string" + } + }, + { + "name": "candidateId", + "in": "path", + "required": true, + "description": "The candidate id.", "schema": { "type": "string" } @@ -889,7 +934,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OptimizationJob" + "$ref": "#/components/schemas/CandidateResults" } } } @@ -915,9 +960,11 @@ } } }, - "/agents": { + "/agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote": { "post": { - "operationId": "Agents_createAgent_Agents_createAgentFromCode", + "operationId": "AgentOptimizationJobs_promoteCandidate", + "summary": "Promote a candidate.", + "description": "Promotes a candidate, recording the deployment timestamp and target agent version.", "parameters": [ { "name": "Foundry-Features", @@ -925,47 +972,48 @@ "required": false, "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", "schema": { - "$ref": "#/components/schemas/AgentDefinitionOptInKeys" + "type": "string", + "enum": [ + "AgentsOptimization=V1Preview" + ] } }, { - "name": "api-version", - "in": "query", + "name": "jobId", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The optimization job id.", "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.", + "name": "candidateId", + "in": "path", + "required": true, + "description": "The candidate id to promote.", "schema": { - "type": "string", - "maxLength": 63 + "type": "string" } }, { - "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.", + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], - "description": "Creates the 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.", "responses": { "200": { "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentObject" + "$ref": "#/components/schemas/PromoteCandidateResponse" } } } @@ -981,165 +1029,322 @@ } } }, - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - }, "tags": [ - "Agents" + "AgentOptimizationJobs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAgentRequest" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/CreateAgentFromCodeContent" - }, - "encoding": { - "metadata": { - "contentType": "application/json" - } + "$ref": "#/components/schemas/PromoteCandidateRequest" } } - } + }, + "description": "Promotion details." + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "AgentsOptimization=V1Preview" + ] } - }, - "get": { - "operationId": "Agents_listAgents", - "description": "Returns the list of all agents.", + } + }, + "/agent_optimization_jobs/{jobId}:cancel": { + "post": { + "operationId": "AgentOptimizationJobs_cancel", + "summary": "Cancels an agent optimization job.", + "description": "Request cancellation. Idempotent on terminal states.", "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", + "name": "Foundry-Features", + "in": "header", "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.", + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", "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": "string", + "enum": [ + "AgentsOptimization=V1Preview" + ] } }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] - } - }, - "/agents/{agent_name}": { - "get": { - "operationId": "Agents_getAgent", - "description": "Retrieves the agent.", - "parameters": [ { - "name": "agent_name", + "name": "jobId", "in": "path", "required": true, - "description": "The name of the agent to retrieve.", + "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" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "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 the 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.", + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "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", + "description": "Returns the list of all agents.", + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + } + }, + "/agents/{agent_name}": { + "get": { + "operationId": "Agents_getAgent", + "description": "Retrieves the agent.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to retrieve.", "schema": { "type": "string" } @@ -1291,7 +1496,7 @@ "name": "force", "in": "query", "required": false, - "description": "For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false.", + "description": "For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types.", "schema": { "type": "boolean", "default": false @@ -1906,6 +2111,15 @@ "type": "string" } }, + { + "name": "x-ms-user-isolation-key", + "in": "header", + "required": false, + "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", + "schema": { + "type": "string" + } + }, { "name": "api-version", "in": "query", @@ -1983,6 +2197,15 @@ "type": "string" } }, + { + "name": "x-ms-user-isolation-key", + "in": "header", + "required": false, + "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", + "schema": { + "type": "string" + } + }, { "name": "limit", "in": "query", @@ -2529,6 +2752,15 @@ "type": "string" } }, + { + "name": "x-ms-user-isolation-key", + "in": "header", + "required": false, + "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", + "schema": { + "type": "string" + } + }, { "name": "api-version", "in": "query", @@ -2605,6 +2837,15 @@ "type": "string" } }, + { + "name": "x-ms-user-isolation-key", + "in": "header", + "required": false, + "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", + "schema": { + "type": "string" + } + }, { "name": "api-version", "in": "query", @@ -2641,16 +2882,37 @@ } } }, - "/agents/{agent_name}/import": { + "/agents/{agent_name}/endpoint/sessions/{session_id}:stop": { "post": { - "operationId": "Agents_updateAgentFromManifest", - "description": "Updates the agent from a manifest by adding a new version if there are any changes to the agent definition.\nIf no changes, returns the existing agent version.", + "operationId": "Agents_stopSession", + "description": "Stops a session.\nReturns 204 No Content when the stop succeeds.", "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": [ + "AgentEndpoints=V1Preview" + ] + } + }, { "name": "agent_name", "in": "path", "required": true, - "description": "The name of the agent to update.", + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "description": "The session identifier.", "schema": { "type": "string" } @@ -2667,15 +2929,8 @@ } ], "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentObject" - } - } - } + "204": { + "description": "There is no content to send for this request, but the headers may be useful." }, "default": { "description": "An unexpected error response.", @@ -2691,39 +2946,25 @@ "tags": [ "Agents" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAgentFromManifestRequest" - } - } - } + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] } } }, - "/agents/{agent_name}/versions": { + "/agents/{agent_name}/import": { "post": { - "operationId": "Agents_createAgentVersion_Agents_createAgentVersionFromCode", + "operationId": "Agents_updateAgentFromManifest", + "description": "Updates the agent from a manifest by adding a new version if there are any changes to the agent definition.\nIf no changes, returns the existing 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": { - "$ref": "#/components/schemas/AgentDefinitionOptInKeys" - } - }, { "name": "agent_name", "in": "path", "required": true, - "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters.", + "description": "The name of the agent to update.", "schema": { - "type": "string", - "maxLength": 63 + "type": "string" } }, { @@ -2735,25 +2976,15 @@ "type": "string" }, "explode": false - }, - { - "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": "Create a new agent version.", "responses": { "200": { "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentVersionObject" + "$ref": "#/components/schemas/AgentObject" } } } @@ -2769,11 +3000,6 @@ } } }, - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - }, "tags": [ "Agents" ], @@ -2782,162 +3008,248 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAgentVersionRequest" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/CreateAgentVersionFromCodeContent" - }, - "encoding": { - "metadata": { - "contentType": "application/json" - } + "$ref": "#/components/schemas/UpdateAgentFromManifestRequest" } } } } - }, - "get": { - "operationId": "Agents_listAgentVersions", - "description": "Returns the list of versions of an agent.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve versions for.", - "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", - "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/AgentVersionObject" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] } }, - "/agents/{agent_name}/versions/{agent_version}": { - "get": { - "operationId": "Agents_getAgentVersion", - "description": "Retrieves a specific version of an agent.", + "/agents/{agent_name}/versions": { + "post": { + "operationId": "Agents_createAgentVersion_Agents_createAgentVersionFromCode", "parameters": [ { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve.", + "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" + "$ref": "#/components/schemas/AgentDefinitionOptInKeys" } }, { - "name": "agent_version", + "name": "agent_name", "in": "path", "required": true, - "description": "The version of the agent to retrieve.", + "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters.", "schema": { - "type": "string" + "type": "string", + "maxLength": 63 + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "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": "Create a new agent version.", + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersionObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentVersionRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateAgentVersionFromCodeContent" + }, + "encoding": { + "metadata": { + "contentType": "application/json" + } + } + } + } + } + }, + "get": { + "operationId": "Agents_listAgentVersions", + "description": "Returns the list of versions of an agent.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to retrieve versions for.", + "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", + "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/AgentVersionObject" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + } + }, + "/agents/{agent_name}/versions/{agent_version}": { + "get": { + "operationId": "Agents_getAgentVersion", + "description": "Retrieves a specific version of an agent.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to retrieve.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_version", + "in": "path", + "required": true, + "description": "The version of the agent to retrieve.", + "schema": { + "type": "string" } }, { @@ -3003,7 +3315,7 @@ "name": "force", "in": "query", "required": false, - "description": "For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false.", + "description": "For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types.", "schema": { "type": "boolean", "default": false @@ -3520,29 +3832,6 @@ }, "explode": false }, - { - "name": "scenario", - "in": "query", - "required": false, - "description": "Filter data generation jobs by their scenario.", - "schema": { - "$ref": "#/components/schemas/DataGenerationJobScenario" - }, - "explode": false - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter data generation jobs by their type.", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataGenerationJobType" - } - }, - "explode": false - }, { "name": "api-version", "in": "query", @@ -4506,168 +4795,41 @@ ] } }, - "/evaluation_suite_generation_jobs": { - "post": { - "operationId": "EvaluationSuiteGenerationJobs_create", - "summary": "Creates an evaluation suite generation job.", - "description": "Create a new job (preview). Includes optional Foundry-Features header and Operation-Id for idempotent retries.", - "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": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "Operation-Id", - "in": "header", - "required": false, - "description": "Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.", - "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": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "headers": { - "Operation-Location": { - "required": true, - "description": "URL to poll for the job status.", - "schema": { - "type": "string" - } - }, - "Location": { - "required": true, - "description": "URL of the created job resource.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteGenerationJob" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "EvaluationSuiteGenerationJobs" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteGenerationJobCreate" - } - } - }, - "description": "The job to create." - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Evaluations=V1Preview" - ] - } - }, + "/evaluationrules": { "get": { - "operationId": "EvaluationSuiteGenerationJobs_list", - "summary": "Returns a list of evaluation suite generation jobs.", - "description": "List jobs with cursor-based pagination (preview). Includes optional Foundry-Features header.", + "operationId": "EvaluationRules_list", + "description": "List all evaluation rules.", "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": [ - "Evaluations=V1Preview" - ] - } - }, - { - "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 + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "order", + "name": "actionType", "in": "query", "required": false, - "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "description": "Filter by the type of evaluation rule.", "schema": { - "$ref": "#/components/schemas/PageOrder" + "$ref": "#/components/schemas/EvaluationRuleActionType" }, "explode": false }, { - "name": "after", + "name": "agentName", "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.", + "description": "Filter by the agent name.", "schema": { "type": "string" }, "explode": false }, { - "name": "before", + "name": "enabled", "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.", + "description": "Filter by the enabled status.", "schema": { - "type": "string" + "type": "boolean" }, "explode": false } @@ -4678,172 +4840,104 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "data", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationSuiteGenerationJob" - }, - "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/PagedEvaluationRule" } } } }, "default": { "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } } }, "tags": [ - "EvaluationSuiteGenerationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Evaluations=V1Preview" - ] - } + "Evaluation Rules" + ] } }, - "/evaluation_suite_generation_jobs/{jobId}": { + "/evaluationrules/{id}": { "get": { - "operationId": "EvaluationSuiteGenerationJobs_get", - "summary": "Get info about an evaluation suite generation job.", - "description": "Get a job by ID (preview). Includes optional Foundry-Features header.", + "operationId": "EvaluationRules_get", + "description": "Get an evaluation rule.", "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": [ - "Evaluations=V1Preview" - ] - } + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "jobId", + "name": "id", "in": "path", "required": true, - "description": "The ID of the job.", + "description": "Unique identifier for the evaluation rule.", "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.", - "headers": { - "Retry-After": { - "required": false, - "description": "Recommended number of seconds to wait before polling again.", - "schema": { - "type": "integer", - "format": "int32" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationSuiteGenerationJob" + "$ref": "#/components/schemas/EvaluationRule" } } } }, "default": { "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } } }, "tags": [ - "EvaluationSuiteGenerationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Evaluations=V1Preview" - ] - } + "Evaluation Rules" + ] }, "delete": { - "operationId": "EvaluationSuiteGenerationJobs_delete", - "summary": "Deletes an evaluation suite generation job.", - "description": "Delete a job (preview). Returns 204 No Content.", + "operationId": "EvaluationRules_delete", + "description": "Delete an evaluation rule.", "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": [ - "Evaluations=V1Preview" - ] - } + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "jobId", + "name": "id", "in": "path", "required": true, - "description": "The ID of the job to delete.", + "description": "Unique identifier for the evaluation rule.", "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": { @@ -4852,61 +4946,55 @@ }, "default": { "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } } }, "tags": [ - "EvaluationSuiteGenerationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "/evaluation_suite_generation_jobs/{jobId}:cancel": { - "post": { - "operationId": "EvaluationSuiteGenerationJobs_cancel", - "summary": "Cancels an evaluation suite generation job.", - "description": "Cancel a running job (preview). Returns 200 with the updated job.", + "Evaluation Rules" + ] + }, + "put": { + "operationId": "EvaluationRules_createOrUpdate", + "description": "Create or update an evaluation rule.", "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": [ - "Evaluations=V1Preview" - ] - } + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "jobId", + "name": "id", "in": "path", "required": true, - "description": "The ID of the job to cancel.", + "description": "Unique identifier for the evaluation rule.", "schema": { "type": "string" } }, { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "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" - }, - "explode": false + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } } ], "responses": { @@ -4915,49 +5003,96 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationSuiteGenerationJob" + "$ref": "#/components/schemas/EvaluationRule" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationRule" } } } }, "default": { "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } } }, "tags": [ - "EvaluationSuiteGenerationJobs" + "Evaluation Rules" ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Evaluations=V1Preview" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationRule" + } + } + }, + "description": "Evaluation rule resource" } } }, - "/evaluation_suites": { + "/evaluationtaxonomies": { "get": { - "operationId": "EvaluationSuites_listLatest", - "description": "List the latest version of each EvaluationSuiteVersion", + "operationId": "EvaluationTaxonomies_list", + "description": "List evaluation taxonomies", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "agent_name", + "name": "inputName", + "in": "query", + "required": false, + "description": "Filter by the evaluation input name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "inputType", "in": "query", "required": false, - "description": "Filter by associated Foundry agent name (from target).", + "description": "Filter by taxonomy input type.", "schema": { "type": "string" }, "explode": false + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } } ], "responses": { @@ -4966,7 +5101,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluationSuiteVersion" + "$ref": "#/components/schemas/PagedEvaluationTaxonomy" } } } @@ -4990,13 +5125,16 @@ } } } - } + }, + "tags": [ + "Evaluation Taxonomies" + ] } }, - "/evaluation_suites/{name}/versions": { + "/evaluationtaxonomies/{name}": { "get": { - "operationId": "EvaluationSuites_listVersions", - "description": "List all versions of the given EvaluationSuiteVersion", + "operationId": "EvaluationTaxonomies_get", + "description": "Get an evaluation run by name.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -5005,10 +5143,22 @@ "name": "name", "in": "path", "required": true, - "description": "The name of the resource.", + "description": "The name of the resource", "schema": { "type": "string" } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } } ], "responses": { @@ -5017,7 +5167,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluationSuiteVersion" + "$ref": "#/components/schemas/EvaluationTaxonomy" } } } @@ -5041,106 +5191,92 @@ } } } - } + }, + "tags": [ + "Evaluation Taxonomies" + ] }, - "post": { - "operationId": "EvaluationSuites_createEvaluationSuiteVersion", - "description": "Create a new EvaluationSuiteVersion with auto incremented version id", + "delete": { + "operationId": "EvaluationTaxonomies_delete", + "description": "Delete an evaluation taxonomy by name.", "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": [ - "Evaluations=V1Preview" - ] - } + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "name", "in": "path", "required": true, - "description": "The name of the evaluation suite.", + "description": "The name of the resource", "schema": { "type": "string" } }, { - "name": "api-version", - "in": "query", + "name": "Foundry-Features", + "in": "header", "required": true, - "description": "The API version to use for this operation.", + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", "schema": { - "type": "string" - }, - "explode": false + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } } ], "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" - } - } - } + "204": { + "description": "There is no content to send for this request, but the headers may be useful." }, "default": { "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } } }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersionCreate" - } - } - }, - "description": "The evaluation suite version to create." - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "/evaluation_suites/{name}/versions/{version}": { - "get": { - "operationId": "EvaluationSuites_getVersion", - "description": "Get the specific version of the EvaluationSuiteVersion. The service returns 404 Not Found error if the EvaluationSuiteVersion does not exist.", + "tags": [ + "Evaluation Taxonomies" + ] + }, + "put": { + "operationId": "EvaluationTaxonomies_create", + "description": "Create an evaluation taxonomy.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "name", - "in": "path", + "name": "Foundry-Features", + "in": "header", "required": true, - "description": "The name of the resource.", + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", "schema": { - "type": "string" + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] } }, { - "name": "version", + "name": "name", "in": "path", "required": true, - "description": "The specific version id of the EvaluationSuiteVersion to retrieve.", + "description": "The name of the evaluation taxonomy.", "schema": { "type": "string" } @@ -5152,61 +5288,20 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" + "$ref": "#/components/schemas/EvaluationTaxonomy" } } } }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/EvaluationTaxonomy" } } } - } - } - }, - "delete": { - "operationId": "EvaluationSuites_deleteVersion", - "description": "Delete the specific version of the EvaluationSuiteVersion. The service returns 204 No Content if the EvaluationSuiteVersion was deleted successfully or if the EvaluationSuiteVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource.", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version of the EvaluationSuiteVersion to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." }, "default": { "description": "An unexpected error response.", @@ -5227,29 +5322,46 @@ } } } + }, + "tags": [ + "Evaluation Taxonomies" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationTaxonomyCreateOrUpdate" + } + } + }, + "description": "The evaluation taxonomy." } }, "patch": { - "operationId": "EvaluationSuites_createOrUpdateVersion", - "description": "Create a new or update an existing EvaluationSuiteVersion with the given version id", + "operationId": "EvaluationTaxonomies_update", + "description": "Update an evaluation taxonomy.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "name", - "in": "path", + "name": "Foundry-Features", + "in": "header", "required": true, - "description": "The name of the resource.", + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", "schema": { - "type": "string" + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] } }, { - "name": "version", + "name": "name", "in": "path", "required": true, - "description": "The specific version id of the EvaluationSuiteVersion to create or update.", + "description": "The name of the evaluation taxonomy.", "schema": { "type": "string" } @@ -5261,17 +5373,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" + "$ref": "#/components/schemas/EvaluationTaxonomy" } } } @@ -5296,23 +5398,27 @@ } } }, + "tags": [ + "Evaluation Taxonomies" + ], "requestBody": { "required": true, "content": { - "application/merge-patch+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersionUpdate" + "$ref": "#/components/schemas/EvaluationTaxonomyUpdate" } } }, - "description": "The EvaluationSuiteVersion to create or update." + "description": "The evaluation taxonomy." } } }, - "/evaluation_suites/{name}:run": { + "/evaluator_generation_jobs": { "post": { - "operationId": "EvaluationSuites_run", - "description": "Run an evaluation using the suite's testing criteria and dataset.", + "operationId": "EvaluatorGenerationJobs_create", + "summary": "Creates an evaluator generation job.", + "description": "Creates an evaluator generation job. The service generates rubric-based evaluator\ndefinitions from the provided source materials asynchronously.", "parameters": [ { "name": "Foundry-Features", @@ -5327,10 +5433,10 @@ } }, { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the evaluation suite.", + "name": "Operation-Id", + "in": "header", + "required": false, + "description": "Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.", "schema": { "type": "string" } @@ -5349,10 +5455,26 @@ "responses": { "201": { "description": "The request has succeeded and a new resource has been created as a result.", + "headers": { + "Operation-Location": { + "required": true, + "description": "URL to poll for the job status.", + "schema": { + "type": "string" + } + }, + "Location": { + "required": true, + "description": "URL of the created job resource.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationSuiteRunResponse" + "$ref": "#/components/schemas/EvaluatorGenerationJob" } } } @@ -5368,59 +5490,92 @@ } } }, + "tags": [ + "EvaluatorGenerationJobs" + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationSuiteRunRequest" + "$ref": "#/components/schemas/EvaluatorGenerationJobCreate" } } }, - "description": "The run request parameters." + "description": "The job to create." }, "x-ms-foundry-meta": { "required_previews": [ "Evaluations=V1Preview" ] } - } - }, - "/evaluationrules": { + }, "get": { - "operationId": "EvaluationRules_list", - "description": "List all evaluation rules.", + "operationId": "EvaluatorGenerationJobs_list", + "summary": "Returns a list of evaluator generation jobs.", + "description": "Returns a list of evaluator generation jobs.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + "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": [ + "Evaluations=V1Preview" + ] + } }, { - "name": "actionType", + "name": "limit", "in": "query", "required": false, - "description": "Filter by the type of evaluation rule.", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "schema": { - "$ref": "#/components/schemas/EvaluationRuleActionType" + "type": "integer", + "format": "int32", + "default": 20 }, "explode": false }, { - "name": "agentName", + "name": "order", "in": "query", "required": false, - "description": "Filter by the agent name.", + "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": "enabled", + "name": "before", "in": "query", "required": false, - "description": "Filter by the enabled status.", + "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": "boolean" + "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 } @@ -5431,104 +5586,171 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluationRule" + "type": "object", + "required": [ + "data", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorGenerationJob" + }, + "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." } } } }, "default": { "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/ApiErrorResponse" } } } } }, "tags": [ - "Evaluation Rules" - ] + "EvaluatorGenerationJobs" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } } }, - "/evaluationrules/{id}": { + "/evaluator_generation_jobs/{jobId}": { "get": { - "operationId": "EvaluationRules_get", - "description": "Get an evaluation rule.", + "operationId": "EvaluatorGenerationJobs_get", + "summary": "Get info about an evaluator generation job.", + "description": "Gets the details of an evaluator generation job by its ID.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + "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": [ + "Evaluations=V1Preview" + ] + } }, { - "name": "id", + "name": "jobId", "in": "path", "required": true, - "description": "Unique identifier for the evaluation rule.", + "description": "The ID of the job.", "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.", + "headers": { + "Retry-After": { + "required": false, + "description": "Recommended number of seconds to wait before polling again.", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationRule" + "$ref": "#/components/schemas/EvaluatorGenerationJob" } } } }, "default": { "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/ApiErrorResponse" } } } } }, "tags": [ - "Evaluation Rules" - ] - }, - "delete": { - "operationId": "EvaluationRules_delete", - "description": "Delete an evaluation rule.", - "parameters": [ + "EvaluatorGenerationJobs" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + }, + "delete": { + "operationId": "EvaluatorGenerationJobs_delete", + "description": "Deletes an evaluator generation job by its ID. Deletes the job record only;\nthe generated evaluator (if any) is preserved.", + "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + "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": [ + "Evaluations=V1Preview" + ] + } }, { - "name": "id", + "name": "jobId", "in": "path", "required": true, - "description": "Unique identifier for the evaluation rule.", + "description": "The ID of the job to delete.", "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": { @@ -5537,44 +5759,31 @@ }, "default": { "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/ApiErrorResponse" } } } } }, "tags": [ - "Evaluation Rules" - ] - }, - "put": { - "operationId": "EvaluationRules_createOrUpdate", - "description": "Create or update an evaluation rule.", + "EvaluatorGenerationJobs" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "/evaluator_generation_jobs/{jobId}:cancel": { + "post": { + "operationId": "EvaluatorGenerationJobs_cancel", + "summary": "Cancels an evaluator generation job.", + "description": "Cancels an evaluator generation job by its ID.", "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "Unique identifier for the evaluation rule.", - "schema": { - "type": "string" - } - }, { "name": "Foundry-Features", "in": "header", @@ -5586,6 +5795,25 @@ "Evaluations=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": { @@ -5594,82 +5822,69 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationRule" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationRule" + "$ref": "#/components/schemas/EvaluatorGenerationJob" } } } }, "default": { "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/ApiErrorResponse" } } } } }, "tags": [ - "Evaluation Rules" + "EvaluatorGenerationJobs" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationRule" - } - } - }, - "description": "Evaluation rule resource" + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] } } }, - "/evaluationtaxonomies": { + "/evaluators": { "get": { - "operationId": "EvaluationTaxonomies_list", - "description": "List evaluation taxonomies", + "operationId": "Evaluators_listLatestVersions", + "description": "List the latest version of each evaluator", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "inputName", + "name": "type", "in": "query", "required": false, - "description": "Filter by the evaluation input name.", + "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", "schema": { - "type": "string" + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorType" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] }, "explode": false }, { - "name": "inputType", + "name": "limit", "in": "query", "required": false, - "description": "Filter by taxonomy input type.", + "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": "string" + "type": "integer", + "format": "int32", + "default": 20 }, "explode": false }, @@ -5692,7 +5907,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluationTaxonomy" + "$ref": "#/components/schemas/PagedEvaluatorVersion" } } } @@ -5718,14 +5933,14 @@ } }, "tags": [ - "Evaluation Taxonomies" + "Evaluators" ] } }, - "/evaluationtaxonomies/{name}": { + "/evaluators/{name}/versions": { "get": { - "operationId": "EvaluationTaxonomies_get", - "description": "Get an evaluation run by name.", + "operationId": "Evaluators_listVersions", + "description": "List all versions of the given evaluator", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -5739,6 +5954,38 @@ "type": "string" } }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorType" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + }, + "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 default is 20.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + }, + "explode": false + }, { "name": "Foundry-Features", "in": "header", @@ -5758,7 +6005,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" + "$ref": "#/components/schemas/PagedEvaluatorVersion" } } } @@ -5784,12 +6031,12 @@ } }, "tags": [ - "Evaluation Taxonomies" + "Evaluators" ] }, - "delete": { - "operationId": "EvaluationTaxonomies_delete", - "description": "Delete an evaluation taxonomy by name.", + "post": { + "operationId": "Evaluators_createVersion", + "description": "Create a new EvaluatorVersion with auto incremented version id", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -5817,8 +6064,15 @@ } ], "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorVersion" + } + } + } }, "default": { "description": "An unexpected error response.", @@ -5841,16 +6095,37 @@ } }, "tags": [ - "Evaluation Taxonomies" - ] - }, - "put": { - "operationId": "EvaluationTaxonomies_create", - "description": "Create an evaluation taxonomy.", + "Evaluators" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorVersionCreate" + } + } + } + } + } + }, + "/evaluators/{name}/versions/{version}": { + "get": { + "operationId": "Evaluators_getVersion", + "description": "Get the specific version of the EvaluatorVersion. The service returns 404 Not Found error if the EvaluatorVersion does not exist.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, { "name": "Foundry-Features", "in": "header", @@ -5864,10 +6139,10 @@ } }, { - "name": "name", + "name": "version", "in": "path", "required": true, - "description": "The name of the evaluation taxonomy.", + "description": "The specific version id of the EvaluatorVersion to retrieve.", "schema": { "type": "string" } @@ -5879,20 +6154,76 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" + "$ref": "#/components/schemas/EvaluatorVersion" } } } }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } + } + }, + "tags": [ + "Evaluators" + ] + }, + "delete": { + "operationId": "Evaluators_deleteVersion", + "description": "Delete the specific version of the EvaluatorVersion. The service returns 204 No Content if the EvaluatorVersion was deleted successfully or if the EvaluatorVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version of the EvaluatorVersion to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." }, "default": { "description": "An unexpected error response.", @@ -5915,27 +6246,25 @@ } }, "tags": [ - "Evaluation Taxonomies" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomyCreateOrUpdate" - } - } - }, - "description": "The evaluation taxonomy." - } + "Evaluators" + ] }, "patch": { - "operationId": "EvaluationTaxonomies_update", - "description": "Update an evaluation taxonomy.", + "operationId": "Evaluators_updateVersion", + "description": "Update an existing EvaluatorVersion with the given version id", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, { "name": "Foundry-Features", "in": "header", @@ -5949,10 +6278,10 @@ } }, { - "name": "name", + "name": "version", "in": "path", "required": true, - "description": "The name of the evaluation taxonomy.", + "description": "The version of the EvaluatorVersion to update.", "schema": { "type": "string" } @@ -5964,7 +6293,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" + "$ref": "#/components/schemas/EvaluatorVersion" } } } @@ -5990,26 +6319,25 @@ } }, "tags": [ - "Evaluation Taxonomies" + "Evaluators" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomyUpdate" + "$ref": "#/components/schemas/EvaluatorVersionUpdate" } } }, - "description": "The evaluation taxonomy." + "description": "Evaluator resource" } } }, - "/evaluator_generation_jobs": { + "/evaluators/{name}/versions/{version}/credentials": { "post": { - "operationId": "EvaluatorGenerationJobs_create", - "summary": "Creates an evaluator generation job.", - "description": "Creates an evaluator generation job. The service generates rubric-based evaluator\ndefinitions from the provided source materials asynchronously.", + "operationId": "Evaluators_getCredentials", + "description": "Get the SAS credential to access the storage account associated with an Evaluator version.", "parameters": [ { "name": "Foundry-Features", @@ -6024,10 +6352,18 @@ } }, { - "name": "Operation-Id", - "in": "header", - "required": false, - "description": "Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.", + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the EvaluatorVersion to operate on.", "schema": { "type": "string" } @@ -6044,28 +6380,12 @@ } ], "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "headers": { - "Operation-Location": { - "required": true, - "description": "URL to poll for the job status.", - "schema": { - "type": "string" - } - }, - "Location": { - "required": true, - "description": "URL of the created job resource.", - "schema": { - "type": "string" - } - } - }, + "200": { + "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorGenerationJob" + "$ref": "#/components/schemas/AssetCredentialResponse" } } } @@ -6082,29 +6402,30 @@ } }, "tags": [ - "EvaluatorGenerationJobs" + "Evaluators" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorGenerationJobCreate" + "$ref": "#/components/schemas/EvaluatorCredentialRequest" } } }, - "description": "The job to create." + "description": "The credential request parameters" }, "x-ms-foundry-meta": { "required_previews": [ "Evaluations=V1Preview" ] } - }, - "get": { - "operationId": "EvaluatorGenerationJobs_list", - "summary": "Returns a list of evaluator generation jobs.", - "description": "Returns a list of evaluator generation jobs.", + } + }, + "/evaluators/{name}/versions/{version}/startPendingUpload": { + "post": { + "operationId": "Evaluators_startPendingUpload", + "description": "Start a new or get an existing pending upload of an evaluator for a specific version.", "parameters": [ { "name": "Foundry-Features", @@ -6119,46 +6440,21 @@ } }, { - "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.", + "name": "name", + "in": "path", + "required": true, "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.", + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the EvaluatorVersion to operate on.", "schema": { "type": "string" - }, - "explode": false + } }, { "name": "api-version", @@ -6177,33 +6473,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "data", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorGenerationJob" - }, - "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/PendingUploadResponse" } } } @@ -6220,218 +6490,19 @@ } }, "tags": [ - "EvaluatorGenerationJobs" + "Evaluators" ], - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "/evaluator_generation_jobs/{jobId}": { - "get": { - "operationId": "EvaluatorGenerationJobs_get", - "summary": "Get info about an evaluator generation job.", - "description": "Gets the details of an evaluator generation job by its ID.", - "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": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The ID of the job.", - "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.", - "headers": { - "Retry-After": { - "required": false, - "description": "Recommended number of seconds to wait before polling again.", - "schema": { - "type": "integer", - "format": "int32" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorGenerationJob" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "EvaluatorGenerationJobs" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - }, - "delete": { - "operationId": "EvaluatorGenerationJobs_delete", - "description": "Deletes an evaluator generation job by its ID. Deletes the job record only;\nthe generated evaluator (if any) is preserved.", - "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": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "jobId", - "in": "path", - "required": true, - "description": "The ID of the job to delete.", - "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": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "EvaluatorGenerationJobs" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "/evaluator_generation_jobs/{jobId}:cancel": { - "post": { - "operationId": "EvaluatorGenerationJobs_cancel", - "summary": "Cancels an evaluator generation job.", - "description": "Cancels an evaluator generation job by its ID.", - "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": [ - "Evaluations=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/EvaluatorGenerationJob" - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PendingUploadRequest" } } }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } + "description": "The pending upload request parameters" }, - "tags": [ - "EvaluatorGenerationJobs" - ], "x-ms-foundry-meta": { "required_previews": [ "Evaluations=V1Preview" @@ -6439,57 +6510,13 @@ } } }, - "/evaluators": { + "/indexes": { "get": { - "operationId": "Evaluators_listLatestVersions", - "description": "List the latest version of each evaluator", + "operationId": "Indexes_listLatest", + "description": "List the latest version of each Index", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/EvaluatorType" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "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 default is 20.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } } ], "responses": { @@ -6498,7 +6525,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluatorVersion" + "$ref": "#/components/schemas/PagedIndex" } } } @@ -6524,14 +6551,14 @@ } }, "tags": [ - "Evaluators" + "Indexes" ] } }, - "/evaluators/{name}/versions": { + "/indexes/{name}/versions": { "get": { - "operationId": "Evaluators_listVersions", - "description": "List all versions of the given evaluator", + "operationId": "Indexes_listVersions", + "description": "List all versions of the given Index", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -6544,50 +6571,6 @@ "schema": { "type": "string" } - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/EvaluatorType" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "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 default is 20.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } } ], "responses": { @@ -6596,7 +6579,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluatorVersion" + "$ref": "#/components/schemas/PagedIndex" } } } @@ -6622,88 +6605,14 @@ } }, "tags": [ - "Evaluators" + "Indexes" ] - }, - "post": { - "operationId": "Evaluators_createVersion", - "description": "Create a new EvaluatorVersion with auto incremented version id", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - } - ], - "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluators" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorVersionCreate" - } - } - } - } } }, - "/evaluators/{name}/versions/{version}": { + "/indexes/{name}/versions/{version}": { "get": { - "operationId": "Evaluators_getVersion", - "description": "Get the specific version of the EvaluatorVersion. The service returns 404 Not Found error if the EvaluatorVersion does not exist.", + "operationId": "Indexes_getVersion", + "description": "Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -6717,23 +6626,11 @@ "type": "string" } }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - }, { "name": "version", "in": "path", "required": true, - "description": "The specific version id of the EvaluatorVersion to retrieve.", + "description": "The specific version id of the Index to retrieve.", "schema": { "type": "string" } @@ -6745,7 +6642,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorVersion" + "$ref": "#/components/schemas/Index" } } } @@ -6771,12 +6668,12 @@ } }, "tags": [ - "Evaluators" + "Indexes" ] }, "delete": { - "operationId": "Evaluators_deleteVersion", - "description": "Delete the specific version of the EvaluatorVersion. The service returns 204 No Content if the EvaluatorVersion was deleted successfully or if the EvaluatorVersion does not exist.", + "operationId": "Indexes_deleteVersion", + "description": "Delete the specific version of the Index. The service returns 204 No Content if the Index was deleted successfully or if the Index does not exist.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -6790,23 +6687,11 @@ "type": "string" } }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - }, { "name": "version", "in": "path", "required": true, - "description": "The version of the EvaluatorVersion to delete.", + "description": "The version of the Index to delete.", "schema": { "type": "string" } @@ -6837,12 +6722,12 @@ } }, "tags": [ - "Evaluators" + "Indexes" ] }, "patch": { - "operationId": "Evaluators_updateVersion", - "description": "Update an existing EvaluatorVersion with the given version id", + "operationId": "Indexes_createOrUpdateVersion", + "description": "Create a new or update an existing Index with the given version id", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -6856,23 +6741,11 @@ "type": "string" } }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - }, { "name": "version", "in": "path", "required": true, - "description": "The version of the EvaluatorVersion to update.", + "description": "The specific version id of the Index to create or update.", "schema": { "type": "string" } @@ -6884,7 +6757,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorVersion" + "$ref": "#/components/schemas/Index" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Index" } } } @@ -6910,25 +6793,25 @@ } }, "tags": [ - "Evaluators" + "Indexes" ], "requestBody": { "required": true, "content": { - "application/json": { + "application/merge-patch+json": { "schema": { - "$ref": "#/components/schemas/EvaluatorVersionUpdate" + "$ref": "#/components/schemas/IndexUpdate" } } }, - "description": "Evaluator resource" + "description": "The Index to create or update." } } }, - "/evaluators/{name}/versions/{version}/credentials": { + "/insights": { "post": { - "operationId": "Evaluators_getCredentials", - "description": "Get the SAS credential to access the storage account associated with an Evaluator version.", + "operationId": "Insights_generate", + "description": "Generate Insights", "parameters": [ { "name": "Foundry-Features", @@ -6938,25 +6821,27 @@ "schema": { "type": "string", "enum": [ - "Evaluations=V1Preview" + "Insights=V1Preview" ] } }, { - "name": "name", - "in": "path", - "required": true, + "name": "Repeatability-Request-ID", + "in": "header", + "required": false, + "description": "Unique, client-generated identifier for ensuring request idempotency. Use the same ID for retries to prevent duplicate evaluations.", "schema": { "type": "string" } }, { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the EvaluatorVersion to operate on.", + "name": "Repeatability-First-Sent", + "in": "header", + "required": false, + "description": "Timestamp indicating when this request was first initiated. Used in conjunction with repeatability-request-id for idempotency control.", "schema": { - "type": "string" + "type": "string", + "format": "http-date" } }, { @@ -6971,12 +6856,12 @@ } ], "responses": { - "200": { - "description": "The request has succeeded.", + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetCredentialResponse" + "$ref": "#/components/schemas/Insight" } } } @@ -6993,490 +6878,14 @@ } }, "tags": [ - "Evaluators" + "Insights" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorCredentialRequest" - } - } - }, - "description": "The credential request parameters" - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "/evaluators/{name}/versions/{version}/startPendingUpload": { - "post": { - "operationId": "Evaluators_startPendingUpload", - "description": "Start a new or get an existing pending upload of an evaluator for a specific 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": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the EvaluatorVersion to operate on.", - "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/PendingUploadResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluators" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PendingUploadRequest" - } - } - }, - "description": "The pending upload request parameters" - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "/indexes": { - "get": { - "operationId": "Indexes_listLatest", - "description": "List the latest version of each Index", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedIndex" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ] - } - }, - "/indexes/{name}/versions": { - "get": { - "operationId": "Indexes_listVersions", - "description": "List all versions of the given Index", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedIndex" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ] - } - }, - "/indexes/{name}/versions/{version}": { - "get": { - "operationId": "Indexes_getVersion", - "description": "Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the Index to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Index" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ] - }, - "delete": { - "operationId": "Indexes_deleteVersion", - "description": "Delete the specific version of the Index. The service returns 204 No Content if the Index was deleted successfully or if the Index does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version of the Index to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ] - }, - "patch": { - "operationId": "Indexes_createOrUpdateVersion", - "description": "Create a new or update an existing Index with the given version id", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the Index to create or update.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Index" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Index" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ], - "requestBody": { - "required": true, - "content": { - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/IndexUpdate" - } - } - }, - "description": "The Index to create or update." - } - } - }, - "/insights": { - "post": { - "operationId": "Insights_generate", - "description": "Generate Insights", - "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": [ - "Insights=V1Preview" - ] - } - }, - { - "name": "Repeatability-Request-ID", - "in": "header", - "required": false, - "description": "Unique, client-generated identifier for ensuring request idempotency. Use the same ID for retries to prevent duplicate evaluations.", - "schema": { - "type": "string" - } - }, - { - "name": "Repeatability-First-Sent", - "in": "header", - "required": false, - "description": "Timestamp indicating when this request was first initiated. Used in conjunction with repeatability-request-id for idempotency control.", - "schema": { - "type": "string", - "format": "http-date" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Insight" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Insights" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Insight" + "$ref": "#/components/schemas/Insight" } } }, @@ -13921,102 +13330,6 @@ } }, "/skills": { - "post": { - "operationId": "Skills_createSkill", - "description": "Creates a skill.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SkillObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 63, - "description": "The unique name of the skill." - }, - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill." - }, - "instructions": { - "type": "string", - "maxLength": 102400, - "description": "Instructions that define the behavior of the skill." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - } - }, - "required": [ - "name" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] - } - }, "get": { "operationId": "Skills_listSkills", "description": "Returns the list of all skills.", @@ -14101,7 +13414,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/Skill" }, "description": "The requested list of items." }, @@ -14155,7 +13468,7 @@ "required": true, "description": "The unique name of the skill.", "schema": { - "type": "string" + "$ref": "#/components/schemas/SkillName" } }, { @@ -14187,7 +13500,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/Skill" } } } @@ -14213,16 +13526,16 @@ } }, "post": { - "operationId": "Skills_updateSkill", - "description": "Updates an existing skill.", + "operationId": "updateSkill", + "description": "Update a skill.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The name of the skill to update.", "schema": { - "type": "string" + "$ref": "#/components/schemas/SkillName" } }, { @@ -14254,7 +13567,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/Skill" } } } @@ -14280,25 +13593,14 @@ "schema": { "type": "object", "properties": { - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill." - }, - "instructions": { + "default_version": { "type": "string", - "maxLength": 102400, - "description": "Instructions that define the behavior of the skill." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" + "description": "The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest." } - } + }, + "required": [ + "default_version" + ] } } } @@ -14319,7 +13621,7 @@ "required": true, "description": "The unique name of the skill.", "schema": { - "type": "string" + "$ref": "#/components/schemas/SkillName" } }, { @@ -14377,18 +13679,18 @@ } } }, - "/skills/{name}:download": { + "/skills/{name}/content": { "get": { - "operationId": "Skills_downloadSkill", - "description": "Downloads a skill package.", + "operationId": "getSkillContent", + "description": "Download the zip content for the default version of a skill.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The name of the skill.", "schema": { - "type": "string" + "$ref": "#/components/schemas/SkillName" } }, { @@ -14447,11 +13749,19 @@ } } }, - "/skills:import": { + "/skills/{name}/versions": { "post": { - "operationId": "Skills_createSkillFromPackage", - "description": "Creates a skill from a zip package.", + "operationId": "createSkillVersion_createSkillVersionFromFiles", "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the skill. If the skill does not exist, it will be created.", + "schema": { + "$ref": "#/components/schemas/SkillName" + } + }, { "name": "Foundry-Features", "in": "header", @@ -14475,13 +13785,14 @@ "explode": false } ], + "description": "Creates a new version of a skill. If the skill does not exist, it will be created. Creates a new version of a skill from uploaded files via multipart form data.", "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + "200": { + "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/SkillVersion" } } } @@ -14497,33 +13808,65 @@ } } }, + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] + }, "tags": [ "Skills" ], "requestBody": { "required": true, "content": { - "application/zip": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "object", + "properties": { + "inline_content": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillInlineContent" + } + ], + "description": "Inline skill content for simple skills without file uploads. Foundry-specific extension." + }, + "default": { + "type": "boolean", + "description": "Whether to set this version as the default." + } + } + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateSkillVersionFromFilesBody" + }, + "encoding": { + "files": { + "contentType": "*/*" + }, + "default": { + "contentType": "text/plain" + } } } - }, - "description": "The zip package used to create the skill." - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] + } } - } - }, - "/toolboxes": { + }, "get": { - "operationId": "listToolboxes", - "description": "List all toolboxes.", + "operationId": "listSkillVersions", + "description": "List all versions of a skill.", "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the skill to list versions for.", + "schema": { + "$ref": "#/components/schemas/SkillName" + } + }, { "name": "limit", "in": "query", @@ -14566,6 +13909,18 @@ }, "explode": false }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, { "name": "api-version", "in": "query", @@ -14592,7 +13947,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ToolboxObject" + "$ref": "#/components/schemas/SkillVersion" }, "description": "The requested list of items." }, @@ -14626,24 +13981,50 @@ } }, "tags": [ - "Toolboxes" - ] + "Skills" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] + } } }, - "/toolboxes/{name}": { + "/skills/{name}/versions/{version}": { "get": { - "operationId": "getToolbox", - "description": "Retrieve a toolbox.", + "operationId": "getSkillVersion", + "description": "Retrieve a specific version of a skill.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The name of the toolbox to retrieve.", + "description": "The name of the skill.", + "schema": { + "$ref": "#/components/schemas/SkillName" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version identifier to retrieve.", "schema": { "type": "string" } }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, { "name": "api-version", "in": "query", @@ -14661,7 +14042,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolboxObject" + "$ref": "#/components/schemas/SkillVersion" } } } @@ -14678,15 +14059,47 @@ } }, "tags": [ - "Toolboxes" - ] + "Skills" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] + } }, - "patch": { - "operationId": "updateToolbox", - "description": "Update a toolbox to point to a specific version.", + "delete": { + "operationId": "deleteSkillVersion", + "description": "Delete a specific version of a skill.", "parameters": [ { - "$ref": "#/components/parameters/UpdateToolboxRequest.name" + "name": "name", + "in": "path", + "required": true, + "description": "The name of the skill.", + "schema": { + "$ref": "#/components/schemas/SkillName" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version identifier to delete.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } }, { "name": "api-version", @@ -14705,7 +14118,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolboxObject" + "$ref": "#/components/schemas/DeleteSkillVersionResponse" } } } @@ -14722,76 +14135,48 @@ } }, "tags": [ - "Toolboxes" + "Skills" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateToolboxRequest" - } - } - } + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] } - }, - "delete": { - "operationId": "deleteToolbox", - "description": "Delete a toolbox and all its versions.", + } + }, + "/skills/{name}/versions/{version}/content": { + "get": { + "operationId": "getSkillVersionContent", + "description": "Download the zip content for a specific version of a skill.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The name of the toolbox to delete.", + "description": "The name of the skill.", "schema": { - "type": "string" + "$ref": "#/components/schemas/SkillName" } }, { - "name": "api-version", - "in": "query", + "name": "version", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The version to download content for.", "schema": { "type": "string" - }, - "explode": false - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } } - } - }, - "tags": [ - "Toolboxes" - ] - } - }, - "/toolboxes/{name}/versions": { - "post": { - "operationId": "createToolboxVersion", - "description": "Create a new version of a toolbox. If the toolbox does not exist, it will be created.", - "parameters": [ + }, { - "name": "name", - "in": "path", + "name": "Foundry-Features", + "in": "header", "required": true, - "description": "The name of the toolbox. If the toolbox does not exist, it will be created.", + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", "schema": { "type": "string", - "maxLength": 256 + "enum": [ + "Skills=V1Preview" + ] } }, { @@ -14807,11 +14192,12 @@ ], "responses": { "200": { - "description": "The request has succeeded.", + "description": "The response body for downloading a skill package.", "content": { - "application/json": { + "application/zip": { "schema": { - "$ref": "#/components/schemas/ToolboxVersionObject" + "type": "string", + "format": "binary" } } } @@ -14828,64 +14214,389 @@ } }, "tags": [ - "Toolboxes" + "Skills" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolbox." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the toolbox." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools to include in this version." - }, - "policies": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolboxPolicies" - } - ], - "description": "Policy configuration for this toolbox version." - } - }, - "required": [ - "tools" - ] - } - } - } + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] } - }, + } + }, + "/toolboxes": { "get": { - "operationId": "listToolboxVersions", - "description": "List all versions of a toolbox.", + "operationId": "listToolboxes", + "description": "List all toolboxes.", "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox to list versions for.", - "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", + "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/ToolboxObject" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ] + } + }, + "/toolboxes/{name}": { + "get": { + "operationId": "getToolbox", + "description": "Retrieve a toolbox.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox to retrieve.", + "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/ToolboxObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ] + }, + "patch": { + "operationId": "updateToolbox", + "description": "Update a toolbox to point to a specific version.", + "parameters": [ + { + "$ref": "#/components/parameters/UpdateToolboxRequest.name" + }, + { + "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/ToolboxObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateToolboxRequest" + } + } + } + } + }, + "delete": { + "operationId": "deleteToolbox", + "description": "Delete a toolbox and all its versions.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox to delete.", + "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": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ] + } + }, + "/toolboxes/{name}/versions": { + "post": { + "operationId": "createToolboxVersion", + "description": "Create a new version of a toolbox. If the toolbox does not exist, it will be created.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox. If the toolbox does not exist, it will be created.", + "schema": { + "type": "string", + "maxLength": 256 + } + }, + { + "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/ToolboxVersionObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the toolbox." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the toolbox." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "The list of tools to include in this version." + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolboxSkill" + }, + "description": "The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used." + }, + "policies": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolboxPolicies" + } + ], + "description": "Policy configuration for this toolbox version." + } + }, + "required": [ + "tools" + ] + } + } + } + } + }, + "get": { + "operationId": "listToolboxVersions", + "description": "List all versions of a toolbox.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox to list versions for.", + "schema": { + "type": "string" + } + }, { "name": "limit", "in": "query", @@ -15831,45 +15542,12 @@ "responses", "a2a", "mcp", - "invocations" + "invocations", + "invocations_ws" ] } ] }, - "AgentEvaluationSuiteJobSource": { - "type": "object", - "required": [ - "type", - "agent_name" - ], - "properties": { - "description": { - "type": "string", - "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." - }, - "type": { - "type": "string", - "enum": [ - "agent" - ], - "description": "The source type for this source, which is Agent." - }, - "agent_name": { - "type": "string", - "description": "The agent name to fetch instructions from." - }, - "agent_version": { - "type": "string", - "description": "The agent version. If not specified, the latest version is used." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteJobSource" - } - ], - "description": "Agent source for evaluation suite generation jobs — references an agent to fetch instructions and metadata from." - }, "AgentEvaluatorGenerationJobSource": { "type": "object", "required": [ @@ -15966,6 +15644,23 @@ ], "description": "A trace source that selects traces by agent reference with time-based filtering." }, + "AgentIdentifier": { + "type": "object", + "required": [ + "agentName" + ], + "properties": { + "agentName": { + "type": "string", + "description": "Registered Foundry agent name (required)." + }, + "agentVersion": { + "type": "string", + "description": "Pinned agent version. Defaults to latest if omitted." + } + }, + "description": "Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig." + }, "AgentIdentity": { "type": "object", "required": [ @@ -16121,7 +15816,8 @@ "activity_protocol", "responses", "mcp", - "invocations" + "invocations", + "invocations_ws" ] } ] @@ -16220,6 +15916,7 @@ "idle", "updating", "failed", + "stopping", "deleting", "deleted", "expired" @@ -18476,21 +18173,126 @@ "skills": { "type": "array", "items": { - "$ref": "#/components/schemas/OptimizationAgentSkill" + "type": "object", + "additionalProperties": {} }, "description": "Optional skill overrides." + }, + "tools": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "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", + "sizeBytes" + ], + "properties": { + "path": { + "type": "string", + "description": "Relative path of the file." + }, + "type": { + "type": "string", + "description": "File type category (e.g. 'config', 'results')." + }, + "sizeBytes": { + "type": "integer", + "format": "int64", + "description": "File size in bytes." + } + }, + "description": "File entry in a candidate's blob directory." + }, + "CandidateMetadata": { + "type": "object", + "required": [ + "candidateId", + "jobId", + "candidateName", + "status", + "hasResults", + "createdAt", + "updatedAt", + "files" + ], + "properties": { + "candidateId": { + "type": "string", + "description": "Server-assigned candidate identifier." + }, + "jobId": { + "type": "string", + "description": "Owning optimization job id." + }, + "candidateName": { + "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." + }, + "hasResults": { + "type": "boolean", + "description": "Whether detailed results are available for this candidate." + }, + "createdAt": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp when the candidate was created, represented in Unix time." + }, + "updatedAt": { + "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", + "candidateId", "results" ], "properties": { - "candidate_id": { + "candidateId": { "type": "string", "description": "Owning candidate id." }, @@ -19536,6 +19338,26 @@ }, "title": "CreateEvalRunRequest" }, + "CreateSkillVersionFromFilesBody": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "string", + "format": "binary" + }, + "description": "Skill files to upload. Upload a single zip file or multiple individual files with relative paths." + }, + "default": { + "type": "boolean", + "description": "Whether to set this version as the default. Defaults to false." + } + }, + "required": [ + "files" + ] + }, "CredentialType": { "anyOf": [ { @@ -19574,7 +19396,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the cron schedule.", + "description": "Time zone for the cron schedule. Defaults to `UTC`.", "default": "UTC" }, "startTime": { @@ -19940,7 +19762,6 @@ "prompt": "#/components/schemas/PromptDataGenerationJobSource", "agent": "#/components/schemas/AgentDataGenerationJobSource", "traces": "#/components/schemas/TracesDataGenerationJobSource", - "dataset": "#/components/schemas/DatasetDataGenerationJobSource", "file": "#/components/schemas/FileDataGenerationJobSource" } }, @@ -19957,7 +19778,6 @@ "prompt", "agent", "traces", - "dataset", "file" ] } @@ -20094,74 +19914,6 @@ ], "description": "Dataset output for a data generation job." }, - "DatasetDataGenerationJobSource": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "description": { - "type": "string", - "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." - }, - "type": { - "type": "string", - "enum": [ - "dataset" - ], - "description": "The source type for this source, which is Dataset." - }, - "name": { - "type": "string", - "description": "The name of the dataset." - }, - "version": { - "type": "string", - "description": "The version of the dataset. If not specified, the latest version is used." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/DataGenerationJobSource" - } - ], - "description": "Dataset source for data generation jobs — reference to a dataset." - }, - "DatasetEvaluationSuiteJobSource": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "description": { - "type": "string", - "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." - }, - "type": { - "type": "string", - "enum": [ - "dataset" - ], - "description": "The source type for this source, which is Dataset." - }, - "name": { - "type": "string", - "description": "The name of the dataset." - }, - "version": { - "type": "string", - "description": "The version of the dataset. If not specified, the latest version is used." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteJobSource" - } - ], - "description": "Dataset source for evaluation suite generation jobs — reference to a dataset." - }, "DatasetEvaluatorGenerationJobSource": { "type": "object", "required": [ @@ -20196,48 +19948,32 @@ ], "description": "Dataset source for evaluator generation jobs — reference to a dataset." }, - "DatasetItem": { + "DatasetInfo": { "type": "object", "required": [ - "name", - "query" + "taskCount", + "isInline" ], "properties": { "name": { "type": "string", - "description": "Unique-within-the-dataset identifier for this task." + "description": "Dataset name when using a registered dataset reference. Null for inline datasets." }, - "query": { - "type": "string", - "description": "The user query / input for the task." - }, - "ground_truth": { + "version": { "type": "string", - "description": "Optional ground truth used by reference-based evaluators." - }, - "criteria": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationCriterion" - }, - "description": "Per-task evaluation criteria. Defaults to the job-level evaluators if unset." + "description": "Dataset version when using a registered dataset reference. Null for inline datasets." }, - "eval_results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemResult" - }, - "description": "Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped." + "taskCount": { + "type": "integer", + "format": "int32", + "description": "Number of tasks/rows in the dataset." }, - "response_items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.OutputItem" - }, - "description": "Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run." + "isInline": { + "type": "boolean", + "description": "True when the dataset was provided inline in the request body." } }, - "description": "A single evaluation task with input query, expected output, and evaluation criteria." + "description": "Metadata about the dataset used for optimization, surfaced in the response." }, "DatasetRef": { "type": "object", @@ -20598,12 +20334,21 @@ "DeleteSkillResponse": { "type": "object", "required": [ + "id", "name", "deleted" ], "properties": { - "name": { + "id": { "type": "string", + "description": "The unique identifier of the deleted skill." + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], "description": "The unique name of the skill." }, "deleted": { @@ -20611,7 +20356,39 @@ "description": "Whether the skill was successfully deleted." } }, - "description": "A deleted skill Object" + "description": "A deleted skill." + }, + "DeleteSkillVersionResponse": { + "type": "object", + "required": [ + "id", + "name", + "deleted", + "version" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the deleted skill version." + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], + "description": "The name of the skill." + }, + "deleted": { + "type": "boolean", + "description": "Whether the skill version was successfully deleted." + }, + "version": { + "type": "string", + "description": "The version that was deleted." + } + }, + "description": "A deleted skill version." }, "Deployment": { "type": "object", @@ -20680,7 +20457,7 @@ }, "always_applicable": { "type": "boolean", - "description": "When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions.", + "description": "When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`.", "default": false } }, @@ -21577,62 +21354,6 @@ ], "description": "Insights from the evaluation comparison." }, - "EvaluationCriterion": { - "type": "object", - "required": [ - "name", - "instruction" - ], - "properties": { - "name": { - "type": "string", - "description": "Criterion name (referenced in evaluation result rows)." - }, - "instruction": { - "type": "string", - "description": "Natural-language instruction passed to the judge LLM." - } - }, - "description": "LLM-as-judge evaluation criterion applied to a single task." - }, - "EvaluationDataGenerationType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "simple_qna", - "traces", - "tool_use", - "task" - ] - } - ], - "description": "The data generation type." - }, - "EvaluationDatasetReference": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "Dataset name." - }, - "version": { - "type": "string", - "description": "Dataset version. If not provided, resolves to the latest version." - }, - "schema_file_name": { - "type": "string", - "description": "Name of the schema file within the dataset's blob folder (e.g., \"a3f2b1c4_schema.json\").\nOptional — if not provided, schema is inferred at runtime from the data.\nOnly applicable for uri_folder datasets." - } - }, - "description": "Reference to a dataset by name and version." - }, "EvaluationLevel": { "anyOf": [ { @@ -21662,878 +21383,252 @@ ], "description": "Evaluation Result Sample Type" }, - "evaluationResult": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalResult" - } - ], - "description": "Evaluation result for the analysis sample." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightSample" - } - ], - "description": "A sample from the evaluation result." - }, - "EvaluationRule": { - "type": "object", - "required": [ - "id", - "action", - "eventType", - "enabled", - "systemData" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the evaluation rule.", - "readOnly": true - }, - "displayName": { - "type": "string", - "description": "Display Name for the evaluation rule." - }, - "description": { - "type": "string", - "description": "Description for the evaluation rule." - }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleAction" - } - ], - "description": "Definition of the evaluation rule action.", - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - }, - "filter": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleFilter" - } - ], - "description": "Filter condition of the evaluation rule." - }, - "eventType": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleEventType" - } - ], - "description": "Event type that the evaluation rule applies to." - }, - "enabled": { - "type": "boolean", - "description": "Indicates whether the evaluation rule is enabled. Default is true." - }, - "systemData": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "System metadata for the evaluation rule.", - "readOnly": true - } - }, - "description": "Evaluation rule model." - }, - "EvaluationRuleAction": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleActionType" - } - ], - "description": "Type of the evaluation action." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", - "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" - } - }, - "description": "Evaluation action model." - }, - "EvaluationRuleActionType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "continuousEvaluation", - "humanEvaluationPreview" - ] - } - ], - "description": "Type of the evaluation action." - }, - "EvaluationRuleEventType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "responseCompleted", - "manual" - ] - } - ], - "description": "Type of the evaluation rule event." - }, - "EvaluationRuleFilter": { - "type": "object", - "required": [ - "agentName" - ], - "properties": { - "agentName": { - "type": "string", - "description": "Filter by agent name." - } - }, - "description": "Evaluation filter model." - }, - "EvaluationRunClusterInsightRequest": { - "type": "object", - "required": [ - "type", - "evalId", - "runIds" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationRunClusterInsight" - ], - "description": "The type of insights request." - }, - "evalId": { - "type": "string", - "description": "Evaluation Id for the insights." - }, - "runIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of evaluation run IDs for the insights." - }, - "modelConfiguration": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightModelConfiguration" - } - ], - "description": "Configuration of the model used in the insight generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightRequest" - } - ], - "description": "Insights on set of Evaluation Results" - }, - "EvaluationRunClusterInsightResult": { - "type": "object", - "required": [ - "type", - "clusterInsight" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationRunClusterInsight" - ], - "description": "The type of insights result." - }, - "clusterInsight": { - "$ref": "#/components/schemas/ClusterInsightResult" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "Insights from the evaluation run cluster analysis." - }, - "EvaluationScheduleTask": { - "type": "object", - "required": [ - "type", - "evalId", - "evalRun" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Evaluation" - ] - }, - "evalId": { - "type": "string", - "description": "Identifier of the evaluation group." - }, - "evalRun": { - "type": "object", - "description": "The evaluation run payload." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleTask" - } - ], - "description": "Evaluation task for the schedule." - }, - "EvaluationSuiteDataGenerationOptions": { - "type": "object", - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationDataGenerationType" - } - ], - "description": "The data generation type. Defaults to 'simple_qna' if not specified." - }, - "max_samples": { - "type": "integer", - "format": "int32", - "minimum": 15, - "maximum": 1000, - "description": "Maximum number of samples to generate. Valid range: 15-1000." - } - }, - "description": "Options for dataset generation within an evaluation suite generation job." - }, - "EvaluationSuiteGenerationCategory": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "quality", - "safety" - ] - } - ], - "description": "The category of evaluator generation." - }, - "EvaluationSuiteGenerationJob": { - "type": "object", - "required": [ - "id", - "status", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "Server-assigned unique identifier.", - "readOnly": true - }, - "inputs": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteGenerationJobInputs" - } - ], - "description": "Caller-supplied inputs." - }, - "result": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteVersion" - } - ], - "description": "Result produced on success.", - "readOnly": true - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/JobStatus" - } - ], - "description": "Current lifecycle status.", - "readOnly": true - }, - "error": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Error" - } - ], - "description": "Error details — populated only on failure.", - "readOnly": true - }, - "created_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The timestamp when the job was created, represented in Unix time.", - "readOnly": true - }, - "finished_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The timestamp when the job finished, represented in Unix time.", - "readOnly": true - }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteGenerationTokenUsage" - } - ], - "description": "Token consumption summary. Populated on terminal states.", - "readOnly": true - } - }, - "description": "Evaluation suite generation job resource — a long-running job that generates testing criteria and optionally a dataset from source materials. On success, the result is the persisted EvaluationSuiteVersion." - }, - "EvaluationSuiteGenerationJobCreate": { - "type": "object", - "properties": { - "inputs": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteGenerationJobInputs" - } - ], - "description": "Caller-supplied inputs." - } - }, - "description": "Evaluation suite generation job resource — a long-running job that generates testing criteria and optionally a dataset from source materials. On success, the result is the persisted EvaluationSuiteVersion." - }, - "EvaluationSuiteGenerationJobInputs": { - "type": "object", - "required": [ - "evaluation_suite_name", - "sources", - "generation_model" - ], - "properties": { - "evaluation_suite_name": { - "type": "string", - "description": "The evaluation suite name to create." - }, - "sources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationSuiteJobSource" - }, - "description": "Source materials for generation — agent context, prompts, traces, or datasets." - }, - "generation_model": { - "type": "string", - "description": "The LLM model to use for rubric and data generation (e.g., 'gpt-4o')." - }, - "category": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteGenerationCategory" - } - ], - "description": "Category determines the generation focus. Default: quality.", - "default": "quality" - }, - "initialization_parameters": { - "type": "object", - "additionalProperties": {}, - "description": "Optional initialization parameters applied to all generated evaluators.\nFor example, deployment_name for LLM judge model, default threshold." - }, - "data_generation_options": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteDataGenerationOptions" - } - ], - "description": "Data generation options. Controls how the evaluation dataset is generated.\nIf omitted, defaults are used (simple_qna, 100 max_samples)." - } - }, - "description": "Caller-supplied inputs for an evaluation suite generation job." - }, - "EvaluationSuiteGenerationTokenUsage": { - "type": "object", - "properties": { - "input_tokens": { - "type": "integer", - "format": "int64", - "description": "Number of input tokens consumed." - }, - "output_tokens": { - "type": "integer", - "format": "int64", - "description": "Number of output tokens consumed." - }, - "total_tokens": { - "type": "integer", - "format": "int64", - "description": "Total tokens consumed." - } - }, - "description": "Token usage summary for an evaluation suite generation job." - }, - "EvaluationSuiteJobSource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteJobSourceType" - } - ], - "description": "The type of source." - }, - "description": { - "type": "string", - "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "prompt": "#/components/schemas/PromptEvaluationSuiteJobSource", - "agent": "#/components/schemas/AgentEvaluationSuiteJobSource", - "traces": "#/components/schemas/TracesEvaluationSuiteJobSource", - "dataset": "#/components/schemas/DatasetEvaluationSuiteJobSource" - } - }, - "description": "The base source model for evaluation suite generation jobs. Polymorphic over `type`." - }, - "EvaluationSuiteJobSourceType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "prompt", - "agent", - "traces", - "dataset" - ] - } - ], - "description": "The supported source types for evaluation suite generation jobs." - }, - "EvaluationSuiteRunRequest": { - "type": "object", - "properties": { - "evaluation_name": { - "type": "string", - "description": "Name for the evaluation. Default: '{suiteName}-runs'." - }, - "evaluation_suite_version": { - "type": "string", - "description": "Evaluation suite version to run. Default: latest." - }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "Overrides the suite's default evaluation level. If omitted, uses the level from the suite." - } - }, - "description": "Request body for running an evaluation from a suite." - }, - "EvaluationSuiteRunResponse": { - "type": "object", - "required": [ - "evaluation_suite_name", - "evaluation_suite_version", - "results" - ], - "properties": { - "evaluation_suite_name": { - "type": "string", - "description": "The evaluation suite name used." - }, - "evaluation_suite_version": { - "type": "string", - "description": "The evaluation suite version resolved." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationSuiteRunResult" - }, - "description": "The run results. Currently a single-element array; will support multiple runs in the future." - } - }, - "description": "Response from running an evaluation suite." - }, - "EvaluationSuiteRunResult": { - "type": "object", - "required": [ - "eval_id", - "run_id", - "status", - "created_at" - ], - "properties": { - "eval_id": { - "type": "string", - "description": "The evaluation ID created." - }, - "run_id": { - "type": "string", - "description": "The eval run ID created." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/JobStatus" - } - ], - "description": "Status of the run." - }, - "created_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when the run was created." - } - }, - "description": "Result of a single evaluation run within a suite execution." - }, - "EvaluationSuiteSubtype": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "default", - "benchmark" - ] - } - ], - "description": "The subtype of an evaluation suite." - }, - "EvaluationSuiteVersion": { - "type": "object", - "required": [ - "testing_criteria", - "name", - "version" - ], - "properties": { - "display_name": { - "type": "string", - "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." - }, - "subtype": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteSubtype" - } - ], - "description": "Subtype of the evaluation suite." - }, - "dataset": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationDatasetReference" - } - ], - "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." - }, - "testing_criteria": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" - }, - { - "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" - } - ] - }, - "minItems": 1, - "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." - }, - "input_messages": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" - } - ], - "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." - }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "Default evaluation level for this suite. Can be overridden at run time." - }, - "name": { - "type": "string", - "description": "The name of the resource.", - "readOnly": true - }, - "version": { - "type": "string", - "description": "The version of the resource.", - "readOnly": true + "evaluationResult": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalResult" + } + ], + "description": "Evaluation result for the analysis sample." } }, - "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." + "allOf": [ + { + "$ref": "#/components/schemas/InsightSample" + } + ], + "description": "A sample from the evaluation result." }, - "EvaluationSuiteVersionCreate": { + "EvaluationRule": { "type": "object", "required": [ - "testing_criteria" + "id", + "action", + "eventType", + "enabled", + "systemData" ], "properties": { - "display_name": { + "id": { "type": "string", - "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." + "description": "Unique identifier for the evaluation rule.", + "readOnly": true }, - "subtype": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteSubtype" - } - ], - "description": "Subtype of the evaluation suite." + "displayName": { + "type": "string", + "description": "Display Name for the evaluation rule." }, - "dataset": { + "description": { + "type": "string", + "description": "Description for the evaluation rule." + }, + "action": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationDatasetReference" + "$ref": "#/components/schemas/EvaluationRuleAction" } ], - "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." - }, - "testing_criteria": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" - }, - { - "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" - } + "description": "Definition of the evaluation rule action.", + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" ] - }, - "minItems": 1, - "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." + } }, - "target": { + "filter": { "allOf": [ { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." - }, - "input_messages": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + "$ref": "#/components/schemas/EvaluationRuleFilter" } ], - "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." + "description": "Filter condition of the evaluation rule." }, - "evaluation_level": { + "eventType": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationLevel" + "$ref": "#/components/schemas/EvaluationRuleEventType" } ], - "description": "Default evaluation level for this suite. Can be overridden at run time." + "description": "Event type that the evaluation rule applies to." }, - "description": { - "type": "string", - "description": "The asset description text." + "enabled": { + "type": "boolean", + "description": "Indicates whether the evaluation rule is enabled. Default is true." }, - "tags": { + "systemData": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "description": "System metadata for the evaluation rule.", + "readOnly": true } }, - "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." + "description": "Evaluation rule model." }, - "EvaluationSuiteVersionUpdate": { + "EvaluationRuleAction": { "type": "object", "required": [ - "testing_criteria" + "type" ], "properties": { - "display_name": { - "type": "string", - "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." - }, - "subtype": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationSuiteSubtype" + "$ref": "#/components/schemas/EvaluationRuleActionType" } ], - "description": "Subtype of the evaluation suite." + "description": "Type of the evaluation action." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", + "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" + } + }, + "description": "Evaluation action model." + }, + "EvaluationRuleActionType": { + "anyOf": [ + { + "type": "string" }, - "dataset": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationDatasetReference" - } + { + "type": "string", + "enum": [ + "continuousEvaluation", + "humanEvaluationPreview" + ] + } + ], + "description": "Type of the evaluation action." + }, + "EvaluationRuleEventType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "responseCompleted", + "manual" + ] + } + ], + "description": "Type of the evaluation rule event." + }, + "EvaluationRuleFilter": { + "type": "object", + "required": [ + "agentName" + ], + "properties": { + "agentName": { + "type": "string", + "description": "Filter by agent name." + } + }, + "description": "Evaluation filter model." + }, + "EvaluationRunClusterInsightRequest": { + "type": "object", + "required": [ + "type", + "evalId", + "runIds" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationRunClusterInsight" ], - "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." + "description": "The type of insights request." }, - "testing_criteria": { + "evalId": { + "type": "string", + "description": "Evaluation Id for the insights." + }, + "runIds": { "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" - }, - { - "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" - } - ] + "type": "string" }, - "minItems": 1, - "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." + "description": "List of evaluation run IDs for the insights." }, - "target": { + "modelConfiguration": { "allOf": [ { - "$ref": "#/components/schemas/Target" + "$ref": "#/components/schemas/InsightModelConfiguration" } ], - "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." - }, - "input_messages": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" - } + "description": "Configuration of the model used in the insight generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightRequest" + } + ], + "description": "Insights on set of Evaluation Results" + }, + "EvaluationRunClusterInsightResult": { + "type": "object", + "required": [ + "type", + "clusterInsight" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationRunClusterInsight" ], - "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." + "description": "The type of insights result." }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "Default evaluation level for this suite. Can be overridden at run time." + "clusterInsight": { + "$ref": "#/components/schemas/ClusterInsightResult" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightResult" + } + ], + "description": "Insights from the evaluation run cluster analysis." + }, + "EvaluationScheduleTask": { + "type": "object", + "required": [ + "type", + "evalId", + "evalRun" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Evaluation" + ] }, - "description": { + "evalId": { "type": "string", - "description": "The asset description text." + "description": "Identifier of the evaluation group." }, - "tags": { + "evalRun": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "description": "The evaluation run payload." } }, - "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleTask" + } + ], + "description": "Evaluation task for the schedule." }, "EvaluationTaxonomy": { "type": "object", @@ -23948,27 +23043,6 @@ }, "description": "An array of tools the hosted agent's model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter." }, - "container_protocol_versions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProtocolVersionRecord" - }, - "description": "The protocols that the agent supports for ingress communication of the containers.", - "example": [ - { - "protocol": "responses", - "version": "v0.1.1" - }, - { - "protocol": "invocations", - "version": "v0.0.1" - }, - { - "protocol": "a2a", - "version": "v0.3.0" - } - ] - }, "cpu": { "type": "string", "description": "The CPU configuration for the hosted agent.", @@ -23990,11 +23064,6 @@ "value": "debug" } }, - "image": { - "type": "string", - "description": "The image ID for the agent, applicable to image-based hosted agents.", - "example": "my-registry.azurecr.io/my-hosted-agent:latest" - }, "container_configuration": { "allOf": [ { @@ -25265,18 +24334,18 @@ }, "chat_summary_enabled": { "type": "boolean", - "description": "Whether to enable chat summary extraction and storage. Default is true.", + "description": "Whether to enable chat summary extraction and storage. Defaults to `true`.", "default": true }, "procedural_memory_enabled": { "type": "boolean", - "description": "Whether to enable procedural memory extraction and storage. Default is true.", + "description": "Whether to enable procedural memory extraction and storage. Defaults to `true`.", "default": true }, "default_ttl_seconds": { "type": "integer", "format": "int32", - "description": "The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire.", + "description": "The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`.", "default": 0 } }, @@ -26068,7 +25137,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the one-time trigger.", + "description": "Time zone for the one-time trigger. Defaults to `UTC`.", "default": "UTC" } }, @@ -45877,52 +44946,41 @@ }, "OptimizationAgentDefinition": { "type": "object", - "required": [ - "agent_name" - ], "properties": { - "agent_name": { + "agentName": { "type": "string", - "description": "Registered Foundry agent name. Required — bare-model mode is not supported." + "description": "Agent name." }, - "agent_version": { + "agentVersion": { "type": "string", - "description": "Pinned agent version. Defaults to latest if omitted." + "description": "Agent version." }, "model": { "type": "string", - "description": "Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model." + "description": "Model deployment name." }, - "system_prompt": { + "systemPrompt": { "type": "string", - "description": "System prompt / instructions override. When set, used as the baseline instructions for the agent." + "description": "System prompt / instructions." }, "skills": { "type": "array", "items": { - "$ref": "#/components/schemas/OptimizationAgentSkill" + "type": "object", + "additionalProperties": {} }, - "description": "Optional named skills the optimizer may tune. Tool descriptions and parameters." - } - }, - "description": "The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides." - }, - "OptimizationAgentSkill": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "Skill name (matches the tool name on the agent)." + "description": "Agent skills." }, - "description": { - "type": "string", - "description": "Free-form description used as the seed when tuning skill descriptions." + "tools": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "description": "Agent tools." } }, - "description": "A named skill on the agent that the optimizer may tune." + "description": "Agent definition returned in response payloads (includes resolved config)." }, "OptimizationCandidate": { "type": "object", @@ -45930,17 +44988,16 @@ "name", "config", "mutations", - "rationale", - "avg_score", - "avg_tokens", - "pass_rate", - "task_scores", - "is_pareto_optimal" + "avgScore", + "avgTokens", + "passRate", + "taskScores", + "isParetoOptimal" ], "properties": { - "candidate_id": { + "candidateId": { "type": "string", - "description": "Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints." + "description": "Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints." }, "name": { "type": "string", @@ -45957,67 +45014,49 @@ "mutations": { "type": "object", "additionalProperties": {}, - "description": "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." - }, - "rationale": { - "type": "string", - "description": "Strategy rationale — why this candidate was generated." + "description": "What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'})." }, - "avg_score": { + "avgScore": { "type": "number", "format": "double", "description": "Average composite score across all tasks." }, - "avg_tokens": { + "avgTokens": { "type": "number", "format": "double", "description": "Average token usage across all tasks." }, - "pass_rate": { + "passRate": { "type": "number", "format": "double", "description": "Fraction of tasks that met the pass threshold." }, - "task_scores": { + "taskScores": { "type": "array", "items": { "$ref": "#/components/schemas/OptimizationTaskResult" }, "description": "Individual task-level scores." }, - "is_pareto_optimal": { + "isParetoOptimal": { "type": "boolean", "description": "Whether this candidate is on the Pareto frontier (score vs cost)." }, - "sample_avg_score": { - "type": "number", - "format": "double", - "description": "Average score from sampled evaluation (null if full dataset was used)." - }, - "sample_size": { - "type": "integer", - "format": "int32", - "description": "Number of tasks in the sample (null if full dataset was used)." + "evalId": { + "type": "string", + "description": "Foundry evaluation identifier used to score this candidate." }, - "evaluation_type": { + "evalRunId": { "type": "string", - "description": "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." + "description": "Foundry evaluation run identifier for this candidate's scoring run." }, - "strategy": { + "promotion": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationStrategy" + "$ref": "#/components/schemas/PromotionInfo" } ], - "description": "Identifies the strategy that produced this candidate." - }, - "eval_id": { - "type": "string", - "description": "Foundry evaluation identifier used to score this candidate." - }, - "eval_run_id": { - "type": "string", - "description": "Foundry evaluation run identifier for this candidate's scoring run." + "description": "Promotion metadata. Null if the candidate has not been promoted." } }, "description": "Aggregated evaluation result for a single candidate agent configuration across all tasks." @@ -46027,7 +45066,7 @@ "required": [ "id", "status", - "created_at" + "createdAt" ], "properties": { "id": { @@ -46035,42 +45074,42 @@ "description": "Server-assigned unique identifier.", "readOnly": true }, - "inputs": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationJobInputs" + "$ref": "#/components/schemas/JobStatus" } ], - "description": "Caller-supplied inputs." + "description": "Current lifecycle status.", + "readOnly": true }, - "result": { + "error": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationJobResult" + "$ref": "#/components/schemas/OpenAI.Error" } ], - "description": "Result produced on success.", + "description": "Error details — populated only on failure.", "readOnly": true }, - "status": { + "result": { "allOf": [ { - "$ref": "#/components/schemas/JobStatus" + "$ref": "#/components/schemas/OptimizationJobResult" } ], - "description": "Current lifecycle status.", + "description": "Result produced on success.", "readOnly": true }, - "error": { + "inputs": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Error" + "$ref": "#/components/schemas/OptimizationJobInputs" } ], - "description": "Error details — populated only on failure.", - "readOnly": true + "description": "Caller-supplied inputs." }, - "created_at": { + "createdAt": { "allOf": [ { "$ref": "#/components/schemas/FoundryTimestamp" @@ -46079,7 +45118,7 @@ "description": "The timestamp when the job was created, represented in Unix time.", "readOnly": true }, - "updated_at": { + "updatedAt": { "allOf": [ { "$ref": "#/components/schemas/FoundryTimestamp" @@ -46096,40 +45135,43 @@ ], "description": "Progress while in flight. Absent in terminal states.", "readOnly": true + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/DatasetInfo" + } + ], + "description": "Metadata about the dataset used for this optimization job.", + "readOnly": true } }, - "description": "Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates." + "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" + "agent", + "trainDatasetReference" ], "properties": { "agent": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationAgentDefinition" + "$ref": "#/components/schemas/AgentIdentifier" } ], "description": "The agent (and pinned version) being optimized." }, - "dataset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetItem" - }, - "description": "Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`." - }, - "train_dataset_reference": { + "trainDatasetReference": { "allOf": [ { "$ref": "#/components/schemas/DatasetRef" } ], - "description": "Reference to a registered training dataset. Mutually exclusive with `dataset`." + "description": "Reference to a registered training dataset (required)." }, - "validation_dataset_reference": { + "validationDatasetReference": { "allOf": [ { "$ref": "#/components/schemas/DatasetRef" @@ -46142,14 +45184,7 @@ "items": { "type": "string" }, - "description": "Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence']." - }, - "criteria": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationCriterion" - }, - "description": "Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`." + "description": "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." }, "options": { "allOf": [ @@ -46165,49 +45200,28 @@ "OptimizationJobProgress": { "type": "object", "required": [ - "current_strategy", - "current_iteration", - "tasks_completed", - "tasks_total", - "best_score", - "elapsed_seconds" + "currentIteration", + "bestScore", + "elapsedSeconds" ], "properties": { - "current_strategy": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationStrategy" - } - ], - "description": "Strategy currently being explored." - }, - "current_iteration": { + "currentIteration": { "type": "integer", "format": "int32", "description": "1-based current iteration index." }, - "tasks_completed": { - "type": "integer", - "format": "int32", - "description": "Tasks evaluated so far this iteration." - }, - "tasks_total": { - "type": "integer", - "format": "int32", - "description": "Total tasks scheduled this iteration." - }, - "best_score": { + "bestScore": { "type": "number", "format": "double", "description": "Best score observed so far across all candidates." }, - "elapsed_seconds": { + "elapsedSeconds": { "type": "number", "format": "double", - "description": "Wall-clock time elapsed since the job began executing." + "description": "Wall-clock time elapsed in seconds since the job began executing." } }, - "description": "In-flight progress; only populated while status is `queued` or `in_progress`." + "description": "In-flight progress; only populated while status is queued or in_progress." }, "OptimizationJobResult": { "type": "object", @@ -46235,21 +45249,6 @@ }, "description": "All evaluated candidates including baseline." }, - "pareto_frontier": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationCandidate" - }, - "description": "Candidates on the Pareto frontier (maximize score, minimize cost)." - }, - "validation_score": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationCandidate" - } - ], - "description": "Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided." - }, "options": { "allOf": [ { @@ -46258,151 +45257,65 @@ ], "description": "The options used for this optimization run." }, - "sample_size": { - "type": "integer", - "format": "int32", - "description": "Number of tasks sampled during optimization iterations (null if sampling was not used)." - }, "warnings": { "type": "array", "items": { "type": "string" }, - "description": "Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped)." + "description": "Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped)." }, - "all_strategies_failed": { + "allTargetAttributesFailed": { "type": "boolean", - "description": "True when all optimization strategies failed — only the baseline was evaluated." + "description": "True when all target attributes failed — only the baseline was evaluated." } }, - "description": "Terminal-state result body. Populated when `status` is `succeeded` or `failed`." - }, - "OptimizationMode": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "optimize" - ] - } - ], - "description": "Run mode for an optimization job." + "description": "Terminal-state result body. Populated when status is succeeded or failed." }, "OptimizationOptions": { "type": "object", "properties": { - "strategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationStrategy" - }, - "description": "Strategies to apply this run. Default: ['instruction'].", - "default": [ - "instruction" - ] - }, - "budget": { - "type": "integer", - "format": "int32", - "description": "Total candidate generation budget (number of candidates explored). Default: 10.", - "default": 10 - }, - "max_iterations": { - "type": "integer", - "format": "int32", - "description": "Maximum optimization iterations per strategy. Default: 5.", - "default": 5 - }, - "tasks_per_iteration": { - "type": "integer", - "format": "int32", - "description": "Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed)." - }, - "max_reflection_tasks": { + "maxIterations": { "type": "integer", "format": "int32", - "description": "Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.", + "description": "Maximum optimization iterations per strategy. Must be >= 1. Default: 5.", "default": 5 }, - "min_improvement": { - "type": "number", - "format": "double", - "description": "Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.", - "default": 0.005 + "optimizationConfig": { + "type": "object", + "additionalProperties": {}, + "description": "Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization." }, - "pass_threshold": { - "type": "number", - "format": "double", - "description": "Composite score threshold for a task to be considered passing. Default: 0.5.", - "default": 0.5 + "evalModel": { + "type": "string", + "description": "Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o')." }, - "improvement_threshold": { - "type": "number", - "format": "double", - "description": "Target average score at which optimization stops early (quality ceiling). Default: 0.95.", - "default": 0.95 + "optimizationModel": { + "type": "string", + "description": "Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set." }, - "mode": { + "evaluationLevel": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationMode" + "$ref": "#/components/schemas/EvaluationLevel" } ], - "description": "Run mode." - }, - "eval_model": { - "type": "string", - "description": "Foundry deployment name to use as the LLM-as-judge evaluation model. Required." - }, - "reflection_model": { - "type": "string", - "description": "Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset." - }, - "task_timeout_seconds": { - "type": "integer", - "format": "int32", - "description": "Per-task timeout for agent execution. Default: 300 seconds (5 minutes).", - "default": 300 - }, - "keep_versions": { - "type": "boolean", - "description": "If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.", - "default": false + "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." }, - "OptimizationStrategy": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "instruction", - "model", - "skill" - ] - } - ], - "description": "Optimization strategy dimension." - }, "OptimizationTaskResult": { "type": "object", "required": [ - "task_name", + "taskName", "scores", - "composite_score", + "compositeScore", "tokens", - "duration_seconds", + "durationSeconds", "passed" ], "properties": { - "task_name": { + "taskName": { "type": "string", "description": "Task name (from the dataset)." }, @@ -46418,7 +45331,7 @@ }, "description": "Per-evaluator scores keyed by evaluator name." }, - "composite_score": { + "compositeScore": { "type": "number", "format": "double", "description": "Composite score combining all evaluator scores." @@ -46428,7 +45341,7 @@ "format": "int32", "description": "Total tokens consumed during the agent run for this task." }, - "duration_seconds": { + "durationSeconds": { "type": "number", "format": "double", "description": "Wall-clock seconds for this task's agent execution." @@ -46437,7 +45350,7 @@ "type": "boolean", "description": "Whether the task met the pass threshold." }, - "error_message": { + "errorMessage": { "type": "string", "description": "Error message if the task failed during execution." }, @@ -46452,7 +45365,7 @@ "type": "string", "description": "Raw agent response text." }, - "run_id": { + "runId": { "type": "string", "description": "Identifier of the agent run that produced this result." } @@ -46592,27 +45505,6 @@ }, "description": "Paged collection of EvaluationRule items" }, - "PagedEvaluationSuiteVersion": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" - }, - "description": "The EvaluationSuiteVersion items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of EvaluationSuiteVersion items" - }, "PagedEvaluationTaxonomy": { "type": "object", "required": [ @@ -46891,6 +45783,88 @@ ] } }, + "PromoteCandidateRequest": { + "type": "object", + "required": [ + "agentName", + "agentVersion" + ], + "properties": { + "agentName": { + "type": "string", + "description": "Name of the Foundry agent to promote to." + }, + "agentVersion": { + "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": [ + "candidateId", + "status", + "promotedAt", + "agentName", + "agentVersion" + ], + "properties": { + "candidateId": { + "type": "string", + "description": "The promoted candidate id." + }, + "status": { + "type": "string", + "description": "Status after promotion." + }, + "promotedAt": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp when promotion occurred, represented in Unix time." + }, + "agentName": { + "type": "string", + "description": "Name of the Foundry agent promoted to." + }, + "agentVersion": { + "type": "string", + "description": "Version of the Foundry agent promoted to." + } + }, + "description": "Response after successfully promoting a candidate." + }, + "PromotionInfo": { + "type": "object", + "required": [ + "promotedAt", + "agentName", + "agentVersion" + ], + "properties": { + "promotedAt": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp when promotion occurred, represented in Unix time." + }, + "agentName": { + "type": "string", + "description": "Name of the Foundry agent this candidate was promoted to." + }, + "agentVersion": { + "type": "string", + "description": "Version of the Foundry agent this candidate was promoted to." + } + }, + "description": "Promotion metadata recorded when a candidate is deployed to a Foundry agent." + }, "PromptAgentDefinition": { "type": "object", "required": [ @@ -46919,7 +45893,7 @@ "nullable": true, "minimum": 0, "maximum": 2, - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both. Defaults to `1`.", "default": 1 }, "top_p": { @@ -46928,7 +45902,7 @@ "nullable": true, "minimum": 0, "maximum": 1, - "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.", + "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered. We generally recommend altering this or `temperature` but not both.\nDefaults to `1`.", "default": 1 }, "reasoning": { @@ -47045,36 +46019,6 @@ ], "description": "Prompt source for data generation jobs — inline text provided by the user." }, - "PromptEvaluationSuiteJobSource": { - "type": "object", - "required": [ - "type", - "prompt" - ], - "properties": { - "description": { - "type": "string", - "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." - }, - "type": { - "type": "string", - "enum": [ - "prompt" - ], - "description": "The source type for this source, which is Prompt." - }, - "prompt": { - "type": "string", - "description": "Inline prompt text (e.g., agent description, policy text, supplementary context)." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteJobSource" - } - ], - "description": "Prompt source for evaluation suite generation jobs — inline text provided by the user." - }, "PromptEvaluatorGenerationJobSource": { "type": "object", "required": [ @@ -47191,7 +46135,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the recurrence schedule.", + "description": "Time zone for the recurrence schedule. Defaults to `UTC`.", "default": "UTC" }, "interval": { @@ -48628,25 +47572,27 @@ ], "description": "The supported question types for SimpleQnA data generation jobs used for fine-tuning scenarios." }, - "SkillObject": { + "Skill": { "type": "object", "required": [ - "skill_id", - "has_blob", - "name" + "id", + "name", + "description", + "created_at", + "default_version", + "latest_version" ], "properties": { - "skill_id": { + "id": { "type": "string", "description": "The unique identifier of the skill." }, - "has_blob": { - "type": "boolean", - "description": "Whether the skill was created from a zip blob package." - }, "name": { - "type": "string", - "maxLength": 63, + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], "description": "The unique name of the skill." }, "description": { @@ -48654,16 +47600,119 @@ "maxLength": 1024, "description": "A human-readable description of the skill." }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The Unix timestamp (seconds) when the skill was created." + }, + "default_version": { + "type": "string", + "description": "The default version for the skill. Can be changed via updateSkill." + }, + "latest_version": { + "type": "string", + "description": "The latest version for the skill." + } + }, + "description": "A skill resource." + }, + "SkillInlineContent": { + "type": "object", + "required": [ + "description", + "instructions" + ], + "properties": { + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of what the skill does and when to use it." + }, + "instructions": { + "type": "string", + "description": "The skill instructions in markdown format. This is the body content of the SKILL.md file." + }, + "license": { + "type": "string", + "description": "License name or reference to a bundled license file." + }, + "compatibility": { + "type": "string", + "maxLength": 500, + "description": "Environment requirements or compatibility notes for the skill." + }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" + "description": "Arbitrary key-value metadata for additional properties." + }, + "allowed_tools": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of pre-approved tools the skill may use. Experimental." + } + }, + "description": "Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification." + }, + "SkillName": { + "type": "string", + "maxLength": 64, + "pattern": "^[a-z0-9]([a-z0-9\\-]*[a-z0-9])?$", + "description": "A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens." + }, + "SkillVersion": { + "type": "object", + "required": [ + "id", + "skill_id", + "name", + "version", + "description", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the skill version." + }, + "skill_id": { + "type": "string", + "description": "The identifier of the parent skill." + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], + "description": "The name of the skill version." + }, + "version": { + "type": "string", + "description": "The version identifier. Skill versions are immutable." + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of the skill version." + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The Unix timestamp (seconds) when the skill version was created." } }, - "description": "A skill object." + "description": "A specific version of a skill." }, "Sku": { "type": "object", @@ -48716,7 +47765,7 @@ }, "required": { "type": "boolean", - "description": "Whether the input property is required when the agent is invoked.", + "description": "Whether the input property is required when the agent is invoked. Defaults to `false`.", "default": false } }, @@ -49502,6 +48551,59 @@ ], "description": "A tool for searching over the agent's toolbox.\nWhen present, deferred tools are hidden from `tools/list` and only\ndiscoverable via `search_tools` queries at runtime." }, + "ToolboxSkill": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of skill source." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "skill_reference": "#/components/schemas/ToolboxSkillReference" + } + }, + "description": "A skill source included in a toolbox." + }, + "ToolboxSkillReference": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "skill_reference" + ], + "description": "The type of skill source." + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], + "description": "The name of the skill." + }, + "version": { + "type": "string", + "description": "The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ToolboxSkill" + } + ], + "description": "A reference to an existing skill to include in a toolbox." + }, "ToolboxVersionObject": { "type": "object", "required": [ @@ -49552,6 +48654,13 @@ }, "description": "The list of tools contained in this toolbox version." }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolboxSkill" + }, + "description": "The list of skill sources included in this toolbox version." + }, "policies": { "allOf": [ { @@ -49708,60 +48817,6 @@ ], "description": "Traces source for data generation jobs — conversation traces from Application Insights." }, - "TracesEvaluationSuiteJobSource": { - "type": "object", - "required": [ - "type", - "start_time" - ], - "properties": { - "description": { - "type": "string", - "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." - }, - "type": { - "type": "string", - "enum": [ - "traces" - ], - "description": "The source type for this source, which is Traces." - }, - "agent_id": { - "type": "string", - "description": "The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required." - }, - "agent_name": { - "type": "string", - "description": "The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required." - }, - "agent_version": { - "type": "string", - "description": "The agent version. If not specified, traces for ALL versions of the agent are included within the time window." - }, - "start_time": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Start of the time window (Unix timestamp in seconds) for fetching traces." - }, - "end_time": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "End of the time window (Unix timestamp in seconds). Defaults to current time." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteJobSource" - } - ], - "description": "Traces source for evaluation suite generation jobs — conversation traces from Application Insights." - }, "TracesEvaluatorGenerationJobSource": { "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 3e92d60aece0..1e7ffd766e91 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 @@ -11,7 +11,6 @@ tags: - name: Deployments - name: Evaluation Taxonomies - name: Evaluation Rules - - name: EvaluationSuiteGenerationJobs - name: Evaluators - name: EvaluatorGenerationJobs - name: Indexes @@ -88,15 +87,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OptimizationJob' - description: The job to create. + $ref: '#/components/schemas/OptimizationJobInputs' + description: The optimization job inputs. x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview get: operationId: AgentOptimizationJobs_list summary: Returns a list of agent optimization jobs. - description: List optimization jobs. Supports cursor pagination and optional `status` / `agent_name` filters. + description: List optimization jobs. Supports cursor pagination and optional status / agentName filters. parameters: - name: Foundry-Features in: header @@ -153,7 +152,7 @@ paths: schema: $ref: '#/components/schemas/JobStatus' explode: false - - name: agent_name + - name: agentName in: query required: false description: Filter to jobs targeting this agent name. @@ -208,7 +207,7 @@ paths: get: operationId: AgentOptimizationJobs_get summary: Get info about an agent optimization job. - description: Get an optimization job by id. Emits `Retry-After` while the job is non-terminal. + description: Get an optimization job by id. Returns 202 while in progress, 200 when terminal. parameters: - name: Foundry-Features in: header @@ -237,7 +236,18 @@ paths: headers: Retry-After: required: false - description: Recommended number of seconds to wait before polling again. + 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 schema: type: integer format: int32 @@ -275,6 +285,13 @@ paths: 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 @@ -404,7 +421,7 @@ paths: get: operationId: AgentOptimizationJobs_getCandidate summary: Get a candidate by id. - description: Get a single candidate manifest and aggregated evaluation summary. + description: Get a single candidate's metadata, manifest, and promotion info. parameters: - name: Foundry-Features in: header @@ -439,7 +456,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OptimizationCandidate' + $ref: '#/components/schemas/CandidateMetadata' default: description: An unexpected error response. content: @@ -502,6 +519,65 @@ paths: x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview + /agent_optimization_jobs/{jobId}/candidates/{candidateId}/files: + get: + operationId: AgentOptimizationJobs_getCandidateFile + summary: Get a candidate file. + description: Stream a specific 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: + type: string + format: binary + default: + description: An unexpected error response. + 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 @@ -553,6 +629,64 @@ paths: x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview + /agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote: + post: + operationId: AgentOptimizationJobs_promoteCandidate + summary: Promote a candidate. + description: Promotes a candidate, recording 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' + default: + description: An unexpected error response. + 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 @@ -869,7 +1003,7 @@ paths: - name: force in: query required: false - description: For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + description: For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. schema: type: boolean default: false @@ -1291,6 +1425,12 @@ paths: description: The name of the agent to create a session for. schema: type: string + - name: x-ms-user-isolation-key + in: header + required: false + description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + schema: + type: string - name: api-version in: query required: true @@ -1340,6 +1480,12 @@ paths: description: The name of the agent. schema: type: string + - name: x-ms-user-isolation-key + in: header + required: false + description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + schema: + type: string - name: limit in: query required: false @@ -1717,6 +1863,12 @@ paths: description: The session identifier. schema: type: string + - name: x-ms-user-isolation-key + in: header + required: false + description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + schema: + type: string - name: api-version in: query required: true @@ -1747,6 +1899,60 @@ paths: description: |- Deletes a session synchronously. Returns 204 No Content when the session is deleted or does not exist. + 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: + - AgentEndpoints=V1Preview + - name: agent_name + in: path + required: true + description: The name of the agent. + schema: + type: string + - name: session_id + in: path + required: true + description: The session identifier. + schema: + type: string + - name: x-ms-user-isolation-key + in: header + required: false + description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + 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: + '204': + description: There is no content to send for this request, but the headers may be useful. + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Agents + x-ms-foundry-meta: + required_previews: + - AgentEndpoints=V1Preview + /agents/{agent_name}/endpoint/sessions/{session_id}:stop: + post: + operationId: Agents_stopSession + description: |- + Stops a session. + Returns 204 No Content when the stop succeeds. parameters: - name: Foundry-Features in: header @@ -2047,7 +2253,7 @@ paths: - name: force in: query required: false - description: For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + description: For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. schema: type: boolean default: false @@ -2415,22 +2621,6 @@ paths: schema: type: string explode: false - - name: scenario - in: query - required: false - description: Filter data generation jobs by their scenario. - schema: - $ref: '#/components/schemas/DataGenerationJobScenario' - explode: false - - name: type - in: query - required: false - description: Filter data generation jobs by their type. - schema: - type: array - items: - $ref: '#/components/schemas/DataGenerationJobType' - explode: false - name: api-version in: query required: true @@ -3038,581 +3228,6 @@ paths: $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' tags: - Deployments - /evaluation_suite_generation_jobs: - post: - operationId: EvaluationSuiteGenerationJobs_create - summary: Creates an evaluation suite generation job. - description: Create a new job (preview). Includes optional Foundry-Features header and Operation-Id for idempotent retries. - 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: - - Evaluations=V1Preview - - name: Operation-Id - in: header - required: false - description: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. - 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: - '201': - description: The request has succeeded and a new resource has been created as a result. - headers: - Operation-Location: - required: true - description: URL to poll for the job status. - schema: - type: string - Location: - required: true - description: URL of the created job resource. - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteGenerationJob' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - EvaluationSuiteGenerationJobs - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteGenerationJobCreate' - description: The job to create. - x-ms-foundry-meta: - conditional_previews: - - Evaluations=V1Preview - get: - operationId: EvaluationSuiteGenerationJobs_list - summary: Returns a list of evaluation suite generation jobs. - description: List jobs with cursor-based pagination (preview). Includes optional Foundry-Features header. - 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: - - Evaluations=V1Preview - - 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/EvaluationSuiteGenerationJob' - 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. - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - EvaluationSuiteGenerationJobs - x-ms-foundry-meta: - conditional_previews: - - Evaluations=V1Preview - /evaluation_suite_generation_jobs/{jobId}: - get: - operationId: EvaluationSuiteGenerationJobs_get - summary: Get info about an evaluation suite generation job. - description: Get a job by ID (preview). Includes optional Foundry-Features header. - 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: - - Evaluations=V1Preview - - name: jobId - in: path - required: true - description: The ID of the job. - 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. - headers: - Retry-After: - required: false - description: Recommended number of seconds to wait before polling again. - schema: - type: integer - format: int32 - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteGenerationJob' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - EvaluationSuiteGenerationJobs - x-ms-foundry-meta: - conditional_previews: - - Evaluations=V1Preview - delete: - operationId: EvaluationSuiteGenerationJobs_delete - summary: Deletes an evaluation suite generation job. - description: Delete a job (preview). Returns 204 No Content. - 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: - - Evaluations=V1Preview - - name: jobId - in: path - required: true - description: The ID of the job to delete. - 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: - '204': - description: There is no content to send for this request, but the headers may be useful. - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - EvaluationSuiteGenerationJobs - x-ms-foundry-meta: - conditional_previews: - - Evaluations=V1Preview - /evaluation_suite_generation_jobs/{jobId}:cancel: - post: - operationId: EvaluationSuiteGenerationJobs_cancel - summary: Cancels an evaluation suite generation job. - description: Cancel a running job (preview). Returns 200 with the updated 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: - - Evaluations=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/EvaluationSuiteGenerationJob' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - EvaluationSuiteGenerationJobs - x-ms-foundry-meta: - conditional_previews: - - Evaluations=V1Preview - /evaluation_suites: - get: - operationId: EvaluationSuites_listLatest - description: List the latest version of each EvaluationSuiteVersion - parameters: - - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' - - name: agent_name - in: query - required: false - description: Filter by associated Foundry agent name (from target). - schema: - type: string - explode: false - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/PagedEvaluationSuiteVersion' - default: - description: An unexpected error response. - headers: - x-ms-error-code: - required: false - description: String error code indicating what went wrong. - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' - /evaluation_suites/{name}/versions: - get: - operationId: EvaluationSuites_listVersions - description: List all versions of the given EvaluationSuiteVersion - parameters: - - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' - - name: name - in: path - required: true - description: The name of the resource. - schema: - type: string - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/PagedEvaluationSuiteVersion' - default: - description: An unexpected error response. - headers: - x-ms-error-code: - required: false - description: String error code indicating what went wrong. - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' - post: - operationId: EvaluationSuites_createEvaluationSuiteVersion - description: Create a new EvaluationSuiteVersion with auto incremented version id - 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: - - Evaluations=V1Preview - - name: name - in: path - required: true - description: The name of the evaluation suite. - 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: - '201': - description: The request has succeeded and a new resource has been created as a result. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteVersion' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteVersionCreate' - description: The evaluation suite version to create. - x-ms-foundry-meta: - required_previews: - - Evaluations=V1Preview - /evaluation_suites/{name}/versions/{version}: - get: - operationId: EvaluationSuites_getVersion - description: Get the specific version of the EvaluationSuiteVersion. The service returns 404 Not Found error if the EvaluationSuiteVersion does not exist. - parameters: - - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' - - name: name - in: path - required: true - description: The name of the resource. - schema: - type: string - - name: version - in: path - required: true - description: The specific version id of the EvaluationSuiteVersion to retrieve. - schema: - type: string - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteVersion' - default: - description: An unexpected error response. - headers: - x-ms-error-code: - required: false - description: String error code indicating what went wrong. - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' - delete: - operationId: EvaluationSuites_deleteVersion - description: Delete the specific version of the EvaluationSuiteVersion. The service returns 204 No Content if the EvaluationSuiteVersion was deleted successfully or if the EvaluationSuiteVersion does not exist. - parameters: - - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' - - name: name - in: path - required: true - description: The name of the resource. - schema: - type: string - - name: version - in: path - required: true - description: The version of the EvaluationSuiteVersion to delete. - schema: - type: string - responses: - '204': - description: There is no content to send for this request, but the headers may be useful. - default: - description: An unexpected error response. - headers: - x-ms-error-code: - required: false - description: String error code indicating what went wrong. - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' - patch: - operationId: EvaluationSuites_createOrUpdateVersion - description: Create a new or update an existing EvaluationSuiteVersion with the given version id - parameters: - - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' - - name: name - in: path - required: true - description: The name of the resource. - schema: - type: string - - name: version - in: path - required: true - description: The specific version id of the EvaluationSuiteVersion to create or update. - schema: - type: string - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteVersion' - '201': - description: The request has succeeded and a new resource has been created as a result. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteVersion' - default: - description: An unexpected error response. - headers: - x-ms-error-code: - required: false - description: String error code indicating what went wrong. - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' - requestBody: - required: true - content: - application/merge-patch+json: - schema: - $ref: '#/components/schemas/EvaluationSuiteVersionUpdate' - description: The EvaluationSuiteVersion to create or update. - /evaluation_suites/{name}:run: - post: - operationId: EvaluationSuites_run - description: Run an evaluation using the suite's testing criteria and dataset. - 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: - - Evaluations=V1Preview - - name: name - in: path - required: true - description: The name of the evaluation suite. - 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: - '201': - description: The request has succeeded and a new resource has been created as a result. - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteRunResponse' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/EvaluationSuiteRunRequest' - description: The run request parameters. - x-ms-foundry-meta: - required_previews: - - Evaluations=V1Preview /evaluationrules: get: operationId: EvaluationRules_list @@ -9220,76 +8835,6 @@ paths: tags: - Schedules /skills: - post: - operationId: Skills_createSkill - description: Creates a skill. - parameters: - - name: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '201': - description: The request has succeeded and a new resource has been created as a result. - content: - application/json: - schema: - $ref: '#/components/schemas/SkillObject' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Skills - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - maxLength: 63 - description: The unique name of the skill. - description: - type: string - maxLength: 1024 - description: A human-readable description of the skill. - instructions: - type: string - maxLength: 102400 - description: Instructions that define the behavior of the skill. - metadata: - type: object - additionalProperties: - type: string - description: |- - Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters. - x-oaiTypeLabel: map - required: - - name - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview get: operationId: Skills_listSkills description: Returns the list of all skills. @@ -9363,7 +8908,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/SkillObject' + $ref: '#/components/schemas/Skill' description: The requested list of items. first_id: type: string @@ -9396,7 +8941,7 @@ paths: required: true description: The unique name of the skill. schema: - type: string + $ref: '#/components/schemas/SkillName' - name: Foundry-Features in: header required: true @@ -9418,7 +8963,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SkillObject' + $ref: '#/components/schemas/Skill' default: description: An unexpected error response. content: @@ -9431,15 +8976,264 @@ paths: required_previews: - Skills=V1Preview post: - operationId: Skills_updateSkill - description: Updates an existing skill. + operationId: updateSkill + description: Update a skill. + parameters: + - name: name + in: path + required: true + description: The name of the skill to update. + schema: + $ref: '#/components/schemas/SkillName' + - name: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - 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/Skill' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Skills + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + default_version: + type: string + description: The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest. + required: + - default_version + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview + delete: + operationId: Skills_deleteSkill + description: Deletes a skill. parameters: - name: name in: path required: true description: The unique name of the skill. + schema: + $ref: '#/components/schemas/SkillName' + - name: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - 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/DeleteSkillResponse' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Skills + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview + /skills/{name}/content: + get: + operationId: getSkillContent + description: Download the zip content for the default version of a skill. + parameters: + - name: name + in: path + required: true + description: The name of the skill. + schema: + $ref: '#/components/schemas/SkillName' + - name: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - 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 response body for downloading a skill package. + content: + application/zip: + schema: + type: string + format: binary + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Skills + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview + /skills/{name}/versions: + post: + operationId: createSkillVersion_createSkillVersionFromFiles + parameters: + - name: name + in: path + required: true + description: The name of the skill. If the skill does not exist, it will be created. + schema: + $ref: '#/components/schemas/SkillName' + - name: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - name: api-version + in: query + required: true + description: The API version to use for this operation. + schema: + type: string + explode: false + description: Creates a new version of a skill. If the skill does not exist, it will be created. Creates a new version of a skill from uploaded files via multipart form data. + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/SkillVersion' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview + tags: + - Skills + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + inline_content: + allOf: + - $ref: '#/components/schemas/SkillInlineContent' + description: Inline skill content for simple skills without file uploads. Foundry-specific extension. + default: + type: boolean + description: Whether to set this version as the default. + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateSkillVersionFromFilesBody' + encoding: + files: + contentType: '*/*' + default: + contentType: text/plain + get: + operationId: listSkillVersions + description: List all versions of a skill. + parameters: + - name: name + in: path + required: true + description: The name of the skill to list versions for. + schema: + $ref: '#/components/schemas/SkillName' + - 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: Foundry-Features in: header required: true @@ -9461,7 +9255,26 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SkillObject' + type: object + required: + - data + - has_more + properties: + data: + type: array + items: + $ref: '#/components/schemas/SkillVersion' + 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. default: description: An unexpected error response. content: @@ -9470,44 +9283,24 @@ paths: $ref: '#/components/schemas/ApiErrorResponse' tags: - Skills - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - description: - type: string - maxLength: 1024 - description: A human-readable description of the skill. - instructions: - type: string - maxLength: 102400 - description: Instructions that define the behavior of the skill. - metadata: - type: object - additionalProperties: - type: string - description: |- - Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters. - x-oaiTypeLabel: map x-ms-foundry-meta: required_previews: - Skills=V1Preview - delete: - operationId: Skills_deleteSkill - description: Deletes a skill. + /skills/{name}/versions/{version}: + get: + operationId: getSkillVersion + description: Retrieve a specific version of a skill. parameters: - name: name in: path required: true - description: The unique name of the skill. + description: The name of the skill. + schema: + $ref: '#/components/schemas/SkillName' + - name: version + in: path + required: true + description: The version identifier to retrieve. schema: type: string - name: Foundry-Features @@ -9531,7 +9324,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeleteSkillResponse' + $ref: '#/components/schemas/SkillVersion' default: description: An unexpected error response. content: @@ -9543,15 +9336,20 @@ paths: x-ms-foundry-meta: required_previews: - Skills=V1Preview - /skills/{name}:download: - get: - operationId: Skills_downloadSkill - description: Downloads a skill package. + delete: + operationId: deleteSkillVersion + description: Delete a specific version of a skill. parameters: - name: name in: path required: true - description: The unique name of the skill. + description: The name of the skill. + schema: + $ref: '#/components/schemas/SkillName' + - name: version + in: path + required: true + description: The version identifier to delete. schema: type: string - name: Foundry-Features @@ -9571,12 +9369,11 @@ paths: explode: false responses: '200': - description: The response body for downloading a skill package. + description: The request has succeeded. content: - application/zip: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/DeleteSkillVersionResponse' default: description: An unexpected error response. content: @@ -9588,11 +9385,23 @@ paths: x-ms-foundry-meta: required_previews: - Skills=V1Preview - /skills:import: - post: - operationId: Skills_createSkillFromPackage - description: Creates a skill from a zip package. + /skills/{name}/versions/{version}/content: + get: + operationId: getSkillVersionContent + description: Download the zip content for a specific version of a skill. parameters: + - name: name + in: path + required: true + description: The name of the skill. + schema: + $ref: '#/components/schemas/SkillName' + - name: version + in: path + required: true + description: The version to download content for. + schema: + type: string - name: Foundry-Features in: header required: true @@ -9609,12 +9418,13 @@ paths: type: string explode: false responses: - '201': - description: The request has succeeded and a new resource has been created as a result. + '200': + description: The response body for downloading a skill package. content: - application/json: + application/zip: schema: - $ref: '#/components/schemas/SkillObject' + type: string + format: binary default: description: An unexpected error response. content: @@ -9623,14 +9433,6 @@ paths: $ref: '#/components/schemas/ApiErrorResponse' tags: - Skills - requestBody: - required: true - content: - application/zip: - schema: - type: string - format: binary - description: The zip package used to create the skill. x-ms-foundry-meta: required_previews: - Skills=V1Preview @@ -9869,6 +9671,11 @@ paths: items: $ref: '#/components/schemas/OpenAI.Tool' description: The list of tools to include in this version. + skills: + type: array + items: + $ref: '#/components/schemas/ToolboxSkill' + description: The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used. policies: allOf: - $ref: '#/components/schemas/ToolboxPolicies' @@ -10543,29 +10350,7 @@ components: - a2a - mcp - invocations - AgentEvaluationSuiteJobSource: - type: object - required: - - type - - agent_name - properties: - description: - type: string - description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). - type: - type: string - enum: - - agent - description: The source type for this source, which is Agent. - agent_name: - type: string - description: The agent name to fetch instructions from. - agent_version: - type: string - description: The agent version. If not specified, the latest version is used. - allOf: - - $ref: '#/components/schemas/EvaluationSuiteJobSource' - description: Agent source for evaluation suite generation jobs — references an agent to fetch instructions and metadata from. + - invocations_ws AgentEvaluatorGenerationJobSource: type: object required: @@ -10627,6 +10412,18 @@ components: allOf: - $ref: '#/components/schemas/TraceSource' description: A trace source that selects traces by agent reference with time-based filtering. + AgentIdentifier: + type: object + required: + - agentName + properties: + agentName: + type: string + description: Registered Foundry agent name (required). + agentVersion: + type: string + description: Pinned agent version. Defaults to latest if omitted. + description: Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig. AgentIdentity: type: object required: @@ -10725,6 +10522,7 @@ components: - responses - mcp - invocations + - invocations_ws AgentReference: type: object required: @@ -10792,6 +10590,7 @@ components: - idle - updating - failed + - stopping - deleting - deleted - expired @@ -12284,16 +12083,90 @@ components: skills: type: array items: - $ref: '#/components/schemas/OptimizationAgentSkill' + type: object + additionalProperties: {} description: Optional skill overrides. + tools: + type: array + items: + type: object + additionalProperties: {} + 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 + - sizeBytes + properties: + path: + type: string + description: Relative path of the file. + type: + type: string + description: File type category (e.g. 'config', 'results'). + sizeBytes: + type: integer + format: int64 + description: File size in bytes. + description: File entry in a candidate's blob directory. + CandidateMetadata: + type: object + required: + - candidateId + - jobId + - candidateName + - status + - hasResults + - createdAt + - updatedAt + - files + properties: + candidateId: + type: string + description: Server-assigned candidate identifier. + jobId: + type: string + description: Owning optimization job id. + candidateName: + 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. + hasResults: + type: boolean + description: Whether detailed results are available for this candidate. + createdAt: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: Timestamp when the candidate was created, represented in Unix time. + updatedAt: + 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 + - candidateId - results properties: - candidate_id: + candidateId: type: string description: Owning candidate id. results: @@ -13046,6 +12919,20 @@ components: description: The level at which evaluation is performed. Defaults to 'turn' if not specified. default: turn title: CreateEvalRunRequest + CreateSkillVersionFromFilesBody: + type: object + properties: + files: + type: array + items: + type: string + format: binary + description: Skill files to upload. Upload a single zip file or multiple individual files with relative paths. + default: + type: boolean + description: Whether to set this version as the default. Defaults to false. + required: + - files CredentialType: anyOf: - type: string @@ -13073,7 +12960,7 @@ components: description: Cron expression that defines the schedule frequency. timeZone: type: string - description: Time zone for the cron schedule. + description: Time zone for the cron schedule. Defaults to `UTC`. default: UTC startTime: type: string @@ -13305,7 +13192,6 @@ components: prompt: '#/components/schemas/PromptDataGenerationJobSource' agent: '#/components/schemas/AgentDataGenerationJobSource' traces: '#/components/schemas/TracesDataGenerationJobSource' - dataset: '#/components/schemas/DatasetDataGenerationJobSource' file: '#/components/schemas/FileDataGenerationJobSource' description: The base source model for data generation jobs. DataGenerationJobSourceType: @@ -13316,7 +13202,6 @@ components: - prompt - agent - traces - - dataset - file description: The supported source types for data generation jobs. DataGenerationJobType: @@ -13412,52 +13297,6 @@ components: allOf: - $ref: '#/components/schemas/DataGenerationJobOutput' description: Dataset output for a data generation job. - DatasetDataGenerationJobSource: - type: object - required: - - type - - name - properties: - description: - type: string - description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). - type: - type: string - enum: - - dataset - description: The source type for this source, which is Dataset. - name: - type: string - description: The name of the dataset. - version: - type: string - description: The version of the dataset. If not specified, the latest version is used. - allOf: - - $ref: '#/components/schemas/DataGenerationJobSource' - description: Dataset source for data generation jobs — reference to a dataset. - DatasetEvaluationSuiteJobSource: - type: object - required: - - type - - name - properties: - description: - type: string - description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). - type: - type: string - enum: - - dataset - description: The source type for this source, which is Dataset. - name: - type: string - description: The name of the dataset. - version: - type: string - description: The version of the dataset. If not specified, the latest version is used. - allOf: - - $ref: '#/components/schemas/EvaluationSuiteJobSource' - description: Dataset source for evaluation suite generation jobs — reference to a dataset. DatasetEvaluatorGenerationJobSource: type: object required: @@ -13481,37 +13320,26 @@ components: allOf: - $ref: '#/components/schemas/EvaluatorGenerationJobSource' description: Dataset source for evaluator generation jobs — reference to a dataset. - DatasetItem: + DatasetInfo: type: object required: - - name - - query + - taskCount + - isInline properties: name: type: string - description: Unique-within-the-dataset identifier for this task. - query: - type: string - description: The user query / input for the task. - ground_truth: + description: Dataset name when using a registered dataset reference. Null for inline datasets. + version: type: string - description: Optional ground truth used by reference-based evaluators. - criteria: - type: array - items: - $ref: '#/components/schemas/EvaluationCriterion' - description: Per-task evaluation criteria. Defaults to the job-level evaluators if unset. - eval_results: - type: array - items: - $ref: '#/components/schemas/EvalRunOutputItemResult' - description: Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped. - response_items: - type: array - items: - $ref: '#/components/schemas/OpenAI.OutputItem' - description: Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run. - description: A single evaluation task with input query, expected output, and evaluation criteria. + description: Dataset version when using a registered dataset reference. Null for inline datasets. + taskCount: + type: integer + format: int32 + description: Number of tasks/rows in the dataset. + isInline: + 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: @@ -13766,16 +13594,43 @@ components: DeleteSkillResponse: type: object required: + - id - name - deleted properties: - name: + id: type: string + description: The unique identifier of the deleted skill. + name: + allOf: + - $ref: '#/components/schemas/SkillName' description: The unique name of the skill. deleted: type: boolean description: Whether the skill was successfully deleted. - description: A deleted skill Object + description: A deleted skill. + DeleteSkillVersionResponse: + type: object + required: + - id + - name + - deleted + - version + properties: + id: + type: string + description: The unique identifier of the deleted skill version. + name: + allOf: + - $ref: '#/components/schemas/SkillName' + description: The name of the skill. + deleted: + type: boolean + description: Whether the skill version was successfully deleted. + version: + type: string + description: The version that was deleted. + description: A deleted skill version. Deployment: type: object required: @@ -13822,7 +13677,7 @@ components: description: Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. always_applicable: type: boolean - description: When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. + description: When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`. default: false description: A single dimension — one independent, measurable quality dimension within a rubric evaluator's scoring blueprint. DispatchRoutineRequest: @@ -14695,47 +14550,6 @@ components: allOf: - $ref: '#/components/schemas/InsightResult' description: Insights from the evaluation comparison. - EvaluationCriterion: - type: object - required: - - name - - instruction - properties: - name: - type: string - description: Criterion name (referenced in evaluation result rows). - instruction: - type: string - description: Natural-language instruction passed to the judge LLM. - description: LLM-as-judge evaluation criterion applied to a single task. - EvaluationDataGenerationType: - anyOf: - - type: string - - type: string - enum: - - simple_qna - - traces - - tool_use - - task - description: The data generation type. - EvaluationDatasetReference: - type: object - required: - - name - properties: - name: - type: string - description: Dataset name. - version: - type: string - description: Dataset version. If not provided, resolves to the latest version. - schema_file_name: - type: string - description: |- - Name of the schema file within the dataset's blob folder (e.g., "a3f2b1c4_schema.json"). - Optional — if not provided, schema is inferred at runtime from the data. - Only applicable for uri_folder datasets. - description: Reference to a dataset by name and version. EvaluationLevel: anyOf: - type: string @@ -14909,437 +14723,6 @@ components: allOf: - $ref: '#/components/schemas/ScheduleTask' description: Evaluation task for the schedule. - EvaluationSuiteDataGenerationOptions: - type: object - properties: - type: - allOf: - - $ref: '#/components/schemas/EvaluationDataGenerationType' - description: The data generation type. Defaults to 'simple_qna' if not specified. - max_samples: - type: integer - format: int32 - minimum: 15 - maximum: 1000 - description: 'Maximum number of samples to generate. Valid range: 15-1000.' - description: Options for dataset generation within an evaluation suite generation job. - EvaluationSuiteGenerationCategory: - anyOf: - - type: string - - type: string - enum: - - quality - - safety - description: The category of evaluator generation. - EvaluationSuiteGenerationJob: - type: object - required: - - id - - status - - created_at - properties: - id: - type: string - description: Server-assigned unique identifier. - readOnly: true - inputs: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteGenerationJobInputs' - description: Caller-supplied inputs. - result: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteVersion' - description: Result produced on success. - readOnly: true - status: - allOf: - - $ref: '#/components/schemas/JobStatus' - description: Current lifecycle status. - readOnly: true - error: - allOf: - - $ref: '#/components/schemas/OpenAI.Error' - description: Error details — populated only on failure. - readOnly: true - created_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: The timestamp when the job was created, represented in Unix time. - readOnly: true - finished_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: The timestamp when the job finished, represented in Unix time. - readOnly: true - usage: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteGenerationTokenUsage' - description: Token consumption summary. Populated on terminal states. - readOnly: true - description: Evaluation suite generation job resource — a long-running job that generates testing criteria and optionally a dataset from source materials. On success, the result is the persisted EvaluationSuiteVersion. - EvaluationSuiteGenerationJobCreate: - type: object - properties: - inputs: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteGenerationJobInputs' - description: Caller-supplied inputs. - description: Evaluation suite generation job resource — a long-running job that generates testing criteria and optionally a dataset from source materials. On success, the result is the persisted EvaluationSuiteVersion. - EvaluationSuiteGenerationJobInputs: - type: object - required: - - evaluation_suite_name - - sources - - generation_model - properties: - evaluation_suite_name: - type: string - description: The evaluation suite name to create. - sources: - type: array - items: - $ref: '#/components/schemas/EvaluationSuiteJobSource' - description: Source materials for generation — agent context, prompts, traces, or datasets. - generation_model: - type: string - description: The LLM model to use for rubric and data generation (e.g., 'gpt-4o'). - category: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteGenerationCategory' - description: 'Category determines the generation focus. Default: quality.' - default: quality - initialization_parameters: - type: object - additionalProperties: {} - description: |- - Optional initialization parameters applied to all generated evaluators. - For example, deployment_name for LLM judge model, default threshold. - data_generation_options: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteDataGenerationOptions' - description: |- - Data generation options. Controls how the evaluation dataset is generated. - If omitted, defaults are used (simple_qna, 100 max_samples). - description: Caller-supplied inputs for an evaluation suite generation job. - EvaluationSuiteGenerationTokenUsage: - type: object - properties: - input_tokens: - type: integer - format: int64 - description: Number of input tokens consumed. - output_tokens: - type: integer - format: int64 - description: Number of output tokens consumed. - total_tokens: - type: integer - format: int64 - description: Total tokens consumed. - description: Token usage summary for an evaluation suite generation job. - EvaluationSuiteJobSource: - type: object - required: - - type - properties: - type: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteJobSourceType' - description: The type of source. - description: - type: string - description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). - discriminator: - propertyName: type - mapping: - prompt: '#/components/schemas/PromptEvaluationSuiteJobSource' - agent: '#/components/schemas/AgentEvaluationSuiteJobSource' - traces: '#/components/schemas/TracesEvaluationSuiteJobSource' - dataset: '#/components/schemas/DatasetEvaluationSuiteJobSource' - description: The base source model for evaluation suite generation jobs. Polymorphic over `type`. - EvaluationSuiteJobSourceType: - anyOf: - - type: string - - type: string - enum: - - prompt - - agent - - traces - - dataset - description: The supported source types for evaluation suite generation jobs. - EvaluationSuiteRunRequest: - type: object - properties: - evaluation_name: - type: string - description: "Name for the evaluation. Default: '{suiteName}-runs'." - evaluation_suite_version: - type: string - description: 'Evaluation suite version to run. Default: latest.' - evaluation_level: - allOf: - - $ref: '#/components/schemas/EvaluationLevel' - description: Overrides the suite's default evaluation level. If omitted, uses the level from the suite. - description: Request body for running an evaluation from a suite. - EvaluationSuiteRunResponse: - type: object - required: - - evaluation_suite_name - - evaluation_suite_version - - results - properties: - evaluation_suite_name: - type: string - description: The evaluation suite name used. - evaluation_suite_version: - type: string - description: The evaluation suite version resolved. - results: - type: array - items: - $ref: '#/components/schemas/EvaluationSuiteRunResult' - description: The run results. Currently a single-element array; will support multiple runs in the future. - description: Response from running an evaluation suite. - EvaluationSuiteRunResult: - type: object - required: - - eval_id - - run_id - - status - - created_at - properties: - eval_id: - type: string - description: The evaluation ID created. - run_id: - type: string - description: The eval run ID created. - status: - allOf: - - $ref: '#/components/schemas/JobStatus' - description: Status of the run. - created_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when the run was created. - description: Result of a single evaluation run within a suite execution. - EvaluationSuiteSubtype: - anyOf: - - type: string - - type: string - enum: - - default - - benchmark - description: The subtype of an evaluation suite. - EvaluationSuiteVersion: - type: object - required: - - testing_criteria - - name - - version - properties: - display_name: - type: string - description: |- - Human-readable display name. - Does not need to be unique. Shown in Foundry portal list views and eval reports. - subtype: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteSubtype' - description: Subtype of the evaluation suite. - dataset: - allOf: - - $ref: '#/components/schemas/EvaluationDatasetReference' - description: |- - Dataset reference for evaluation. - Optional — omit for evaluator-only suites where data comes from - live production traces or is provided at run time. - The referenced dataset must exist in the project's dataset registry. - testing_criteria: - type: array - items: - anyOf: - - $ref: '#/components/schemas/OpenAI.EvalGraderLabelModel' - - $ref: '#/components/schemas/OpenAI.EvalGraderStringCheck' - - $ref: '#/components/schemas/OpenAI.EvalGraderTextSimilarity' - - $ref: '#/components/schemas/OpenAI.EvalGraderPython' - - $ref: '#/components/schemas/OpenAI.EvalGraderScoreModel' - - $ref: '#/components/schemas/TestingCriterionAzureAIEvaluator' - minItems: 1 - description: |- - Testing criteria — the evaluator configurations for this suite. - Supports all grader types: azure_ai_evaluator, string_check, label_model, - score_model, text_similarity, python, etc. - At least one entry is required. - target: - allOf: - - $ref: '#/components/schemas/Target' - description: |- - Target for this evaluation suite. Uses the existing Target discriminated type - from eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. - Optional — allows suites to exist without a target. - input_messages: - anyOf: - - $ref: '#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate' - - $ref: '#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference' - description: |- - How to send dataset rows to the target (agent or model). - Supports template type (prompt with column placeholders) and - item_reference type (column containing pre-built messages). - evaluation_level: - allOf: - - $ref: '#/components/schemas/EvaluationLevel' - description: Default evaluation level for this suite. Can be overridden at run time. - name: - type: string - description: The name of the resource. - readOnly: true - version: - type: string - description: The version of the resource. - readOnly: true - description: |- - An evaluation suite bundles testing criteria — an optional dataset, one or more - evaluator configs with thresholds and init params — into a reusable, named artifact that - can gate agent changes across batch, scheduled, continuous, and CI/CD evals. - EvaluationSuiteVersionCreate: - type: object - required: - - testing_criteria - properties: - display_name: - type: string - description: |- - Human-readable display name. - Does not need to be unique. Shown in Foundry portal list views and eval reports. - subtype: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteSubtype' - description: Subtype of the evaluation suite. - dataset: - allOf: - - $ref: '#/components/schemas/EvaluationDatasetReference' - description: |- - Dataset reference for evaluation. - Optional — omit for evaluator-only suites where data comes from - live production traces or is provided at run time. - The referenced dataset must exist in the project's dataset registry. - testing_criteria: - type: array - items: - anyOf: - - $ref: '#/components/schemas/OpenAI.EvalGraderLabelModel' - - $ref: '#/components/schemas/OpenAI.EvalGraderStringCheck' - - $ref: '#/components/schemas/OpenAI.EvalGraderTextSimilarity' - - $ref: '#/components/schemas/OpenAI.EvalGraderPython' - - $ref: '#/components/schemas/OpenAI.EvalGraderScoreModel' - - $ref: '#/components/schemas/TestingCriterionAzureAIEvaluator' - minItems: 1 - description: |- - Testing criteria — the evaluator configurations for this suite. - Supports all grader types: azure_ai_evaluator, string_check, label_model, - score_model, text_similarity, python, etc. - At least one entry is required. - target: - allOf: - - $ref: '#/components/schemas/Target' - description: |- - Target for this evaluation suite. Uses the existing Target discriminated type - from eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. - Optional — allows suites to exist without a target. - input_messages: - anyOf: - - $ref: '#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate' - - $ref: '#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference' - description: |- - How to send dataset rows to the target (agent or model). - Supports template type (prompt with column placeholders) and - item_reference type (column containing pre-built messages). - evaluation_level: - allOf: - - $ref: '#/components/schemas/EvaluationLevel' - description: Default evaluation level for this suite. Can be overridden at run time. - description: - type: string - description: The asset description text. - tags: - type: object - additionalProperties: - type: string - description: Tag dictionary. Tags can be added, removed, and updated. - description: |- - An evaluation suite bundles testing criteria — an optional dataset, one or more - evaluator configs with thresholds and init params — into a reusable, named artifact that - can gate agent changes across batch, scheduled, continuous, and CI/CD evals. - EvaluationSuiteVersionUpdate: - type: object - required: - - testing_criteria - properties: - display_name: - type: string - description: |- - Human-readable display name. - Does not need to be unique. Shown in Foundry portal list views and eval reports. - subtype: - allOf: - - $ref: '#/components/schemas/EvaluationSuiteSubtype' - description: Subtype of the evaluation suite. - dataset: - allOf: - - $ref: '#/components/schemas/EvaluationDatasetReference' - description: |- - Dataset reference for evaluation. - Optional — omit for evaluator-only suites where data comes from - live production traces or is provided at run time. - The referenced dataset must exist in the project's dataset registry. - testing_criteria: - type: array - items: - anyOf: - - $ref: '#/components/schemas/OpenAI.EvalGraderLabelModel' - - $ref: '#/components/schemas/OpenAI.EvalGraderStringCheck' - - $ref: '#/components/schemas/OpenAI.EvalGraderTextSimilarity' - - $ref: '#/components/schemas/OpenAI.EvalGraderPython' - - $ref: '#/components/schemas/OpenAI.EvalGraderScoreModel' - - $ref: '#/components/schemas/TestingCriterionAzureAIEvaluator' - minItems: 1 - description: |- - Testing criteria — the evaluator configurations for this suite. - Supports all grader types: azure_ai_evaluator, string_check, label_model, - score_model, text_similarity, python, etc. - At least one entry is required. - target: - allOf: - - $ref: '#/components/schemas/Target' - description: |- - Target for this evaluation suite. Uses the existing Target discriminated type - from eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. - Optional — allows suites to exist without a target. - input_messages: - anyOf: - - $ref: '#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate' - - $ref: '#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference' - description: |- - How to send dataset rows to the target (agent or model). - Supports template type (prompt with column placeholders) and - item_reference type (column containing pre-built messages). - evaluation_level: - allOf: - - $ref: '#/components/schemas/EvaluationLevel' - description: Default evaluation level for this suite. Can be overridden at run time. - description: - type: string - description: The asset description text. - tags: - type: object - additionalProperties: - type: string - description: Tag dictionary. Tags can be added, removed, and updated. - description: |- - An evaluation suite bundles testing criteria — an optional dataset, one or more - evaluator configs with thresholds and init params — into a reusable, named artifact that - can gate agent changes across batch, scheduled, continuous, and CI/CD evals. EvaluationTaxonomy: type: object required: @@ -16273,18 +15656,6 @@ components: description: |- An array of tools the hosted agent's model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter. - container_protocol_versions: - type: array - items: - $ref: '#/components/schemas/ProtocolVersionRecord' - description: The protocols that the agent supports for ingress communication of the containers. - example: - - protocol: responses - version: v0.1.1 - - protocol: invocations - version: v0.0.1 - - protocol: a2a - version: v0.3.0 cpu: type: string description: The CPU configuration for the hosted agent. @@ -16301,10 +15672,6 @@ components: example: name: LOG_LEVEL value: debug - image: - type: string - description: The image ID for the agent, applicable to image-based hosted agents. - example: my-registry.azurecr.io/my-hosted-agent:latest container_configuration: allOf: - $ref: '#/components/schemas/ContainerConfiguration' @@ -17132,16 +16499,16 @@ components: description: Specific categories or types of user profile information to extract and store. chat_summary_enabled: type: boolean - description: Whether to enable chat summary extraction and storage. Default is true. + description: Whether to enable chat summary extraction and storage. Defaults to `true`. default: true procedural_memory_enabled: type: boolean - description: Whether to enable procedural memory extraction and storage. Default is true. + description: Whether to enable procedural memory extraction and storage. Defaults to `true`. default: true default_ttl_seconds: type: integer format: int32 - description: The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire. + description: The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`. default: 0 description: Default memory store configurations. x-ms-foundry-meta: @@ -17665,7 +17032,7 @@ components: description: Date and time for the one-time trigger in ISO 8601 format. timeZone: type: string - description: Time zone for the one-time trigger. + description: Time zone for the one-time trigger. Defaults to `UTC`. default: UTC allOf: - $ref: '#/components/schemas/Trigger' @@ -32499,55 +31866,47 @@ components: description: The output of an OpenAPI tool call. OptimizationAgentDefinition: type: object - required: - - agent_name properties: - agent_name: + agentName: type: string - description: Registered Foundry agent name. Required — bare-model mode is not supported. - agent_version: + description: Agent name. + agentVersion: type: string - description: Pinned agent version. Defaults to latest if omitted. + description: Agent version. model: type: string - description: Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model. - system_prompt: + description: Model deployment name. + systemPrompt: type: string - description: System prompt / instructions override. When set, used as the baseline instructions for the agent. + description: System prompt / instructions. skills: type: array items: - $ref: '#/components/schemas/OptimizationAgentSkill' - description: Optional named skills the optimizer may tune. Tool descriptions and parameters. - description: The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides. - OptimizationAgentSkill: - type: object - required: - - name - properties: - name: - type: string - description: Skill name (matches the tool name on the agent). - description: - type: string - description: Free-form description used as the seed when tuning skill descriptions. - description: A named skill on the agent that the optimizer may tune. + type: object + additionalProperties: {} + description: Agent skills. + tools: + type: array + items: + type: object + additionalProperties: {} + description: Agent tools. + description: Agent definition returned in response payloads (includes resolved config). OptimizationCandidate: type: object required: - name - config - mutations - - rationale - - avg_score - - avg_tokens - - pass_rate - - task_scores - - is_pareto_optimal + - avgScore + - avgTokens + - passRate + - taskScores + - isParetoOptimal properties: - candidate_id: + candidateId: type: string - description: Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints. + description: Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints. name: type: string description: Display name of the candidate (e.g., 'baseline', 'instruction-v2'). @@ -32558,72 +31917,49 @@ components: mutations: type: object additionalProperties: {} - description: "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." - rationale: - type: string - description: Strategy rationale — why this candidate was generated. - avg_score: + description: "What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'})." + avgScore: type: number format: double description: Average composite score across all tasks. - avg_tokens: + avgTokens: type: number format: double description: Average token usage across all tasks. - pass_rate: + passRate: type: number format: double description: Fraction of tasks that met the pass threshold. - task_scores: + taskScores: type: array items: $ref: '#/components/schemas/OptimizationTaskResult' description: Individual task-level scores. - is_pareto_optimal: + isParetoOptimal: type: boolean description: Whether this candidate is on the Pareto frontier (score vs cost). - sample_avg_score: - type: number - format: double - description: Average score from sampled evaluation (null if full dataset was used). - sample_size: - type: integer - format: int32 - description: Number of tasks in the sample (null if full dataset was used). - evaluation_type: - type: string - description: "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." - strategy: - allOf: - - $ref: '#/components/schemas/OptimizationStrategy' - description: Identifies the strategy that produced this candidate. - eval_id: + evalId: type: string description: Foundry evaluation identifier used to score this candidate. - eval_run_id: + evalRunId: type: string description: Foundry evaluation run identifier for this candidate's scoring run. + promotion: + allOf: + - $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. OptimizationJob: type: object required: - id - status - - created_at + - createdAt 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' @@ -32634,12 +31970,21 @@ components: - $ref: '#/components/schemas/OpenAI.Error' description: Error details — populated only on failure. readOnly: true - created_at: + result: + allOf: + - $ref: '#/components/schemas/OptimizationJobResult' + description: Result produced on success. + readOnly: true + inputs: + allOf: + - $ref: '#/components/schemas/OptimizationJobInputs' + description: Caller-supplied inputs. + createdAt: allOf: - $ref: '#/components/schemas/FoundryTimestamp' description: The timestamp when the job was created, represented in Unix time. readOnly: true - updated_at: + updatedAt: allOf: - $ref: '#/components/schemas/FoundryTimestamp' description: The timestamp when the job was last updated, represented in Unix time. @@ -32649,26 +31994,27 @@ components: - $ref: '#/components/schemas/OptimizationJobProgress' description: Progress while in flight. Absent in terminal states. readOnly: true - description: Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates. + dataset: + allOf: + - $ref: '#/components/schemas/DatasetInfo' + description: Metadata about the dataset used for this optimization job. + 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 + - trainDatasetReference properties: agent: allOf: - - $ref: '#/components/schemas/OptimizationAgentDefinition' + - $ref: '#/components/schemas/AgentIdentifier' description: The agent (and pinned version) being optimized. - dataset: - type: array - items: - $ref: '#/components/schemas/DatasetItem' - description: Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`. - train_dataset_reference: + trainDatasetReference: allOf: - $ref: '#/components/schemas/DatasetRef' - description: Reference to a registered training dataset. Mutually exclusive with `dataset`. - validation_dataset_reference: + description: Reference to a registered training dataset (required). + validationDatasetReference: allOf: - $ref: '#/components/schemas/DatasetRef' description: Optional held-out validation dataset for measuring generalization of the final candidate. @@ -32676,12 +32022,7 @@ components: type: array items: type: string - description: "Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence']." - criteria: - type: array - items: - $ref: '#/components/schemas/EvaluationCriterion' - description: Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`. + description: "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." options: allOf: - $ref: '#/components/schemas/OptimizationOptions' @@ -32690,38 +32031,23 @@ components: OptimizationJobProgress: type: object required: - - current_strategy - - current_iteration - - tasks_completed - - tasks_total - - best_score - - elapsed_seconds + - currentIteration + - bestScore + - elapsedSeconds properties: - current_strategy: - allOf: - - $ref: '#/components/schemas/OptimizationStrategy' - description: Strategy currently being explored. - current_iteration: + currentIteration: type: integer format: int32 description: 1-based current iteration index. - tasks_completed: - type: integer - format: int32 - description: Tasks evaluated so far this iteration. - tasks_total: - type: integer - format: int32 - description: Total tasks scheduled this iteration. - best_score: + bestScore: type: number format: double description: Best score observed so far across all candidates. - elapsed_seconds: + elapsedSeconds: type: number format: double - description: Wall-clock time elapsed since the job began executing. - description: In-flight progress; only populated while status is `queued` or `in_progress`. + description: Wall-clock time elapsed in seconds since the job began executing. + description: In-flight progress; only populated while status is queued or in_progress. OptimizationJobResult: type: object properties: @@ -32738,123 +32064,53 @@ components: items: $ref: '#/components/schemas/OptimizationCandidate' description: All evaluated candidates including baseline. - pareto_frontier: - type: array - items: - $ref: '#/components/schemas/OptimizationCandidate' - description: Candidates on the Pareto frontier (maximize score, minimize cost). - validation_score: - allOf: - - $ref: '#/components/schemas/OptimizationCandidate' - description: Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided. options: allOf: - $ref: '#/components/schemas/OptimizationOptions' description: The options used for this optimization run. - sample_size: - type: integer - format: int32 - description: Number of tasks sampled during optimization iterations (null if sampling was not used). warnings: type: array items: type: string - description: Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped). - all_strategies_failed: + description: Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped). + allTargetAttributesFailed: type: boolean - description: True when all optimization strategies failed — only the baseline was evaluated. - description: Terminal-state result body. Populated when `status` is `succeeded` or `failed`. - OptimizationMode: - anyOf: - - type: string - - type: string - enum: - - optimize - description: Run mode for an optimization job. + 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: - strategies: - type: array - items: - $ref: '#/components/schemas/OptimizationStrategy' - description: "Strategies to apply this run. Default: ['instruction']." - default: - - instruction - budget: + maxIterations: type: integer format: int32 - description: 'Total candidate generation budget (number of candidates explored). Default: 10.' - default: 10 - max_iterations: - type: integer - format: int32 - description: 'Maximum optimization iterations per strategy. Default: 5.' + description: 'Maximum optimization iterations per strategy. Must be >= 1. Default: 5.' default: 5 - tasks_per_iteration: - type: integer - format: int32 - description: 'Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed).' - max_reflection_tasks: - type: integer - format: int32 - description: 'Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.' - default: 5 - min_improvement: - type: number - format: double - description: 'Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.' - default: 0.005 - pass_threshold: - type: number - format: double - description: 'Composite score threshold for a task to be considered passing. Default: 0.5.' - default: 0.5 - improvement_threshold: - type: number - format: double - description: 'Target average score at which optimization stops early (quality ceiling). Default: 0.95.' - default: 0.95 - mode: - allOf: - - $ref: '#/components/schemas/OptimizationMode' - description: Run mode. - eval_model: + optimizationConfig: + type: object + additionalProperties: {} + description: Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization. + evalModel: type: string - description: Foundry deployment name to use as the LLM-as-judge evaluation model. Required. - reflection_model: + description: Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o'). + optimizationModel: type: string - description: Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset. - task_timeout_seconds: - type: integer - format: int32 - description: 'Per-task timeout for agent execution. Default: 300 seconds (5 minutes).' - default: 300 - keep_versions: - type: boolean - description: 'If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.' - default: false + description: Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set. + evaluationLevel: + allOf: + - $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. - OptimizationStrategy: - anyOf: - - type: string - - type: string - enum: - - instruction - - model - - skill - description: Optimization strategy dimension. OptimizationTaskResult: type: object required: - - task_name + - taskName - scores - - composite_score + - compositeScore - tokens - - duration_seconds + - durationSeconds - passed properties: - task_name: + taskName: type: string description: Task name (from the dataset). query: @@ -32866,7 +32122,7 @@ components: type: number format: double description: Per-evaluator scores keyed by evaluator name. - composite_score: + compositeScore: type: number format: double description: Composite score combining all evaluator scores. @@ -32874,14 +32130,14 @@ components: type: integer format: int32 description: Total tokens consumed during the agent run for this task. - duration_seconds: + durationSeconds: 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: + errorMessage: type: string description: Error message if the task failed during execution. rationales: @@ -32892,7 +32148,7 @@ components: response: type: string description: Raw agent response text. - run_id: + runId: type: string description: Identifier of the agent run that produced this result. description: Per-task evaluation result for a single candidate. @@ -32988,21 +32244,6 @@ components: format: uri description: The link to the next page of items description: Paged collection of EvaluationRule items - PagedEvaluationSuiteVersion: - type: object - required: - - value - properties: - value: - type: array - items: - $ref: '#/components/schemas/EvaluationSuiteVersion' - description: The EvaluationSuiteVersion items on this page - nextLink: - type: string - format: uri - description: The link to the next page of items - description: Paged collection of EvaluationSuiteVersion items PagedEvaluationTaxonomy: type: object required: @@ -33193,6 +32434,63 @@ components: x-ms-foundry-meta: required_previews: - MemoryStores=V1Preview + PromoteCandidateRequest: + type: object + required: + - agentName + - agentVersion + properties: + agentName: + type: string + description: Name of the Foundry agent to promote to. + agentVersion: + 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: + - candidateId + - status + - promotedAt + - agentName + - agentVersion + properties: + candidateId: + type: string + description: The promoted candidate id. + status: + type: string + description: Status after promotion. + promotedAt: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: Timestamp when promotion occurred, represented in Unix time. + agentName: + type: string + description: Name of the Foundry agent promoted to. + agentVersion: + type: string + description: Version of the Foundry agent promoted to. + description: Response after successfully promoting a candidate. + PromotionInfo: + type: object + required: + - promotedAt + - agentName + - agentVersion + properties: + promotedAt: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: Timestamp when promotion occurred, represented in Unix time. + agentName: + type: string + description: Name of the Foundry agent this candidate was promoted to. + agentVersion: + type: string + description: Version of the Foundry agent this candidate was promoted to. + description: Promotion metadata recorded when a candidate is deployed to a Foundry agent. PromptAgentDefinition: type: object required: @@ -33218,7 +32516,7 @@ components: maximum: 2 description: |- What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. + We generally recommend altering this or `top_p` but not both. Defaults to `1`. default: 1 top_p: type: number @@ -33230,9 +32528,8 @@ components: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. + are considered. We generally recommend altering this or `temperature` but not both. + Defaults to `1`. default: 1 reasoning: type: object @@ -33307,26 +32604,6 @@ components: allOf: - $ref: '#/components/schemas/DataGenerationJobSource' description: Prompt source for data generation jobs — inline text provided by the user. - PromptEvaluationSuiteJobSource: - type: object - required: - - type - - prompt - properties: - description: - type: string - description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). - type: - type: string - enum: - - prompt - description: The source type for this source, which is Prompt. - prompt: - type: string - description: Inline prompt text (e.g., agent description, policy text, supplementary context). - allOf: - - $ref: '#/components/schemas/EvaluationSuiteJobSource' - description: Prompt source for evaluation suite generation jobs — inline text provided by the user. PromptEvaluatorGenerationJobSource: type: object required: @@ -33407,7 +32684,7 @@ components: description: End time for the recurrence schedule in ISO 8601 format. timeZone: type: string - description: Time zone for the recurrence schedule. + description: Time zone for the recurrence schedule. Defaults to `UTC`. default: UTC interval: type: integer @@ -34365,40 +33642,106 @@ components: - short_answer - long_answer description: The supported question types for SimpleQnA data generation jobs used for fine-tuning scenarios. - SkillObject: + Skill: type: object required: - - skill_id - - has_blob + - id - name + - description + - created_at + - default_version + - latest_version properties: - skill_id: + id: type: string description: The unique identifier of the skill. - has_blob: - type: boolean - description: Whether the skill was created from a zip blob package. name: - type: string - maxLength: 63 + allOf: + - $ref: '#/components/schemas/SkillName' description: The unique name of the skill. description: type: string maxLength: 1024 description: A human-readable description of the skill. + created_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The Unix timestamp (seconds) when the skill was created. + default_version: + type: string + description: The default version for the skill. Can be changed via updateSkill. + latest_version: + type: string + description: The latest version for the skill. + description: A skill resource. + SkillInlineContent: + type: object + required: + - description + - instructions + properties: + description: + type: string + maxLength: 1024 + description: A human-readable description of what the skill does and when to use it. + instructions: + type: string + description: The skill instructions in markdown format. This is the body content of the SKILL.md file. + license: + type: string + description: License name or reference to a bundled license file. + compatibility: + type: string + maxLength: 500 + description: Environment requirements or compatibility notes for the skill. metadata: type: object additionalProperties: type: string - description: |- - Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters. - x-oaiTypeLabel: map - description: A skill object. + description: Arbitrary key-value metadata for additional properties. + allowed_tools: + type: array + items: + type: string + description: List of pre-approved tools the skill may use. Experimental. + description: Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification. + SkillName: + type: string + maxLength: 64 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + description: 'A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens.' + SkillVersion: + type: object + required: + - id + - skill_id + - name + - version + - description + - created_at + properties: + id: + type: string + description: The unique identifier of the skill version. + skill_id: + type: string + description: The identifier of the parent skill. + name: + allOf: + - $ref: '#/components/schemas/SkillName' + description: The name of the skill version. + version: + type: string + description: The version identifier. Skill versions are immutable. + description: + type: string + maxLength: 1024 + description: A human-readable description of the skill version. + created_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The Unix timestamp (seconds) when the skill version was created. + description: A specific version of a skill. Sku: type: object required: @@ -34439,7 +33782,7 @@ components: description: The JSON schema for the structured input (optional). required: type: boolean - description: Whether the input property is required when the agent is invoked. + description: Whether the input property is required when the agent is invoked. Defaults to `false`. default: false description: An structured input that can participate in prompt template substitutions and tool argument binding. StructuredOutputDefinition: @@ -34959,6 +34302,40 @@ components: A tool for searching over the agent's toolbox. When present, deferred tools are hidden from `tools/list` and only discoverable via `search_tools` queries at runtime. + ToolboxSkill: + type: object + required: + - type + properties: + type: + type: string + description: The type of skill source. + discriminator: + propertyName: type + mapping: + skill_reference: '#/components/schemas/ToolboxSkillReference' + description: A skill source included in a toolbox. + ToolboxSkillReference: + type: object + required: + - type + - name + properties: + type: + type: string + enum: + - skill_reference + description: The type of skill source. + name: + allOf: + - $ref: '#/components/schemas/SkillName' + description: The name of the skill. + version: + type: string + description: The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version. + allOf: + - $ref: '#/components/schemas/ToolboxSkill' + description: A reference to an existing skill to include in a toolbox. ToolboxVersionObject: type: object required: @@ -35005,6 +34382,11 @@ components: items: $ref: '#/components/schemas/OpenAI.Tool' description: The list of tools contained in this toolbox version. + skills: + type: array + items: + $ref: '#/components/schemas/ToolboxSkill' + description: The list of skill sources included in this toolbox version. policies: allOf: - $ref: '#/components/schemas/ToolboxPolicies' @@ -35101,40 +34483,6 @@ components: allOf: - $ref: '#/components/schemas/DataGenerationJobSource' description: Traces source for data generation jobs — conversation traces from Application Insights. - TracesEvaluationSuiteJobSource: - type: object - required: - - type - - start_time - properties: - description: - type: string - description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). - type: - type: string - enum: - - traces - description: The source type for this source, which is Traces. - agent_id: - type: string - description: The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required. - agent_name: - type: string - description: The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required. - agent_version: - type: string - description: The agent version. If not specified, traces for ALL versions of the agent are included within the time window. - start_time: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Start of the time window (Unix timestamp in seconds) for fetching traces. - end_time: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: End of the time window (Unix timestamp in seconds). Defaults to current time. - allOf: - - $ref: '#/components/schemas/EvaluationSuiteJobSource' - description: Traces source for evaluation suite generation jobs — conversation traces from Application Insights. TracesEvaluatorGenerationJobSource: type: object required: diff --git a/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml,json b/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml,json deleted file mode 100644 index 315642e4c46c..000000000000 --- a/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml,json +++ /dev/null @@ -1,45601 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Microsoft Foundry", - "version": "v1" - }, - "tags": [ - { - "name": "Agents" - }, - { - "name": "Agent Session Files" - }, - { - "name": "Agent Invocations" - }, - { - "name": "Connections" - }, - { - "name": "Datasets" - }, - { - "name": "Deployments" - }, - { - "name": "Evaluation Taxonomies" - }, - { - "name": "Evaluation Rules" - }, - { - "name": "Evaluators" - }, - { - "name": "Indexes" - }, - { - "name": "Insights" - }, - { - "name": "Models" - }, - { - "name": "Memory Stores" - }, - { - "name": "Conversations" - }, - { - "name": "Evals" - }, - { - "name": "Fine-Tuning" - }, - { - "name": "Responses" - }, - { - "name": "Redteams" - }, - { - "name": "Schedules" - }, - { - "name": "Skills" - }, - { - "name": "Toolboxes" - }, - { - "name": "AgentOptimizationJobs" - } - ], - "paths": { - "/agent_optimization_jobs": { - "post": { - "operationId": "AgentOptimizationJobs_create", - "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", - "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": "Operation-Id", - "in": "header", - "required": false, - "description": "Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.", - "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": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "headers": { - "Operation-Location": { - "required": true, - "description": "URL to poll for the job status.", - "schema": { - "type": "string" - } - }, - "Location": { - "required": true, - "description": "URL of the created job resource.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OptimizationJob" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OptimizationJob" - } - } - }, - "description": "The job to create." - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - }, - "get": { - "operationId": "AgentOptimizationJobs_list", - "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", - "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": "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": "status", - "in": "query", - "required": false, - "description": "Filter to jobs in this lifecycle state.", - "schema": { - "$ref": "#/components/schemas/JobStatus" - }, - "explode": false - }, - { - "name": "agent_name", - "in": "query", - "required": false, - "description": "Filter to jobs targeting this agent name.", - "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/OptimizationJob" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}": { - "get": { - "operationId": "AgentOptimizationJobs_get", - "summary": "Get info about an agent optimization job.", - "description": "Get an optimization job by id. Emits `Retry-After` while the job is non-terminal.", - "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.", - "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.", - "headers": { - "Retry-After": { - "required": false, - "description": "Recommended number of seconds to wait before polling again.", - "schema": { - "type": "integer", - "format": "int32" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OptimizationJob" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - }, - "delete": { - "operationId": "AgentOptimizationJobs_delete", - "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", - "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 delete.", - "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": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}/candidates": { - "get": { - "operationId": "AgentOptimizationJobs_listCandidates", - "summary": "Returns a list of candidates for an optimization job.", - "description": "List candidates produced by a 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\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/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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "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 a candidate by id.", - "description": "Get a single candidate manifest and aggregated evaluation summary.", - "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/OptimizationCandidate" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "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 candidate deploy config.", - "description": "Get the candidate's deploy config JSON. Used to compose `agents.create_version(...)` from a 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/CandidateDeployConfig" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "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 candidate evaluation results.", - "description": "Get full per-task evaluation results for a 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" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "AgentOptimizationJobs" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] - } - } - }, - "/agent_optimization_jobs/{jobId}:cancel": { - "post": { - "operationId": "AgentOptimizationJobs_cancel", - "summary": "Cancels an agent optimization job.", - "description": "Request cancellation. Idempotent on terminal states.", - "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" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "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 the 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.", - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "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", - "description": "Returns the list of all agents.", - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] - } - }, - "/agents/{agent_name}": { - "get": { - "operationId": "Agents_getAgent", - "description": "Retrieves the agent.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve.", - "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/AgentObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] - }, - "post": { - "operationId": "Agents_updateAgent_Agents_updateAgentFromCode", - "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": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "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": "Updates the agent by adding a new version if there are any changes to the agent definition.\nIf no changes, returns the existing agent version. Updates a code-based agent by uploading new code and creating a new version.\nIf the code and definition are unchanged (matched by x-ms-code-zip-sha256 header), returns the existing version.\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.", - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAgentRequest" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/CreateAgentVersionFromCodeContent" - }, - "encoding": { - "metadata": { - "contentType": "application/json" - } - } - } - } - } - }, - "delete": { - "operationId": "Agents_deleteAgent", - "description": "Deletes an agent.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to delete.", - "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/DeleteAgentResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] - }, - "patch": { - "operationId": "Agents_patchAgentObject", - "description": "Updates an agent endpoint.", - "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": [ - "AgentEndpoints=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve.", - "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/AgentObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/PatchAgentRequest" - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/code:download": { - "get": { - "operationId": "Agents_downloadAgentCode", - "description": "Download the code zip for the latest version of a code-based hosted agent.\nReturns the previously-uploaded zip (`application/zip`).\nThe SHA-256 digest of the returned bytes matches the `content_hash` on the latest version's `code_configuration`.", - "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": [ - "CodeAgents=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent whose latest-version code zip should be downloaded.", - "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": "Response body for downloading a hosted agent's code zip.\nBody is the raw zip bytes; `Content-Type` declares `application/zip` so clients\ncan route to a zip-aware handler. Streaming is preserved (`bytes` body) regardless\nof the content-type label.", - "content": { - "application/zip": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/endpoint/protocols/invocations": { - "post": { - "operationId": "AgentInvocations_createAgentInvocation", - "description": "Creates an invocation for the specified agent version.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_session_id", - "in": "query", - "required": false, - "description": "Optional session ID returned by the session CRUD APIs to reuse an existing sandbox. If not provided, a new session ID will be auto-generated.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "HostedAgents=V1Preview" - ] - } - }, - { - "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.", - "headers": { - "x-agent-invocation-id": { - "required": true, - "description": "Unique identifier for this invocation.", - "schema": { - "type": "string" - } - }, - "x-agent-session-id": { - "required": true, - "description": "Session ID for this invocation. Returns the provided session ID or an auto-generated one if not provided in the request.", - "schema": { - "type": "string" - } - } - }, - "content": { - "*/*": { - "schema": {} - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agent Invocations" - ], - "requestBody": { - "required": true, - "content": { - "*/*": { - "schema": {} - } - }, - "description": "The request body." - }, - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/endpoint/protocols/invocations/docs/openapi.json": { - "get": { - "operationId": "AgentInvocations_getAgentInvocationOpenApiSpec", - "description": "Retrieves the OpenAPI specification for an agent version's invocation contract.\nReturns 404 if the agent does not expose an OpenAPI specification.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "HostedAgents=V1Preview" - ] - } - }, - { - "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", - "additionalProperties": {} - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agent Invocations" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/endpoint/protocols/invocations/{invocation_id}": { - "get": { - "operationId": "AgentInvocations_getAgentInvocation", - "description": "Retrieves the invocation with the given ID.\nReturns 404 if the agent does not support this operation or if the invocation ID is not found.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "invocation_id", - "in": "path", - "required": true, - "description": "The unique identifier of the invocation.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "HostedAgents=V1Preview" - ] - } - }, - { - "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.", - "headers": { - "x-agent-session-id": { - "required": true, - "description": "Session ID for this invocation. Returns the session ID associated with the invocation.", - "schema": { - "type": "string" - } - } - }, - "content": { - "*/*": { - "schema": {} - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agent Invocations" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/endpoint/protocols/invocations/{invocation_id}/cancel": { - "post": { - "operationId": "AgentInvocations_cancelAgentInvocation", - "description": "Cancels an invocation.\nReturns 404 if the agent does not support this operation or if the invocation ID is not found.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "invocation_id", - "in": "path", - "required": true, - "description": "The unique identifier of the invocation to cancel.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "HostedAgents=V1Preview" - ] - } - }, - { - "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.", - "headers": { - "x-agent-session-id": { - "required": true, - "description": "Session ID for this invocation. Returns the session ID associated with the invocation.", - "schema": { - "type": "string" - } - } - }, - "content": { - "*/*": { - "schema": {} - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agent Invocations" - ], - "requestBody": { - "required": false, - "content": { - "*/*": { - "schema": {} - } - }, - "description": "Optional request body." - }, - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/endpoint/sessions": { - "post": { - "operationId": "Agents_createSession", - "description": "Creates a new session for an agent endpoint.\nThe endpoint resolves the backing agent version from `version_indicator` and\nenforces session ownership using the provided isolation key for session-mutating operations.", - "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": [ - "AgentEndpoints=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to create a session for.", - "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": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentSessionResource" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentSessionRequest" - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "get": { - "operationId": "Agents_listSessions", - "description": "Returns a list of sessions for the specified agent.", - "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": [ - "AgentEndpoints=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "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", - "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/AgentSessionResource" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/endpoint/sessions/{agent_session_id}/files": { - "get": { - "operationId": "AgentSessionFiles_listSessionFiles", - "description": "List files and directories at a given path in the session sandbox.\nReturns only the immediate children of the specified directory (non-recursive).", - "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": [ - "HostedAgents=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_session_id", - "in": "path", - "required": true, - "description": "The session ID.", - "schema": { - "type": "string" - } - }, - { - "name": "path", - "in": "query", - "required": true, - "description": "The directory path to list, relative to the session home directory.", - "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": { - "$ref": "#/components/schemas/SessionDirectoryListResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agent Session Files" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "delete": { - "operationId": "AgentSessionFiles_deleteSessionFile", - "description": "Delete a file or directory from the session sandbox.\nIf `recursive` is false (default) and the target is a non-empty directory, the API returns 409 Conflict.", - "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": [ - "HostedAgents=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_session_id", - "in": "path", - "required": true, - "description": "The session ID.", - "schema": { - "type": "string" - } - }, - { - "name": "path", - "in": "query", - "required": true, - "description": "The file or directory path to delete, relative to the session home directory.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "recursive", - "in": "query", - "required": false, - "description": "Whether to recursively delete directory contents. Defaults to false.", - "schema": { - "type": "boolean", - "default": false - }, - "explode": false - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agent Session Files" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/endpoint/sessions/{agent_session_id}/files/content": { - "put": { - "operationId": "AgentSessionFiles_uploadSessionFile", - "description": "Upload a file to the session sandbox via binary stream.\nMaximum file size is 50 MB. Uploads exceeding this limit return 413 Payload Too Large.", - "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": [ - "HostedAgents=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_session_id", - "in": "path", - "required": true, - "description": "The session ID.", - "schema": { - "type": "string" - } - }, - { - "name": "path", - "in": "query", - "required": true, - "description": "The destination file path within the sandbox, relative to the session home directory.", - "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": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionFileWriteResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agent Session Files" - ], - "requestBody": { - "required": true, - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "get": { - "operationId": "AgentSessionFiles_downloadSessionFile", - "description": "Download a file from the session sandbox as a binary stream.", - "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": [ - "HostedAgents=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_session_id", - "in": "path", - "required": true, - "description": "The session ID.", - "schema": { - "type": "string" - } - }, - { - "name": "path", - "in": "query", - "required": true, - "description": "The file path to download from the sandbox, relative to the session home directory.", - "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": { - "type": "string", - "format": "binary" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agent Session Files" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/endpoint/sessions/{session_id}": { - "get": { - "operationId": "Agents_getSession", - "description": "Retrieves a session by ID.", - "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": [ - "AgentEndpoints=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "description": "The session identifier.", - "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/AgentSessionResource" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "delete": { - "operationId": "Agents_deleteSession", - "description": "Deletes a session synchronously.\nReturns 204 No Content when the session is deleted or does not exist.", - "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": [ - "AgentEndpoints=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "description": "The session identifier.", - "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": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/import": { - "post": { - "operationId": "Agents_updateAgentFromManifest", - "description": "Updates the agent from a manifest by adding a new version if there are any changes to the agent definition.\nIf no changes, returns the existing agent version.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to update.", - "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/AgentObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateAgentFromManifestRequest" - } - } - } - } - } - }, - "/agents/{agent_name}/versions": { - "post": { - "operationId": "Agents_createAgentVersion_Agents_createAgentVersionFromCode", - "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": "agent_name", - "in": "path", - "required": true, - "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters.", - "schema": { - "type": "string", - "maxLength": 63 - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "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": "Create a new agent version.", - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentVersionObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentVersionRequest" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/CreateAgentVersionFromCodeContent" - }, - "encoding": { - "metadata": { - "contentType": "application/json" - } - } - } - } - } - }, - "get": { - "operationId": "Agents_listAgentVersions", - "description": "Returns the list of versions of an agent.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve versions for.", - "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", - "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/AgentVersionObject" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] - } - }, - "/agents/{agent_name}/versions/{agent_version}": { - "get": { - "operationId": "Agents_getAgentVersion", - "description": "Retrieves a specific version of an agent.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_version", - "in": "path", - "required": true, - "description": "The version of the agent to retrieve.", - "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/AgentVersionObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] - }, - "delete": { - "operationId": "Agents_deleteAgentVersion", - "description": "Deletes a specific version of an agent.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to delete.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_version", - "in": "path", - "required": true, - "description": "The version of the agent to delete", - "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/DeleteAgentVersionResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] - } - }, - "/agents/{agent_name}/versions/{agent_version}/code:download": { - "get": { - "operationId": "Agents_downloadAgentVersionCode", - "description": "Download the code zip for a specific version of a code-based hosted agent.\nReturns the previously-uploaded zip (`application/zip`).\nThe SHA-256 digest of the returned bytes matches the `content_hash` on the agent version's `code_configuration`.", - "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": [ - "CodeAgents=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_version", - "in": "path", - "required": true, - "description": "The version of the agent whose code zip should be downloaded.", - "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": "Response body for downloading a hosted agent's code zip.\nBody is the raw zip bytes; `Content-Type` declares `application/zip` so clients\ncan route to a zip-aware handler. Streaming is preserved (`bytes` body) regardless\nof the content-type label.", - "content": { - "application/zip": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/versions/{agent_version}/sessions/{session_id}:logstream": { - "get": { - "operationId": "Agents_getSessionLogStream", - "description": "Streams console logs (stdout / stderr) for a specific hosted agent session\nas a Server-Sent Events (SSE) stream.\n\nEach SSE frame contains:\n- `event`: always `\"log\"`\n- `data`: a plain-text log line (currently JSON-formatted, but the schema\nis not contractual and may include additional keys or change format\nover time — clients should treat it as an opaque string)\n\nExample SSE frames:\n```\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:33:17.121Z\",\"stream\":\"stdout\",\"message\":\"Starting FoundryCBAgent server on port 8088\"}\n\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:33:17.130Z\",\"stream\":\"stderr\",\"message\":\"INFO: Application startup complete.\"}\n\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:34:52.714Z\",\"stream\":\"status\",\"message\":\"Successfully connected to container\"}\n\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:35:52.714Z\",\"stream\":\"status\",\"message\":\"No logs since last 60 seconds\"}\n```\n\nThe stream remains open until the client disconnects or the server\nterminates the connection. Clients should handle reconnection as needed.", - "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": [ - "HostedAgents=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the hosted agent.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_version", - "in": "path", - "required": true, - "description": "The version of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "description": "The session ID (maps to an ADC sandbox).", - "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": { - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/SessionLogEvent" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/versions:import": { - "post": { - "operationId": "Agents_createAgentVersionFromManifest", - "description": "Create a new agent version from a manifest.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters.", - "schema": { - "type": "string", - "maxLength": 63 - } - }, - { - "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/AgentVersionObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentVersionFromManifestRequest" - } - } - } - } - } - }, - "/agents:import": { - "post": { - "operationId": "Agents_createAgentFromManifest", - "description": "Creates an agent from a manifest.", - "parameters": [ - { - "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/AgentObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentFromManifestRequest" - } - } - } - } - } - }, - "/connections": { - "get": { - "operationId": "Connections_list", - "description": "List all connections in the project, without populating connection credentials", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "connectionType", - "in": "query", - "required": false, - "description": "List connections of this specific type", - "schema": { - "$ref": "#/components/schemas/ConnectionType" - }, - "explode": false - }, - { - "name": "defaultConnection", - "in": "query", - "required": false, - "description": "List connections that are default connections", - "schema": { - "type": "boolean" - }, - "explode": false - }, - { - "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-ms-client-request-id": { - "required": false, - "description": "An opaque, globally-unique, client-generated string identifier for the request.", - "schema": { - "$ref": "#/components/schemas/Azure.Core.uuid" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedConnection" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Connections" - ] - } - }, - "/connections/{name}": { - "get": { - "operationId": "Connections_get", - "description": "Get a connection by name, without populating connection credentials", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The friendly name of the connection, provided by the user.", - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-ms-client-request-id": { - "required": false, - "description": "An opaque, globally-unique, client-generated string identifier for the request.", - "schema": { - "$ref": "#/components/schemas/Azure.Core.uuid" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Connection" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Connections" - ] - } - }, - "/connections/{name}/getConnectionWithCredentials": { - "post": { - "operationId": "Connections_getWithCredentials", - "description": "Get a connection by name, with its connection credentials", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The friendly name of the connection, provided by the user.", - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-ms-client-request-id": { - "required": false, - "description": "An opaque, globally-unique, client-generated string identifier for the request.", - "schema": { - "$ref": "#/components/schemas/Azure.Core.uuid" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Connection" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Connections" - ] - } - }, - "/datasets": { - "get": { - "operationId": "Datasets_listLatest", - "description": "List the latest version of each DatasetVersion", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedDatasetVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Datasets" - ] - } - }, - "/datasets/{name}/versions": { - "get": { - "operationId": "Datasets_listVersions", - "description": "List all versions of the given DatasetVersion", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedDatasetVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Datasets" - ] - } - }, - "/datasets/{name}/versions/{version}": { - "get": { - "operationId": "Datasets_getVersion", - "description": "Get the specific version of the DatasetVersion. The service returns 404 Not Found error if the DatasetVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the DatasetVersion to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DatasetVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Datasets" - ] - }, - "delete": { - "operationId": "Datasets_deleteVersion", - "description": "Delete the specific version of the DatasetVersion. The service returns 204 No Content if the DatasetVersion was deleted successfully or if the DatasetVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version of the DatasetVersion to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Datasets" - ] - }, - "patch": { - "operationId": "Datasets_createOrUpdateVersion", - "description": "Create a new or update an existing DatasetVersion with the given version id", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the DatasetVersion to create or update.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DatasetVersion" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DatasetVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Datasets" - ], - "requestBody": { - "required": true, - "content": { - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/DatasetVersionUpdate" - } - } - }, - "description": "The DatasetVersion to create or update." - } - } - }, - "/datasets/{name}/versions/{version}/credentials": { - "post": { - "operationId": "Datasets_getCredentials", - "description": "Get the SAS credential to access the storage account associated with a Dataset version.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the DatasetVersion to operate on.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetCredentialResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Datasets" - ] - } - }, - "/datasets/{name}/versions/{version}/startPendingUpload": { - "post": { - "operationId": "Datasets_startPendingUploadVersion", - "description": "Start a new or get an existing pending upload of a dataset for a specific version.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the DatasetVersion to operate on.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PendingUploadResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Datasets" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PendingUploadRequest" - } - } - }, - "description": "The pending upload request parameters" - } - } - }, - "/deployments": { - "get": { - "operationId": "Deployments_list", - "description": "List all deployed models in the project", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "modelPublisher", - "in": "query", - "required": false, - "description": "Model publisher to filter models by", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "modelName", - "in": "query", - "required": false, - "description": "Model name (the publisher specific name) to filter models by", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "deploymentType", - "in": "query", - "required": false, - "description": "Type of deployment to filter list by", - "schema": { - "$ref": "#/components/schemas/DeploymentType" - }, - "explode": false - }, - { - "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-ms-client-request-id": { - "required": false, - "description": "An opaque, globally-unique, client-generated string identifier for the request.", - "schema": { - "$ref": "#/components/schemas/Azure.Core.uuid" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedDeployment" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Deployments" - ] - } - }, - "/deployments/{name}": { - "get": { - "operationId": "Deployments_get", - "description": "Get a deployed model.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "Name of the deployment", - "schema": { - "type": "string" - } - }, - { - "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-ms-client-request-id": { - "required": false, - "description": "An opaque, globally-unique, client-generated string identifier for the request.", - "schema": { - "$ref": "#/components/schemas/Azure.Core.uuid" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Deployment" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Deployments" - ] - } - }, - "/evaluation_suites": { - "get": { - "operationId": "EvaluationSuites_listLatest", - "description": "List the latest version of each EvaluationSuiteVersion", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "agent_name", - "in": "query", - "required": false, - "description": "Filter by associated Foundry agent name (from target).", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedEvaluationSuiteVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - } - } - }, - "/evaluation_suites/{name}/versions": { - "get": { - "operationId": "EvaluationSuites_listVersions", - "description": "List all versions of the given EvaluationSuiteVersion", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedEvaluationSuiteVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - } - }, - "post": { - "operationId": "EvaluationSuites_createEvaluationSuiteVersion", - "description": "Create a new EvaluationSuiteVersion with auto incremented version id", - "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": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the evaluation suite.", - "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": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersionCreate" - } - } - }, - "description": "The evaluation suite version to create." - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "/evaluation_suites/{name}/versions/{version}": { - "get": { - "operationId": "EvaluationSuites_getVersion", - "description": "Get the specific version of the EvaluationSuiteVersion. The service returns 404 Not Found error if the EvaluationSuiteVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource.", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the EvaluationSuiteVersion to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - } - }, - "delete": { - "operationId": "EvaluationSuites_deleteVersion", - "description": "Delete the specific version of the EvaluationSuiteVersion. The service returns 204 No Content if the EvaluationSuiteVersion was deleted successfully or if the EvaluationSuiteVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource.", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version of the EvaluationSuiteVersion to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - } - }, - "patch": { - "operationId": "EvaluationSuites_createOrUpdateVersion", - "description": "Create a new or update an existing EvaluationSuiteVersion with the given version id", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource.", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the EvaluationSuiteVersion to create or update.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "requestBody": { - "required": true, - "content": { - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteVersionUpdate" - } - } - }, - "description": "The EvaluationSuiteVersion to create or update." - } - } - }, - "/evaluation_suites/{name}:run": { - "post": { - "operationId": "EvaluationSuites_run", - "description": "Run an evaluation using the suite's testing criteria and dataset.", - "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": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the evaluation suite.", - "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": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteRunResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationSuiteRunRequest" - } - } - }, - "description": "The run request parameters." - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "/evaluationrules": { - "get": { - "operationId": "EvaluationRules_list", - "description": "List all evaluation rules.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "actionType", - "in": "query", - "required": false, - "description": "Filter by the type of evaluation rule.", - "schema": { - "$ref": "#/components/schemas/EvaluationRuleActionType" - }, - "explode": false - }, - { - "name": "agentName", - "in": "query", - "required": false, - "description": "Filter by the agent name.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "enabled", - "in": "query", - "required": false, - "description": "Filter by the enabled status.", - "schema": { - "type": "boolean" - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedEvaluationRule" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluation Rules" - ] - } - }, - "/evaluationrules/{id}": { - "get": { - "operationId": "EvaluationRules_get", - "description": "Get an evaluation rule.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "Unique identifier for the evaluation rule.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationRule" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluation Rules" - ] - }, - "delete": { - "operationId": "EvaluationRules_delete", - "description": "Delete an evaluation rule.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "Unique identifier for the evaluation rule.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluation Rules" - ] - }, - "put": { - "operationId": "EvaluationRules_createOrUpdate", - "description": "Create or update an evaluation rule.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "Unique identifier for the evaluation rule.", - "schema": { - "type": "string" - } - }, - { - "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": [ - "Evaluations=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationRule" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationRule" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluation Rules" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationRule" - } - } - }, - "description": "Evaluation rule resource" - } - } - }, - "/evaluationtaxonomies": { - "get": { - "operationId": "EvaluationTaxonomies_list", - "description": "List evaluation taxonomies", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "inputName", - "in": "query", - "required": false, - "description": "Filter by the evaluation input name.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "inputType", - "in": "query", - "required": false, - "description": "Filter by taxonomy input type.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedEvaluationTaxonomy" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluation Taxonomies" - ] - } - }, - "/evaluationtaxonomies/{name}": { - "get": { - "operationId": "EvaluationTaxonomies_get", - "description": "Get an evaluation run by name.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluation Taxonomies" - ] - }, - "delete": { - "operationId": "EvaluationTaxonomies_delete", - "description": "Delete an evaluation taxonomy by name.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluation Taxonomies" - ] - }, - "put": { - "operationId": "EvaluationTaxonomies_create", - "description": "Create an evaluation taxonomy.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the evaluation taxonomy.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluation Taxonomies" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomyCreateOrUpdate" - } - } - }, - "description": "The evaluation taxonomy." - } - }, - "patch": { - "operationId": "EvaluationTaxonomies_update", - "description": "Update an evaluation taxonomy.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the evaluation taxonomy.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluation Taxonomies" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomyUpdate" - } - } - }, - "description": "The evaluation taxonomy." - } - } - }, - "/evaluators": { - "get": { - "operationId": "Evaluators_listLatestVersions", - "description": "List the latest version of each evaluator", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/EvaluatorType" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "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 default is 20.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedEvaluatorVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluators" - ] - } - }, - "/evaluators/{name}/versions": { - "get": { - "operationId": "Evaluators_listVersions", - "description": "List all versions of the given evaluator", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/EvaluatorType" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "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 default is 20.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedEvaluatorVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluators" - ] - }, - "post": { - "operationId": "Evaluators_createVersion", - "description": "Create a new EvaluatorVersion with auto incremented version id", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - } - ], - "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluators" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorVersionCreate" - } - } - } - } - } - }, - "/evaluators/{name}/versions/{version}": { - "get": { - "operationId": "Evaluators_getVersion", - "description": "Get the specific version of the EvaluatorVersion. The service returns 404 Not Found error if the EvaluatorVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the EvaluatorVersion to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluators" - ] - }, - "delete": { - "operationId": "Evaluators_deleteVersion", - "description": "Delete the specific version of the EvaluatorVersion. The service returns 204 No Content if the EvaluatorVersion was deleted successfully or if the EvaluatorVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version of the EvaluatorVersion to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluators" - ] - }, - "patch": { - "operationId": "Evaluators_updateVersion", - "description": "Update an existing EvaluatorVersion with the given version id", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version of the EvaluatorVersion to update.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Evaluators" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorVersionUpdate" - } - } - }, - "description": "Evaluator resource" - } - } - }, - "/indexes": { - "get": { - "operationId": "Indexes_listLatest", - "description": "List the latest version of each Index", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedIndex" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ] - } - }, - "/indexes/{name}/versions": { - "get": { - "operationId": "Indexes_listVersions", - "description": "List all versions of the given Index", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedIndex" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ] - } - }, - "/indexes/{name}/versions/{version}": { - "get": { - "operationId": "Indexes_getVersion", - "description": "Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the Index to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Index" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ] - }, - "delete": { - "operationId": "Indexes_deleteVersion", - "description": "Delete the specific version of the Index. The service returns 204 No Content if the Index was deleted successfully or if the Index does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version of the Index to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ] - }, - "patch": { - "operationId": "Indexes_createOrUpdateVersion", - "description": "Create a new or update an existing Index with the given version id", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the Index to create or update.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Index" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Index" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Indexes" - ], - "requestBody": { - "required": true, - "content": { - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/IndexUpdate" - } - } - }, - "description": "The Index to create or update." - } - } - }, - "/insights": { - "post": { - "operationId": "Insights_generate", - "description": "Generate Insights", - "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": [ - "Insights=V1Preview" - ] - } - }, - { - "name": "Repeatability-Request-ID", - "in": "header", - "required": false, - "description": "Unique, client-generated identifier for ensuring request idempotency. Use the same ID for retries to prevent duplicate evaluations.", - "schema": { - "type": "string" - } - }, - { - "name": "Repeatability-First-Sent", - "in": "header", - "required": false, - "description": "Timestamp indicating when this request was first initiated. Used in conjunction with repeatability-request-id for idempotency control.", - "schema": { - "type": "string", - "format": "http-date" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Insight" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Insights" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Insight" - } - } - }, - "description": "Complete evaluation configuration including data source, evaluators, and result settings" - } - }, - "get": { - "operationId": "Insights_list", - "description": "List all insights in reverse chronological order (newest first).", - "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": [ - "Insights=V1Preview" - ] - } - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter by the type of analysis.", - "schema": { - "$ref": "#/components/schemas/InsightType" - }, - "explode": false - }, - { - "name": "evalId", - "in": "query", - "required": false, - "description": "Filter by the evaluation ID.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "runId", - "in": "query", - "required": false, - "description": "Filter by the evaluation run ID.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "agentName", - "in": "query", - "required": false, - "description": "Filter by the agent name.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "includeCoordinates", - "in": "query", - "required": false, - "description": "Whether to include coordinates for visualization in the response. Defaults to false.", - "schema": { - "type": "boolean" - }, - "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": { - "$ref": "#/components/schemas/PagedInsight" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Insights" - ] - } - }, - "/insights/{id}": { - "get": { - "operationId": "Insights_get", - "description": "Get a specific insight by Id.", - "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": [ - "Insights=V1Preview" - ] - } - }, - { - "name": "includeCoordinates", - "in": "query", - "required": false, - "description": "Whether to include coordinates for visualization in the response. Defaults to false.", - "schema": { - "type": "boolean" - }, - "explode": false - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "The unique identifier for the insights report.", - "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/Insight" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Insights" - ] - } - }, - "/memory_stores": { - "post": { - "operationId": "createMemoryStore", - "description": "Create a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "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/MemoryStoreObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the memory store." - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the memory store." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the memory store." - }, - "definition": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreDefinition" - } - ], - "description": "The memory store definition." - } - }, - "required": [ - "name", - "definition" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "get": { - "operationId": "listMemoryStores", - "description": "List all memory stores.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "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/MemoryStoreObject" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - } - }, - "/memory_stores/{name}": { - "post": { - "operationId": "updateMemoryStore", - "description": "Update a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store to update.", - "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/MemoryStoreObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the memory store." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the memory store." - } - } - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "get": { - "operationId": "getMemoryStore", - "description": "Retrieve a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store to retrieve.", - "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/MemoryStoreObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "delete": { - "operationId": "deleteMemoryStore", - "description": "Delete a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store to delete.", - "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/DeleteMemoryStoreResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - } - }, - "/memory_stores/{name}/memories": { - "post": { - "operationId": "createMemory", - "description": "Create a memory item in a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store.", - "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/MemoryItem" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scope": { - "type": "string", - "description": "The namespace that logically groups and isolates memories, such as a user ID." - }, - "content": { - "type": "string", - "description": "The content of the memory." - }, - "kind": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryItemKind" - } - ], - "description": "The kind of the memory item." - } - }, - "required": [ - "scope", - "content", - "kind" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "get": { - "operationId": "listMemories", - "description": "List all memory items in a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store.", - "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", - "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/MemoryItem" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - } - }, - "/memory_stores/{name}/memories/{memory_id}": { - "post": { - "operationId": "updateMemory", - "description": "Update a memory item in a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store.", - "schema": { - "type": "string" - } - }, - { - "name": "memory_id", - "in": "path", - "required": true, - "description": "The ID of the memory item to update.", - "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/MemoryItem" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "The updated content of the memory." - } - }, - "required": [ - "content" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "get": { - "operationId": "getMemory", - "description": "Retrieve a memory item from a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store.", - "schema": { - "type": "string" - } - }, - { - "name": "memory_id", - "in": "path", - "required": true, - "description": "The ID of the memory item to retrieve.", - "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/MemoryItem" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "delete": { - "operationId": "deleteMemory", - "description": "Delete a memory item from a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store.", - "schema": { - "type": "string" - } - }, - { - "name": "memory_id", - "in": "path", - "required": true, - "description": "The ID of the memory item to delete.", - "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/DeleteMemoryResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - } - }, - "/memory_stores/{name}/updates/{update_id}": { - "get": { - "operationId": "getUpdateResult", - "description": "Get memory store update result.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store.", - "schema": { - "type": "string" - } - }, - { - "name": "update_id", - "in": "path", - "required": true, - "description": "The ID of the memory update operation.", - "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/MemoryStoreUpdateResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - } - }, - "/memory_stores/{name}:delete_scope": { - "post": { - "operationId": "deleteScopeMemories", - "description": "Delete all memories associated with a specific scope from a memory store.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store.", - "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/MemoryStoreDeleteScopeResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scope": { - "type": "string", - "description": "The namespace that logically groups and isolates memories to delete, such as a user ID." - } - }, - "required": [ - "scope" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - } - }, - "/memory_stores/{name}:search_memories": { - "post": { - "operationId": "searchMemories", - "description": "Search for relevant memories from a memory store based on conversation context.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store to search.", - "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/MemoryStoreSearchResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scope": { - "type": "string", - "description": "The namespace that logically groups and isolates memories, such as a user ID." - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - }, - "description": "Items for which to search for relevant memories." - }, - "previous_search_id": { - "type": "string", - "description": "The unique ID of the previous search request, enabling incremental memory search from where the last operation left off." - }, - "options": { - "allOf": [ - { - "$ref": "#/components/schemas/MemorySearchOptions" - } - ], - "description": "Memory search options." - } - }, - "required": [ - "scope" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - } - }, - "/memory_stores/{name}:update_memories": { - "post": { - "operationId": "updateMemories", - "description": "Update memory store with conversation memories.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "MemoryStores=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the memory store to update.", - "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": { - "202": { - "description": "The request has been accepted for processing, but processing has not yet completed.", - "headers": { - "Operation-Location": { - "required": true, - "description": "The location for monitoring the operation state.", - "schema": { - "type": "string", - "format": "uri" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemoryStoreUpdateResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Memory Stores" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "scope": { - "type": "string", - "description": "The namespace that logically groups and isolates memories, such as a user ID." - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - }, - "description": "Conversation items to be stored in memory." - }, - "previous_update_id": { - "type": "string", - "description": "The unique ID of the previous update request, enabling incremental memory updates from where the last operation left off." - }, - "update_delay": { - "type": "integer", - "format": "int32", - "description": "Timeout period before processing the memory update in seconds.\nIf a new update request is received during this period, it will cancel the current request and reset the timeout.\nSet to 0 to immediately trigger the update without delay.\nDefaults to 300 (5 minutes).", - "default": 300 - } - }, - "required": [ - "scope" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - } - }, - "/models": { - "get": { - "operationId": "Models_listLatest", - "description": "List the latest version of each ModelVersion", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Models=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedModelVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Models" - ] - } - }, - "/models/{name}/versions": { - "get": { - "operationId": "Models_listVersions", - "description": "List all versions of the given ModelVersion", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Models=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedModelVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Models" - ] - } - }, - "/models/{name}/versions/{version}": { - "get": { - "operationId": "Models_getVersion", - "description": "Get the specific version of the ModelVersion. The service returns 404 Not Found error if the ModelVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Models=V1Preview" - ] - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the ModelVersion to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Models" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Models=V1Preview" - ] - } - }, - "delete": { - "operationId": "Models_deleteVersion", - "description": "Delete the specific version of the ModelVersion. The service returns 200 OK if the ModelVersion was deleted successfully or if the ModelVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Models=V1Preview" - ] - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version of the ModelVersion to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Models" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Models=V1Preview" - ] - } - }, - "patch": { - "operationId": "Models_updateVersion", - "description": "Update an existing ModelVersion with the given version id", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the UpdateModelVersionRequest to create or update.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Models=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelVersion" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Models" - ], - "requestBody": { - "required": true, - "content": { - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/UpdateModelVersionRequest" - } - } - }, - "description": "The UpdateModelVersionRequest to create or update." - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Models=V1Preview" - ] - } - } - }, - "/models/{name}/versions/{version}/createAsync": { - "post": { - "operationId": "Models_createAsync", - "description": "Creates a model version asynchronously with blob content validation. Returns 202 Accepted with a Location header for polling.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Models=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "Name of the model.", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "Version of the model.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "202": { - "description": "Accepted response for asynchronous model version creation, with polling location.", - "headers": { - "Location": { - "required": false, - "description": "URL to poll for operation status.", - "schema": { - "type": "string", - "format": "uri" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "location": { - "type": "string", - "format": "uri", - "description": "URL to poll for operation status." - }, - "operationResult": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "URL to the operation result, or null if the operation is still in progress." - } - } - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Models" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelVersion" - } - } - }, - "description": "Model version to create." - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Models=V1Preview" - ] - } - } - }, - "/models/{name}/versions/{version}/credentials": { - "post": { - "operationId": "Models_getCredentials", - "description": "Get credentials for a model version asset.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Models=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "Name of the model.", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "Version of the model.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetCredentialResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Models" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelCredentialRequest" - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Models=V1Preview" - ] - } - } - }, - "/models/{name}/versions/{version}/startPendingUpload": { - "post": { - "operationId": "Models_startPendingUpload", - "description": "Start or retrieve a pending upload for a model version.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Models=V1Preview" - ] - } - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "Name of the model.", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "Version of the model.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelPendingUploadResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Models" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelPendingUploadRequest" - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Models=V1Preview" - ] - } - } - }, - "/openai/v1/conversations": { - "post": { - "operationId": "createConversation", - "description": "Create a conversation.", - "parameters": [], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Conversations" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CreateConversationBody" - } - } - } - } - }, - "get": { - "operationId": "listConversations", - "description": "Returns the list of all conversations.", - "parameters": [ - { - "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": "agent_name", - "in": "query", - "required": false, - "description": "Filter by agent name. If provided, only items associated with the specified agent will be returned.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "agent_id", - "in": "query", - "required": false, - "description": "Filter by agent ID in the format `name:version`. If provided, only items associated with the specified agent ID will be returned.", - "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/OpenAI.ConversationResource" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Conversations" - ] - } - }, - "/openai/v1/conversations/{conversation_id}": { - "post": { - "operationId": "updateConversation", - "description": "Update a conversation.", - "parameters": [ - { - "name": "conversation_id", - "in": "path", - "required": true, - "description": "The id of the conversation to update.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Conversations" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.UpdateConversationBody" - } - } - } - } - }, - "get": { - "operationId": "getConversation", - "description": "Retrieves a conversation.", - "parameters": [ - { - "name": "conversation_id", - "in": "path", - "required": true, - "description": "The id of the conversation to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Conversations" - ] - }, - "delete": { - "operationId": "deleteConversation", - "description": "Deletes a conversation.", - "parameters": [ - { - "name": "conversation_id", - "in": "path", - "required": true, - "description": "The id of the conversation to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.DeletedConversationResource" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Conversations" - ] - } - }, - "/openai/v1/conversations/{conversation_id}/items": { - "post": { - "operationId": "createConversationItems", - "description": "Create items in a conversation with the given ID.", - "parameters": [ - { - "name": "conversation_id", - "in": "path", - "required": true, - "description": "The id of the conversation on which the item needs to be created.", - "schema": { - "type": "string" - } - }, - { - "name": "include", - "in": "query", - "required": false, - "description": "Additional fields to include in the response.\nSee the `include` parameter for listing Conversation items for more information.", - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "explode": false - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationItemList" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Conversations" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Item" - }, - "maxItems": 20, - "description": "The items to add to the conversation. You may add up to 20 items at a time." - } - }, - "required": [ - "items" - ] - } - } - } - } - }, - "get": { - "operationId": "listConversationItems", - "description": "List all items for a conversation with the given ID.", - "parameters": [ - { - "name": "conversation_id", - "in": "path", - "required": true, - "description": "The id of the conversation on which the items needs to be listed.", - "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": "item_type", - "in": "query", - "required": false, - "description": "Filter by item type. If provided, only items of the specified type will be returned.", - "schema": { - "$ref": "#/components/schemas/OpenAI.ItemType" - }, - "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/OpenAI.OutputItem" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Conversations" - ] - } - }, - "/openai/v1/conversations/{conversation_id}/items/{item_id}": { - "get": { - "operationId": "getConversationItem", - "description": "Get a single item from a conversation with the given IDs.", - "parameters": [ - { - "name": "conversation_id", - "in": "path", - "required": true, - "description": "The ID of the conversation that contains the item.", - "schema": { - "type": "string" - } - }, - { - "name": "item_id", - "in": "path", - "required": true, - "description": "The id of the conversation item to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Conversations" - ] - }, - "delete": { - "operationId": "deleteConversationItem", - "description": "Delete an item from a conversation with the given IDs.", - "parameters": [ - { - "name": "conversation_id", - "in": "path", - "required": true, - "description": "The id of the conversation on which the item needs to be deleted from.", - "schema": { - "type": "string" - } - }, - { - "name": "item_id", - "in": "path", - "required": true, - "description": "The id of the conversation item to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Conversations" - ] - } - }, - "/openai/v1/evals": { - "get": { - "operationId": "Evals_listEvals", - "summary": "List all evaluations", - "description": "List evaluations for a project.", - "parameters": [ - { - "name": "after", - "in": "query", - "required": false, - "description": "Identifier for the last run from the previous pagination request.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "Number of runs to retrieve.", - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "default": 20 - }, - "explode": false - }, - { - "name": "order", - "in": "query", - "required": false, - "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "asc" - }, - "explode": false - }, - { - "name": "order_by", - "in": "query", - "required": false, - "description": "Evals can be ordered by creation time or last updated time.\nUse `created_at` for creation time or `updated_at` for last updated time.", - "schema": { - "type": "string", - "enum": [ - "created_at", - "updated_at" - ], - "default": "created_at" - } - } - ], - "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/Eval" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ] - }, - "post": { - "operationId": "Evals_createEval", - "summary": "Create evaluation", - "description": "Create the structure of an evaluation that can be used to test a model's performance.\nAn evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.\nFor more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals).", - "parameters": [], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eval" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateEvalRequest" - } - } - } - } - } - }, - "/openai/v1/evals/{eval_id}": { - "delete": { - "operationId": "Evals_deleteEval", - "summary": "Delete an evaluation", - "description": "Delete an evaluation.", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "description": "The ID of the evaluation to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteEvalResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ] - }, - "get": { - "operationId": "Evals_getEval", - "summary": "Get an evaluation", - "description": "Get an evaluation by ID.", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "description": "The ID of the evaluation to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eval" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ] - }, - "post": { - "operationId": "Evals_updateEval", - "summary": "Update an evaluation", - "description": "Update certain properties of an evaluation.", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "description": "The ID of the evaluation to update.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eval" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateEvalParametersBody" - } - } - } - } - } - }, - "/openai/v1/evals/{eval_id}/runs": { - "get": { - "operationId": "Evals_listRuns", - "summary": "Get a list of runs for an evaluation", - "description": "Get a list of runs for an evaluation.", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "description": "The ID of the evaluation to retrieve runs for.", - "schema": { - "type": "string" - } - }, - { - "name": "after", - "in": "query", - "required": false, - "description": "Identifier for the last run from the previous pagination request.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "Number of runs to retrieve.", - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "default": 20 - }, - "explode": false - }, - { - "name": "order", - "in": "query", - "required": false, - "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "asc" - }, - "explode": false - }, - { - "name": "status", - "in": "query", - "required": false, - "description": "Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` | `canceled`.", - "schema": { - "type": "string", - "enum": [ - "queued", - "in_progress", - "completed", - "canceled", - "failed" - ] - }, - "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/EvalRun" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ] - }, - "post": { - "operationId": "Evals_createEvalRun", - "summary": "Create evaluation run", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "description": "The ID of the evaluation to create a run for.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalRun" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateEvalRunRequest" - } - } - } - } - } - }, - "/openai/v1/evals/{eval_id}/runs/{run_id}": { - "delete": { - "operationId": "Evals_deleteEvalRun", - "summary": "Delete evaluation run", - "description": "Delete an eval run.", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "description": "The ID of the evaluation to delete the run from.", - "schema": { - "type": "string" - } - }, - { - "name": "run_id", - "in": "path", - "required": true, - "description": "The ID of the run to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteEvalRunResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ] - }, - "get": { - "operationId": "Evals_getEvalRun", - "summary": "Get an evaluation run", - "description": "Get an evaluation run by ID.", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "description": "The ID of the evaluation to retrieve runs for.", - "schema": { - "type": "string" - } - }, - { - "name": "run_id", - "in": "path", - "required": true, - "description": "The ID of the run to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalRun" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ] - }, - "post": { - "operationId": "Evals_cancelEvalRun", - "summary": "Cancel evaluation run", - "description": "Cancel an ongoing evaluation run.", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "description": "The ID of the evaluation whose run you want to cancel.", - "schema": { - "type": "string" - } - }, - { - "name": "run_id", - "in": "path", - "required": true, - "description": "The ID of the run to cancel.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalRun" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ] - } - }, - "/openai/v1/evals/{eval_id}/runs/{run_id}/output_items": { - "get": { - "operationId": "Evals_getEvalRunOutputItems", - "summary": "Get evaluation run output items", - "description": "Get a list of output items for an evaluation run.", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "run_id", - "in": "path", - "required": true, - "description": "The ID of the run to retrieve output items for.", - "schema": { - "type": "string" - } - }, - { - "name": "after", - "in": "query", - "required": false, - "description": "Identifier for the last run from the previous pagination request.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "Number of runs to retrieve.", - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "default": 20 - }, - "explode": false - }, - { - "name": "order", - "in": "query", - "required": false, - "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "asc" - }, - "explode": false - }, - { - "name": "status", - "in": "query", - "required": false, - "description": "Filter output items by status. Use `failed` to filter by failed output\nitems or `pass` to filter by passed output items.", - "schema": { - "type": "string", - "enum": [ - "fail", - "pass" - ] - } - } - ], - "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/EvalRunOutputItem" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ] - } - }, - "/openai/v1/evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}": { - "get": { - "operationId": "Evals_getEvalRunOutputItem", - "summary": "Get an output item of an evaluation run", - "description": "Get an evaluation run output item by ID.", - "parameters": [ - { - "name": "eval_id", - "in": "path", - "required": true, - "description": "The ID of the evaluation to retrieve runs for.", - "schema": { - "type": "string" - } - }, - { - "name": "run_id", - "in": "path", - "required": true, - "description": "The ID of the run to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "output_item_id", - "in": "path", - "required": true, - "description": "The ID of the output item to retrieve.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalRunOutputItem" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Evals" - ] - } - }, - "/openai/v1/fine_tuning/jobs": { - "post": { - "operationId": "createFineTuningJob", - "description": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)", - "parameters": [ - { - "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/OpenAI.FineTuningJob" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Fine-Tuning" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequest" - } - } - } - } - }, - "get": { - "operationId": "listPaginatedFineTuningJobs", - "description": "List your organization's fine-tuning jobs", - "parameters": [ - { - "name": "after", - "in": "query", - "required": false, - "description": "Identifier for the last job from the previous pagination request.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "Number of fine-tuning jobs to retrieve.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "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": { - "$ref": "#/components/schemas/OpenAI.ListPaginatedFineTuningJobsResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Fine-Tuning" - ] - } - }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}": { - "get": { - "operationId": "retrieveFineTuningJob", - "description": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)", - "parameters": [ - { - "name": "fine_tuning_job_id", - "in": "path", - "required": true, - "description": "The ID of the fine-tuning job.", - "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/OpenAI.FineTuningJob" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Fine-Tuning" - ] - } - }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel": { - "post": { - "operationId": "cancelFineTuningJob", - "description": "Immediately cancel a fine-tune job.", - "parameters": [ - { - "name": "fine_tuning_job_id", - "in": "path", - "required": true, - "description": "The ID of the fine-tuning 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/OpenAI.FineTuningJob" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Fine-Tuning" - ] - } - }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints": { - "get": { - "operationId": "listFineTuningJobCheckpoints", - "description": "List checkpoints for a fine-tuning job.", - "parameters": [ - { - "name": "fine_tuning_job_id", - "in": "path", - "required": true, - "description": "The ID of the fine-tuning job to get checkpoints for.", - "schema": { - "type": "string" - } - }, - { - "name": "after", - "in": "query", - "required": false, - "description": "Identifier for the last checkpoint ID from the previous pagination request.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "Number of checkpoints to retrieve.", - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - }, - "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": { - "$ref": "#/components/schemas/OpenAI.ListFineTuningJobCheckpointsResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Fine-Tuning" - ] - } - }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/events": { - "get": { - "operationId": "listFineTuningJobEvents", - "description": "Get fine-grained status updates for a fine-tuning job.", - "parameters": [ - { - "name": "fine_tuning_job_id", - "in": "path", - "required": true, - "description": "The ID of the fine-tuning job to get events for.", - "schema": { - "type": "string" - } - }, - { - "name": "after", - "in": "query", - "required": false, - "description": "Identifier for the last event from the previous pagination request.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "limit", - "in": "query", - "required": false, - "description": "Number of events to retrieve.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "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": { - "$ref": "#/components/schemas/OpenAI.ListFineTuningJobEventsResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Fine-Tuning" - ] - } - }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/pause": { - "post": { - "operationId": "pauseFineTuningJob", - "description": "Pause a running fine-tune job.", - "parameters": [ - { - "name": "fine_tuning_job_id", - "in": "path", - "required": true, - "description": "The ID of the fine-tuning job to pause.", - "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/OpenAI.FineTuningJob" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Fine-Tuning" - ] - } - }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/resume": { - "post": { - "operationId": "resumeFineTuningJob", - "description": "Resume a paused fine-tune job.", - "parameters": [ - { - "name": "fine_tuning_job_id", - "in": "path", - "required": true, - "description": "The ID of the fine-tuning job to resume.", - "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/OpenAI.FineTuningJob" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Fine-Tuning" - ] - } - }, - "/openai/v1/responses": { - "post": { - "operationId": "createResponse_createResponseStream", - "parameters": [], - "description": "Creates a model response. Creates a model response (streaming response).", - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-agent-session-id": { - "required": false, - "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.Response" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CreateResponseStreamingResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Responses" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "top_logprobs": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "temperature": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true, - "default": 1 - }, - "top_p": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true, - "default": 1 - }, - "user": { - "type": "string", - "description": "This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\n A stable identifier for your end-users.\n Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).", - "deprecated": true - }, - "safety_identifier": { - "type": "string", - "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\n The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers)." - }, - "prompt_cache_key": { - "type": "string", - "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching)." - }, - "service_tier": { - "$ref": "#/components/schemas/OpenAI.ServiceTier" - }, - "prompt_cache_retention": { - "type": "string", - "enum": [ - "in-memory", - "24h" - ], - "nullable": true - }, - "previous_response_id": { - "type": "string", - "nullable": true - }, - "model": { - "type": "string", - "description": "The model deployment to use for the creation of this response." - }, - "reasoning": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Reasoning" - } - ], - "nullable": true - }, - "background": { - "type": "boolean", - "nullable": true - }, - "max_output_tokens": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "max_tool_calls": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "text": { - "$ref": "#/components/schemas/OpenAI.ResponseTextParam" - }, - "tools": { - "$ref": "#/components/schemas/OpenAI.ToolsArray" - }, - "tool_choice": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceOptions" - }, - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ] - }, - "prompt": { - "$ref": "#/components/schemas/OpenAI.Prompt" - }, - "truncation": { - "type": "string", - "enum": [ - "auto", - "disabled" - ], - "nullable": true, - "default": "disabled" - }, - "input": { - "$ref": "#/components/schemas/OpenAI.InputParam" - }, - "include": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.IncludeEnum" - }, - "nullable": true - }, - "parallel_tool_calls": { - "type": "boolean", - "nullable": true, - "default": true - }, - "store": { - "type": "boolean", - "nullable": true, - "default": true - }, - "instructions": { - "type": "string", - "nullable": true - }, - "stream": { - "type": "boolean", - "nullable": true - }, - "stream_options": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseStreamOptions" - } - ], - "nullable": true - }, - "conversation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationParam" - } - ], - "nullable": true - }, - "context_management": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ContextManagementParam" - }, - "nullable": true, - "description": "Context management configuration for this request." - }, - "agent_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentReference" - } - ], - "description": "The agent to use for generating the response." - }, - "structured_inputs": { - "type": "object", - "additionalProperties": {}, - "description": "The structured inputs to the response that can participate in prompt template substitution or tool argument bindings." - } - } - }, - { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "top_logprobs": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "temperature": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true, - "default": 1 - }, - "top_p": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true, - "default": 1 - }, - "user": { - "type": "string", - "description": "This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\n A stable identifier for your end-users.\n Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).", - "deprecated": true - }, - "safety_identifier": { - "type": "string", - "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\n The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers)." - }, - "prompt_cache_key": { - "type": "string", - "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching)." - }, - "service_tier": { - "$ref": "#/components/schemas/OpenAI.ServiceTier" - }, - "prompt_cache_retention": { - "type": "string", - "enum": [ - "in-memory", - "24h" - ], - "nullable": true - }, - "previous_response_id": { - "type": "string", - "nullable": true - }, - "model": { - "type": "string", - "description": "The model deployment to use for the creation of this response." - }, - "reasoning": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Reasoning" - } - ], - "nullable": true - }, - "background": { - "type": "boolean", - "nullable": true - }, - "max_output_tokens": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "max_tool_calls": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "text": { - "$ref": "#/components/schemas/OpenAI.ResponseTextParam" - }, - "tools": { - "$ref": "#/components/schemas/OpenAI.ToolsArray" - }, - "tool_choice": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceOptions" - }, - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ] - }, - "prompt": { - "$ref": "#/components/schemas/OpenAI.Prompt" - }, - "truncation": { - "type": "string", - "enum": [ - "auto", - "disabled" - ], - "nullable": true, - "default": "disabled" - }, - "input": { - "$ref": "#/components/schemas/OpenAI.InputParam" - }, - "include": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.IncludeEnum" - }, - "nullable": true - }, - "parallel_tool_calls": { - "type": "boolean", - "nullable": true, - "default": true - }, - "store": { - "type": "boolean", - "nullable": true, - "default": true - }, - "instructions": { - "type": "string", - "nullable": true - }, - "stream": { - "type": "boolean", - "nullable": true - }, - "stream_options": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseStreamOptions" - } - ], - "nullable": true - }, - "conversation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationParam" - } - ], - "nullable": true - }, - "context_management": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ContextManagementParam" - }, - "nullable": true, - "description": "Context management configuration for this request." - }, - "agent_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentReference" - } - ], - "description": "The agent to use for generating the response." - }, - "structured_inputs": { - "type": "object", - "additionalProperties": {}, - "description": "The structured inputs to the response that can participate in prompt template substitution or tool argument bindings." - } - } - } - ] - } - } - } - } - }, - "get": { - "operationId": "listResponses", - "description": "Returns the list of all responses.", - "parameters": [ - { - "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": "agent_name", - "in": "query", - "required": false, - "description": "Filter by agent name. If provided, only items associated with the specified agent will be returned.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "agent_id", - "in": "query", - "required": false, - "description": "Filter by agent ID in the format `name:version`. If provided, only items associated with the specified agent ID will be returned.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "conversation_id", - "in": "query", - "required": false, - "description": "Filter by conversation ID. If provided, only responses associated with the specified conversation will be returned.", - "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/OpenAI.Response" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Responses" - ] - } - }, - "/openai/v1/responses/compact": { - "post": { - "operationId": "compactResponseConversation", - "description": "Produces a compaction of a responses conversation.", - "parameters": [], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CompactResource" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Responses" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CompactResponseMethodPublicBody" - } - } - } - } - } - }, - "/openai/v1/responses/{response_id}": { - "get": { - "operationId": "getResponse_getResponseStream", - "parameters": [ - { - "name": "response_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "include[]", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.IncludeEnum" - }, - "default": [] - } - }, - { - "name": "stream", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "explode": false - }, - { - "name": "starting_after", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32" - }, - "explode": false - }, - { - "name": "accept", - "in": "header", - "required": false, - "schema": { - "type": "string", - "enum": [ - "text/event-stream" - ] - } - } - ], - "description": "Retrieves a model response with the given ID. Retrieves a model response with the given ID (streaming response).", - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-agent-session-id": { - "required": false, - "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.Response" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CreateResponseStreamingResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Responses" - ] - }, - "delete": { - "operationId": "deleteResponse", - "description": "Deletes a model response.", - "parameters": [ - { - "name": "response_id", - "in": "path", - "required": true, - "description": "The ID of the response to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-agent-session-id": { - "required": false, - "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteResponseResult" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Responses" - ] - } - }, - "/openai/v1/responses/{response_id}/cancel": { - "post": { - "operationId": "cancelResponse", - "description": "Cancels a model response.", - "parameters": [ - { - "name": "response_id", - "in": "path", - "required": true, - "description": "The ID of the response to cancel.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-agent-session-id": { - "required": false, - "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OpenAI.Response" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Responses" - ] - } - }, - "/openai/v1/responses/{response_id}/input_items": { - "get": { - "operationId": "listInputItems", - "description": "Returns a list of input items for a given response.", - "parameters": [ - { - "name": "response_id", - "in": "path", - "required": true, - "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 - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "headers": { - "x-agent-session-id": { - "required": false, - "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ItemResource" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Responses" - ] - } - }, - "/redTeams/runs": { - "get": { - "operationId": "RedTeams_list", - "description": "List a redteam by name.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "RedTeams=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedRedTeam" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Redteams" - ] - } - }, - "/redTeams/runs/{name}": { - "get": { - "operationId": "RedTeams_get", - "description": "Get a redteam by name.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "Identifier of the red team run.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "RedTeams=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RedTeam" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Redteams" - ] - } - }, - "/redTeams/runs:run": { - "post": { - "operationId": "RedTeams_create", - "description": "Creates a redteam run.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "RedTeams=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RedTeam" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Redteams" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RedTeam" - } - } - }, - "description": "Redteam to be run" - } - } - }, - "/schedules": { - "get": { - "operationId": "Schedules_list", - "description": "List all schedules.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter by the type of schedule.", - "schema": { - "$ref": "#/components/schemas/ScheduleTaskType" - }, - "explode": false - }, - { - "name": "enabled", - "in": "query", - "required": false, - "description": "Filter by the enabled status.", - "schema": { - "type": "boolean" - }, - "explode": false - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Schedules=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedSchedule" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - } - }, - "/schedules/{id}": { - "delete": { - "operationId": "Schedules_delete", - "description": "Delete a schedule.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "Identifier of the schedule.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Schedules=V1Preview" - ] - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - }, - "get": { - "operationId": "Schedules_get", - "description": "Get a schedule by id.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "Identifier of the schedule.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Schedules=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Schedule" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - }, - "put": { - "operationId": "Schedules_createOrUpdate", - "description": "Create or update operation template.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "Identifier of the schedule.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Schedules=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Schedule" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Schedule" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Schedules" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Schedule" - } - } - }, - "description": "The resource instance." - } - } - }, - "/schedules/{id}/runs": { - "get": { - "operationId": "Schedules_listRuns", - "description": "List all schedule runs.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "Identifier of the schedule.", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter by the type of schedule.", - "schema": { - "$ref": "#/components/schemas/ScheduleTaskType" - }, - "explode": false - }, - { - "name": "enabled", - "in": "query", - "required": false, - "description": "Filter by the enabled status.", - "schema": { - "type": "boolean" - }, - "explode": false - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Schedules=V1Preview" - ] - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PagedScheduleRun" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - } - }, - "/schedules/{schedule_id}/runs/{run_id}": { - "get": { - "operationId": "Schedules_getRun", - "description": "Get a schedule run by id.", - "parameters": [ - { - "name": "schedule_id", - "in": "path", - "required": true, - "description": "The unique identifier of the schedule.", - "schema": { - "type": "string" - } - }, - { - "name": "run_id", - "in": "path", - "required": true, - "description": "The unique identifier of the schedule run.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Schedules=V1Preview" - ] - } - }, - { - "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/ScheduleRun" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - } - }, - "/skills": { - "post": { - "operationId": "Skills_createSkill", - "description": "Creates a skill.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SkillObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 63, - "description": "The unique name of the skill." - }, - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill." - }, - "instructions": { - "type": "string", - "maxLength": 102400, - "description": "Instructions that define the behavior of the skill." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - } - }, - "required": [ - "name" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - }, - "get": { - "operationId": "Skills_listSkills", - "description": "Returns the list of all skills.", - "parameters": [ - { - "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": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "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/SkillObject" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/skills/{name}": { - "get": { - "operationId": "Skills_getSkill", - "description": "Retrieves a skill.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The unique name of the skill.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "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/SkillObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - }, - "post": { - "operationId": "Skills_updateSkill", - "description": "Updates an existing skill.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The unique name of the skill.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "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/SkillObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill." - }, - "instructions": { - "type": "string", - "maxLength": 102400, - "description": "Instructions that define the behavior of the skill." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - } - } - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - }, - "delete": { - "operationId": "Skills_deleteSkill", - "description": "Deletes a skill.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The unique name of the skill.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "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/DeleteSkillResponse" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/skills/{name}:download": { - "get": { - "operationId": "Skills_downloadSkill", - "description": "Downloads a skill package.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The unique name of the skill.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "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 response body for downloading a skill package.", - "content": { - "application/zip": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/skills:import": { - "post": { - "operationId": "Skills_createSkillFromPackage", - "description": "Creates a skill from a zip package.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SkillObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "requestBody": { - "required": true, - "content": { - "application/zip": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "description": "The zip package used to create the skill." - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/toolboxes": { - "get": { - "operationId": "listToolboxes", - "description": "List all toolboxes.", - "parameters": [ - { - "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": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Toolboxes=V1Preview" - ] - } - }, - { - "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/ToolboxObject" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolboxes=V1Preview" - ] - } - } - }, - "/toolboxes/{name}": { - "get": { - "operationId": "getToolbox", - "description": "Retrieve a toolbox.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Toolboxes=V1Preview" - ] - } - }, - { - "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/ToolboxObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolboxes=V1Preview" - ] - } - }, - "patch": { - "operationId": "updateToolbox", - "description": "Update a toolbox to point to a specific version.", - "parameters": [ - { - "$ref": "#/components/parameters/UpdateToolboxRequest.name" - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Toolboxes=V1Preview" - ] - } - }, - { - "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/ToolboxObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateToolboxRequest" - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolboxes=V1Preview" - ] - } - }, - "delete": { - "operationId": "deleteToolbox", - "description": "Delete a toolbox and all its versions.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox to delete.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Toolboxes=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolboxes=V1Preview" - ] - } - } - }, - "/toolboxes/{name}/versions": { - "post": { - "operationId": "createToolboxVersion", - "description": "Create a new version of a toolbox. If the toolbox does not exist, it will be created.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox. If the toolbox does not exist, it will be created.", - "schema": { - "type": "string", - "maxLength": 256 - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Toolboxes=V1Preview" - ] - } - }, - { - "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/ToolboxVersionObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolbox." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the toolbox." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools to include in this version." - }, - "policies": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolboxPolicies" - } - ], - "description": "Policy configuration for this toolbox version." - } - }, - "required": [ - "tools" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolboxes=V1Preview" - ] - } - }, - "get": { - "operationId": "listToolboxVersions", - "description": "List all versions of a toolbox.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox to list versions for.", - "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": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Toolboxes=V1Preview" - ] - } - }, - { - "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/ToolboxVersionObject" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolboxes=V1Preview" - ] - } - } - }, - "/toolboxes/{name}/versions/{version}": { - "get": { - "operationId": "getToolboxVersion", - "description": "Retrieve a specific version of a toolbox.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox.", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version identifier to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Toolboxes=V1Preview" - ] - } - }, - { - "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/ToolboxVersionObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolboxes=V1Preview" - ] - } - }, - "delete": { - "operationId": "deleteToolboxVersion", - "description": "Delete a specific version of a toolbox.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox.", - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version identifier to delete.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Toolboxes=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolboxes=V1Preview" - ] - } - } - } - }, - "security": [ - { - "OAuth2Auth": [ - "https://ai.azure.com/.default" - ] - } - ], - "components": { - "parameters": { - "Azure.Core.ClientRequestIdHeader": { - "name": "x-ms-client-request-id", - "in": "header", - "required": false, - "description": "An opaque, globally-unique, client-generated string identifier for the request.", - "schema": { - "$ref": "#/components/schemas/Azure.Core.uuid" - } - }, - "Azure.Core.Foundations.ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string", - "minLength": 1 - }, - "explode": false - }, - "UpdateToolboxRequest.name": { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox to update.", - "schema": { - "type": "string" - } - } - }, - "schemas": { - "A2APreviewTool": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "a2a_preview" - ], - "description": "The type of the tool. Always `\"a2a_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." - }, - "base_url": { - "type": "string", - "format": "uri", - "description": "Base URL of the agent." - }, - "agent_card_path": { - "type": "string", - "description": "The path to the agent card relative to the `base_url`.\nIf not provided, defaults to `/.well-known/agent-card.json`" - }, - "project_connection_id": { - "type": "string", - "description": "The connection ID in the project for the A2A server.\nThe connection stores authentication and other connection details needed to connect to the A2A server." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "An agent implementing the A2A protocol." - }, - "A2AToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "a2a_preview_call" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the A2A agent card being called." - }, - "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": "An A2A (Agent-to-Agent) tool call." - }, - "A2AToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "a2a_preview_call_output" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the A2A agent card that was called." - }, - "output": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallOutputContent" - } - ], - "description": "The output from the A2A 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 an A2A (Agent-to-Agent) tool call." - }, - "AISearchIndexResource": { - "type": "object", - "properties": { - "project_connection_id": { - "type": "string", - "description": "An index connection ID in an IndexResource attached to this agent." - }, - "index_name": { - "type": "string", - "description": "The name of an index in an IndexResource attached to this agent." - }, - "query_type": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureAISearchQueryType" - } - ], - "description": "Type of query in an AIIndexResource attached to this agent." - }, - "top_k": { - "type": "integer", - "format": "int32", - "description": "Number of documents to retrieve from search and present to the model." - }, - "filter": { - "type": "string", - "description": "filter string for search resource. [Learn more here](https://learn.microsoft.com/azure/search/search-filters)." - }, - "index_asset_id": { - "type": "string", - "description": "Index asset id for search resource." - } - }, - "description": "A AI Search Index resource." - }, - "AgentBlueprintReference": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/AgentBlueprintReferenceType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "ManagedAgentIdentityBlueprint": "#/components/schemas/ManagedAgentIdentityBlueprintReference" - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentBlueprintReferenceType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "ManagedAgentIdentityBlueprint" - ] - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentCard": { - "type": "object", - "required": [ - "version", - "skills" - ], - "properties": { - "version": { - "type": "string", - "minLength": 1, - "maxLength": 32, - "description": "The version of the agent card." - }, - "description": { - "type": "string", - "maxLength": 2048, - "description": "The description of the agent card." - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentCardSkill" - }, - "maxItems": 16, - "description": "The set of skills that an agent can perform." - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentCardSkill": { - "type": "object", - "required": [ - "id", - "name" - ], - "properties": { - "id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "a unique identifier for the skill" - }, - "name": { - "type": "string", - "minLength": 1, - "maxLength": 128, - "description": "The name of the skill" - }, - "description": { - "type": "string", - "maxLength": 2048, - "description": "A description of the skill" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentCardSkillTag" - }, - "maxItems": 5, - "description": "set of tagwords describing classes of capabilities for the skill" - }, - "examples": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentCardSkillExample" - }, - "maxItems": 5, - "description": "A list of example scenarios that the skill can perform." - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentCardSkillExample": { - "type": "string", - "maxLength": 1024, - "description": "A skill example string with a maximum length of 1024 characters.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentCardSkillTag": { - "type": "string", - "maxLength": 32, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentCardUpdate": { - "type": "object", - "properties": { - "version": { - "type": "string", - "minLength": 1, - "maxLength": 32, - "description": "The version of the agent card." - }, - "description": { - "type": "string", - "maxLength": 2048, - "description": "The description of the agent card." - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentCardSkill" - }, - "maxItems": 16, - "description": "The set of skills that an agent can perform." - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentClusterInsightRequest": { - "type": "object", - "required": [ - "type", - "agentName" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "AgentClusterInsight" - ], - "description": "The type of request." - }, - "agentName": { - "type": "string", - "description": "Identifier for the agent." - }, - "modelConfiguration": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightModelConfiguration" - } - ], - "description": "Configuration of the model used in the insight generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightRequest" - } - ], - "description": "Insights on set of Agent Evaluation Results" - }, - "AgentClusterInsightResult": { - "type": "object", - "required": [ - "type", - "clusterInsight" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "AgentClusterInsight" - ], - "description": "The type of insights result." - }, - "clusterInsight": { - "$ref": "#/components/schemas/ClusterInsightResult" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "Insights from the agent cluster analysis." - }, - "AgentDefinition": { - "type": "object", - "required": [ - "kind" - ], - "properties": { - "kind": { - "$ref": "#/components/schemas/AgentKind" - }, - "rai_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RaiConfig" - } - ], - "description": "Configuration for Responsible AI (RAI) content filtering and safety features." - } - }, - "discriminator": { - "propertyName": "kind", - "mapping": { - "hosted": "#/components/schemas/HostedAgentDefinition", - "prompt": "#/components/schemas/PromptAgentDefinition", - "workflow": "#/components/schemas/WorkflowAgentDefinition", - "external": "#/components/schemas/ExternalAgentDefinition" - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview", - "CodeAgents=V1Preview", - "ExternalAgents=V1Preview" - ] - } - }, - "AgentDefinitionOptInKeys": { - "type": "string", - "enum": [ - "HostedAgents=V1Preview", - "WorkflowAgents=V1Preview", - "ContainerAgents=V1Preview", - "AgentEndpoints=V1Preview", - "CodeAgents=V1Preview", - "ExternalAgents=V1Preview" - ], - "description": "Feature opt-in keys for agent definition operations supporting hosted or workflow agents." - }, - "AgentEndpointAuthorizationScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/AgentEndpointAuthorizationSchemeType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "Entra": "#/components/schemas/EntraAuthorizationScheme", - "BotService": "#/components/schemas/BotServiceAuthorizationScheme", - "BotServiceRbac": "#/components/schemas/BotServiceRbacAuthorizationScheme" - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentEndpointAuthorizationSchemeType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "Entra", - "BotService", - "BotServiceRbac" - ] - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentEndpointConfig": { - "type": "object", - "properties": { - "version_selector": { - "allOf": [ - { - "$ref": "#/components/schemas/VersionSelector" - } - ], - "description": "The version selector of the agent endpoint determines how traffic is routed to different versions of the agent." - }, - "protocols": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentEndpointProtocol" - }, - "description": "The protocols that the agent supports" - }, - "authorization_schemes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" - }, - "description": "The authorization schemes supported by the agent endpoint" - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentEndpointConfigUpdate": { - "type": "object", - "properties": { - "version_selector": { - "allOf": [ - { - "$ref": "#/components/schemas/VersionSelectorUpdate" - } - ], - "description": "The version selector of the agent endpoint determines how traffic is routed to different versions of the agent." - }, - "protocols": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentEndpointProtocol" - }, - "description": "The protocols that the agent supports" - }, - "authorization_schemes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" - }, - "description": "The authorization schemes supported by the agent endpoint" - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentEndpointProtocol": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "activity", - "responses", - "a2a", - "mcp", - "invocations" - ] - } - ] - }, - "AgentFilterTraceSource": { - "type": "object", - "required": [ - "type", - "agent_reference" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "agent_filter" - ], - "description": "The type of trace source, always `agent_filter`." - }, - "agent_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalAgentReference" - } - ], - "description": "The agent reference to filter traces by." - }, - "start_time": { - "type": "integer", - "format": "int64", - "description": "Start time for the trace query window, expressed as a Unix timestamp (seconds)." - }, - "end_time": { - "type": "integer", - "format": "int64", - "description": "End time for the trace query window, expressed as a Unix timestamp (seconds)." - }, - "max_traces": { - "type": "integer", - "format": "int32", - "description": "Maximum number of traces to sample. Must be greater than 0." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/TraceSource" - } - ], - "description": "A trace source that selects traces by agent reference with time-based filtering." - }, - "AgentIdentity": { - "type": "object", - "required": [ - "principal_id", - "client_id" - ], - "properties": { - "principal_id": { - "type": "string", - "description": "The principal ID of the agent instance" - }, - "client_id": { - "type": "string", - "description": "The client ID of the agent instance. Also referred to as the instance ID" - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentKind": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "prompt", - "hosted", - "workflow", - "external" - ] - } - ] - }, - "AgentObject": { - "type": "object", - "required": [ - "object", - "id", - "name", - "versions" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "agent" - ], - "description": "The object type, which is always 'agent'." - }, - "id": { - "type": "string", - "description": "The unique identifier of the agent." - }, - "name": { - "type": "string", - "maxLength": 63, - "description": "The name of the agent." - }, - "versions": { - "type": "object", - "properties": { - "latest": { - "$ref": "#/components/schemas/AgentVersionObject" - } - }, - "required": [ - "latest" - ], - "description": "The latest version of the agent." - }, - "agent_endpoint": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentEndpointConfig" - } - ], - "description": "The endpoint configuration for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "instance_identity": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentIdentity" - } - ], - "description": "The instance identity of the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, - "readOnly": true - }, - "blueprint": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentIdentity" - } - ], - "description": "The blueprint for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, - "readOnly": true - }, - "blueprint_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentBlueprintReference" - } - ], - "description": "The blueprint for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, - "readOnly": true - }, - "agent_card": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentCard" - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - } - } - }, - "AgentProtocol": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "activity_protocol", - "responses", - "mcp", - "invocations" - ] - } - ] - }, - "AgentReference": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "agent_reference" - ] - }, - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the agent." - }, - "version": { - "type": "string", - "description": "The version identifier of the agent." - } - } - }, - "AgentSessionResource": { - "type": "object", - "required": [ - "agent_session_id", - "version_indicator", - "status", - "created_at", - "last_accessed_at", - "expires_at" - ], - "properties": { - "agent_session_id": { - "type": "string", - "description": "The session identifier." - }, - "version_indicator": { - "allOf": [ - { - "$ref": "#/components/schemas/VersionIndicator" - } - ], - "description": "The version indicator determining which agent version backs this session." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentSessionStatus" - } - ], - "description": "The current status of the session." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) when the session was created.", - "readOnly": true - }, - "last_accessed_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) when the session was last accessed.", - "readOnly": true - }, - "expires_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) when the session expires (rolling, 30 days from last activity).", - "readOnly": true - } - }, - "description": "An agent session providing a long-lived compute sandbox for hosted agent invocations.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentSessionStatus": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "creating", - "active", - "idle", - "updating", - "failed", - "deleting", - "deleted", - "expired" - ] - } - ], - "description": "The status of an agent session.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentSmartFilterTraceSource": { - "type": "object", - "required": [ - "type", - "agent_reference" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "agent_smart_filter" - ], - "description": "The type of trace source, always `agent_smart_filter`." - }, - "agent_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalAgentReference" - } - ], - "description": "The agent reference to filter traces by." - }, - "start_time": { - "type": "integer", - "format": "int64", - "description": "Start time for the trace query window, expressed as a Unix timestamp (seconds)." - }, - "end_time": { - "type": "integer", - "format": "int64", - "description": "End time for the trace query window, expressed as a Unix timestamp (seconds)." - }, - "max_traces": { - "type": "integer", - "format": "int32", - "description": "Maximum number of traces to sample. Must be greater than 0." - }, - "model": { - "type": "string", - "description": "If you provide the model, it will be used for filtering." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/TraceSource" - } - ], - "description": "An extended agent filter trace source that also includes model information." - }, - "AgentTaxonomyInput": { - "type": "object", - "required": [ - "type", - "target", - "riskCategories" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "agent" - ], - "description": "Input type of the evaluation taxonomy." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Target configuration for the agent." - }, - "riskCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RiskCategory" - }, - "description": "List of risk categories to evaluate against." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTaxonomyInput" - } - ], - "description": "Input configuration for the evaluation taxonomy when the input type is agent." - }, - "AgentTaxonomyInputUpdate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "agent" - ], - "description": "Input type of the evaluation taxonomy." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/TargetUpdate" - } - ], - "description": "Target configuration for the agent." - }, - "riskCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RiskCategory" - }, - "description": "List of risk categories to evaluate against." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTaxonomyInputUpdate" - } - ], - "description": "Input configuration for the evaluation taxonomy when the input type is agent." - }, - "AgentVersionObject": { - "type": "object", - "required": [ - "metadata", - "object", - "id", - "name", - "version", - "created_at", - "definition" - ], - "properties": { - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "object": { - "type": "string", - "enum": [ - "agent.version" - ], - "description": "The object type, which is always 'agent.version'." - }, - "id": { - "type": "string", - "description": "The unique identifier of the agent version." - }, - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the agent. Name can be used to retrieve/update/delete the agent." - }, - "version": { - "type": "string", - "description": "The version identifier of the agent. Agents are immutable and every update creates a new version while keeping the name same." - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "created_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The Unix timestamp (seconds) when the agent was created." - }, - "definition": { - "$ref": "#/components/schemas/AgentDefinition" - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentVersionStatus" - } - ], - "description": "The provisioning status of the agent version. Defaults to 'active' for non-hosted agents. For hosted agents, reflects infrastructure readiness." - }, - "instance_identity": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentIdentity" - } - ], - "description": "The instance identity of the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, - "readOnly": true - }, - "blueprint": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentIdentity" - } - ], - "description": "The blueprint for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, - "readOnly": true - }, - "blueprint_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentBlueprintReference" - } - ], - "description": "The blueprint for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, - "readOnly": true - }, - "agent_guid": { - "type": "string", - "description": "The unique GUID identifier of the agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, - "readOnly": true - } - } - }, - "AgentVersionStatus": { - "type": "string", - "enum": [ - "creating", - "active", - "failed", - "deleting", - "deleted" - ], - "description": "The provisioning status of an agent version." - }, - "AgenticIdentityPreviewCredentials": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "AgenticIdentityToken_Preview" - ], - "description": "The credential type", - "readOnly": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "Agentic identity credential definition" - }, - "ApiErrorResponse": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "$ref": "#/components/schemas/OpenAI.Error" - } - }, - "description": "Error response for API failures." - }, - "ApiKeyCredentials": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "ApiKey" - ], - "description": "The credential type", - "readOnly": true - }, - "key": { - "type": "string", - "description": "API Key", - "readOnly": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "API Key Credential definition" - }, - "ArtifactProfile": { - "type": "object", - "required": [ - "category" - ], - "properties": { - "category": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryModelArtifactProfileCategory" - } - ], - "description": "The category of the artifact profile" - }, - "signals": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FoundryModelArtifactProfileSignal" - }, - "description": "Signals detected in the model artifact" - } - }, - "description": "Artifact profile of the model" - }, - "AssetCredentialResponse": { - "type": "object", - "required": [ - "blobReference" - ], - "properties": { - "blobReference": { - "allOf": [ - { - "$ref": "#/components/schemas/BlobReference" - } - ], - "description": "Credential info to access the storage account." - } - }, - "description": "Represents a reference to a blob for consumption" - }, - "AssetId": { - "type": "string", - "description": "Identifier of a saved asset." - }, - "AttackStrategy": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "easy", - "moderate", - "difficult", - "ascii_art", - "ascii_smuggler", - "atbash", - "base64", - "binary", - "caesar", - "character_space", - "jailbreak", - "ansi_attack", - "character_swap", - "suffix_append", - "string_join", - "unicode_confusable", - "unicode_substitution", - "diacritic", - "flip", - "leetspeak", - "rot13", - "morse", - "url", - "baseline", - "indirect_jailbreak", - "tense", - "multi_turn", - "crescendo" - ] - } - ], - "description": "Strategies for attacks." - }, - "Azure.Core.Foundations.Error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "string", - "description": "One of a server-defined set of error codes." - }, - "message": { - "type": "string", - "description": "A human-readable representation of the error." - }, - "target": { - "type": "string", - "description": "The target of the error." - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Azure.Core.Foundations.Error" - }, - "description": "An array of details about specific errors that led to this reported error." - }, - "innererror": { - "allOf": [ - { - "$ref": "#/components/schemas/Azure.Core.Foundations.InnerError" - } - ], - "description": "An object containing more specific information than the current object about the error." - } - }, - "description": "The error object." - }, - "Azure.Core.Foundations.ErrorResponse": { - "type": "object", - "required": [ - "error" - ], - "properties": { - "error": { - "allOf": [ - { - "$ref": "#/components/schemas/Azure.Core.Foundations.Error" - } - ], - "description": "The error object." - } - }, - "description": "A response containing error details." - }, - "Azure.Core.Foundations.InnerError": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "One of a server-defined set of error codes." - }, - "innererror": { - "allOf": [ - { - "$ref": "#/components/schemas/Azure.Core.Foundations.InnerError" - } - ], - "description": "Inner error." - } - }, - "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors." - }, - "Azure.Core.Foundations.OperationState": { - "anyOf": [ - { - "type": "string", - "enum": [ - "NotStarted", - "Running", - "Succeeded", - "Failed", - "Canceled" - ] - }, - { - "type": "string" - } - ], - "description": "Enum describing allowed operation states." - }, - "Azure.Core.uuid": { - "type": "string", - "format": "uuid", - "description": "Universally Unique Identifier" - }, - "AzureAIAgentTarget": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_agent" - ], - "description": "The type of target, always `azure_ai_agent`." - }, - "name": { - "type": "string", - "description": "The unique identifier of the Azure AI agent." - }, - "version": { - "type": "string", - "description": "The version of the Azure AI agent." - }, - "tool_descriptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolDescription" - }, - "description": "The parameters used to control the sampling behavior of the agent during text generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Represents a target specifying an Azure AI agent." - }, - "AzureAIAgentTargetUpdate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_agent" - ], - "description": "The type of target, always `azure_ai_agent`." - }, - "name": { - "type": "string", - "description": "The unique identifier of the Azure AI agent." - }, - "version": { - "type": "string", - "description": "The version of the Azure AI agent." - }, - "tool_descriptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolDescription" - }, - "description": "The parameters used to control the sampling behavior of the agent during text generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/TargetUpdate" - } - ], - "description": "Represents a target specifying an Azure AI agent." - }, - "AzureAIBenchmarkDataSourceConfig": { - "type": "object", - "required": [ - "scenario", - "benchmark_name" - ], - "properties": { - "scenario": { - "type": "string", - "enum": [ - "benchmark_preview" - ], - "description": "Data schema scenario, always `benchmark` for benchmark evaluations." - }, - "benchmark_name": { - "type": "string", - "description": "The name of the benchmark specification." - }, - "benchmark_version": { - "type": "string", - "description": "The version of the benchmark specification (e.g., '0.1'). Latest version if not specified." - }, - "grader_model": { - "type": "string", - "description": "Optional grader model for benchmarks that use model graders, Required when the benchmark's testing_criteria uses a model grader type." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AzureAIDataSourceConfig" - } - ], - "description": "Data source configuration for benchmark evaluations." - }, - "AzureAIBenchmarkPreviewEvalRunDataSource": { - "type": "object", - "required": [ - "type", - "target" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_benchmark_preview" - ], - "description": "The type of data source, always `azure_ai_benchmark_preview`." - }, - "input_messages": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" - } - ], - "description": "Input messages configuration." - }, - "target": { - "anyOf": [ - { - "$ref": "#/components/schemas/AzureAIModelTarget" - }, - { - "$ref": "#/components/schemas/AzureAIAgentTarget" - } - ], - "description": "The target model or agent to evaluate against the benchmark.\nWhen using `azure_ai_model` target, `sampling_params` must not be provided;\ninference parameters are auto-filled from the benchmark specification stored in eval group properties." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a data source for benchmark evaluation runs." - }, - "AzureAIDataSourceConfig": { - "type": "object", - "required": [ - "type", - "scenario" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_source" - ], - "description": "The object type, which is always `azure_ai_source`." - }, - "scenario": { - "type": "string", - "enum": [ - "red_team", - "responses", - "traces_preview", - "synthetic_data_gen_preview", - "benchmark_preview" - ], - "description": "Data schema scenario." - } - }, - "discriminator": { - "propertyName": "scenario", - "mapping": { - "benchmark_preview": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/DataSourceConfig" - } - ], - "description": "Base data source configuration for Azure AI evaluation scenarios." - }, - "AzureAIModelTarget": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_model" - ], - "description": "The type of target, always `azure_ai_model`." - }, - "model": { - "type": "string", - "description": "The unique identifier of the Azure AI model." - }, - "sampling_params": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelSamplingParams" - } - ], - "description": "The parameters used to control the sampling behavior of the model during text generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Represents a target specifying an Azure AI model for operations requiring model selection." - }, - "AzureAIModelTargetUpdate": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_model" - ], - "description": "The type of target, always `azure_ai_model`." - }, - "model": { - "type": "string", - "description": "The unique identifier of the Azure AI model." - }, - "sampling_params": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelSamplingParams" - } - ], - "description": "The parameters used to control the sampling behavior of the model during text generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/TargetUpdate" - } - ], - "description": "Represents a target specifying an Azure AI model for operations requiring model selection." - }, - "AzureAIResponsesEvalRunDataSource": { - "type": "object", - "required": [ - "type", - "item_generation_params", - "max_runs_hourly", - "event_configuration_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_responses" - ], - "description": "The type of data source, always `azure_ai_responses`." - }, - "item_generation_params": { - "allOf": [ - { - "$ref": "#/components/schemas/ResponseRetrievalItemGenerationParams" - } - ], - "description": "The parameters for item generation." - }, - "max_runs_hourly": { - "type": "integer", - "format": "int32", - "description": "Maximum number of evaluation runs allowed per hour." - }, - "event_configuration_id": { - "type": "string", - "description": "The event configuration name associated with this evaluation run." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a data source for evaluation runs that are specific to Continuous Evaluation scenarios." - }, - "AzureAISearchIndex": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "AzureSearch" - ], - "description": "Type of index" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Index" - } - ], - "description": "Azure AI Search Index Definition" - }, - "AzureAISearchIndexUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "AzureSearch" - ], - "description": "Type of index" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/IndexUpdate" - } - ], - "description": "Azure AI Search Index Definition" - }, - "AzureAISearchQueryType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "simple", - "semantic", - "vector", - "vector_simple_hybrid", - "vector_semantic_hybrid" - ] - } - ], - "description": "Available query types for Azure AI Search tool." - }, - "AzureAISearchTool": { - "type": "object", - "required": [ - "type", - "azure_ai_search" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_search" - ], - "description": "The object type, which is always 'azure_ai_search'." - }, - "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." - }, - "azure_ai_search": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureAISearchToolResource" - } - ], - "description": "The azure ai search index resource." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for an Azure AI search tool as used to configure an agent." - }, - "AzureAISearchToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_search_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": "An Azure AI Search tool call." - }, - "AzureAISearchToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_search_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 Azure AI Search 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 an Azure AI Search tool call." - }, - "AzureAISearchToolResource": { - "type": "object", - "required": [ - "indexes" - ], - "properties": { - "indexes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AISearchIndexResource" - }, - "maxItems": 1, - "description": "The indices attached to this agent. There can be a maximum of 1 index\nresource attached to the agent." - } - }, - "description": "A set of index resources used by the `azure_ai_search` tool." - }, - "AzureAITraceDataSourcePreviewEvalRunDataSource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_trace_data_source_preview" - ], - "description": "The type of data source, always `azure_ai_trace_data_source_preview`." - }, - "trace_source": { - "allOf": [ - { - "$ref": "#/components/schemas/TraceSource" - } - ], - "description": "The trace source that defines how traces are selected for evaluation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "A wrapper data source that contains a polymorphic trace source to specify how traces are selected for evaluation." - }, - "AzureContentFilterBlocklistIdResult": { - "type": "object", - "required": [ - "id", - "filtered" - ], - "properties": { - "id": { - "type": "string", - "description": "The ID of the custom blocklist." - }, - "filtered": { - "type": "boolean", - "description": "Whether the blocklist resulted in filtering." - } - }, - "description": "A content filter blocklist ID result." - }, - "AzureContentFilterBlocklistResult": { - "type": "object", - "required": [ - "filtered" - ], - "properties": { - "filtered": { - "type": "boolean", - "description": "Whether any blocklist resulted in filtering." - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AzureContentFilterBlocklistIdResult" - }, - "description": "The pairs of individual blocklist IDs and their filtering results." - } - }, - "description": "A collection of filtering results for configured custom blocklists." - }, - "AzureContentFilterCitation": { - "type": "object", - "properties": { - "license": { - "type": "string", - "description": "The license associated with the detection." - }, - "url": { - "type": "string", - "format": "uri", - "description": "The URL associated with the license." - } - }, - "description": "Citation details for protected material detection." - }, - "AzureContentFilterCompletionTextSpan": { - "type": "object", - "required": [ - "completion_start_offset", - "completion_end_offset" - ], - "properties": { - "completion_start_offset": { - "type": "integer", - "format": "int32", - "description": "Offset of the UTF32 code point which begins the span." - }, - "completion_end_offset": { - "type": "integer", - "format": "int32", - "description": "Offset of the first UTF32 code point which is excluded from the span." - } - }, - "description": "A representation of a span of completion text as used by Azure OpenAI content filter results." - }, - "AzureContentFilterCompletionTextSpanDetectionResult": { - "type": "object", - "required": [ - "filtered", - "detected", - "details" - ], - "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." - }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AzureContentFilterCompletionTextSpan" - }, - "description": "Detailed information about the detected completion text spans." - } - }, - "description": "A content filter detection result with completion text span details." - }, - "AzureContentFilterDetectionResult": { - "type": "object", - "required": [ - "filtered", - "detected" - ], - "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." - }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." - } - }, - "description": "A content filter result indicating whether the content was detected and filtered." - }, - "AzureContentFilterDetectionWithCitationResult": { - "type": "object", - "required": [ - "filtered", - "detected" - ], - "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." - }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." - }, - "citation": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterCitation" - } - ], - "description": "Citation details describing the associated license and its location." - } - }, - "description": "A content filter detection result that includes citation information for protected material." - }, - "AzureContentFilterDetectionWithReasonResult": { - "type": "object", - "required": [ - "filtered", - "detected" - ], - "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." - }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." - }, - "reason": { - "type": "string", - "description": "A human-readable explanation of why the detection result was produced." - } - }, - "description": "A content filter detection result that includes a reason description." - }, - "AzureContentFilterError": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "integer", - "format": "int32", - "description": "A machine-readable error code." - }, - "message": { - "type": "string", - "description": "A human-readable error message." - } - }, - "description": "Error details from the content filtering system." - }, - "AzureContentFilterPersonallyIdentifiableInformationResult": { - "type": "object", - "required": [ - "filtered", - "detected" - ], - "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." - }, - "detected": { - "type": "boolean", - "description": "Whether PII was detected in the content." - }, - "sub_categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AzureContentFilterPiiSubCategoryResult" - }, - "description": "Detailed results for individual PII subcategories." - } - }, - "description": "A content filter detection result for Personally Identifiable Information." - }, - "AzureContentFilterPiiSubCategoryResult": { - "type": "object", - "required": [ - "sub_category", - "filtered", - "detected" - ], - "properties": { - "sub_category": { - "type": "string", - "description": "The PII subcategory that was evaluated." - }, - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered for this subcategory." - }, - "detected": { - "type": "boolean", - "description": "Whether the subcategory was detected in the content." - } - }, - "description": "Result details for an individual PII subcategory." - }, - "AzureContentFilterResultsForResponses": { - "type": "object", - "properties": { - "sexual": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterSeverityResult" - } - ], - "description": "Severity result for sexual content." - }, - "hate": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterSeverityResult" - } - ], - "description": "Severity result for hate content." - }, - "violence": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterSeverityResult" - } - ], - "description": "Severity result for violence content." - }, - "self_harm": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterSeverityResult" - } - ], - "description": "Severity result for self-harm content." - }, - "profanity": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionResult" - } - ], - "description": "Detection result for profanity." - }, - "custom_blocklists": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterBlocklistResult" - } - ], - "description": "Results for configured custom blocklists." - }, - "jailbreak": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionResult" - } - ], - "description": "Detection result for jailbreak attempts." - }, - "task_adherence": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionWithReasonResult" - } - ], - "description": "Detection result for task adherence evaluation." - }, - "protected_material_text": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionResult" - } - ], - "description": "Detection result for protected material text." - }, - "protected_material_code": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionWithCitationResult" - } - ], - "description": "Detection result for protected material code with citation." - }, - "ungrounded_material": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterCompletionTextSpanDetectionResult" - } - ], - "description": "Detection result for ungrounded material with completion text span details." - }, - "personally_identifiable_information": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterPersonallyIdentifiableInformationResult" - } - ], - "description": "Detection result for Personally Identifiable Information." - }, - "indirect_attack": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionResult" - } - ], - "description": "Detection result for indirect attacks." - }, - "error": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterError" - } - ], - "description": "Error details if content filtering evaluation failed." - } - }, - "description": "Content filter results for the Responses API." - }, - "AzureContentFilterSeverity": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "safe", - "low", - "medium", - "high" - ] - } - ], - "description": "Ratings for the intensity and risk level of harmful content." - }, - "AzureContentFilterSeverityResult": { - "type": "object", - "required": [ - "filtered", - "severity" - ], - "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." - }, - "severity": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterSeverity" - } - ], - "description": "The severity level of the content." - } - }, - "description": "A content filter result indicating severity level and whether content was filtered." - }, - "AzureFunctionBinding": { - "type": "object", - "required": [ - "type", - "storage_queue" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "storage_queue" - ], - "description": "The type of binding, which is always 'storage_queue'." - }, - "storage_queue": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureFunctionStorageQueue" - } - ], - "description": "Storage queue." - } - }, - "description": "The structure for keeping storage queue name and URI." - }, - "AzureFunctionDefinition": { - "type": "object", - "required": [ - "function", - "input_binding", - "output_binding" - ], - "properties": { - "function": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the function to be called." - }, - "description": { - "type": "string", - "description": "A description of what the function does, used by the model to choose when and how to call the function." - }, - "parameters": { - "type": "object", - "additionalProperties": {}, - "description": "The parameters the functions accepts, described as a JSON Schema object." - } - }, - "required": [ - "name", - "parameters" - ], - "description": "The definition of azure function and its parameters." - }, - "input_binding": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureFunctionBinding" - } - ], - "description": "Input storage queue. The queue storage trigger runs a function as messages are added to it." - }, - "output_binding": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureFunctionBinding" - } - ], - "description": "Output storage queue. The function writes output to this queue when the input items are processed." - } - }, - "description": "The definition of Azure function." - }, - "AzureFunctionStorageQueue": { - "type": "object", - "required": [ - "queue_service_endpoint", - "queue_name" - ], - "properties": { - "queue_service_endpoint": { - "type": "string", - "description": "URI to the Azure Storage Queue service allowing you to manipulate a queue." - }, - "queue_name": { - "type": "string", - "description": "The name of an Azure function storage queue." - } - }, - "description": "The structure for keeping storage queue name and URI." - }, - "AzureFunctionTool": { - "type": "object", - "required": [ - "type", - "azure_function" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_function" - ], - "description": "The object type, which is always 'browser_automation'." - }, - "azure_function": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureFunctionDefinition" - } - ], - "description": "The Azure Function Tool definition." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for an Azure Function Tool, as used to configure an Agent." - }, - "AzureFunctionToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_function_call" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the Azure Function being called." - }, - "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": "An Azure Function tool call." - }, - "AzureFunctionToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_function_call_output" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the Azure Function that was called." - }, - "output": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallOutputContent" - } - ], - "description": "The output from the Azure Function 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 an Azure Function tool call." - }, - "AzureOpenAIModelConfiguration": { - "type": "object", - "required": [ - "type", - "modelDeploymentName" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "AzureOpenAIModel" - ] - }, - "modelDeploymentName": { - "type": "string", - "description": "Deployment name for AOAI model. Example: gpt-4o if in AIServices or connection based `connection_name/deployment_name` (e.g. `my-aoai-connection/gpt-4o`)." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/RedTeamTargetConfig" - } - ], - "description": "Azure OpenAI model configuration. The API version would be selected by the service for querying the model." - }, - "BaseCredentials": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/CredentialType" - } - ], - "description": "The type of credential used by the connection", - "readOnly": true - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "ApiKey": "#/components/schemas/ApiKeyCredentials", - "AAD": "#/components/schemas/EntraIDCredentials", - "CustomKeys": "#/components/schemas/CustomCredential", - "SAS": "#/components/schemas/SASCredentials", - "None": "#/components/schemas/NoAuthenticationCredentials", - "AgenticIdentityToken_Preview": "#/components/schemas/AgenticIdentityPreviewCredentials" - } - }, - "description": "A base class for connection credentials" - }, - "BingCustomSearchConfiguration": { - "type": "object", - "required": [ - "project_connection_id", - "instance_name" - ], - "properties": { - "project_connection_id": { - "type": "string", - "description": "Project connection id for grounding with bing search" - }, - "instance_name": { - "type": "string", - "description": "Name of the custom configuration instance given to config." - }, - "market": { - "type": "string", - "description": "The market where the results come from." - }, - "set_lang": { - "type": "string", - "description": "The language to use for user interface strings when calling Bing API." - }, - "count": { - "type": "integer", - "format": "int64", - "description": "The number of search results to return in the bing api response" - }, - "freshness": { - "type": "string", - "description": "Filter search results by a specific time range. See [accepted values here](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters)." - } - }, - "description": "A bing custom search configuration." - }, - "BingCustomSearchPreviewTool": { - "type": "object", - "required": [ - "type", - "bing_custom_search_preview" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "bing_custom_search_preview" - ], - "description": "The object type, which is always 'bing_custom_search_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." - }, - "bing_custom_search_preview": { - "allOf": [ - { - "$ref": "#/components/schemas/BingCustomSearchToolParameters" - } - ], - "description": "The bing custom search tool parameters." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for a Bing custom search tool as used to configure an agent." - }, - "BingCustomSearchToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "bing_custom_search_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 Bing custom search tool call." - }, - "BingCustomSearchToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "bing_custom_search_preview_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 custom search 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 custom search tool call." - }, - "BingCustomSearchToolParameters": { - "type": "object", - "required": [ - "search_configurations" - ], - "properties": { - "search_configurations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BingCustomSearchConfiguration" - }, - "maxItems": 1, - "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." - } - }, - "description": "The bing custom search tool parameters." - }, - "BingGroundingSearchConfiguration": { - "type": "object", - "required": [ - "project_connection_id" - ], - "properties": { - "project_connection_id": { - "type": "string", - "description": "Project connection id for grounding with bing search" - }, - "market": { - "type": "string", - "description": "The market where the results come from." - }, - "set_lang": { - "type": "string", - "description": "The language to use for user interface strings when calling Bing API." - }, - "count": { - "type": "integer", - "format": "int64", - "description": "The number of search results to return in the bing api response" - }, - "freshness": { - "type": "string", - "description": "Filter search results by a specific time range. See [accepted values here](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters)." - } - }, - "description": "Search configuration for Bing Grounding" - }, - "BingGroundingSearchToolParameters": { - "type": "object", - "required": [ - "search_configurations" - ], - "properties": { - "search_configurations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BingGroundingSearchConfiguration" - }, - "maxItems": 1, - "description": "The search configurations attached to this tool. There can be a maximum of 1\nsearch configuration resource attached to the tool." - } - }, - "description": "The bing grounding search tool parameters." - }, - "BingGroundingTool": { - "type": "object", - "required": [ - "type", - "bing_grounding" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "bing_grounding" - ], - "description": "The object type, which is always 'bing_grounding'." - }, - "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." - }, - "bing_grounding": { - "allOf": [ - { - "$ref": "#/components/schemas/BingGroundingSearchToolParameters" - } - ], - "description": "The bing grounding search tool parameters." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for a bing grounding search tool as used to configure an agent." - }, - "BingGroundingToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "bing_grounding_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 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." - }, - "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." - }, - "BrowserAutomationToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "browser_automation_preview_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 browser automation 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 browser automation tool call." - }, - "BrowserAutomationToolConnectionParameters": { - "type": "object", - "required": [ - "project_connection_id" - ], - "properties": { - "project_connection_id": { - "type": "string", - "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": "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": { - "$ref": "#/components/schemas/OptimizationAgentSkill" - }, - "description": "Optional skill overrides." - } - }, - "description": "Deploy-config blob for a candidate. Suitable for setting OPTIMIZATION_CONFIG on a hosted-agent version." - }, - "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": [ - "type", - "outputs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "capture_structured_outputs" - ], - "description": "The type of the tool. Always `capture_structured_outputs`." - }, - "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." - }, - "outputs": { - "allOf": [ - { - "$ref": "#/components/schemas/StructuredOutputDefinition" - } - ], - "description": "The structured outputs to capture from the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool for capturing structured outputs" - }, - "ChartCoordinate": { - "type": "object", - "required": [ - "x", - "y", - "size" - ], - "properties": { - "x": { - "type": "integer", - "format": "int32", - "description": "X-axis coordinate." - }, - "y": { - "type": "integer", - "format": "int32", - "description": "Y-axis coordinate." - }, - "size": { - "type": "integer", - "format": "int32", - "description": "Size of the chart element." - } - }, - "description": "Coordinates for the analysis chart." - }, - "ChatSummaryMemoryItem": { - "type": "object", - "required": [ - "kind" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "chat_summary" - ], - "description": "The kind of the memory item." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/MemoryItem" - } - ], - "description": "A memory item containing a summary extracted from conversations.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "ClusterInsightResult": { - "type": "object", - "required": [ - "summary", - "clusters" - ], - "properties": { - "summary": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightSummary" - } - ], - "description": "Summary of the insights report." - }, - "clusters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InsightCluster" - }, - "description": "List of clusters identified in the insights." - }, - "coordinates": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ChartCoordinate" - }, - "description": " Optional mapping of IDs to 2D coordinates used by the UX for visualization.\n\n The map keys are string identifiers (for example, a cluster id or a sample id)\n and the values are the coordinates and visual size for rendering on a 2D chart.\n\n This property is omitted unless the client requests coordinates (for example,\n by passing `includeCoordinates=true` as a query parameter).\n\n Example:\n ```\n {\n \"cluster-1\": { \"x\": 12, \"y\": 34, \"size\": 8 },\n \"sample-123\": { \"x\": 18, \"y\": 22, \"size\": 4 }\n }\n ```\n\n Coordinates are intended only for client-side visualization and do not\n modify the canonical insights results." - } - }, - "description": "Insights from the cluster analysis." - }, - "ClusterTokenUsage": { - "type": "object", - "required": [ - "inputTokenUsage", - "outputTokenUsage", - "totalTokenUsage" - ], - "properties": { - "inputTokenUsage": { - "type": "integer", - "format": "int32", - "description": "input token usage" - }, - "outputTokenUsage": { - "type": "integer", - "format": "int32", - "description": "output token usage" - }, - "totalTokenUsage": { - "type": "integer", - "format": "int32", - "description": "total token usage" - } - }, - "description": "Token usage for cluster analysis" - }, - "CodeBasedEvaluatorDefinition": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code" - ] - }, - "code_text": { - "type": "string", - "description": "Inline code text for the evaluator" - }, - "entry_point": { - "type": "string", - "description": "The entry point Python file name for the uploaded evaluator code (e.g. 'answer_length_evaluator.py')", - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - }, - "image_tag": { - "type": "string", - "description": "The container image tag to use for evaluator code execution", - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - }, - "blob_uri": { - "type": "string", - "format": "uri", - "description": "The blob URI for the evaluator storage", - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorDefinition" - } - ], - "description": "Code-based evaluator definition using python code" - }, - "CodeConfiguration": { - "type": "object", - "required": [ - "runtime", - "entry_point", - "dependency_resolution" - ], - "properties": { - "runtime": { - "type": "string", - "description": "The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', 'python_3_13')." - }, - "entry_point": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The entry point command and arguments for the code execution." - }, - "dependency_resolution": { - "allOf": [ - { - "$ref": "#/components/schemas/CodeDependencyResolution" - } - ], - "description": "How package dependencies are resolved at deployment time. Defaults to `bundled`,\nwhere the caller bundles all dependencies into the uploaded zip and the service\nperforms no remote build. `remote_build` instructs the service to build\ndependencies remotely from the manifest included in the uploaded zip.", - "default": "bundled" - }, - "content_hash": { - "type": "string", - "description": "The SHA-256 hex digest of the uploaded code zip. Set by the service from the `x-ms-code-zip-sha256` request header; read-only in responses and never accepted in request payloads.", - "readOnly": true - } - }, - "description": "Code-based deployment configuration for a hosted agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - } - }, - "CodeDependencyResolution": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "bundled", - "remote_build" - ] - } - ], - "description": "How package dependencies are resolved at deployment time for a code-based hosted agent." - }, - "CompletionMessageToolCallChunk": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "string", - "description": "The Id for the tool call." - }, - "type": { - "type": "string", - "enum": [ - "function" - ], - "description": "The type of tool call, which is always \"function\"." - }, - "function": { - "allOf": [ - { - "$ref": "#/components/schemas/FunctionToolCall" - } - ], - "description": "Details of the function tool call, if applicable." - } - }, - "description": "Tool call details within a message." - }, - "Connection": { - "type": "object", - "required": [ - "name", - "id", - "type", - "target", - "isDefault", - "credentials", - "metadata" - ], - "properties": { - "name": { - "type": "string", - "description": "The friendly name of the connection, provided by the user.", - "readOnly": true - }, - "id": { - "type": "string", - "description": "A unique identifier for the connection, generated by the service", - "readOnly": true - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ConnectionType" - } - ], - "description": "Category of the connection", - "readOnly": true - }, - "target": { - "type": "string", - "description": "The connection URL to be used for this service", - "readOnly": true - }, - "isDefault": { - "type": "boolean", - "description": "Whether the connection is tagged as the default connection of its type", - "readOnly": true - }, - "credentials": { - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "The credentials used by the connection", - "readOnly": true - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Metadata of the connection", - "readOnly": true - } - }, - "description": "Response from the list and get connections operations" - }, - "ConnectionType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "AzureOpenAI", - "AzureBlob", - "AzureStorageAccount", - "CognitiveSearch", - "CosmosDB", - "ApiKey", - "AppConfig", - "AppInsights", - "CustomKeys", - "RemoteTool_Preview" - ] - } - ], - "description": "The Type (or category) of the connection" - }, - "ContainerConfiguration": { - "type": "object", - "required": [ - "image" - ], - "properties": { - "image": { - "type": "string", - "description": "The container image for the hosted agent.", - "example": "my-registry.azurecr.io/my-hosted-agent:latest" - } - }, - "description": "Container-based deployment configuration for a hosted agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - } - }, - "ContentFilterResult": { - "type": "object", - "required": [ - "blocked", - "source_type", - "content_filter_results" - ], - "properties": { - "blocked": { - "type": "boolean", - "description": "Whether the content was blocked by the content filter." - }, - "source_type": { - "type": "string", - "description": "The source type of the content filter evaluation (e.g., 'prompt', 'response', 'pre_tool_call', 'post_tool_call')." - }, - "content_filter_results": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterResultsForResponses" - } - ], - "description": "The content filter results for this evaluation." - }, - "tool_call_id": { - "type": "string", - "description": "The ID of the tool call associated with this content filter result, if applicable." - } - }, - "description": "A content filter evaluation result for a specific source in the response." - }, - "ContinuousEvaluationRuleAction": { - "type": "object", - "required": [ - "type", - "evalId" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "continuousEvaluation" - ] - }, - "evalId": { - "type": "string", - "description": "Eval Id to add continuous evaluation runs to." - }, - "maxHourlyRuns": { - "type": "integer", - "format": "int32", - "description": "Maximum number of evaluation runs allowed per hour." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleAction" - } - ], - "description": "Evaluation rule action for continuous evaluation." - }, - "ConversationGenPreviewItemGenerationParams": { - "type": "object", - "required": [ - "type", - "source", - "model" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "conversation_gen_preview" - ], - "description": "The type of item generation parameters, always `conversation_gen_preview`." - }, - "source": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - } - ], - "description": "The source of test scenarios, supporting file_id or file_content." - }, - "model": { - "type": "string", - "description": "The model deployment used for simulation, in the format '{connectionName}/modelDeploymentName'." - }, - "max_turns": { - "type": "integer", - "format": "int32", - "description": "Maximum number of turns per simulated conversation. Defaults to 20.", - "default": 20 - }, - "num_conversations": { - "type": "integer", - "format": "int32", - "description": "Number of simulated conversations to generate per test scenario. Defaults to 5.", - "default": 5 - }, - "data_mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Mapping from source fields to response_id field, which is required for retrieving chat history." - }, - "sampling_params": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelSamplingParams" - } - ], - "description": "Sampling parameters for the conversation generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ], - "description": "Represents the parameters for conversation simulation item generation." - }, - "ConversationIdTraceSource": { - "type": "object", - "required": [ - "type", - "conversation_ids" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "conversation_id_source" - ], - "description": "The type of trace source, always `conversation_id_source`." - }, - "conversation_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Collection of conversation identifiers to filter traces by." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/TraceSource" - } - ], - "description": "A trace source that selects traces by conversation IDs." - }, - "ConversationSimulationPreviewEvalRunDataSource": { - "type": "object", - "required": [ - "type", - "item_generation_params", - "target" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_conversation_simulation_preview" - ], - "description": "The type of data source, always `azure_ai_conversation_simulation_preview`." - }, - "item_generation_params": { - "allOf": [ - { - "$ref": "#/components/schemas/ConversationGenPreviewItemGenerationParams" - } - ], - "description": "The parameters for conversation generation." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureAIAgentTarget" - } - ], - "description": "The target agent to simulate conversations against." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a data source for evaluation runs that generate multi-turn conversations via LLM simulation against a target agent." - }, - "CosmosDBIndex": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "CosmosDBNoSqlVectorStore" - ], - "description": "Type of index" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Index" - } - ], - "description": "CosmosDB Vector Store Index Definition" - }, - "CosmosDBIndexUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "CosmosDBNoSqlVectorStore" - ], - "description": "Type of index" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/IndexUpdate" - } - ], - "description": "CosmosDB Vector Store Index Definition" - }, - "CreateAgentFromCodeContent": { - "type": "object", - "properties": { - "metadata": { - "allOf": [ - { - "$ref": "#/components/schemas/CreateAgentVersionFromCodeMetadata" - } - ], - "description": "JSON metadata including description and hosted definition." - }, - "code": { - "type": "string", - "format": "binary", - "description": "The code zip file (max 250 MB)." - } - }, - "required": [ - "metadata", - "code" - ] - }, - "CreateAgentFromManifestRequest": { - "type": "object", - "required": [ - "name", - "manifest_id", - "parameter_values" - ], - "properties": { - "name": { - "type": "string", - "maxLength": 63, - "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "manifest_id": { - "type": "string", - "description": "The manifest ID to import the agent version from." - }, - "parameter_values": { - "type": "object", - "additionalProperties": {}, - "description": "The inputs to the manifest that will result in a fully materialized Agent." - } - } - }, - "CreateAgentRequest": { - "type": "object", - "required": [ - "name", - "definition" - ], - "properties": { - "name": { - "type": "string", - "maxLength": 63, - "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "definition": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentDefinition" - } - ], - "description": "The agent definition. This can be a workflow, hosted agent, or a simple agent definition.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview", - "CodeAgents=V1Preview", - "ExternalAgents=V1Preview" - ] - } - }, - "blueprint_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentBlueprintReference" - } - ], - "description": "The blueprint reference for the agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "agent_endpoint": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentEndpointConfig" - } - ], - "description": "An optional endpoint configuration. If not specified, a default endpoint configuration will be set for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "agent_card": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentCard" - } - ], - "description": "Optional agent card for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview", - "CodeAgents=V1Preview", - "ExternalAgents=V1Preview" - ] - } - }, - "CreateAgentSessionRequest": { - "type": "object", - "required": [ - "version_indicator" - ], - "properties": { - "agent_session_id": { - "type": "string", - "description": "Optional caller-provided session ID. If specified, it must be unique within the agent endpoint. Auto-generated if omitted." - }, - "version_indicator": { - "allOf": [ - { - "$ref": "#/components/schemas/VersionIndicator" - } - ], - "description": "Determines which agent version backs the session." - } - }, - "description": "Request to create a new agent session.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "CreateAgentVersionFromCodeContent": { - "type": "object", - "properties": { - "metadata": { - "allOf": [ - { - "$ref": "#/components/schemas/CreateAgentVersionFromCodeMetadata" - } - ], - "description": "JSON metadata including description and hosted definition." - }, - "code": { - "type": "string", - "format": "binary", - "description": "The code zip file (max 250 MB)." - } - }, - "required": [ - "metadata", - "code" - ] - }, - "CreateAgentVersionFromCodeMetadata": { - "type": "object", - "required": [ - "definition" - ], - "properties": { - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "definition": { - "allOf": [ - { - "$ref": "#/components/schemas/HostedAgentDefinition" - } - ], - "description": "The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, and protocol_versions." - } - }, - "description": "JSON metadata for code-based agent operations (create, update, create version).\nThe agent name comes from the URL path parameter or the `x-ms-agent-name` header,\nso it is not included in this model.\nThe content hash (SHA-256 of the zip) is carried in the `x-ms-code-zip-sha256` header.", - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - } - }, - "CreateAgentVersionFromManifestRequest": { - "type": "object", - "required": [ - "manifest_id", - "parameter_values" - ], - "properties": { - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "manifest_id": { - "type": "string", - "description": "The manifest ID to import the agent version from." - }, - "parameter_values": { - "type": "object", - "additionalProperties": {}, - "description": "The inputs to the manifest that will result in a fully materialized Agent." - } - } - }, - "CreateAgentVersionRequest": { - "type": "object", - "required": [ - "definition" - ], - "properties": { - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "definition": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentDefinition" - } - ], - "description": "The agent definition. This can be a workflow, hosted agent, or a simple agent definition.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview", - "CodeAgents=V1Preview", - "ExternalAgents=V1Preview" - ] - } - }, - "blueprint_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentBlueprintReference" - } - ], - "description": "The blueprint reference for the agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview", - "CodeAgents=V1Preview", - "ExternalAgents=V1Preview" - ] - } - }, - "CreateEvalRequest": { - "type": "object", - "required": [ - "data_source_config", - "testing_criteria" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the evaluation." - }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "data_source_config": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCustomDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalLogsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalStoredCompletionsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/AzureAIDataSourceConfig" - }, - { - "$ref": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" - } - ], - "description": "The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation." - }, - "testing_criteria": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" - }, - { - "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" - } - ] - }, - "description": "A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`)." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." - } - }, - "title": "CreateEvalRequest" - }, - "CreateEvalRunRequest": { - "type": "object", - "required": [ - "data_source" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the run." - }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "data_source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalJsonlRunDataSource" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSource" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSource" - }, - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Details about the run's data source." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." - }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "The level at which evaluation is performed. Defaults to 'turn' if not specified.", - "default": "turn" - } - }, - "title": "CreateEvalRunRequest" - }, - "CredentialType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "ApiKey", - "AAD", - "SAS", - "CustomKeys", - "None", - "AgenticIdentityToken_Preview" - ] - } - ], - "description": "The credential type used by the connection" - }, - "CronTrigger": { - "type": "object", - "required": [ - "type", - "expression" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Cron" - ] - }, - "expression": { - "type": "string", - "description": "Cron expression that defines the schedule frequency." - }, - "timeZone": { - "type": "string", - "description": "Time zone for the cron schedule.", - "default": "UTC" - }, - "startTime": { - "type": "string", - "description": "Start time for the cron schedule in ISO 8601 format." - }, - "endTime": { - "type": "string", - "description": "End time for the cron schedule in ISO 8601 format." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Trigger" - } - ], - "description": "Cron based trigger." - }, - "CustomCredential": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "CustomKeys" - ], - "description": "The credential type", - "readOnly": true - } - }, - "additionalProperties": { - "type": "string" - }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "Custom credential definition" - }, - "DailyRecurrenceSchedule": { - "type": "object", - "required": [ - "type", - "hours" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Daily" - ], - "description": "Daily recurrence type." - }, - "hours": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Hours for the recurrence schedule." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/RecurrenceSchedule" - } - ], - "description": "Daily recurrence schedule." - }, - "DataSourceConfig": { - "type": "object", - "required": [ - "type", - "schema" - ], - "properties": { - "type": { - "type": "string", - "description": "The data source type discriminator." - }, - "schema": { - "type": "object", - "additionalProperties": {}, - "description": "The overall object JSON schema for the run data source items." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": {} - }, - "description": "Base class for run data sources with discriminator support." - }, - "DatasetItem": { - "type": "object", - "required": [ - "name", - "query" - ], - "properties": { - "name": { - "type": "string", - "description": "Unique-within-the-dataset identifier for this task." - }, - "query": { - "type": "string", - "description": "The user query / input for the task." - }, - "ground_truth": { - "type": "string", - "description": "Optional ground truth used by reference-based evaluators." - }, - "criteria": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationCriterion" - }, - "description": "Per-task evaluation criteria. Defaults to the job-level evaluators if unset." - }, - "eval_results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemResult" - }, - "description": "Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped." - }, - "response_items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.OutputItem" - }, - "description": "Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run." - } - }, - "description": "A single evaluation task with input query, expected output, and evaluation criteria." - }, - "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." - }, - "DatasetType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "uri_file", - "uri_folder" - ] - } - ], - "description": "Enum to determine the type of data." - }, - "DatasetVersion": { - "type": "object", - "required": [ - "dataUri", - "type", - "name", - "version" - ], - "properties": { - "dataUri": { - "type": "string", - "minLength": 1, - "pattern": "[a-zA-Z0-9_]", - "description": "URI of the data ([example](https://go.microsoft.com/fwlink/?linkid=2202330))" - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/DatasetType" - } - ], - "description": "Dataset type" - }, - "isReference": { - "type": "boolean", - "description": "Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted", - "readOnly": true - }, - "connectionName": { - "type": "string", - "description": "The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset" - }, - "id": { - "type": "string", - "description": "Asset ID, a unique identifier for the asset", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the resource", - "readOnly": true - }, - "version": { - "type": "string", - "description": "The version of the resource", - "readOnly": true - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "uri_file": "#/components/schemas/FileDatasetVersion", - "uri_folder": "#/components/schemas/FolderDatasetVersion" - } - }, - "description": "DatasetVersion Definition" - }, - "DatasetVersionUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/DatasetType" - } - ], - "description": "Dataset type" - }, - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "uri_file": "#/components/schemas/FileDatasetVersionUpdate", - "uri_folder": "#/components/schemas/FolderDatasetVersionUpdate" - } - }, - "description": "DatasetVersion Definition" - }, - "DayOfWeek": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ] - } - ], - "description": "Days of the week for recurrence schedule." - }, - "DeleteAgentResponse": { - "type": "object", - "required": [ - "object", - "name", - "deleted" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "agent.deleted" - ], - "description": "The object type. Always 'agent.deleted'." - }, - "name": { - "type": "string", - "description": "The name of the agent." - }, - "deleted": { - "type": "boolean", - "description": "Whether the agent was successfully deleted." - } - }, - "description": "A deleted agent Object" - }, - "DeleteAgentVersionResponse": { - "type": "object", - "required": [ - "object", - "name", - "version", - "deleted" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "agent.version.deleted" - ], - "description": "The object type. Always 'agent.version.deleted'." - }, - "name": { - "type": "string", - "description": "The name of the agent." - }, - "version": { - "type": "string", - "description": "The version identifier of the agent." - }, - "deleted": { - "type": "boolean", - "description": "Whether the agent was successfully deleted." - } - }, - "description": "A deleted agent version Object" - }, - "DeleteEvalResponse": { - "type": "object", - "required": [ - "object", - "eval_id", - "deleted" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "eval.deleted" - ], - "description": "The object type. Always 'eval.deleted'." - }, - "eval_id": { - "type": "string", - "description": "id of the eval." - }, - "deleted": { - "type": "boolean", - "description": "Whether the eval was successfully deleted." - } - }, - "description": "A deleted evaluation Object" - }, - "DeleteEvalRunResponse": { - "type": "object", - "properties": { - "object": { - "type": "string", - "enum": [ - "eval.deleted" - ], - "description": "The object type. Always 'eval.deleted'." - }, - "run_id": { - "type": "string", - "description": "id of the eval." - }, - "deleted": { - "type": "boolean", - "description": "Whether the eval was successfully deleted." - } - }, - "description": "A deleted evaluation run Object." - }, - "DeleteMemoryResponse": { - "type": "object", - "required": [ - "object", - "name", - "memory_id", - "deleted" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "memory.deleted" - ], - "description": "The object type. Always 'memory.deleted'." - }, - "name": { - "type": "string", - "description": "The name of the memory store." - }, - "memory_id": { - "type": "string", - "description": "The unique ID of the deleted memory item." - }, - "deleted": { - "type": "boolean", - "description": "Whether the memory item was successfully deleted." - } - }, - "description": "Response for deleting a memory item from a memory store.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "DeleteMemoryStoreResponse": { - "type": "object", - "required": [ - "object", - "name", - "deleted" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "memory_store.deleted" - ], - "description": "The object type. Always 'memory_store.deleted'." - }, - "name": { - "type": "string", - "description": "The name of the memory store." - }, - "deleted": { - "type": "boolean", - "description": "Whether the memory store was successfully deleted." - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "DeleteResponseResult": { - "type": "object", - "required": [ - "id", - "object", - "deleted" - ], - "properties": { - "id": { - "type": "string", - "description": "The operation ID." - }, - "object": { - "type": "string", - "enum": [ - "response" - ], - "description": "Always return 'response'." - }, - "deleted": { - "type": "boolean", - "enum": [ - true - ], - "description": "Always return true" - } - }, - "description": "The result of a delete response operation." - }, - "DeleteSkillResponse": { - "type": "object", - "required": [ - "name", - "deleted" - ], - "properties": { - "name": { - "type": "string", - "description": "The unique name of the skill." - }, - "deleted": { - "type": "boolean", - "description": "Whether the skill was successfully deleted." - } - }, - "description": "A deleted skill Object" - }, - "Deployment": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/DeploymentType" - } - ], - "description": "The type of the deployment" - }, - "name": { - "type": "string", - "description": "Name of the deployment", - "readOnly": true - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "ModelDeployment": "#/components/schemas/ModelDeployment" - } - }, - "description": "Model Deployment Definition" - }, - "DeploymentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "ModelDeployment" - ] - } - ] - }, - "EntraAuthorizationScheme": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Entra" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "EntraIDCredentials": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "AAD" - ], - "description": "The credential type", - "readOnly": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "Entra ID credential definition" - }, - "Eval": { - "type": "object", - "required": [ - "object", - "id", - "name", - "data_source_config", - "testing_criteria", - "created_at", - "metadata" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "eval" - ], - "description": "The object type.", - "x-stainless-const": true, - "default": "eval" - }, - "id": { - "type": "string", - "description": "Unique identifier for the evaluation." - }, - "name": { - "type": "string", - "description": "The name of the evaluation." - }, - "data_source_config": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCustomDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalLogsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalStoredCompletionsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/AzureAIDataSourceConfig" - }, - { - "$ref": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" - } - ], - "description": "Configuration of data sources used in runs of the evaluation." - }, - "testing_criteria": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" - }, - { - "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" - } - ] - }, - "description": "A list of testing criteria." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) for when the eval was created." - }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "modified_at": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "description": "Unix timestamp (in seconds) when the evaluation run was last modified." - }, - "created_by": { - "type": "string", - "description": "the name of the person who created the run." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." - } - }, - "description": "An Eval object with a data source config and testing criteria.\nAn Eval represents a task to be done for your LLM integration.\nLike:\n- Improve the quality of my chatbot\n- See how well my chatbot handles customer support\n- Check if o4-mini is better at my usecase than gpt-4o", - "title": "Eval", - "x-oaiMeta": { - "name": "The eval object", - "group": "evals", - "example": "{\n \"object\": \"eval\",\n \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"data_source_config\": {\n \"type\": \"custom\",\n \"item_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\"type\": \"string\"},\n },\n \"required\": [\"label\"]\n },\n \"include_sample_schema\": true\n },\n \"testing_criteria\": [\n {\n \"name\": \"My string check grader\",\n \"type\": \"string_check\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\",\n }\n ],\n \"name\": \"External Data Eval\",\n \"created_at\": 1739314509,\n \"metadata\": {\n \"test\": \"synthetics\",\n }\n}\n" - } - }, - "EvalAgentIdReference": { - "type": "object", - "required": [ - "type", - "agent_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "agent_id" - ], - "description": "The type of agent reference, always `agent_id`." - }, - "agent_id": { - "type": "string", - "description": "The unique identifier of the agent." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalAgentReference" - } - ], - "description": "Identifies a 3P (Assistants) agent by its opaque agent ID." - }, - "EvalAgentReference": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalAgentReferenceType" - } - ], - "description": "The discriminator that identifies which kind of agent reference this is." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "agent_id": "#/components/schemas/EvalAgentIdReference", - "agent_reference": "#/components/schemas/EvalFoundryAgentReference" - } - }, - "description": "Base class for polymorphic agent references used in evaluation trace filtering. The user supplies exactly one variant to identify the agent whose traces should be filtered." - }, - "EvalAgentReferenceType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "agent_id", - "agent_reference" - ] - } - ], - "description": "Specifies the type of agent reference used for filtering traces." - }, - "EvalCsvFileIdSource": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "file_id" - ], - "description": "The type of source, always `file_id`." - }, - "id": { - "type": "string", - "description": "The identifier of the uploaded CSV file." - } - }, - "description": "Represents a reference to an uploaded CSV file used as a source for evaluation data." - }, - "EvalCsvRunDataSource": { - "type": "object", - "required": [ - "type", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "csv" - ], - "description": "The type of data source, always `csv`." - }, - "source": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalCsvFileIdSource" - } - ], - "description": "The source of the CSV data, either inline content or a file reference." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a CSV data source for evaluation runs." - }, - "EvalFoundryAgentReference": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "agent_reference" - ], - "description": "The type of agent reference, always `agent_reference`." - }, - "name": { - "type": "string", - "description": "The name of the agent." - }, - "version": { - "type": "string", - "description": "The version identifier of the agent. If not specified, will look for any version." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalAgentReference" - } - ], - "description": "Identifies a Foundry agent by its name and optional version." - }, - "EvalResult": { - "type": "object", - "required": [ - "name", - "type", - "score", - "passed" - ], - "properties": { - "name": { - "type": "string", - "description": "name of the check" - }, - "type": { - "type": "string", - "description": "type of the check" - }, - "score": { - "type": "number", - "format": "float", - "description": "score" - }, - "passed": { - "type": "boolean", - "description": "indicates if the check passed or failed" - } - }, - "description": "Result of the evaluation." - }, - "EvalRun": { - "type": "object", - "required": [ - "object", - "id", - "eval_id", - "status", - "model", - "name", - "created_at", - "report_url", - "result_counts", - "per_model_usage", - "per_testing_criteria_results", - "data_source", - "metadata", - "error" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "eval.run" - ], - "description": "The type of the object. Always \"eval.run\".", - "x-stainless-const": true, - "default": "eval.run" - }, - "id": { - "type": "string", - "description": "Unique identifier for the evaluation run." - }, - "eval_id": { - "type": "string", - "description": "The identifier of the associated evaluation." - }, - "status": { - "type": "string", - "description": "The status of the evaluation run." - }, - "model": { - "type": "string", - "description": "The model that is evaluated, if applicable." - }, - "name": { - "type": "string", - "description": "The name of the evaluation run." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "Unix timestamp (in seconds) when the evaluation run was created." - }, - "report_url": { - "type": "string", - "format": "uri", - "description": "The URL to the rendered evaluation run report on the UI dashboard." - }, - "result_counts": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalRunResultCounts" - } - ], - "description": "Counters summarizing the outcomes of the evaluation run." - }, - "per_model_usage": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalRunPerModelUsage" - }, - "description": "Usage statistics for each model during the evaluation run." - }, - "per_testing_criteria_results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalRunPerTestingCriteriaResults" - }, - "description": "Results per testing criteria applied during the evaluation run." - }, - "data_source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalJsonlRunDataSource" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSource" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSource" - }, - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Information about the run's data source." - }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/OpenAI.EvalApiError" - }, - "modified_at": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "description": "Unix timestamp (in seconds) when the evaluation run was last modified." - }, - "created_by": { - "type": "string", - "description": "the name of the person who created the run." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." - }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "The level at which evaluation is performed. Defaults to 'turn' if not specified.", - "default": "turn" - } - }, - "description": "A schema representing an evaluation run.", - "title": "EvalRun", - "x-oaiMeta": { - "name": "The eval run object", - "group": "evals", - "example": "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67e57965b480819094274e3a32235e4c\",\n \"eval_id\": \"eval_67e579652b548190aaa83ada4b125f47\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47?run_id=evalrun_67e57965b480819094274e3a32235e4c\",\n \"status\": \"queued\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Summit Addresses Climate Change Strategies\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"National Team Qualifies for World Championship Finals\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"World Leaders Sign Historic Climate Agreement\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Cooperation Strengthened Through New Treaty\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n \"ground_truth\": \"Sports\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\n\n# Steps\n\n1. Analyze the content of the news headline to understand its primary focus.\n2. Extract the subject matter, identifying any key indicators or keywords.\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\n4. Ensure only one category is selected per headline.\n\n# Output Format\n\nRespond with the chosen category as a single word. For instance: \"Technology\", \"Markets\", \"World\", \"Business\", or \"Sports\".\n\n# Examples\n\n**Input**: \"Apple Unveils New iPhone Model, Featuring Advanced AI Features\"\n**Output**: \"Technology\"\n\n**Input**: \"Global Stocks Mixed as Investors Await Central Bank Decisions\"\n**Output**: \"Markets\"\n\n**Input**: \"War in Ukraine: Latest Updates on Negotiation Status\"\n**Output**: \"World\"\n\n**Input**: \"Microsoft in Talks to Acquire Gaming Company for $2 Billion\"\n**Output**: \"Business\"\n\n**Input**: \"Manchester United Secures Win in Premier League Football Match\"\n**Output**: \"Sports\"\n\n# Notes\n\n- If the headline appears to fit into more than one category, choose the most dominant theme.\n- Keywords or phrases such as \"stocks\", \"company acquisition\", \"match\", or technological brands can be good indicators for classification.\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" - } - }, - "EvalRunDataSource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The data source type discriminator." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "azure_ai_traces_preview": "#/components/schemas/TracesPreviewEvalRunDataSource", - "azure_ai_synthetic_data_gen_preview": "#/components/schemas/SyntheticDataGenerationPreviewEvalRunDataSource", - "azure_ai_responses": "#/components/schemas/AzureAIResponsesEvalRunDataSource", - "azure_ai_target_completions": "#/components/schemas/TargetCompletionEvalRunDataSource", - "csv": "#/components/schemas/EvalCsvRunDataSource", - "azure_ai_red_team": "#/components/schemas/RedTeamEvalRunDataSource", - "azure_ai_conversation_simulation_preview": "#/components/schemas/ConversationSimulationPreviewEvalRunDataSource", - "azure_ai_trace_data_source_preview": "#/components/schemas/AzureAITraceDataSourcePreviewEvalRunDataSource", - "azure_ai_benchmark_preview": "#/components/schemas/AzureAIBenchmarkPreviewEvalRunDataSource" - } - }, - "description": "Base class for run data sources with discriminator support." - }, - "EvalRunOutputItem": { - "type": "object", - "required": [ - "object", - "id", - "run_id", - "eval_id", - "created_at", - "status", - "datasource_item_id", - "datasource_item", - "results", - "sample" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "eval.run.output_item" - ], - "description": "The type of the object. Always \"eval.run.output_item\".", - "x-stainless-const": true, - "default": "eval.run.output_item" - }, - "id": { - "type": "string", - "description": "Unique identifier for the evaluation run output item." - }, - "run_id": { - "type": "string", - "description": "The identifier of the evaluation run associated with this output item." - }, - "eval_id": { - "type": "string", - "description": "The identifier of the evaluation group." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "Unix timestamp (in seconds) when the evaluation run was created." - }, - "status": { - "type": "string", - "description": "The status of the evaluation run." - }, - "datasource_item_id": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The identifier for the data source item." - }, - "datasource_item": { - "type": "object", - "additionalProperties": {}, - "description": "Details of the input data source item." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemResult" - }, - "description": "A list of grader results for this output item." - }, - "sample": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalRunOutputItemSample" - } - ], - "description": "A sample containing the input and output of the evaluation run." - } - }, - "description": "A schema representing an evaluation run output item.", - "title": "EvalRunOutputItem", - "x-oaiMeta": { - "name": "The eval run output item object", - "group": "evals", - "example": "{\n \"object\": \"eval.run.output_item\",\n \"id\": \"outputitem_67abd55eb6548190bb580745d5644a33\",\n \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"created_at\": 1739314509,\n \"status\": \"pass\",\n \"datasource_item_id\": 137,\n \"datasource_item\": {\n \"teacher\": \"To grade essays, I only check for style, content, and grammar.\",\n \"student\": \"I am a student who is trying to write the best essay.\"\n },\n \"results\": [\n {\n \"name\": \"String Check Grader\",\n \"type\": \"string-check-grader\",\n \"score\": 1.0,\n \"passed\": true,\n }\n ],\n \"sample\": {\n \"input\": [\n {\n \"role\": \"system\",\n \"content\": \"You are an evaluator bot...\"\n },\n {\n \"role\": \"user\",\n \"content\": \"You are assessing...\"\n }\n ],\n \"output\": [\n {\n \"role\": \"assistant\",\n \"content\": \"The rubric is not clear nor concise.\"\n }\n ],\n \"finish_reason\": \"stop\",\n \"model\": \"gpt-4o-2024-08-06\",\n \"usage\": {\n \"total_tokens\": 521,\n \"completion_tokens\": 2,\n \"prompt_tokens\": 519,\n \"cached_tokens\": 0\n },\n \"error\": null,\n \"temperature\": 1.0,\n \"max_completion_tokens\": 2048,\n \"top_p\": 1.0,\n \"seed\": 42\n }\n}\n" - } - }, - "EvalRunOutputItemResult": { - "type": "object", - "required": [ - "name", - "score", - "passed" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the grader." - }, - "type": { - "type": "string", - "description": "The grader type (for example, \"string-check-grader\")." - }, - "score": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "The numeric score produced by the grader." - }, - "passed": { - "type": "boolean", - "description": "Whether the grader considered the output a pass." - }, - "sample": { - "type": "object", - "additionalProperties": {}, - "nullable": true, - "description": "Optional sample or intermediate data produced by the grader." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunOutputItemResultStatus" - } - ], - "description": "The evaluation status for this result item. Values: \"completed\", \"errored\", \"skipped\". Null if not provided by evaluator. When status is skipped, passed/score can be ignored." - }, - "metric": { - "type": "string", - "description": "The name of the metric (e.g., \"fluency\", \"f1_score\")." - }, - "label": { - "type": "string", - "description": "The label associated with the test criteria metric (e.g., \"pass\", \"fail\", \"good\", \"bad\")." - }, - "threshold": { - "type": "number", - "format": "float", - "description": "The threshold used to determine pass/fail for this test criteria, if it is numerical." - }, - "reason": { - "type": "string", - "description": "The reason for the test criteria metric." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional details about the test criteria metric." - } - }, - "additionalProperties": {}, - "description": "A single grader result for an evaluation run output item.", - "title": "EvalRunOutputItemResult" - }, - "EvalRunOutputItemResultStatus": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "completed", - "errored", - "skipped" - ] - } - ], - "description": "The evaluation status for an evaluation run output item result." - }, - "EvalRunOutputItemSampleInput": { - "type": "object", - "required": [ - "role", - "content", - "tool_calls" - ], - "properties": { - "role": { - "type": "string" - }, - "content": { - "type": "string" - }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CompletionMessageToolCallChunk" - }, - "description": "Tool calls made within the message, if any." - } - }, - "description": "A message in the evaluation run." - }, - "EvalRunOutputItemSampleOutput": { - "type": "object", - "required": [ - "tool_calls" - ], - "properties": { - "role": { - "type": "string" - }, - "content": { - "type": "string" - }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CompletionMessageToolCallChunk" - }, - "description": "Tool calls made within the message, if any." - } - }, - "description": "A message in the evaluation run." - }, - "EvalRunResultCompareItem": { - "type": "object", - "required": [ - "treatmentRunId", - "treatmentRunSummary", - "deltaEstimate", - "pValue", - "treatmentEffect" - ], - "properties": { - "treatmentRunId": { - "type": "string", - "description": "The treatment run ID." - }, - "treatmentRunSummary": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunResultSummary" - } - ], - "description": "Summary statistics of the treatment run." - }, - "deltaEstimate": { - "type": "number", - "format": "float", - "description": "Estimated difference between treatment and baseline." - }, - "pValue": { - "type": "number", - "format": "float", - "description": "P-value for the treatment effect." - }, - "treatmentEffect": { - "allOf": [ - { - "$ref": "#/components/schemas/TreatmentEffectType" - } - ], - "description": "Type of treatment effect." - } - }, - "description": "Metric comparison for a treatment against the baseline." - }, - "EvalRunResultComparison": { - "type": "object", - "required": [ - "testingCriteria", - "metric", - "evaluator", - "baselineRunSummary", - "compareItems" - ], - "properties": { - "testingCriteria": { - "type": "string", - "description": "Name of the testing criteria." - }, - "metric": { - "type": "string", - "description": "Metric being evaluated." - }, - "evaluator": { - "type": "string", - "description": "Name of the evaluator for this testing criteria." - }, - "baselineRunSummary": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunResultSummary" - } - ], - "description": "Summary statistics of the baseline run." - }, - "compareItems": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunResultCompareItem" - }, - "description": "List of comparison results for each treatment run." - } - }, - "description": "Comparison results for treatment runs against the baseline." - }, - "EvalRunResultSummary": { - "type": "object", - "required": [ - "runId", - "sampleCount", - "average", - "standardDeviation" - ], - "properties": { - "runId": { - "type": "string", - "description": "The evaluation run ID." - }, - "sampleCount": { - "type": "integer", - "format": "int32", - "description": "Number of samples in the evaluation run." - }, - "average": { - "type": "number", - "format": "float", - "description": "Average value of the metric in the evaluation run." - }, - "standardDeviation": { - "type": "number", - "format": "float", - "description": "Standard deviation of the metric in the evaluation run." - } - }, - "description": "Summary statistics of a metric in an evaluation run." - }, - "EvaluationComparisonInsightRequest": { - "type": "object", - "required": [ - "type", - "evalId", - "baselineRunId", - "treatmentRunIds" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationComparison" - ], - "description": "The type of request." - }, - "evalId": { - "type": "string", - "description": "Identifier for the evaluation." - }, - "baselineRunId": { - "type": "string", - "description": "The baseline run ID for comparison." - }, - "treatmentRunIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of treatment run IDs for comparison." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightRequest" - } - ], - "description": "Evaluation Comparison Request" - }, - "EvaluationComparisonInsightResult": { - "type": "object", - "required": [ - "type", - "comparisons", - "method" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationComparison" - ], - "description": "The type of insights result." - }, - "comparisons": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunResultComparison" - }, - "description": "Comparison results for each treatment run against the baseline." - }, - "method": { - "type": "string", - "description": "The statistical method used for comparison." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "Insights from the evaluation comparison." - }, - "EvaluationCriterion": { - "type": "object", - "required": [ - "name", - "instruction" - ], - "properties": { - "name": { - "type": "string", - "description": "Criterion name (referenced in evaluation result rows)." - }, - "instruction": { - "type": "string", - "description": "Natural-language instruction passed to the judge LLM." - } - }, - "description": "LLM-as-judge evaluation criterion applied to a single task." - }, - "EvaluationDatasetReference": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "Dataset name." - }, - "version": { - "type": "string", - "description": "Dataset version. If not provided, resolves to the latest version." - }, - "schema_file_name": { - "type": "string", - "description": "Name of the schema file within the dataset's blob folder (e.g., \"a3f2b1c4_schema.json\").\nOptional — if not provided, schema is inferred at runtime from the data.\nOnly applicable for uri_folder datasets." - } - }, - "description": "Reference to a dataset by name and version." - }, - "EvaluationLevel": { - "anyOf": [ - { - "type": "string", - "enum": [ - "turn", - "conversation" - ] - }, - { - "type": "string" - } - ], - "description": "The level at which evaluation is performed." - }, - "EvaluationResultSample": { - "type": "object", - "required": [ - "type", - "evaluationResult" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationResultSample" - ], - "description": "Evaluation Result Sample Type" - }, - "evaluationResult": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalResult" - } - ], - "description": "Evaluation result for the analysis sample." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightSample" - } - ], - "description": "A sample from the evaluation result." - }, - "EvaluationRule": { - "type": "object", - "required": [ - "id", - "action", - "eventType", - "enabled", - "systemData" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the evaluation rule.", - "readOnly": true - }, - "displayName": { - "type": "string", - "description": "Display Name for the evaluation rule." - }, - "description": { - "type": "string", - "description": "Description for the evaluation rule." - }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleAction" - } - ], - "description": "Definition of the evaluation rule action.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "Evaluations=V1Preview" - ] - } - }, - "filter": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleFilter" - } - ], - "description": "Filter condition of the evaluation rule." - }, - "eventType": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleEventType" - } - ], - "description": "Event type that the evaluation rule applies to." - }, - "enabled": { - "type": "boolean", - "description": "Indicates whether the evaluation rule is enabled. Default is true." - }, - "systemData": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "System metadata for the evaluation rule.", - "readOnly": true - } - }, - "description": "Evaluation rule model." - }, - "EvaluationRuleAction": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleActionType" - } - ], - "description": "Type of the evaluation action." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", - "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" - } - }, - "description": "Evaluation action model." - }, - "EvaluationRuleActionType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "continuousEvaluation", - "humanEvaluationPreview" - ] - } - ], - "description": "Type of the evaluation action." - }, - "EvaluationRuleEventType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "responseCompleted", - "manual" - ] - } - ], - "description": "Type of the evaluation rule event." - }, - "EvaluationRuleFilter": { - "type": "object", - "required": [ - "agentName" - ], - "properties": { - "agentName": { - "type": "string", - "description": "Filter by agent name." - } - }, - "description": "Evaluation filter model." - }, - "EvaluationRunClusterInsightRequest": { - "type": "object", - "required": [ - "type", - "evalId", - "runIds" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationRunClusterInsight" - ], - "description": "The type of insights request." - }, - "evalId": { - "type": "string", - "description": "Evaluation Id for the insights." - }, - "runIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of evaluation run IDs for the insights." - }, - "modelConfiguration": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightModelConfiguration" - } - ], - "description": "Configuration of the model used in the insight generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightRequest" - } - ], - "description": "Insights on set of Evaluation Results" - }, - "EvaluationRunClusterInsightResult": { - "type": "object", - "required": [ - "type", - "clusterInsight" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationRunClusterInsight" - ], - "description": "The type of insights result." - }, - "clusterInsight": { - "$ref": "#/components/schemas/ClusterInsightResult" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "Insights from the evaluation run cluster analysis." - }, - "EvaluationScheduleTask": { - "type": "object", - "required": [ - "type", - "evalId", - "evalRun" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Evaluation" - ] - }, - "evalId": { - "type": "string", - "description": "Identifier of the evaluation group." - }, - "evalRun": { - "type": "object", - "description": "The evaluation run payload." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleTask" - } - ], - "description": "Evaluation task for the schedule." - }, - "EvaluationSuiteRunRequest": { - "type": "object", - "properties": { - "evaluation_name": { - "type": "string", - "description": "Name for the evaluation. Default: '{suiteName}-runs'." - }, - "evaluation_suite_version": { - "type": "string", - "description": "Evaluation suite version to run. Default: latest." - }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "Overrides the suite's default evaluation level. If omitted, uses the level from the suite." - } - }, - "description": "Request body for running an evaluation from a suite." - }, - "EvaluationSuiteRunResponse": { - "type": "object", - "required": [ - "evaluation_suite_name", - "evaluation_suite_version", - "results" - ], - "properties": { - "evaluation_suite_name": { - "type": "string", - "description": "The evaluation suite name used." - }, - "evaluation_suite_version": { - "type": "string", - "description": "The evaluation suite version resolved." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationSuiteRunResult" - }, - "description": "The run results. Currently a single-element array; will support multiple runs in the future." - } - }, - "description": "Response from running an evaluation suite." - }, - "EvaluationSuiteRunResult": { - "type": "object", - "required": [ - "eval_id", - "run_id", - "status", - "created_at" - ], - "properties": { - "eval_id": { - "type": "string", - "description": "The evaluation ID created." - }, - "run_id": { - "type": "string", - "description": "The eval run ID created." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/JobStatus" - } - ], - "description": "Status of the run." - }, - "created_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when the run was created." - } - }, - "description": "Result of a single evaluation run within a suite execution." - }, - "EvaluationSuiteSubtype": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "default", - "benchmark" - ] - } - ], - "description": "The subtype of an evaluation suite." - }, - "EvaluationSuiteVersion": { - "type": "object", - "required": [ - "testing_criteria", - "name", - "version" - ], - "properties": { - "display_name": { - "type": "string", - "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." - }, - "subtype": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteSubtype" - } - ], - "description": "Subtype of the evaluation suite." - }, - "dataset": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationDatasetReference" - } - ], - "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." - }, - "testing_criteria": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" - }, - { - "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" - } - ] - }, - "minItems": 1, - "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." - }, - "input_messages": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" - } - ], - "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." - }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "Default evaluation level for this suite. Can be overridden at run time." - }, - "name": { - "type": "string", - "description": "The name of the resource.", - "readOnly": true - }, - "version": { - "type": "string", - "description": "The version of the resource.", - "readOnly": true - } - }, - "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." - }, - "EvaluationSuiteVersionCreate": { - "type": "object", - "required": [ - "testing_criteria" - ], - "properties": { - "display_name": { - "type": "string", - "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." - }, - "subtype": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteSubtype" - } - ], - "description": "Subtype of the evaluation suite." - }, - "dataset": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationDatasetReference" - } - ], - "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." - }, - "testing_criteria": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" - }, - { - "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" - } - ] - }, - "minItems": 1, - "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." - }, - "input_messages": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" - } - ], - "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." - }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "Default evaluation level for this suite. Can be overridden at run time." - }, - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - } - }, - "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." - }, - "EvaluationSuiteVersionUpdate": { - "type": "object", - "required": [ - "testing_criteria" - ], - "properties": { - "display_name": { - "type": "string", - "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." - }, - "subtype": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationSuiteSubtype" - } - ], - "description": "Subtype of the evaluation suite." - }, - "dataset": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationDatasetReference" - } - ], - "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." - }, - "testing_criteria": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" - }, - { - "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" - } - ] - }, - "minItems": 1, - "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." - }, - "input_messages": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" - } - ], - "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." - }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "Default evaluation level for this suite. Can be overridden at run time." - }, - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - } - }, - "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." - }, - "EvaluationTaxonomy": { - "type": "object", - "required": [ - "name", - "version", - "taxonomyInput" - ], - "properties": { - "id": { - "type": "string", - "description": "Asset ID, a unique identifier for the asset", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the resource", - "readOnly": true - }, - "version": { - "type": "string", - "description": "The version of the resource", - "readOnly": true - }, - "taxonomyInput": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTaxonomyInput" - } - ], - "description": "Input configuration for the evaluation taxonomy." - }, - "taxonomyCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxonomyCategory" - }, - "description": "List of taxonomy categories." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the evaluation taxonomy." - } - }, - "description": "Evaluation Taxonomy Definition" - }, - "EvaluationTaxonomyCreateOrUpdate": { - "type": "object", - "required": [ - "taxonomyInput" - ], - "properties": { - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - }, - "taxonomyInput": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTaxonomyInput" - } - ], - "description": "Input configuration for the evaluation taxonomy." - }, - "taxonomyCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxonomyCategory" - }, - "description": "List of taxonomy categories." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the evaluation taxonomy." - } - }, - "description": "Evaluation Taxonomy Definition" - }, - "EvaluationTaxonomyInput": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTaxonomyInputType" - } - ], - "description": "Input type of the evaluation taxonomy." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "agent": "#/components/schemas/AgentTaxonomyInput" - } - }, - "description": "Input configuration for the evaluation taxonomy." - }, - "EvaluationTaxonomyInputType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "agent", - "policy" - ] - } - ], - "description": "Type of the evaluation taxonomy input." - }, - "EvaluationTaxonomyInputUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTaxonomyInputType" - } - ], - "description": "Input type of the evaluation taxonomy." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "agent": "#/components/schemas/AgentTaxonomyInputUpdate" - } - }, - "description": "Input configuration for the evaluation taxonomy." - }, - "EvaluationTaxonomyUpdate": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - }, - "taxonomyInput": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTaxonomyInputUpdate" - } - ], - "description": "Input configuration for the evaluation taxonomy." - }, - "taxonomyCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxonomyCategory" - }, - "description": "List of taxonomy categories." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the evaluation taxonomy." - } - }, - "description": "Evaluation Taxonomy Definition" - }, - "EvaluatorCategory": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "quality", - "safety", - "agents" - ] - } - ], - "description": "The category of the evaluator" - }, - "EvaluatorDefinition": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorDefinitionType" - } - ], - "description": "The type of evaluator definition" - }, - "init_parameters": { - "type": "object", - "additionalProperties": {}, - "description": "The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters like type, properties, required." - }, - "data_schema": { - "type": "object", - "additionalProperties": {}, - "description": "The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like type, properties, required." - }, - "metrics": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EvaluatorMetric" - }, - "description": "List of output metrics produced by this evaluator" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "code": "#/components/schemas/CodeBasedEvaluatorDefinition", - "prompt": "#/components/schemas/PromptBasedEvaluatorDefinition" - } - }, - "description": "Base evaluator configuration with discriminator" - }, - "EvaluatorDefinitionType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "prompt", - "code", - "prompt_and_code", - "service", - "openai_graders" - ] - } - ], - "description": "The type of evaluator definition" - }, - "EvaluatorMetric": { - "type": "object", - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorMetricType" - } - ], - "description": "Type of the metric." - }, - "desirable_direction": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorMetricDirection" - } - ], - "description": "It indicates whether a higher value is better or a lower value is better for this metric." - }, - "min_value": { - "type": "number", - "format": "float", - "description": "Minimum value for the metric" - }, - "max_value": { - "type": "number", - "format": "float", - "description": "Maximum value for the metric. If not specified, it is assumed to be unbounded." - }, - "threshold": { - "type": "number", - "format": "float", - "description": "Default pass/fail threshold for this metric." - }, - "is_primary": { - "type": "boolean", - "description": "Indicates if this metric is primary when there are multiple metrics." - } - }, - "description": "Evaluator Metric" - }, - "EvaluatorMetricDirection": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "increase", - "decrease", - "neutral" - ] - } - ], - "description": "The direction of the metric indicating whether a higher value is better, a lower value is better, or neutral" - }, - "EvaluatorMetricType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "ordinal", - "continuous", - "boolean" - ] - } - ], - "description": "The type of the evaluator" - }, - "EvaluatorType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "builtin", - "custom" - ] - } - ], - "description": "The type of the evaluator" - }, - "EvaluatorVersion": { - "type": "object", - "required": [ - "evaluator_type", - "categories", - "definition", - "created_by", - "created_at", - "modified_at", - "name", - "version" - ], - "properties": { - "display_name": { - "type": "string", - "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Metadata about the evaluator" - }, - "evaluator_type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorType" - } - ], - "description": "The type of the evaluator" - }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorCategory" - }, - "description": "The categories of the evaluator" - }, - "definition": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorDefinition" - } - ], - "description": "Definition of the evaluator" - }, - "created_by": { - "type": "string", - "description": "Creator of the evaluator", - "readOnly": true - }, - "created_at": { - "type": "string", - "description": "Creation date/time of the evaluator", - "readOnly": true - }, - "modified_at": { - "type": "string", - "description": "Last modified date/time of the evaluator", - "readOnly": true - }, - "id": { - "type": "string", - "description": "Asset ID, a unique identifier for the asset", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the resource", - "readOnly": true - }, - "version": { - "type": "string", - "description": "The version of the resource", - "readOnly": true - } - }, - "description": "Evaluator Definition" - }, - "EvaluatorVersionCreate": { - "type": "object", - "required": [ - "evaluator_type", - "categories", - "definition" - ], - "properties": { - "display_name": { - "type": "string", - "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Metadata about the evaluator" - }, - "evaluator_type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorType" - } - ], - "description": "The type of the evaluator" - }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorCategory" - }, - "description": "The categories of the evaluator" - }, - "definition": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorDefinition" - } - ], - "description": "Definition of the evaluator" - }, - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - } - }, - "description": "Evaluator Definition" - }, - "EvaluatorVersionUpdate": { - "type": "object", - "properties": { - "display_name": { - "type": "string", - "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Metadata about the evaluator" - }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorCategory" - }, - "description": "The categories of the evaluator" - }, - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - } - }, - "description": "Evaluator Definition" - }, - "ExternalAgentDefinition": { - "type": "object", - "required": [ - "kind" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "external" - ] - }, - "otel_agent_id": { - "type": "string", - "description": "The OpenTelemetry agent identifier used to attribute customer-emitted spans to this Foundry agent.\nSpans must include the attribute `gen_ai.agent.id = ` to appear under this registration.\nDefaults to the top-level agent name when omitted. Provide an explicit value only for migration scenarios\nwhere the running external agent already emits a stable id that differs from the Foundry agent name.\nThe resolved value is always echoed on read." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentDefinition" - } - ], - "description": "The external agent definition. Represents a third-party agent hosted outside Foundry (for example, on GCP or AWS).\nRegistration is metadata-only: Foundry records the agent definition to light up observability experiences (traces, evaluations)\nover customer-emitted OpenTelemetry data.", - "x-ms-foundry-meta": { - "required_previews": [ - "ExternalAgents=V1Preview" - ] - } - }, - "FabricDataAgentToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "fabric_dataagent_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 Fabric data agent tool call." - }, - "FabricDataAgentToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "fabric_dataagent_preview_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 Fabric data agent 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 Fabric data agent tool call." - }, - "FabricDataAgentToolParameters": { - "type": "object", - "properties": { - "project_connections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolProjectConnection" - }, - "maxItems": 1, - "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." - } - }, - "description": "The fabric data agent tool parameters." - }, - "FabricIQPreviewTool": { - "type": "object", - "required": [ - "type", - "project_connection_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "fabric_iq_preview" - ], - "description": "The object type, which is always 'fabric_iq_preview'." - }, - "project_connection_id": { - "type": "string", - "description": "The ID of the FabricIQ project connection." - }, - "server_label": { - "type": "string", - "description": "(Optional) The label of the FabricIQ MCP server to connect to." - }, - "server_url": { - "type": "string", - "format": "uri", - "description": "(Optional) The URL of the FabricIQ MCP server. If not provided, the URL from the project connection will be used." - }, - "require_approval": { - "anyOf": [ - { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolRequireApproval" - } - ], - "nullable": true - }, - { - "type": "string", - "nullable": true - } - ], - "description": "(Optional) Whether the agent requires approval before executing actions. Default is always.", - "default": "always" - }, - "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." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A FabricIQ server-side tool." - }, - "FileDatasetVersion": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "uri_file" - ], - "description": "Dataset type" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/DatasetVersion" - } - ], - "description": "FileDatasetVersion Definition" - }, - "FileDatasetVersionUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "uri_file" - ], - "description": "Dataset type" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/DatasetVersionUpdate" - } - ], - "description": "FileDatasetVersion Definition" - }, - "FixedRatioVersionSelectionRule": { - "type": "object", - "required": [ - "type", - "traffic_percentage" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "FixedRatio" - ] - }, - "traffic_percentage": { - "type": "integer", - "format": "int32", - "minimum": 0, - "maximum": 100, - "description": "The percentage of traffic to route to the version. Must be between 0 and 100." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/VersionSelectionRule" - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "FolderDatasetVersion": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "uri_folder" - ], - "description": "Dataset type" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/DatasetVersion" - } - ], - "description": "FileDatasetVersion Definition" - }, - "FolderDatasetVersionUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "uri_folder" - ], - "description": "Dataset type" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/DatasetVersionUpdate" - } - ], - "description": "FileDatasetVersion Definition" - }, - "FoundryModelArtifactProfileCategory": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "DataOnly", - "RuntimeDependent", - "Unknown" - ] - } - ], - "description": "The artifact profile category." - }, - "FoundryModelArtifactProfileSignal": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "PickleDeserialization", - "CustomPythonCode", - "DynamicOps", - "NativeBinary", - "UnknownFormat" - ] - } - ], - "description": "Signals detected in the model artifact." - }, - "FoundryModelSourceType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "LocalUpload", - "TrainingJob" - ] - } - ], - "description": "The source type of the model." - }, - "FoundryModelWarning": { - "type": "object", - "properties": { - "code": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryModelWarningCode" - } - ], - "description": "The warning code." - }, - "message": { - "type": "string", - "description": "The warning message." - } - }, - "description": "A warning associated with a model." - }, - "FoundryModelWarningCode": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "RuntimeDependentArtifact", - "UnclassifiedArtifact" - ] - } - ], - "description": "Warning code for model artifacts." - }, - "FoundryModelWeightType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "FullWeight", - "LoRA", - "DraftModel" - ] - } - ], - "description": "The weight type of the model." - }, - "FoundryTimestamp": { - "type": "integer", - "format": "unixtime" - }, - "FunctionToolCall": { - "type": "object", - "required": [ - "name", - "arguments" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the function to call." - }, - "arguments": { - "type": "string", - "description": "The arguments to call the function with, as generated by the model in JSON format." - } - }, - "description": "Details of a function tool call." - }, - "HeaderTelemetryEndpointAuth": { - "type": "object", - "required": [ - "type", - "header_name", - "secret_id", - "secret_key" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "header" - ], - "description": "The authentication type, always 'header' for header-based secret authentication." - }, - "header_name": { - "type": "string", - "description": "The name of the HTTP header to inject the secret value into.", - "example": "X-Otlp-Api-Key" - }, - "secret_id": { - "type": "string", - "description": "The identifier of the secret store or connection.", - "example": "my-secret-store" - }, - "secret_key": { - "type": "string", - "description": "The key within the secret to retrieve the authentication value.", - "example": "OTLP_KEY" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/TelemetryEndpointAuth" - } - ], - "description": "Header-based secret authentication for a telemetry endpoint. The resolved secret value is injected as an HTTP header.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "HostedAgentDefinition": { - "type": "object", - "required": [ - "kind", - "cpu", - "memory" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "hosted" - ] - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "An array of tools the hosted agent's model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter." - }, - "container_protocol_versions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProtocolVersionRecord" - }, - "description": "The protocols that the agent supports for ingress communication of the containers.", - "example": [ - { - "protocol": "responses", - "version": "v0.1.1" - }, - { - "protocol": "invocations", - "version": "v0.0.1" - }, - { - "protocol": "a2a", - "version": "v0.3.0" - } - ] - }, - "cpu": { - "type": "string", - "description": "The CPU configuration for the hosted agent.", - "example": "0.25" - }, - "memory": { - "type": "string", - "description": "The memory configuration for the hosted agent.", - "example": "0.5Gi" - }, - "environment_variables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables to set in the hosted agent container.", - "example": { - "name": "LOG_LEVEL", - "value": "debug" - } - }, - "image": { - "type": "string", - "description": "The image ID for the agent, applicable to image-based hosted agents.", - "example": "my-registry.azurecr.io/my-hosted-agent:latest" - }, - "container_configuration": { - "allOf": [ - { - "$ref": "#/components/schemas/ContainerConfiguration" - } - ], - "description": "Container-based deployment configuration. Provide this for image-based deployments. Mutually exclusive with code_configuration — the service validates that exactly one is set.", - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - } - }, - "protocol_versions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProtocolVersionRecord" - }, - "description": "The protocols that the agent supports for ingress communication.", - "example": [ - { - "protocol": "responses", - "version": "v0.1.1" - }, - { - "protocol": "a2a", - "version": "v0.3.0" - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - } - }, - "code_configuration": { - "allOf": [ - { - "$ref": "#/components/schemas/CodeConfiguration" - } - ], - "description": "Code-based deployment configuration. Provide this for code-based deployments. Mutually exclusive with container_configuration — the service validates that exactly one is set.", - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - } - }, - "telemetry_config": { - "allOf": [ - { - "$ref": "#/components/schemas/TelemetryConfig" - } - ], - "description": "Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentDefinition" - } - ], - "description": "The hosted agent definition.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "HourlyRecurrenceSchedule": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Hourly" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/RecurrenceSchedule" - } - ], - "description": "Hourly recurrence schedule." - }, - "HumanEvaluationPreviewRuleAction": { - "type": "object", - "required": [ - "type", - "templateId" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "humanEvaluationPreview" - ] - }, - "templateId": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetId" - } - ], - "description": "Human evaluation template Id." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleAction" - } - ], - "description": "Evaluation rule action for human evaluation." - }, - "Index": { - "type": "object", - "required": [ - "type", - "name", - "version" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/IndexType" - } - ], - "description": "Type of index" - }, - "id": { - "type": "string", - "description": "Asset ID, a unique identifier for the asset", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the resource", - "readOnly": true - }, - "version": { - "type": "string", - "description": "The version of the resource", - "readOnly": true - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "AzureSearch": "#/components/schemas/AzureAISearchIndex", - "ManagedAzureSearch": "#/components/schemas/ManagedAzureAISearchIndex", - "CosmosDBNoSqlVectorStore": "#/components/schemas/CosmosDBIndex" - } - }, - "description": "Index resource Definition" - }, - "IndexType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "AzureSearch", - "CosmosDBNoSqlVectorStore", - "ManagedAzureSearch" - ] - } - ] - }, - "IndexUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/IndexType" - } - ], - "description": "Type of index" - }, - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "AzureSearch": "#/components/schemas/AzureAISearchIndexUpdate", - "ManagedAzureSearch": "#/components/schemas/ManagedAzureAISearchIndexUpdate", - "CosmosDBNoSqlVectorStore": "#/components/schemas/CosmosDBIndexUpdate" - } - }, - "description": "Index resource Definition" - }, - "Insight": { - "type": "object", - "required": [ - "id", - "metadata", - "state", - "displayName", - "request" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the insights report.", - "readOnly": true - }, - "metadata": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightsMetadata" - } - ], - "description": "Metadata about the insights report.", - "readOnly": true - }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/Azure.Core.Foundations.OperationState" - } - ], - "description": "The current state of the insights.", - "readOnly": true - }, - "displayName": { - "type": "string", - "description": "User friendly display name for the insight." - }, - "request": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightRequest" - } - ], - "description": "Request for the insights analysis." - }, - "result": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "The result of the insights report.", - "readOnly": true - } - }, - "description": "The response body for cluster insights." - }, - "InsightCluster": { - "type": "object", - "required": [ - "id", - "label", - "suggestion", - "suggestionTitle", - "description", - "weight" - ], - "properties": { - "id": { - "type": "string", - "description": "The id of the analysis cluster." - }, - "label": { - "type": "string", - "description": "Label for the cluster" - }, - "suggestion": { - "type": "string", - "description": "Suggestion for the cluster" - }, - "suggestionTitle": { - "type": "string", - "description": "The title of the suggestion for the cluster" - }, - "description": { - "type": "string", - "description": "Description of the analysis cluster." - }, - "weight": { - "type": "integer", - "format": "int32", - "description": "The weight of the analysis cluster. This indicate number of samples in the cluster." - }, - "subClusters": { - "description": "List of subclusters within this cluster. Empty if no subclusters exist.", - "type": "array", - "items": { - "$ref": "#/components/schemas/InsightCluster" - } - }, - "samples": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InsightSample" - }, - "description": "List of samples that belong to this cluster. Empty if samples are part of subclusters." - } - }, - "description": "A cluster of analysis samples." - }, - "InsightModelConfiguration": { - "type": "object", - "required": [ - "modelDeploymentName" - ], - "properties": { - "modelDeploymentName": { - "type": "string", - "description": "The model deployment to be evaluated. Accepts either the deployment name alone or with the connection name as '{connectionName}/'." - } - }, - "description": "Configuration of the model used in the insight generation." - }, - "InsightRequest": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightType" - } - ], - "description": "The type of request." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightRequest", - "AgentClusterInsight": "#/components/schemas/AgentClusterInsightRequest", - "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightRequest" - } - }, - "description": "The request of the insights report." - }, - "InsightResult": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightType" - } - ], - "description": "The type of insights result." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightResult", - "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightResult", - "AgentClusterInsight": "#/components/schemas/AgentClusterInsightResult" - } - }, - "description": "The result of the insights." - }, - "InsightSample": { - "type": "object", - "required": [ - "id", - "type", - "features", - "correlationInfo" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the analysis sample." - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/SampleType" - } - ], - "description": "Sample type" - }, - "features": { - "type": "object", - "additionalProperties": {}, - "description": "Features to help with additional filtering of data in UX." - }, - "correlationInfo": { - "type": "object", - "additionalProperties": {}, - "description": "Info about the correlation for the analysis sample." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "EvaluationResultSample": "#/components/schemas/EvaluationResultSample" - } - }, - "description": "A sample from the analysis." - }, - "InsightScheduleTask": { - "type": "object", - "required": [ - "type", - "insight" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Insight" - ] - }, - "insight": { - "allOf": [ - { - "$ref": "#/components/schemas/Insight" - } - ], - "description": "The insight payload." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleTask" - } - ], - "description": "Insight task for the schedule." - }, - "InsightSummary": { - "type": "object", - "required": [ - "sampleCount", - "uniqueSubclusterCount", - "uniqueClusterCount", - "method", - "usage" - ], - "properties": { - "sampleCount": { - "type": "integer", - "format": "int32", - "description": "Total number of samples analyzed." - }, - "uniqueSubclusterCount": { - "type": "integer", - "format": "int32", - "description": "Total number of unique subcluster labels." - }, - "uniqueClusterCount": { - "type": "integer", - "format": "int32", - "description": "Total number of unique clusters." - }, - "method": { - "type": "string", - "description": "Method used for clustering." - }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterTokenUsage" - } - ], - "description": "Token usage while performing clustering analysis" - } - }, - "description": "Summary of the error cluster analysis." - }, - "InsightType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "EvaluationRunClusterInsight", - "AgentClusterInsight", - "EvaluationComparison" - ] - } - ], - "description": "The request of the insights." - }, - "InsightsMetadata": { - "type": "object", - "required": [ - "createdAt" - ], - "properties": { - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp when the insights were created." - }, - "completedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp when the insights were completed." - } - }, - "description": "Metadata about the insights." - }, - "ItemGenerationParams": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParamsType" - } - ], - "description": "The type of item generation parameters to use." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "red_team": "#/components/schemas/RedTeamItemGenerationParams", - "red_team_seed_prompts": "#/components/schemas/RedTeamSeedPromptsItemGenerationParams", - "red_team_taxonomy": "#/components/schemas/RedTeamTaxonomyItemGenerationParams", - "response_retrieval": "#/components/schemas/ResponseRetrievalItemGenerationParams", - "conversation_gen_preview": "#/components/schemas/ConversationGenPreviewItemGenerationParams" - } - }, - "description": "Represents the set of parameters used to control item generation operations." - }, - "ItemGenerationParamsType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "red_team", - "response_retrieval", - "red_team_seed_prompts", - "red_team_taxonomy", - "synthetic_data_gen_preview", - "conversation_gen_preview" - ] - } - ], - "description": "The types of parameters for red team item generation." - }, - "JobStatus": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "queued", - "in_progress", - "succeeded", - "failed", - "cancelled" - ] - } - ], - "description": "Extensible status values shared by Foundry jobs." - }, - "LoraConfig": { - "type": "object", - "properties": { - "rank": { - "type": "integer", - "format": "int32", - "description": "LoRA rank (r). Positive integer. Common values: 8, 16, 32, 64." - }, - "alpha": { - "type": "integer", - "format": "int32", - "description": "LoRA scaling factor (α). Positive integer; typically 2× the rank." - }, - "targetModules": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Model layers modified by the adapter (e.g., q_proj, v_proj). Auto-detected from adapter_config.json if omitted." - }, - "dropout": { - "type": "number", - "format": "float", - "description": "Dropout rate used during training. Informational — not used at serving time." - } - }, - "description": "Adapter-specific metadata for LoRA models. Drives serving engine configuration at deployment time." - }, - "ManagedAgentIdentityBlueprintReference": { - "type": "object", - "required": [ - "type", - "blueprint_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "ManagedAgentIdentityBlueprint" - ] - }, - "blueprint_id": { - "type": "string", - "description": "The ID of the managed blueprint" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentBlueprintReference" - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "ManagedAzureAISearchIndex": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "ManagedAzureSearch" - ], - "description": "Type of index" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Index" - } - ], - "description": "Managed Azure AI Search Index Definition" - }, - "ManagedAzureAISearchIndexUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "ManagedAzureSearch" - ], - "description": "Type of index" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/IndexUpdate" - } - ], - "description": "Managed Azure AI Search Index Definition" - }, - "MemoryItem": { - "type": "object", - "required": [ - "memory_id", - "updated_at", - "scope", - "content", - "kind" - ], - "properties": { - "memory_id": { - "type": "string", - "description": "The unique ID of the memory item." - }, - "updated_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The last update time of the memory item." - }, - "scope": { - "type": "string", - "description": "The namespace that logically groups and isolates memories, such as a user ID." - }, - "content": { - "type": "string", - "description": "The content of the memory." - }, - "kind": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryItemKind" - } - ], - "description": "The kind of the memory item." - } - }, - "discriminator": { - "propertyName": "kind", - "mapping": { - "user_profile": "#/components/schemas/UserProfileMemoryItem", - "chat_summary": "#/components/schemas/ChatSummaryMemoryItem" - } - }, - "description": "A single memory item stored in the memory store, containing content and metadata.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryItemKind": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "user_profile", - "chat_summary" - ] - } - ], - "description": "Memory item kind.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryOperation": { - "type": "object", - "required": [ - "kind", - "memory_item" - ], - "properties": { - "kind": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryOperationKind" - } - ], - "description": "The type of memory operation being performed." - }, - "memory_item": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryItem" - } - ], - "description": "The memory item to create, update, or delete." - } - }, - "description": "Represents a single memory operation (create, update, or delete) performed on a memory item.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryOperationKind": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "create", - "update", - "delete" - ] - } - ], - "description": "Memory operation kind.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemorySearchItem": { - "type": "object", - "required": [ - "memory_item" - ], - "properties": { - "memory_item": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryItem" - } - ], - "description": "Retrieved memory item." - } - }, - "description": "A retrieved memory item from memory search.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemorySearchOptions": { - "type": "object", - "properties": { - "max_memories": { - "type": "integer", - "format": "int32", - "description": "Maximum number of memory items to return." - } - }, - "description": "Memory search options.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemorySearchPreviewTool": { - "type": "object", - "required": [ - "type", - "memory_store_name", - "scope" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "memory_search_preview" - ], - "description": "The type of the tool. Always `memory_search_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." - }, - "memory_store_name": { - "type": "string", - "description": "The name of the memory store to use." - }, - "scope": { - "type": "string", - "description": "The namespace used to group and isolate memories, such as a user ID.\nLimits which memories can be retrieved or updated.\nUse special variable `{{$userId}}` to scope memories to the current signed-in user." - }, - "search_options": { - "allOf": [ - { - "$ref": "#/components/schemas/MemorySearchOptions" - } - ], - "description": "Options for searching the memory store." - }, - "update_delay": { - "type": "integer", - "format": "int32", - "description": "Time to wait before updating memories after inactivity (seconds). Default 300.", - "default": 300 - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool for integrating memories into the agent." - }, - "MemorySearchToolCallItemParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "memory_search_call" - ] - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemorySearchItem" - }, - "nullable": true, - "description": "The results returned from the memory search." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ] - }, - "MemorySearchToolCallItemResource": { - "type": "object", - "required": [ - "type", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "memory_search_call" - ] - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" - ], - "description": "The status of the memory search tool call. One of `in_progress`,\n`searching`, `completed`, `incomplete` or `failed`," - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemorySearchItem" - }, - "nullable": true, - "description": "The results returned from the memory search." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ] - }, - "MemoryStoreDefaultDefinition": { - "type": "object", - "required": [ - "kind", - "chat_model", - "embedding_model" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "default" - ], - "description": "The kind of the memory store." - }, - "chat_model": { - "type": "string", - "description": "The name or identifier of the chat completion model deployment used for memory processing." - }, - "embedding_model": { - "type": "string", - "description": "The name or identifier of the embedding model deployment used for memory processing." - }, - "options": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreDefaultOptions" - } - ], - "description": "Default memory store options." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreDefinition" - } - ], - "description": "Default memory store implementation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreDefaultOptions": { - "type": "object", - "required": [ - "user_profile_enabled", - "chat_summary_enabled" - ], - "properties": { - "user_profile_enabled": { - "type": "boolean", - "description": "Whether to enable user profile extraction and storage. Default is true.", - "default": true - }, - "user_profile_details": { - "type": "string", - "description": "Specific categories or types of user profile information to extract and store." - }, - "chat_summary_enabled": { - "type": "boolean", - "description": "Whether to enable chat summary extraction and storage. Default is true.", - "default": true - } - }, - "description": "Default memory store configurations.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreDefinition": { - "type": "object", - "required": [ - "kind" - ], - "properties": { - "kind": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreKind" - } - ], - "description": "The kind of the memory store." - } - }, - "discriminator": { - "propertyName": "kind", - "mapping": { - "default": "#/components/schemas/MemoryStoreDefaultDefinition" - } - }, - "description": "Base definition for memory store configurations.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreDeleteScopeResponse": { - "type": "object", - "required": [ - "object", - "name", - "scope", - "deleted" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "memory_store.scope.deleted" - ], - "description": "The object type. Always 'memory_store.scope.deleted'." - }, - "name": { - "type": "string", - "description": "The name of the memory store." - }, - "scope": { - "type": "string", - "description": "The scope from which memories were deleted." - }, - "deleted": { - "type": "boolean", - "description": "Whether the deletion operation was successful." - } - }, - "description": "Response for deleting memories from a scope.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreKind": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "default" - ] - } - ], - "description": "The type of memory store implementation to use.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreObject": { - "type": "object", - "required": [ - "object", - "id", - "created_at", - "updated_at", - "name", - "definition" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "memory_store" - ], - "description": "The object type, which is always 'memory_store'." - }, - "id": { - "type": "string", - "description": "The unique identifier of the memory store." - }, - "created_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The Unix timestamp (seconds) when the memory store was created." - }, - "updated_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The Unix timestamp (seconds) when the memory store was last updated." - }, - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the memory store." - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the memory store." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the memory store." - }, - "definition": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreDefinition" - } - ], - "description": "The definition of the memory store." - } - }, - "description": "A memory store that can store and retrieve user memories.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreOperationUsage": { - "type": "object", - "required": [ - "embedding_tokens", - "input_tokens", - "input_tokens_details", - "output_tokens", - "output_tokens_details", - "total_tokens" - ], - "properties": { - "embedding_tokens": { - "type": "integer", - "format": "int32", - "description": "The number of embedding tokens." - }, - "input_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of input tokens." - }, - "input_tokens_details": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" - } - ], - "description": "A detailed breakdown of the input tokens." - }, - "output_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of output tokens." - }, - "output_tokens_details": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" - } - ], - "description": "A detailed breakdown of the output tokens." - }, - "total_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The total number of tokens used." - } - }, - "description": "Usage statistics of a memory store operation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreSearchResponse": { - "type": "object", - "required": [ - "search_id", - "memories", - "usage" - ], - "properties": { - "search_id": { - "type": "string", - "description": "The unique ID of this search request. Use this value as previous_search_id in subsequent requests to perform incremental searches." - }, - "memories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemorySearchItem" - }, - "description": "Related memory items found during the search operation." - }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreOperationUsage" - } - ], - "description": "Usage statistics associated with the memory search operation." - } - }, - "description": "Memory search response.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreUpdateCompletedResult": { - "type": "object", - "required": [ - "memory_operations", - "usage" - ], - "properties": { - "memory_operations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemoryOperation" - }, - "description": "A list of individual memory operations that were performed during the update." - }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreOperationUsage" - } - ], - "description": "Usage statistics associated with the memory update operation." - } - }, - "description": "Memory update result.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreUpdateResponse": { - "type": "object", - "required": [ - "update_id", - "status" - ], - "properties": { - "update_id": { - "type": "string", - "description": "The unique ID of this update request. Use this value as previous_update_id in subsequent requests to perform incremental updates." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreUpdateStatus" - } - ], - "description": "The status of the memory update operation. One of \"queued\", \"in_progress\", \"completed\", \"failed\", or \"superseded\"." - }, - "superseded_by": { - "type": "string", - "description": "The update_id the operation was superseded by when status is \"superseded\"." - }, - "result": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreUpdateCompletedResult" - } - ], - "description": "The result of memory store update operation when status is \"completed\"." - }, - "error": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Error" - } - ], - "description": "Error object that describes the error when status is \"failed\"." - } - }, - "description": "Provides the status of a memory store update operation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreUpdateStatus": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "superseded" - ] - } - ], - "description": "Status of a memory store update operation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MicrosoftFabricPreviewTool": { - "type": "object", - "required": [ - "type", - "fabric_dataagent_preview" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "fabric_dataagent_preview" - ], - "description": "The object type, which is always 'fabric_dataagent_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." - }, - "fabric_dataagent_preview": { - "allOf": [ - { - "$ref": "#/components/schemas/FabricDataAgentToolParameters" - } - ], - "description": "The fabric data agent tool parameters." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for a Microsoft Fabric tool as used to configure an agent." - }, - "ModelCredentialRequest": { - "type": "object", - "required": [ - "blobUri" - ], - "properties": { - "blobUri": { - "type": "string", - "format": "uri", - "description": "Blob URI of the model asset to fetch credentials for." - } - }, - "description": "Request to fetch credentials for a model asset." - }, - "ModelDeployment": { - "type": "object", - "required": [ - "type", - "modelName", - "modelVersion", - "modelPublisher", - "capabilities", - "sku" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "ModelDeployment" - ], - "description": "The type of the deployment" - }, - "modelName": { - "type": "string", - "description": "Publisher-specific name of the deployed model", - "readOnly": true - }, - "modelVersion": { - "type": "string", - "description": "Publisher-specific version of the deployed model", - "readOnly": true - }, - "modelPublisher": { - "type": "string", - "description": "Name of the deployed model's publisher", - "readOnly": true - }, - "capabilities": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Capabilities of deployed model", - "readOnly": true - }, - "sku": { - "allOf": [ - { - "$ref": "#/components/schemas/Sku" - } - ], - "description": "Sku of the model deployment", - "readOnly": true - }, - "connectionName": { - "type": "string", - "description": "Name of the connection the deployment comes from", - "readOnly": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Deployment" - } - ], - "description": "Model Deployment Definition" - }, - "ModelPendingUploadRequest": { - "type": "object", - "required": [ - "pendingUploadType" - ], - "properties": { - "pendingUploadId": { - "type": "string", - "description": "If PendingUploadId is not provided, a random GUID will be used." - }, - "connectionName": { - "type": "string", - "description": "Azure Storage Account connection name to use for generating temporary SAS token" - }, - "pendingUploadType": { - "type": "string", - "enum": [ - "TemporaryBlobReference" - ], - "description": "The type of pending upload. Only TemporaryBlobReference is supported for models." - } - }, - "description": "Represents a request for a pending upload of a model version." - }, - "ModelPendingUploadResponse": { - "type": "object", - "required": [ - "blobReference", - "pendingUploadId", - "pendingUploadType" - ], - "properties": { - "blobReference": { - "allOf": [ - { - "$ref": "#/components/schemas/BlobReference" - } - ], - "description": "Container-level read, write, list SAS." - }, - "pendingUploadId": { - "type": "string", - "description": "ID for this upload request." - }, - "version": { - "type": "string", - "description": "Version of asset to be created if user did not specify version when initially creating upload" - }, - "pendingUploadType": { - "type": "string", - "enum": [ - "TemporaryBlobReference" - ], - "description": "The type of pending upload. Only TemporaryBlobReference is supported for models." - } - }, - "description": "Represents the response for a model pending upload request." - }, - "ModelSamplingParams": { - "type": "object", - "properties": { - "temperature": { - "type": "number", - "format": "float", - "description": "The temperature parameter for sampling. Defaults to 1.0.", - "default": 1 - }, - "top_p": { - "type": "number", - "format": "float", - "description": "The top-p parameter for nucleus sampling. Defaults to 1.0.", - "default": 1 - }, - "seed": { - "type": "integer", - "format": "int32", - "description": "The random seed for reproducibility. Defaults to 42.", - "default": 42 - }, - "max_completion_tokens": { - "type": "integer", - "format": "int32", - "description": "The maximum number of tokens allowed in the completion." - } - }, - "description": "Represents a set of parameters used to control the sampling behavior of a language model during text generation." - }, - "ModelSourceData": { - "type": "object", - "properties": { - "sourceType": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryModelSourceType" - } - ], - "description": "The source type of the model" - }, - "jobId": { - "type": "string", - "description": "The job ID that produced this model" - } - }, - "description": "Source information for the model" - }, - "ModelVersion": { - "type": "object", - "required": [ - "blobUri", - "name", - "version" - ], - "properties": { - "systemData": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemDataV3" - } - ], - "description": "System related metadata", - "readOnly": true - }, - "blobUri": { - "type": "string", - "format": "uri", - "description": "URI of the model artifact in blob storage" - }, - "weightType": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryModelWeightType" - } - ], - "description": "The weight type of the model" - }, - "baseModel": { - "type": "string", - "description": "Base model asset ID" - }, - "source": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelSourceData" - } - ], - "description": "The source of the model" - }, - "loraConfig": { - "allOf": [ - { - "$ref": "#/components/schemas/LoraConfig" - } - ], - "description": "Adapter-specific configuration. Required when weight_type is lora; ignored otherwise. May be auto-populated from adapter_config.json when present in the uploaded files — user-provided values take precedence over auto-detected values." - }, - "artifactProfile": { - "allOf": [ - { - "$ref": "#/components/schemas/ArtifactProfile" - } - ], - "description": "The artifact profile of the model", - "readOnly": true - }, - "warnings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FoundryModelWarning" - }, - "description": "Service-computed advisory warnings derived from the artifact profile.", - "readOnly": true - }, - "id": { - "type": "string", - "description": "Asset ID, a unique identifier for the asset", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the resource", - "readOnly": true - }, - "version": { - "type": "string", - "description": "The version of the resource", - "readOnly": true - }, - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - } - }, - "description": "Model Version Definition" - }, - "MonthlyRecurrenceSchedule": { - "type": "object", - "required": [ - "type", - "daysOfMonth" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Monthly" - ], - "description": "Monthly recurrence type." - }, - "daysOfMonth": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Days of the month for the recurrence schedule." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/RecurrenceSchedule" - } - ], - "description": "Monthly recurrence schedule." - }, - "NoAuthenticationCredentials": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "None" - ], - "description": "The credential type ", - "readOnly": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "Credentials that do not require authentication" - }, - "OAuthConsentRequestOutputItem": { - "type": "object", - "required": [ - "id", - "type", - "consent_link", - "server_label" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "oauth_consent_request" - ] - }, - "consent_link": { - "type": "string", - "description": "The link the user can use to perform OAuth consent." - }, - "server_label": { - "type": "string", - "description": "The server label for the OAuth consent request." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "Request from the service for the user to perform OAuth consent." - }, - "OneTimeTrigger": { - "type": "object", - "required": [ - "type", - "triggerAt" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "OneTime" - ] - }, - "triggerAt": { - "type": "string", - "description": "Date and time for the one-time trigger in ISO 8601 format." - }, - "timeZone": { - "type": "string", - "description": "Time zone for the one-time trigger.", - "default": "UTC" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Trigger" - } - ], - "description": "One-time trigger." - }, - "OpenAI.Annotation": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.AnnotationType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "file_citation": "#/components/schemas/OpenAI.FileCitationBody", - "url_citation": "#/components/schemas/OpenAI.UrlCitationBody", - "container_file_citation": "#/components/schemas/OpenAI.ContainerFileCitationBody", - "file_path": "#/components/schemas/OpenAI.FilePath" - } - }, - "description": "An annotation that applies to a span of output text." - }, - "OpenAI.AnnotationType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "file_citation", - "url_citation", - "container_file_citation", - "file_path" - ] - } - ] - }, - "OpenAI.ApplyPatchCallOutputStatus": { - "type": "string", - "enum": [ - "completed", - "failed" - ] - }, - "OpenAI.ApplyPatchCallOutputStatusParam": { - "type": "string", - "enum": [ - "completed", - "failed" - ], - "description": "Outcome values reported for apply_patch tool call outputs.", - "title": "Apply patch call output status" - }, - "OpenAI.ApplyPatchCallStatus": { - "type": "string", - "enum": [ - "in_progress", - "completed" - ] - }, - "OpenAI.ApplyPatchCallStatusParam": { - "type": "string", - "enum": [ - "in_progress", - "completed" - ], - "description": "Status values reported for apply_patch tool calls.", - "title": "Apply patch call status" - }, - "OpenAI.ApplyPatchCreateFileOperation": { - "type": "object", - "required": [ - "type", - "path", - "diff" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "create_file" - ], - "description": "Create a new file with the provided diff.", - "x-stainless-const": true, - "default": "create_file" - }, - "path": { - "type": "string", - "description": "Path of the file to create." - }, - "diff": { - "type": "string", - "description": "Diff to apply." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" - } - ], - "description": "Instruction describing how to create a file via the apply_patch tool.", - "title": "Apply patch create file operation" - }, - "OpenAI.ApplyPatchCreateFileOperationParam": { - "type": "object", - "required": [ - "type", - "path", - "diff" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "create_file" - ], - "description": "The operation type. Always `create_file`.", - "x-stainless-const": true, - "default": "create_file" - }, - "path": { - "type": "string", - "minLength": 1, - "description": "Path of the file to create relative to the workspace root." - }, - "diff": { - "type": "string", - "maxLength": 10485760, - "description": "Unified diff content to apply when creating the file." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" - } - ], - "description": "Instruction for creating a new file via the apply_patch tool.", - "title": "Apply patch create file operation" - }, - "OpenAI.ApplyPatchDeleteFileOperation": { - "type": "object", - "required": [ - "type", - "path" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "delete_file" - ], - "description": "Delete the specified file.", - "x-stainless-const": true, - "default": "delete_file" - }, - "path": { - "type": "string", - "description": "Path of the file to delete." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" - } - ], - "description": "Instruction describing how to delete a file via the apply_patch tool.", - "title": "Apply patch delete file operation" - }, - "OpenAI.ApplyPatchDeleteFileOperationParam": { - "type": "object", - "required": [ - "type", - "path" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "delete_file" - ], - "description": "The operation type. Always `delete_file`.", - "x-stainless-const": true, - "default": "delete_file" - }, - "path": { - "type": "string", - "minLength": 1, - "description": "Path of the file to delete relative to the workspace root." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" - } - ], - "description": "Instruction for deleting an existing file via the apply_patch tool.", - "title": "Apply patch delete file operation" - }, - "OpenAI.ApplyPatchFileOperation": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperationType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "create_file": "#/components/schemas/OpenAI.ApplyPatchCreateFileOperation", - "delete_file": "#/components/schemas/OpenAI.ApplyPatchDeleteFileOperation", - "update_file": "#/components/schemas/OpenAI.ApplyPatchUpdateFileOperation" - } - }, - "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", - "title": "Apply patch operation" - }, - "OpenAI.ApplyPatchFileOperationType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "create_file", - "delete_file", - "update_file" - ] - } - ] - }, - "OpenAI.ApplyPatchOperationParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParamType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "create_file": "#/components/schemas/OpenAI.ApplyPatchCreateFileOperationParam", - "delete_file": "#/components/schemas/OpenAI.ApplyPatchDeleteFileOperationParam", - "update_file": "#/components/schemas/OpenAI.ApplyPatchUpdateFileOperationParam" - } - }, - "description": "One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.", - "title": "Apply patch operation" - }, - "OpenAI.ApplyPatchOperationParamType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "create_file", - "delete_file", - "update_file" - ] - } - ] - }, - "OpenAI.ApplyPatchToolParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch" - ], - "description": "The type of the tool. Always `apply_patch`.", - "x-stainless-const": true, - "default": "apply_patch" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "Allows the assistant to create, delete, or update files using unified diffs.", - "title": "Apply patch tool" - }, - "OpenAI.ApplyPatchUpdateFileOperation": { - "type": "object", - "required": [ - "type", - "path", - "diff" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "update_file" - ], - "description": "Update an existing file with the provided diff.", - "x-stainless-const": true, - "default": "update_file" - }, - "path": { - "type": "string", - "description": "Path of the file to update." - }, - "diff": { - "type": "string", - "description": "Diff to apply." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" - } - ], - "description": "Instruction describing how to update a file via the apply_patch tool.", - "title": "Apply patch update file operation" - }, - "OpenAI.ApplyPatchUpdateFileOperationParam": { - "type": "object", - "required": [ - "type", - "path", - "diff" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "update_file" - ], - "description": "The operation type. Always `update_file`.", - "x-stainless-const": true, - "default": "update_file" - }, - "path": { - "type": "string", - "minLength": 1, - "description": "Path of the file to update relative to the workspace root." - }, - "diff": { - "type": "string", - "maxLength": 10485760, - "description": "Unified diff content to apply to the existing file." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" - } - ], - "description": "Instruction for updating an existing file via the apply_patch tool.", - "title": "Apply patch update file operation" - }, - "OpenAI.ApproximateLocation": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "approximate" - ], - "description": "The type of location approximation. Always `approximate`.", - "x-stainless-const": true, - "default": "approximate" - }, - "country": { - "type": "string", - "nullable": true - }, - "region": { - "type": "string", - "nullable": true - }, - "city": { - "type": "string", - "nullable": true - }, - "timezone": { - "type": "string", - "nullable": true - } - } - }, - "OpenAI.AutoCodeInterpreterToolParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "auto" - ], - "description": "Always `auto`.", - "x-stainless-const": true, - "default": "auto" - }, - "file_ids": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 50, - "description": "An optional list of uploaded files to make available to your code." - }, - "memory_limit": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" - } - ], - "nullable": true - }, - "network_policy": { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" - } - }, - "description": "Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.", - "title": "Automatic Code Interpreter Tool Parameters" - }, - "OpenAI.ChatCompletionTool": { - "type": "object", - "required": [ - "type", - "function" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "function" - ], - "description": "The type of the tool. Currently, only `function` is supported.", - "x-stainless-const": true - }, - "function": { - "$ref": "#/components/schemas/OpenAI.FunctionObject" - } - }, - "description": "A function tool that can be used to generate a response.", - "title": "Function tool" - }, - "OpenAI.ChatModel": { - "type": "string", - "enum": [ - "gpt-5.2", - "gpt-5.2-2025-12-11", - "gpt-5.2-chat-latest", - "gpt-5.2-pro", - "gpt-5.2-pro-2025-12-11", - "gpt-5.1", - "gpt-5.1-2025-11-13", - "gpt-5.1-codex", - "gpt-5.1-mini", - "gpt-5.1-chat-latest", - "gpt-5", - "gpt-5-mini", - "gpt-5-nano", - "gpt-5-2025-08-07", - "gpt-5-mini-2025-08-07", - "gpt-5-nano-2025-08-07", - "gpt-5-chat-latest", - "gpt-4.1", - "gpt-4.1-mini", - "gpt-4.1-nano", - "gpt-4.1-2025-04-14", - "gpt-4.1-mini-2025-04-14", - "gpt-4.1-nano-2025-04-14", - "o4-mini", - "o4-mini-2025-04-16", - "o3", - "o3-2025-04-16", - "o3-mini", - "o3-mini-2025-01-31", - "o1", - "o1-2024-12-17", - "o1-preview", - "o1-preview-2024-09-12", - "o1-mini", - "o1-mini-2024-09-12", - "gpt-4o", - "gpt-4o-2024-11-20", - "gpt-4o-2024-08-06", - "gpt-4o-2024-05-13", - "gpt-4o-audio-preview", - "gpt-4o-audio-preview-2024-10-01", - "gpt-4o-audio-preview-2024-12-17", - "gpt-4o-audio-preview-2025-06-03", - "gpt-4o-mini-audio-preview", - "gpt-4o-mini-audio-preview-2024-12-17", - "gpt-4o-search-preview", - "gpt-4o-mini-search-preview", - "gpt-4o-search-preview-2025-03-11", - "gpt-4o-mini-search-preview-2025-03-11", - "chatgpt-4o-latest", - "codex-mini-latest", - "gpt-4o-mini", - "gpt-4o-mini-2024-07-18", - "gpt-4-turbo", - "gpt-4-turbo-2024-04-09", - "gpt-4-0125-preview", - "gpt-4-turbo-preview", - "gpt-4-1106-preview", - "gpt-4-vision-preview", - "gpt-4", - "gpt-4-0314", - "gpt-4-0613", - "gpt-4-32k", - "gpt-4-32k-0314", - "gpt-4-32k-0613", - "gpt-3.5-turbo", - "gpt-3.5-turbo-16k", - "gpt-3.5-turbo-0301", - "gpt-3.5-turbo-0613", - "gpt-3.5-turbo-1106", - "gpt-3.5-turbo-0125", - "gpt-3.5-turbo-16k-0613" - ] - }, - "OpenAI.ClickButtonType": { - "type": "string", - "enum": [ - "left", - "right", - "wheel", - "back", - "forward" - ] - }, - "OpenAI.ClickParam": { - "type": "object", - "required": [ - "type", - "button", - "x", - "y" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "click" - ], - "description": "Specifies the event type. For a click action, this property is always `click`.", - "x-stainless-const": true, - "default": "click" - }, - "button": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ClickButtonType" - } - ], - "description": "Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`." - }, - "x": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The x-coordinate where the click occurred." - }, - "y": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The y-coordinate where the click occurred." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A click action.", - "title": "Click" - }, - "OpenAI.CodeInterpreterOutputImage": { - "type": "object", - "required": [ - "type", - "url" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "image" - ], - "description": "The type of the output. Always `image`.", - "x-stainless-const": true, - "default": "image" - }, - "url": { - "type": "string", - "format": "uri", - "description": "The URL of the image output from the code interpreter." - } - }, - "description": "The image output from the code interpreter.", - "title": "Code interpreter output image" - }, - "OpenAI.CodeInterpreterOutputLogs": { - "type": "object", - "required": [ - "type", - "logs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "logs" - ], - "description": "The type of the output. Always `logs`.", - "x-stainless-const": true, - "default": "logs" - }, - "logs": { - "type": "string", - "description": "The logs output from the code interpreter." - } - }, - "description": "The logs output from the code interpreter.", - "title": "Code interpreter output logs" - }, - "OpenAI.CodeInterpreterTool": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code_interpreter" - ], - "description": "The type of the code interpreter tool. Always `code_interpreter`.", - "x-stainless-const": true - }, - "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." - }, - "container": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.AutoCodeInterpreterToolParam" - } - ], - "description": "The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.\nIf not provided, the service assumes auto." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool that runs Python code to help generate a response to a prompt.", - "title": "Code interpreter" - }, - "OpenAI.CompactResource": { - "type": "object", - "required": [ - "id", - "object", - "output", - "created_at", - "usage" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the compacted response." - }, - "object": { - "type": "string", - "enum": [ - "response.compaction" - ], - "description": "The object type. Always `response.compaction`.", - "x-stainless-const": true, - "default": "response.compaction" - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ItemField" - }, - "description": "The compacted list of output items." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "Unix timestamp (in seconds) when the compacted conversation was created." - }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsage" - } - ], - "description": "Token accounting for the compaction pass, including cached, reasoning, and total tokens." - } - }, - "title": "The compacted response object" - }, - "OpenAI.CompactResponseMethodPublicBody": { - "type": "object", - "required": [ - "model" - ], - "properties": { - "model": { - "$ref": "#/components/schemas/OpenAI.ModelIdsCompaction" - }, - "input": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - } - ], - "nullable": true - }, - "previous_response_id": { - "type": "string", - "nullable": true - }, - "instructions": { - "type": "string", - "nullable": true - } - } - }, - "OpenAI.ComparisonFilter": { - "type": "object", - "required": [ - "type", - "key", - "value" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "eq", - "ne", - "gt", - "gte", - "lt", - "lte" - ], - "description": "Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n - `eq`: equals\n - `ne`: not equal\n - `gt`: greater than\n - `gte`: greater than or equal\n - `lt`: less than\n - `lte`: less than or equal\n - `in`: in\n - `nin`: not in", - "default": "eq" - }, - "key": { - "type": "string", - "description": "The key to compare against the value." - }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ] - } - } - ], - "description": "The value to compare against the attribute key; supports string, number, or boolean types." - } - }, - "description": "A filter used to compare a specified attribute key to a given value using a defined comparison operation.", - "title": "Comparison Filter", - "x-oaiMeta": { - "name": "ComparisonFilter" - } - }, - "OpenAI.CompoundFilter": { - "type": "object", - "required": [ - "type", - "filters" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "and", - "or" - ], - "description": "Type of operation: `and` or `or`." - }, - "filters": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComparisonFilter" - }, - {} - ] - }, - "description": "Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`." - } - }, - "description": "Combine multiple filters using `and` or `or`.", - "title": "Compound Filter", - "x-oaiMeta": { - "name": "CompoundFilter" - } - }, - "OpenAI.ComputerAction": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ComputerActionType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "click": "#/components/schemas/OpenAI.ClickParam", - "double_click": "#/components/schemas/OpenAI.DoubleClickAction", - "drag": "#/components/schemas/OpenAI.DragParam", - "keypress": "#/components/schemas/OpenAI.KeyPressAction", - "move": "#/components/schemas/OpenAI.MoveParam", - "screenshot": "#/components/schemas/OpenAI.ScreenshotParam", - "scroll": "#/components/schemas/OpenAI.ScrollParam", - "type": "#/components/schemas/OpenAI.TypeParam", - "wait": "#/components/schemas/OpenAI.WaitParam" - } - } - }, - "OpenAI.ComputerActionType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "click", - "double_click", - "drag", - "keypress", - "move", - "screenshot", - "scroll", - "type", - "wait" - ] - } - ] - }, - "OpenAI.ComputerCallSafetyCheckParam": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "description": "The ID of the pending safety check." - }, - "code": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string", - "nullable": true - } - }, - "description": "A pending safety check for the computer call." - }, - "OpenAI.ComputerEnvironment": { - "type": "string", - "enum": [ - "windows", - "mac", - "linux", - "ubuntu", - "browser" - ] - }, - "OpenAI.ComputerScreenshotContent": { - "type": "object", - "required": [ - "type", - "image_url", - "file_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_screenshot" - ], - "description": "Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.", - "x-stainless-const": true, - "default": "computer_screenshot" - }, - "image_url": { - "type": "string", - "format": "uri", - "nullable": true - }, - "file_id": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A screenshot of a computer.", - "title": "Computer screenshot" - }, - "OpenAI.ComputerScreenshotImage": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_screenshot" - ], - "description": "Specifies the event type. For a computer screenshot, this property is\n always set to `computer_screenshot`.", - "x-stainless-const": true, - "default": "computer_screenshot" - }, - "image_url": { - "type": "string", - "format": "uri", - "description": "The URL of the screenshot image." - }, - "file_id": { - "type": "string", - "description": "The identifier of an uploaded file that contains the screenshot." - } - }, - "description": "A computer screenshot image used with the computer use tool." - }, - "OpenAI.ComputerUsePreviewTool": { - "type": "object", - "required": [ - "type", - "environment", - "display_width", - "display_height" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_use_preview" - ], - "description": "The type of the computer use tool. Always `computer_use_preview`.", - "x-stainless-const": true, - "default": "computer_use_preview" - }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerEnvironment" - } - ], - "description": "The type of computer environment to control." - }, - "display_width": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The width of the computer display." - }, - "display_height": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The height of the computer display." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).", - "title": "Computer use preview" - }, - "OpenAI.ContainerAutoParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "container_auto" - ], - "description": "Automatically creates a container for this request", - "x-stainless-const": true, - "default": "container_auto" - }, - "file_ids": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 50, - "description": "An optional list of uploaded files to make available to your code." - }, - "memory_limit": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" - } - ], - "nullable": true - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ContainerSkill" - }, - "maxItems": 200, - "description": "An optional list of skills referenced by id or inline data." - }, - "network_policy": { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" - } - ] - }, - "OpenAI.ContainerFileCitationBody": { - "type": "object", - "required": [ - "type", - "container_id", - "file_id", - "start_index", - "end_index", - "filename" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "container_file_citation" - ], - "description": "The type of the container file citation. Always `container_file_citation`.", - "x-stainless-const": true, - "default": "container_file_citation" - }, - "container_id": { - "type": "string", - "description": "The ID of the container file." - }, - "file_id": { - "type": "string", - "description": "The ID of the file." - }, - "start_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the first character of the container file citation in the message." - }, - "end_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the last character of the container file citation in the message." - }, - "filename": { - "type": "string", - "description": "The filename of the container file cited." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Annotation" - } - ], - "description": "A citation for a container file used to generate a model response.", - "title": "Container file citation" - }, - "OpenAI.ContainerMemoryLimit": { - "type": "string", - "enum": [ - "1g", - "4g", - "16g", - "64g" - ] - }, - "OpenAI.ContainerNetworkPolicyAllowlistParam": { - "type": "object", - "required": [ - "type", - "allowed_domains" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "allowlist" - ], - "description": "Allow outbound network access only to specified domains. Always `allowlist`.", - "x-stainless-const": true, - "default": "allowlist" - }, - "allowed_domains": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "description": "A list of allowed domains when type is `allowlist`." - }, - "domain_secrets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyDomainSecretParam" - }, - "minItems": 1, - "description": "Optional domain-scoped secrets for allowlisted domains." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" - } - ] - }, - "OpenAI.ContainerNetworkPolicyDisabledParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "disabled" - ], - "description": "Disable outbound network access. Always `disabled`.", - "x-stainless-const": true, - "default": "disabled" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" - } - ] - }, - "OpenAI.ContainerNetworkPolicyDomainSecretParam": { - "type": "object", - "required": [ - "domain", - "name", - "value" - ], - "properties": { - "domain": { - "type": "string", - "minLength": 1, - "description": "The domain associated with the secret." - }, - "name": { - "type": "string", - "minLength": 1, - "description": "The name of the secret to inject for the domain." - }, - "value": { - "type": "string", - "minLength": 1, - "maxLength": 10485760, - "description": "The secret value to inject for the domain." - } - } - }, - "OpenAI.ContainerNetworkPolicyParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParamType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "disabled": "#/components/schemas/OpenAI.ContainerNetworkPolicyDisabledParam", - "allowlist": "#/components/schemas/OpenAI.ContainerNetworkPolicyAllowlistParam" - } - }, - "description": "Network access policy for the container." - }, - "OpenAI.ContainerNetworkPolicyParamType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "disabled", - "allowlist" - ] - } - ] - }, - "OpenAI.ContainerReferenceResource": { - "type": "object", - "required": [ - "type", - "container_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "container_reference" - ], - "description": "The environment type. Always `container_reference`.", - "x-stainless-const": true, - "default": "container_reference" - }, - "container_id": { - "type": "string" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], - "description": "Represents a container created with /v1/containers.", - "title": "Container Reference" - }, - "OpenAI.ContainerSkill": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ContainerSkillType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "skill_reference": "#/components/schemas/OpenAI.SkillReferenceParam", - "inline": "#/components/schemas/OpenAI.InlineSkillParam" - } - } - }, - "OpenAI.ContainerSkillType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "skill_reference", - "inline" - ] - } - ] - }, - "OpenAI.ContextManagementParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The context management entry type. Currently only 'compaction' is supported." - }, - "compact_threshold": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - } - } - }, - "OpenAI.ConversationItem": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ConversationItemType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "message": "#/components/schemas/OpenAI.ConversationItemMessage", - "function_call": "#/components/schemas/OpenAI.ConversationItemFunctionToolCallResource", - "function_call_output": "#/components/schemas/OpenAI.ConversationItemFunctionToolCallOutputResource", - "file_search_call": "#/components/schemas/OpenAI.ConversationItemFileSearchToolCall", - "web_search_call": "#/components/schemas/OpenAI.ConversationItemWebSearchToolCall", - "image_generation_call": "#/components/schemas/OpenAI.ConversationItemImageGenToolCall", - "computer_call": "#/components/schemas/OpenAI.ConversationItemComputerToolCall", - "computer_call_output": "#/components/schemas/OpenAI.ConversationItemComputerToolCallOutputResource", - "reasoning": "#/components/schemas/OpenAI.ConversationItemReasoningItem", - "code_interpreter_call": "#/components/schemas/OpenAI.ConversationItemCodeInterpreterToolCall", - "local_shell_call": "#/components/schemas/OpenAI.ConversationItemLocalShellToolCall", - "local_shell_call_output": "#/components/schemas/OpenAI.ConversationItemLocalShellToolCallOutput", - "shell_call": "#/components/schemas/OpenAI.ConversationItemFunctionShellCall", - "shell_call_output": "#/components/schemas/OpenAI.ConversationItemFunctionShellCallOutput", - "apply_patch_call": "#/components/schemas/OpenAI.ConversationItemApplyPatchToolCall", - "apply_patch_call_output": "#/components/schemas/OpenAI.ConversationItemApplyPatchToolCallOutput", - "mcp_list_tools": "#/components/schemas/OpenAI.ConversationItemMcpListTools", - "mcp_approval_request": "#/components/schemas/OpenAI.ConversationItemMcpApprovalRequest", - "mcp_approval_response": "#/components/schemas/OpenAI.ConversationItemMcpApprovalResponseResource", - "mcp_call": "#/components/schemas/OpenAI.ConversationItemMcpToolCall", - "custom_tool_call": "#/components/schemas/OpenAI.ConversationItemCustomToolCall", - "custom_tool_call_output": "#/components/schemas/OpenAI.ConversationItemCustomToolCallOutput" - } - }, - "description": "A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](/docs/api-reference/responses/object#responses/object-output).", - "title": "Conversation item" - }, - "OpenAI.ConversationItemApplyPatchToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status", - "operation" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call" - ], - "description": "The type of the item. Always `apply_patch_call`.", - "x-stainless-const": true, - "default": "apply_patch_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" - } - ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." - }, - "operation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" - } - ], - "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", - "title": "Apply patch operation" - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A tool call that applies file diffs by creating, deleting, or updating files.", - "title": "Apply patch tool call" - }, - "OpenAI.ConversationItemApplyPatchToolCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call_output" - ], - "description": "The type of the item. Always `apply_patch_call_output`.", - "x-stainless-const": true, - "default": "apply_patch_call_output" - }, - "id": { - "type": "string", - "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" - } - ], - "description": "The status of the apply patch tool call output. One of `completed` or `failed`." - }, - "output": { - "type": "string", - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call output." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "The output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" - }, - "OpenAI.ConversationItemCodeInterpreterToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "container_id", - "code", - "outputs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code_interpreter_call" - ], - "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", - "x-stainless-const": true, - "default": "code_interpreter_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the code interpreter tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "interpreting", - "failed" - ], - "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." - }, - "container_id": { - "type": "string", - "description": "The ID of the container used to run the code." - }, - "code": { - "type": "string", - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" - }, - "OpenAI.ConversationItemComputerToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_call" - ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." - }, - "call_id": { - "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - }, - "pending_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The pending safety checks for the computer call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", - "title": "Computer tool call" - }, - "OpenAI.ConversationItemComputerToolCallOutputResource": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_call_output" - ], - "description": "The type of the computer tool call output. Always `computer_call_output`.", - "x-stainless-const": true, - "default": "computer_call_output" - }, - "id": { - "type": "string", - "description": "The ID of the computer tool call output." - }, - "call_id": { - "type": "string", - "description": "The ID of the computer tool call that produced the output." - }, - "acknowledged_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The safety checks reported by the API that have been acknowledged by the\n developer." - }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ] - }, - "OpenAI.ConversationItemCustomToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "input" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call" - ], - "description": "The type of the custom tool call. Always `custom_tool_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call in the OpenAI platform." - }, - "call_id": { - "type": "string", - "description": "An identifier used to map this custom tool call to a tool call output." - }, - "name": { - "type": "string", - "description": "The name of the custom tool being called." - }, - "input": { - "type": "string", - "description": "The input for the custom tool call generated by the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" - }, - "OpenAI.ConversationItemCustomToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call_output" - ], - "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call output in the OpenAI platform." - }, - "call_id": { - "type": "string", - "description": "The call ID, used to map this custom tool call output to a custom tool call." - }, - "output": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - } - ], - "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "The output of a custom tool call from your code, being sent back to the model.", - "title": "Custom tool call output" - }, - "OpenAI.ConversationItemFileSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "queries" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, - "type": { - "type": "string", - "enum": [ - "file_search_call" - ], - "description": "The type of the file search tool call. Always `file_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" - ], - "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," - }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The queries used to search for files." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", - "title": "File search tool call" - }, - "OpenAI.ConversationItemFunctionShellCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status", - "environment" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell_call" - ], - "description": "The type of the item. Always `shell_call`.", - "x-stainless-const": true, - "default": "shell_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the shell tool call. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the shell tool call generated by the model." - }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellAction" - } - ], - "description": "The shell commands and limits that describe how to run the tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" - } - ], - "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." - }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A tool call that executes one or more shell commands in a managed environment.", - "title": "Shell tool call" - }, - "OpenAI.ConversationItemFunctionShellCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status", - "output", - "max_output_length" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell_call_output" - ], - "description": "The type of the shell call output. Always `shell_call_output`.", - "x-stainless-const": true, - "default": "shell_call_output" - }, - "id": { - "type": "string", - "description": "The unique ID of the shell call output. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the shell tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" - } - ], - "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" - }, - "description": "An array of shell call output contents" - }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" - }, - "OpenAI.ConversationItemFunctionToolCallOutputResource": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call output. Populated when this item\n is returned via API." - }, - "type": { - "type": "string", - "enum": [ - "function_call_output" - ], - "description": "The type of the function tool call output. Always `function_call_output`.", - "x-stainless-const": true - }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." - }, - "output": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - } - ], - "description": "The output from the function call generated by your code.\n Can be a string or an list of output content." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ] - }, - "OpenAI.ConversationItemFunctionToolCallResource": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, - "type": { - "type": "string", - "enum": [ - "function_call" - ], - "description": "The type of the function tool call. Always `function_call`.", - "x-stainless-const": true - }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the function to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ] - }, - "OpenAI.ConversationItemImageGenToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "result" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "image_generation_call" - ], - "description": "The type of the image generation call. Always `image_generation_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the image generation call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "generating", - "failed" - ], - "description": "The status of the image generation call." - }, - "result": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "An image generation request made by the model.", - "title": "Image generation call" - }, - "OpenAI.ConversationItemList": { - "type": "object", - "required": [ - "object", - "data", - "has_more", - "first_id", - "last_id" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "list" - ], - "description": "The type of object returned, must be `list`.", - "x-stainless-const": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - }, - "description": "A list of conversation items.", - "x-ms-list-page-items": true - }, - "has_more": { - "type": "boolean", - "description": "Whether there are more items available." - }, - "first_id": { - "type": "string", - "description": "The ID of the first item in the list." - }, - "last_id": { - "type": "string", - "description": "The ID of the last item in the list.", - "x-ms-list-continuation-token": true - } - }, - "description": "A list of Conversation items.", - "title": "The conversation item list", - "x-oaiMeta": { - "name": "The item list", - "group": "conversations" - } - }, - "OpenAI.ConversationItemLocalShellToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call" - ], - "description": "The type of the local shell call. Always `local_shell_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell call." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" - }, - "OpenAI.ConversationItemLocalShellToolCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call_output" - ], - "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "output": { - "type": "string", - "description": "A JSON string of the output of the local shell tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" - }, - "OpenAI.ConversationItemMcpApprovalRequest": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_request" - ], - "description": "The type of the item. Always `mcp_approval_request`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the approval request." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server making the request." - }, - "name": { - "type": "string", - "description": "The name of the tool to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of arguments for the tool." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" - }, - "OpenAI.ConversationItemMcpApprovalResponseResource": { - "type": "object", - "required": [ - "type", - "id", - "approval_request_id", - "approve" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_response" - ], - "description": "The type of the item. Always `mcp_approval_response`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the approval response" - }, - "approval_request_id": { - "type": "string", - "description": "The ID of the approval request being answered." - }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." - }, - "reason": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" - }, - "OpenAI.ConversationItemMcpListTools": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "tools" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_list_tools" - ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the list." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." - }, - "error": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" - }, - "OpenAI.ConversationItemMcpToolCall": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_call" - ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the tool call." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server running the tool." - }, - "name": { - "type": "string", - "description": "The name of the tool that was run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments passed to the tool." - }, - "output": { - "type": "string", - "nullable": true - }, - "error": { - "type": "object", - "additionalProperties": {} - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" - } - ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." - }, - "approval_request_id": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" - }, - "OpenAI.ConversationItemMessage": { - "type": "object", - "required": [ - "type", - "id", - "status", - "role", - "content" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message. Always set to `message`.", - "x-stainless-const": true, - "default": "message" - }, - "id": { - "type": "string", - "description": "The unique ID of the message." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageStatus" - } - ], - "description": "The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API." - }, - "role": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageRole" - } - ], - "description": "The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`." - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MessageContent" - }, - "description": "The content of the message" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A message to or from the model.", - "title": "Message" - }, - "OpenAI.ConversationItemReasoningItem": { - "type": "object", - "required": [ - "type", - "id", - "summary" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "reasoning" - ], - "description": "The type of the object. Always `reasoning`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique identifier of the reasoning content." - }, - "encrypted_content": { - "type": "string", - "nullable": true - }, - "summary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.SummaryTextContent" - }, - "description": "Reasoning summary content." - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" - }, - "description": "Reasoning text content." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", - "title": "Reasoning" - }, - "OpenAI.ConversationItemType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "message", - "function_call", - "function_call_output", - "file_search_call", - "web_search_call", - "image_generation_call", - "computer_call", - "computer_call_output", - "reasoning", - "code_interpreter_call", - "local_shell_call", - "local_shell_call_output", - "shell_call", - "shell_call_output", - "apply_patch_call", - "apply_patch_call_output", - "mcp_list_tools", - "mcp_approval_request", - "mcp_approval_response", - "mcp_call", - "custom_tool_call", - "custom_tool_call_output" - ] - } - ] - }, - "OpenAI.ConversationItemWebSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "action" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, - "type": { - "type": "string", - "enum": [ - "web_search_call" - ], - "description": "The type of the web search tool call. Always `web_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" - ], - "description": "The status of the web search tool call." - }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" - } - ], - "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", - "title": "Web search tool call" - }, - "OpenAI.ConversationParam": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.ConversationParam-2" - } - ], - "description": "The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.\nInput items and output items from this response are automatically added to this conversation after this response completes." - }, - "OpenAI.ConversationParam-2": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the conversation." - } - }, - "description": "The conversation that this response belongs to.", - "title": "Conversation object" - }, - "OpenAI.ConversationReference": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the conversation that this response was associated with." - } - }, - "description": "The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.", - "title": "Conversation" - }, - "OpenAI.ConversationResource": { - "type": "object", - "required": [ - "id", - "object", - "metadata", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the conversation." - }, - "object": { - "type": "string", - "enum": [ - "conversation" - ], - "description": "The object type, which is always `conversation`.", - "x-stainless-const": true, - "default": "conversation" - }, - "metadata": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The time at which the conversation was created, measured in seconds since the Unix epoch." - } - } - }, - "OpenAI.CoordParam": { - "type": "object", - "required": [ - "x", - "y" - ], - "properties": { - "x": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The x-coordinate." - }, - "y": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The y-coordinate." - } - }, - "description": "An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.", - "title": "Coordinate" - }, - "OpenAI.CreateChatCompletionRequestResponseFormat": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "text": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatText", - "json_object": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject" - } - }, - "description": "An object specifying the format that the model must output.\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. Learn more in the [Structured Outputs\nguide](/docs/guides/structured-outputs).\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it." - }, - "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "json_object" - ], - "description": "The type of response format being defined. Always `json_object`.", - "x-stainless-const": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" - } - ], - "description": "JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.", - "title": "JSON object" - }, - "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatText": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ], - "description": "The type of response format being defined. Always `text`.", - "x-stainless-const": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" - } - ], - "description": "Default response format. Used to generate text responses.", - "title": "Text" - }, - "OpenAI.CreateChatCompletionRequestResponseFormatType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "text", - "json_schema", - "json_object" - ] - } - ] - }, - "OpenAI.CreateConversationBody": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - }, - "nullable": true - } - } - }, - "OpenAI.CreateEvalCompletionsRunDataSource": { - "type": "object", - "required": [ - "type", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "completions" - ], - "description": "The type of run data source. Always `completions`.", - "default": "completions" - }, - "input_messages": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplate" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" - } - ], - "description": "Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace." - }, - "sampling_params": { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams" - }, - "model": { - "type": "string", - "description": "The name of the model to use for generating completions (e.g. \"o3-mini\")." - }, - "source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalStoredCompletionsSource" - } - ], - "description": "Determines what populates the `item` namespace in this run's data source." - } - }, - "description": "A CompletionsRunDataSource object describing a model sampling configuration.", - "title": "CompletionsRunDataSource", - "x-oaiMeta": { - "name": "The completions data source object used to configure an individual run", - "group": "eval runs", - "example": "{\n \"name\": \"gpt-4o-mini-2024-07-18\",\n \"data_source\": {\n \"type\": \"completions\",\n \"input_messages\": {\n \"type\": \"item_reference\",\n \"item_reference\": \"item.input\"\n },\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"source\": {\n \"type\": \"stored_completions\",\n \"model\": \"gpt-4o-mini-2024-07-18\"\n }\n }\n}\n" - } - }, - "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference": { - "type": "object", - "required": [ - "type", - "item_reference" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "item_reference" - ] - }, - "item_reference": { - "type": "string" - } - } - }, - "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplate": { - "type": "object", - "required": [ - "type", - "template" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "template" - ] - }, - "template": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EasyInputMessage" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalItem" - } - ] - } - } - } - }, - "OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams": { - "type": "object", - "properties": { - "reasoning_effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" - }, - "temperature": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "default": 1 - }, - "max_completion_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "top_p": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "default": 1 - }, - "seed": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "default": 42 - }, - "response_format": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseFormatText" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchema" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonObject" - } - ] - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ChatCompletionTool" - } - } - } - }, - "OpenAI.CreateEvalCustomDataSourceConfig": { - "type": "object", - "required": [ - "type", - "item_schema" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom" - ], - "description": "The type of data source. Always `custom`.", - "x-stainless-const": true, - "default": "custom" - }, - "item_schema": { - "type": "object", - "additionalProperties": {}, - "description": "The json schema for each row in the data source." - }, - "include_sample_schema": { - "type": "boolean", - "description": "Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)" - } - }, - "description": "A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs.\nThis schema is used to define the shape of the data that will be:\n- Used to define your testing criteria and\n- What data is required when creating a run", - "title": "CustomDataSourceConfig", - "x-oaiMeta": { - "name": "The eval file data source config object", - "group": "evals", - "example": "{\n \"type\": \"custom\",\n \"item_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\"type\": \"string\"},\n \"age\": {\"type\": \"integer\"}\n },\n \"required\": [\"name\", \"age\"]\n },\n \"include_sample_schema\": true\n}\n" - } - }, - "OpenAI.CreateEvalJsonlRunDataSource": { - "type": "object", - "required": [ - "type", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "jsonl" - ], - "description": "The type of data source. Always `jsonl`.", - "x-stainless-const": true, - "default": "jsonl" - }, - "source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - } - ], - "description": "Determines what populates the `item` namespace in the data source." - } - }, - "description": "A JsonlRunDataSource object with that specifies a JSONL file that matches the eval", - "title": "JsonlRunDataSource", - "x-oaiMeta": { - "name": "The file data source object for the eval run configuration", - "group": "evals", - "example": "{\n \"type\": \"jsonl\",\n \"source\": {\n \"type\": \"file_id\",\n \"id\": \"file-9GYS6xbkWgWhmE7VoLUWFg\"\n }\n}\n" - } - }, - "OpenAI.CreateEvalLogsDataSourceConfig": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "logs" - ], - "description": "The type of data source. Always `logs`.", - "x-stainless-const": true, - "default": "logs" - }, - "metadata": { - "type": "object", - "additionalProperties": {}, - "description": "Metadata filters for the logs data source." - } - }, - "description": "A data source config which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.", - "title": "LogsDataSourceConfig", - "x-oaiMeta": { - "name": "The logs data source object for evals", - "group": "evals", - "example": "{\n \"type\": \"logs\",\n \"metadata\": {\n \"use_case\": \"customer_support_agent\"\n }\n}\n" - } - }, - "OpenAI.CreateEvalResponsesRunDataSource": { - "type": "object", - "required": [ - "type", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "responses" - ], - "description": "The type of run data source. Always `responses`.", - "default": "responses" - }, - "input_messages": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference" - } - ], - "description": "Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace." - }, - "sampling_params": { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceSamplingParams" - }, - "model": { - "type": "string", - "description": "The name of the model to use for generating completions (e.g. \"o3-mini\")." - }, - "source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalResponsesSource" - } - ], - "description": "Determines what populates the `item` namespace in this run's data source." - } - }, - "description": "A ResponsesRunDataSource object describing a model sampling configuration.", - "title": "ResponsesRunDataSource", - "x-oaiMeta": { - "name": "The completions data source object used to configure an individual run", - "group": "eval runs", - "example": "{\n \"name\": \"gpt-4o-mini-2024-07-18\",\n \"data_source\": {\n \"type\": \"responses\",\n \"input_messages\": {\n \"type\": \"item_reference\",\n \"item_reference\": \"item.input\"\n },\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"source\": {\n \"type\": \"responses\",\n \"model\": \"gpt-4o-mini-2024-07-18\"\n }\n }\n}\n" - } - }, - "OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference": { - "type": "object", - "required": [ - "type", - "item_reference" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "item_reference" - ] - }, - "item_reference": { - "type": "string" - } - } - }, - "OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate": { - "type": "object", - "required": [ - "type", - "template" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "template" - ] - }, - "template": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "content": { - "type": "string" - } - }, - "required": [ - "role", - "content" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.EvalItem" - } - ] - } - } - } - }, - "OpenAI.CreateEvalResponsesRunDataSourceSamplingParams": { - "type": "object", - "properties": { - "reasoning_effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" - }, - "temperature": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "default": 1 - }, - "max_completion_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "top_p": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "default": 1 - }, - "seed": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "default": 42 - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - } - }, - "text": { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText" - } - } - }, - "OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText": { - "type": "object", - "properties": { - "format": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" - } - } - }, - "OpenAI.CreateEvalStoredCompletionsDataSourceConfig": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "stored_completions" - ], - "description": "The type of data source. Always `stored_completions`.", - "x-stainless-const": true, - "default": "stored_completions" - }, - "metadata": { - "type": "object", - "additionalProperties": {}, - "description": "Metadata filters for the stored completions data source." - } - }, - "description": "Deprecated in favor of LogsDataSourceConfig.", - "title": "StoredCompletionsDataSourceConfig", - "deprecated": true, - "x-oaiMeta": { - "name": "The stored completions data source object for evals", - "group": "evals", - "example": "{\n \"type\": \"stored_completions\",\n \"metadata\": {\n \"use_case\": \"customer_support_agent\"\n }\n}\n" - } - }, - "OpenAI.CreateFineTuningJobRequest": { - "type": "object", - "required": [ - "model", - "training_file" - ], - "properties": { - "model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "babbage-002", - "davinci-002", - "gpt-3.5-turbo", - "gpt-4o-mini" - ] - } - ], - "description": "The name of the model to fine-tune. You can select one of the\n [supported models](/docs/guides/fine-tuning#which-models-can-be-fine-tuned).", - "x-oaiTypeLabel": "string" - }, - "training_file": { - "type": "string", - "description": "The ID of an uploaded file that contains training data.\n See [upload file](/docs/api-reference/files/create) for how to upload a file.\n Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n The contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input), [completions](/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](/docs/api-reference/fine-tuning/preference-input) format.\n See the [fine-tuning guide](/docs/guides/model-optimization) for more details." - }, - "hyperparameters": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestHyperparameters" - } - ], - "description": "The hyperparameters used for the fine-tuning job.\n This value is now deprecated in favor of `method`, and should be passed in under the `method` parameter.", - "deprecated": true - }, - "suffix": { - "type": "string", - "nullable": true, - "minLength": 1, - "maxLength": 64, - "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n For example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`." - }, - "validation_file": { - "type": "string", - "nullable": true, - "description": "The ID of an uploaded file that contains validation data.\n If you provide this file, the data is used to generate validation\n metrics periodically during fine-tuning. These metrics can be viewed in\n the fine-tuning results file.\n The same data should not be present in both train and validation files.\n Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n See the [fine-tuning guide](/docs/guides/model-optimization) for more details." - }, - "integrations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrations" - }, - "nullable": true, - "description": "A list of integrations to enable for your fine-tuning job." - }, - "seed": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true, - "minimum": 0, - "maximum": 2147483647, - "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\n If a seed is not specified, one will be generated for you." - }, - "method": { - "$ref": "#/components/schemas/OpenAI.FineTuneMethod" - }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - } - } - }, - "OpenAI.CreateFineTuningJobRequestHyperparameters": { - "type": "object", - "properties": { - "batch_size": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "default": "auto" - }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "default": "auto" - }, - "n_epochs": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "default": "auto" - } - } - }, - "OpenAI.CreateFineTuningJobRequestIntegrations": { - "type": "object", - "required": [ - "type", - "wandb" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wandb" - ], - "x-stainless-const": true - }, - "wandb": { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrationsWandb" - } - } - }, - "OpenAI.CreateFineTuningJobRequestIntegrationsWandb": { - "type": "object", - "required": [ - "project" - ], - "properties": { - "project": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "entity": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "OpenAI.CreateResponseStreamingResponse": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseAudioDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseAudioTranscriptDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallInProgressEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallInterpretingEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseContentPartAddedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCreatedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseErrorEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFileSearchCallInProgressEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFileSearchCallSearchingEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFunctionCallArgumentsDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseInProgressEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFailedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseIncompleteEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseOutputItemAddedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartAddedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryTextDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningTextDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseRefusalDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseTextDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseWebSearchCallInProgressEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseWebSearchCallSearchingEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallGeneratingEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallInProgressEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallPartialImageEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPCallArgumentsDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPCallFailedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPCallInProgressEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsFailedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsInProgressEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseOutputTextAnnotationAddedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseQueuedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCustomToolCallInputDeltaEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseAudioDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseAudioTranscriptDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallCodeDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallCompletedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCompletedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseContentPartDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFileSearchCallCompletedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFunctionCallArgumentsDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseOutputItemDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryTextDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningTextDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseRefusalDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseTextDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseWebSearchCallCompletedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallCompletedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPCallArgumentsDoneEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPCallCompletedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsCompletedEvent" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCustomToolCallInputDoneEvent" - } - ] - }, - "OpenAI.CustomGrammarFormatParam": { - "type": "object", - "required": [ - "type", - "syntax", - "definition" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "grammar" - ], - "description": "Grammar format. Always `grammar`.", - "x-stainless-const": true, - "default": "grammar" - }, - "syntax": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.GrammarSyntax1" - } - ], - "description": "The syntax of the grammar definition. One of `lark` or `regex`." - }, - "definition": { - "type": "string", - "description": "The grammar definition." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" - } - ], - "description": "A grammar defined by the user.", - "title": "Grammar format" - }, - "OpenAI.CustomTextFormatParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ], - "description": "Unconstrained text format. Always `text`.", - "x-stainless-const": true, - "default": "text" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" - } - ], - "description": "Unconstrained free-form text.", - "title": "Text format" - }, - "OpenAI.CustomToolParam": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom" - ], - "description": "The type of the custom tool. Always `custom`.", - "x-stainless-const": true, - "default": "custom" - }, - "name": { - "type": "string", - "description": "The name of the custom tool, used to identify it in tool calls." - }, - "description": { - "type": "string", - "description": "Optional description of the custom tool, used to provide more context." - }, - "format": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" - } - ], - "description": "The input format for the custom tool. Default is unconstrained text." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)", - "title": "Custom tool" - }, - "OpenAI.CustomToolParamFormat": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.CustomToolParamFormatType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "text": "#/components/schemas/OpenAI.CustomTextFormatParam", - "grammar": "#/components/schemas/OpenAI.CustomGrammarFormatParam" - } - }, - "description": "The input format for the custom tool. Default is unconstrained text." - }, - "OpenAI.CustomToolParamFormatType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "text", - "grammar" - ] - } - ] - }, - "OpenAI.DeletedConversationResource": { - "type": "object", - "required": [ - "object", - "deleted", - "id" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "conversation.deleted" - ], - "x-stainless-const": true, - "default": "conversation.deleted" - }, - "deleted": { - "type": "boolean" - }, - "id": { - "type": "string" - } - } - }, - "OpenAI.DetailEnum": { - "type": "string", - "enum": [ - "low", - "high", - "auto" - ] - }, - "OpenAI.DoubleClickAction": { - "type": "object", - "required": [ - "type", - "x", - "y" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "double_click" - ], - "description": "Specifies the event type. For a double click action, this property is always set to `double_click`.", - "x-stainless-const": true, - "default": "double_click" - }, - "x": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The x-coordinate where the double click occurred." - }, - "y": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The y-coordinate where the double click occurred." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A double click action.", - "title": "DoubleClick" - }, - "OpenAI.DragParam": { - "type": "object", - "required": [ - "type", - "path" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "drag" - ], - "description": "Specifies the event type. For a drag action, this property is always set to `drag`.", - "x-stainless-const": true, - "default": "drag" - }, - "path": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.CoordParam" - }, - "description": "An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg\n ```\n [\n { x: 100, y: 200 },\n { x: 200, y: 300 }\n ]\n ```" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A drag action.", - "title": "Drag" - }, - "OpenAI.EasyInputMessage": { - "type": "object", - "required": [ - "role", - "content", - "type" - ], - "properties": { - "role": { - "type": "string", - "enum": [ - "user", - "assistant", - "system", - "developer" - ], - "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n `developer`." - }, - "content": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.InputMessageContentList" - } - ], - "description": "Text, image, or audio input to the model, used to generate a response.\n Can also contain previous assistant responses." - }, - "type": { - "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message input. Always `message`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.", - "title": "Input message" - }, - "OpenAI.Error": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string" - }, - "param": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Error" - } - }, - "additionalInfo": { - "type": "object", - "additionalProperties": {} - }, - "debugInfo": { - "type": "object", - "additionalProperties": {} - } - } - }, - "OpenAI.EvalApiError": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "type": "string", - "description": "The error code." - }, - "message": { - "type": "string", - "description": "The error message." - } - }, - "description": "An object representing an error response from the Eval API.", - "title": "EvalApiError", - "x-oaiMeta": { - "name": "The API error object", - "group": "evals", - "example": "{\n \"code\": \"internal_error\",\n \"message\": \"The eval run failed due to an internal error.\"\n}\n" - } - }, - "OpenAI.EvalGraderLabelModel": { - "type": "object", - "required": [ - "type", - "name", - "model", - "input", - "labels", - "passing_labels" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "label_model" - ], - "description": "The object type, which is always `label_model`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "model": { - "type": "string", - "description": "The model to use for the evaluation. Must support structured outputs." - }, - "input": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalItem" - } - }, - "labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels to assign to each item in the evaluation." - }, - "passing_labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels that indicate a passing result. Must be a subset of labels." - } - }, - "title": "LabelModelGrader" - }, - "OpenAI.EvalGraderPython": { - "type": "object", - "required": [ - "type", - "name", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "python" - ], - "description": "The object type, which is always `python`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "source": { - "type": "string", - "description": "The source code of the python script." - }, - "image_tag": { - "type": "string", - "description": "The image tag to use for the python script." - }, - "pass_threshold": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "The threshold for the score." - } - }, - "title": "PythonGrader" - }, - "OpenAI.EvalGraderScoreModel": { - "type": "object", - "required": [ - "type", - "name", - "model", - "input" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "score_model" - ], - "description": "The object type, which is always `score_model`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "model": { - "type": "string", - "description": "The model to use for the evaluation." - }, - "sampling_params": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModelSamplingParams" - } - ], - "description": "The sampling parameters for the model." - }, - "input": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalItem" - }, - "description": "The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings." - }, - "range": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "description": "The range of the score. Defaults to `[0, 1]`." - }, - "pass_threshold": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "The threshold for the score." - } - }, - "title": "ScoreModelGrader" - }, - "OpenAI.EvalGraderScoreModelSamplingParams": { - "type": "object", - "properties": { - "seed": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "top_p": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true, - "default": 1 - }, - "temperature": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true - }, - "max_completions_tokens": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "reasoning_effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" - } - } - }, - "OpenAI.EvalGraderStringCheck": { - "type": "object", - "required": [ - "type", - "name", - "input", - "reference", - "operation" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "string_check" - ], - "description": "The object type, which is always `string_check`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "input": { - "type": "string", - "description": "The input text. This may include template strings." - }, - "reference": { - "type": "string", - "description": "The reference text. This may include template strings." - }, - "operation": { - "type": "string", - "enum": [ - "eq", - "ne", - "like", - "ilike" - ], - "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." - } - }, - "title": "StringCheckGrader" - }, - "OpenAI.EvalGraderTextSimilarity": { - "type": "object", - "required": [ - "type", - "name", - "input", - "reference", - "evaluation_metric", - "pass_threshold" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "text_similarity" - ], - "description": "The type of grader.", - "x-stainless-const": true, - "default": "text_similarity" - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "input": { - "type": "string", - "description": "The text being graded." - }, - "reference": { - "type": "string", - "description": "The text being graded against." - }, - "evaluation_metric": { - "type": "string", - "enum": [ - "cosine", - "fuzzy_match", - "bleu", - "gleu", - "meteor", - "rouge_1", - "rouge_2", - "rouge_3", - "rouge_4", - "rouge_5", - "rouge_l" - ], - "description": "The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\n or `rouge_l`." - }, - "pass_threshold": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "The threshold for the score." - } - }, - "title": "TextSimilarityGrader" - }, - "OpenAI.EvalItem": { - "type": "object", - "required": [ - "role", - "content" - ], - "properties": { - "role": { - "type": "string", - "enum": [ - "user", - "assistant", - "system", - "developer" - ], - "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n `developer`." - }, - "content": { - "$ref": "#/components/schemas/OpenAI.EvalItemContent" - }, - "type": { - "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message input. Always `message`.", - "x-stainless-const": true - } - }, - "description": "A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.", - "title": "Eval message object" - }, - "OpenAI.EvalItemContent": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItem" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentArray" - } - ], - "description": "Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.", - "title": "Eval content" - }, - "OpenAI.EvalItemContentArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItem" - }, - "description": "A list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.", - "title": "An array of Input text, Output text, Input image, and Input audio" - }, - "OpenAI.EvalItemContentItem": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentText" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" - } - ], - "description": "A single content item: input text, output text, input image, or input audio.", - "title": "Eval content item" - }, - "OpenAI.EvalItemContentItemObject": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObjectType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "output_text": "#/components/schemas/OpenAI.EvalItemContentOutputText", - "input_image": "#/components/schemas/OpenAI.EvalItemInputImage", - "input_audio": "#/components/schemas/OpenAI.InputAudio", - "input_text": "#/components/schemas/OpenAI.EvalItemContentItemObjectInputTextContent" - } - }, - "description": "A single content item: input text, output text, input image, or input audio.", - "title": "Eval content item" - }, - "OpenAI.EvalItemContentItemObjectInputTextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_text" - ], - "description": "The type of the input item. Always `input_text`.", - "x-stainless-const": true, - "default": "input_text" - }, - "text": { - "type": "string", - "description": "The text input to the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" - } - ], - "description": "A text input to the model.", - "title": "Input text" - }, - "OpenAI.EvalItemContentItemObjectType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "input_text", - "output_text", - "input_image", - "input_audio" - ] - } - ] - }, - "OpenAI.EvalItemContentOutputText": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "output_text" - ], - "description": "The type of the output text. Always `output_text`.", - "x-stainless-const": true - }, - "text": { - "type": "string", - "description": "The text output from the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" - } - ], - "description": "A text output from the model.", - "title": "Output text" - }, - "OpenAI.EvalItemContentText": { - "type": "string", - "description": "A text input to the model.", - "title": "Text input" - }, - "OpenAI.EvalItemInputImage": { - "type": "object", - "required": [ - "type", - "image_url" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_image" - ], - "description": "The type of the image input. Always `input_image`.", - "x-stainless-const": true - }, - "image_url": { - "type": "string", - "format": "uri", - "description": "The URL of the image input." - }, - "detail": { - "type": "string", - "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" - } - ], - "description": "An image input block used within EvalItem content arrays.", - "title": "Input image" - }, - "OpenAI.EvalJsonlFileContentSource": { - "type": "object", - "required": [ - "type", - "content" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "file_content" - ], - "description": "The type of jsonl source. Always `file_content`.", - "x-stainless-const": true, - "default": "file_content" - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSourceContent" - }, - "description": "The content of the jsonl file." - } - }, - "title": "EvalJsonlFileContentSource" - }, - "OpenAI.EvalJsonlFileContentSourceContent": { - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "additionalProperties": {} - }, - "sample": { - "type": "object", - "additionalProperties": {} - } - } - }, - "OpenAI.EvalJsonlFileIdSource": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "file_id" - ], - "description": "The type of jsonl source. Always `file_id`.", - "x-stainless-const": true, - "default": "file_id" - }, - "id": { - "type": "string", - "description": "The identifier of the file." - } - }, - "title": "EvalJsonlFileIdSource" - }, - "OpenAI.EvalResponsesSource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "responses" - ], - "description": "The type of run data source. Always `responses`." - }, - "metadata": { - "type": "object", - "additionalProperties": {}, - "nullable": true - }, - "model": { - "type": "string", - "nullable": true - }, - "instructions_search": { - "type": "string", - "nullable": true - }, - "created_after": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "created_before": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "reasoning_effort": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" - } - ], - "nullable": true - }, - "temperature": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true - }, - "top_p": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true - }, - "users": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "description": "A EvalResponsesSource object describing a run data source configuration.", - "title": "EvalResponsesSource", - "x-oaiMeta": { - "name": "The run data source object used to configure an individual run", - "group": "eval runs", - "example": "{\n \"type\": \"responses\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"temperature\": 0.7,\n \"top_p\": 1.0,\n \"users\": [\"user1\", \"user2\"],\n \"tools\": [\"tool1\", \"tool2\"],\n \"instructions_search\": \"You are a coding assistant\"\n}\n" - } - }, - "OpenAI.EvalRunOutputItemSample": { - "type": "object", - "required": [ - "input", - "output", - "finish_reason", - "model", - "usage", - "error", - "temperature", - "max_completion_tokens", - "top_p", - "seed" - ], - "properties": { - "input": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemSampleInput" - } - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemSampleOutput" - } - }, - "finish_reason": { - "type": "string" - }, - "model": { - "type": "string" - }, - "usage": { - "$ref": "#/components/schemas/OpenAI.EvalRunOutputItemSampleUsage" - }, - "error": { - "$ref": "#/components/schemas/OpenAI.EvalApiError" - }, - "temperature": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "max_completion_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "top_p": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "seed": { - "$ref": "#/components/schemas/OpenAI.integer" - } - } - }, - "OpenAI.EvalRunOutputItemSampleUsage": { - "type": "object", - "required": [ - "total_tokens", - "completion_tokens", - "prompt_tokens", - "cached_tokens" - ], - "properties": { - "total_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "completion_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "prompt_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "cached_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - } - } - }, - "OpenAI.EvalRunPerModelUsage": { - "type": "object", - "required": [ - "model_name", - "invocation_count", - "prompt_tokens", - "completion_tokens", - "total_tokens", - "cached_tokens" - ], - "properties": { - "model_name": { - "type": "string" - }, - "invocation_count": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "prompt_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "completion_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "total_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "cached_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - } - } - }, - "OpenAI.EvalRunPerTestingCriteriaResults": { - "type": "object", - "required": [ - "testing_criteria", - "passed", - "failed" - ], - "properties": { - "testing_criteria": { - "type": "string" - }, - "passed": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "failed": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "errored": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "description": "Number of tests that errored for this criteria." - }, - "skipped": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "description": "Number of tests that were skipped for this criteria." - } - } - }, - "OpenAI.EvalRunResultCounts": { - "type": "object", - "required": [ - "total", - "errored", - "failed", - "passed" - ], - "properties": { - "total": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "errored": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "failed": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "passed": { - "$ref": "#/components/schemas/OpenAI.integer" - }, - "skipped": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "description": "Number of output items that were skipped during the evaluation." - } - } - }, - "OpenAI.EvalStoredCompletionsSource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "stored_completions" - ], - "description": "The type of source. Always `stored_completions`.", - "x-stainless-const": true, - "default": "stored_completions" - }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "model": { - "type": "string", - "nullable": true - }, - "created_after": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "created_before": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "limit": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - } - }, - "description": "A StoredCompletionsRunDataSource configuration describing a set of filters", - "title": "StoredCompletionsRunDataSource", - "x-oaiMeta": { - "name": "The stored completions data source object used to configure an individual run", - "group": "eval runs", - "example": "{\n \"type\": \"stored_completions\",\n \"model\": \"gpt-4o\",\n \"created_after\": 1668124800,\n \"created_before\": 1668124900,\n \"limit\": 100,\n \"metadata\": {}\n}\n" - } - }, - "OpenAI.FileCitationBody": { - "type": "object", - "required": [ - "type", - "file_id", - "index", - "filename" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "file_citation" - ], - "description": "The type of the file citation. Always `file_citation`.", - "x-stainless-const": true, - "default": "file_citation" - }, - "file_id": { - "type": "string", - "description": "The ID of the file." - }, - "index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the file in the list of files." - }, - "filename": { - "type": "string", - "description": "The filename of the file cited." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Annotation" - } - ], - "description": "A citation to a file.", - "title": "File citation" - }, - "OpenAI.FilePath": { - "type": "object", - "required": [ - "type", - "file_id", - "index" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "file_path" - ], - "description": "The type of the file path. Always `file_path`.", - "x-stainless-const": true - }, - "file_id": { - "type": "string", - "description": "The ID of the file." - }, - "index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the file in the list of files." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Annotation" - } - ], - "description": "A path to a file.", - "title": "File path" - }, - "OpenAI.FileSearchTool": { - "type": "object", - "required": [ - "type", - "vector_store_ids" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "file_search" - ], - "description": "The type of the file search tool. Always `file_search`.", - "x-stainless-const": true, - "default": "file_search" - }, - "vector_store_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The IDs of the vector stores to search." - }, - "max_num_results": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The maximum number of results to return. This number should be between 1 and 50 inclusive." - }, - "ranking_options": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.RankingOptions" - } - ], - "description": "Ranking options for search." - }, - "filters": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Filters" - } - ], - "nullable": true - }, - "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." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).", - "title": "File search" - }, - "OpenAI.FileSearchToolCallResults": { - "type": "object", - "properties": { - "file_id": { - "type": "string" - }, - "text": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "attributes": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.VectorStoreFileAttributes" - } - ], - "nullable": true - }, - "score": { - "type": "number", - "format": "float" - } - } - }, - "OpenAI.Filters": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComparisonFilter" - }, - { - "$ref": "#/components/schemas/OpenAI.CompoundFilter" - } - ] - }, - "OpenAI.FineTuneDPOHyperparameters": { - "type": "object", - "properties": { - "beta": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.", - "default": "auto" - }, - "batch_size": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.", - "default": "auto" - }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", - "default": "auto" - }, - "n_epochs": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", - "default": "auto" - } - }, - "description": "The hyperparameters used for the DPO fine-tuning job." - }, - "OpenAI.FineTuneDPOMethod": { - "type": "object", - "properties": { - "hyperparameters": { - "$ref": "#/components/schemas/OpenAI.FineTuneDPOHyperparameters" - } - }, - "description": "Configuration for the DPO fine-tuning method." - }, - "OpenAI.FineTuneMethod": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "supervised", - "dpo", - "reinforcement" - ], - "description": "The type of method. Is either `supervised`, `dpo`, or `reinforcement`." - }, - "supervised": { - "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedMethod" - }, - "dpo": { - "$ref": "#/components/schemas/OpenAI.FineTuneDPOMethod" - }, - "reinforcement": { - "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementMethod" - } - }, - "description": "The method used for fine-tuning." - }, - "OpenAI.FineTuneReinforcementHyperparameters": { - "type": "object", - "properties": { - "batch_size": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.", - "default": "auto" - }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", - "default": "auto" - }, - "n_epochs": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", - "default": "auto" - }, - "reasoning_effort": { - "type": "string", - "enum": [ - "default", - "low", - "medium", - "high" - ], - "description": "Level of reasoning effort.", - "default": "default" - }, - "compute_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "Multiplier on amount of compute used for exploring search space during training.", - "default": "auto" - }, - "eval_interval": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of training steps between evaluation runs.", - "default": "auto" - }, - "eval_samples": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "Number of evaluation samples to generate per training step.", - "default": "auto" - } - }, - "description": "The hyperparameters used for the reinforcement fine-tuning job." - }, - "OpenAI.FineTuneReinforcementMethod": { - "type": "object", - "required": [ - "grader" - ], - "properties": { - "grader": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.GraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.GraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.GraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.GraderScoreModel" - }, - { - "$ref": "#/components/schemas/OpenAI.GraderMulti" - } - ], - "description": "The grader used for the fine-tuning job." - }, - "hyperparameters": { - "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementHyperparameters" - } - }, - "description": "Configuration for the reinforcement fine-tuning method." - }, - "OpenAI.FineTuneSupervisedHyperparameters": { - "type": "object", - "properties": { - "batch_size": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.", - "default": "auto" - }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", - "default": "auto" - }, - "n_epochs": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", - "default": "auto" - } - }, - "description": "The hyperparameters used for the fine-tuning job." - }, - "OpenAI.FineTuneSupervisedMethod": { - "type": "object", - "properties": { - "hyperparameters": { - "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedHyperparameters" - } - }, - "description": "Configuration for the supervised fine-tuning method." - }, - "OpenAI.FineTuningIntegration": { - "type": "object", - "required": [ - "type", - "wandb" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wandb" - ], - "description": "The type of the integration being enabled for the fine-tuning job", - "x-stainless-const": true - }, - "wandb": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FineTuningIntegrationWandb" - } - ], - "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\n metrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\n to your run, and set a default entity (team, username, etc) to be associated with your run." - } - }, - "title": "Fine-Tuning Job Integration" - }, - "OpenAI.FineTuningIntegrationWandb": { - "type": "object", - "required": [ - "project" - ], - "properties": { - "project": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "entity": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "OpenAI.FineTuningJob": { - "type": "object", - "required": [ - "id", - "created_at", - "error", - "fine_tuned_model", - "finished_at", - "hyperparameters", - "model", - "object", - "organization_id", - "result_files", - "status", - "trained_tokens", - "training_file", - "validation_file", - "seed" - ], - "properties": { - "id": { - "type": "string", - "description": "The object identifier, which can be referenced in the API endpoints." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created." - }, - "error": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FineTuningJobError" - } - ], - "nullable": true - }, - "fine_tuned_model": { - "type": "string", - "nullable": true - }, - "finished_at": { - "type": "integer", - "format": "unixtime", - "nullable": true - }, - "hyperparameters": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FineTuningJobHyperparameters" - } - ], - "description": "The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs." - }, - "model": { - "type": "string", - "description": "The base model that is being fine-tuned." - }, - "object": { - "type": "string", - "enum": [ - "fine_tuning.job" - ], - "description": "The object type, which is always \"fine_tuning.job\".", - "x-stainless-const": true - }, - "organization_id": { - "type": "string", - "description": "The organization that owns the fine-tuning job." - }, - "result_files": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents)." - }, - "status": { - "type": "string", - "enum": [ - "validating_files", - "queued", - "running", - "succeeded", - "failed", - "cancelled" - ], - "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`." - }, - "trained_tokens": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "training_file": { - "type": "string", - "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents)." - }, - "validation_file": { - "type": "string", - "nullable": true - }, - "integrations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FineTuningIntegration" - }, - "nullable": true - }, - "seed": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The seed used for the fine-tuning job." - }, - "estimated_finish": { - "type": "integer", - "format": "unixtime", - "nullable": true - }, - "method": { - "$ref": "#/components/schemas/OpenAI.FineTuneMethod" - }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - } - }, - "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", - "title": "FineTuningJob", - "x-oaiMeta": { - "name": "The fine-tuning job object", - "example": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"davinci-002\",\n \"created_at\": 1692661014,\n \"finished_at\": 1692661190,\n \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n \"organization_id\": \"org-123\",\n \"result_files\": [\n \"file-abc123\"\n ],\n \"status\": \"succeeded\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"hyperparameters\": {\n \"n_epochs\": 4,\n \"batch_size\": 1,\n \"learning_rate_multiplier\": 1.0\n },\n \"trained_tokens\": 5768,\n \"integrations\": [],\n \"seed\": 0,\n \"estimated_finish\": 0,\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"n_epochs\": 4,\n \"batch_size\": 1,\n \"learning_rate_multiplier\": 1.0\n }\n }\n },\n \"metadata\": {\n \"key\": \"value\"\n }\n}\n" - } - }, - "OpenAI.FineTuningJobCheckpoint": { - "type": "object", - "required": [ - "id", - "created_at", - "fine_tuned_model_checkpoint", - "step_number", - "metrics", - "fine_tuning_job_id", - "object" - ], - "properties": { - "id": { - "type": "string", - "description": "The checkpoint identifier, which can be referenced in the API endpoints." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) for when the checkpoint was created." - }, - "fine_tuned_model_checkpoint": { - "type": "string", - "description": "The name of the fine-tuned checkpoint model that is created." - }, - "step_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The step number that the checkpoint was created at." - }, - "metrics": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpointMetrics" - } - ], - "description": "Metrics at the step number during the fine-tuning job." - }, - "fine_tuning_job_id": { - "type": "string", - "description": "The name of the fine-tuning job that this checkpoint was created from." - }, - "object": { - "type": "string", - "enum": [ - "fine_tuning.job.checkpoint" - ], - "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", - "x-stainless-const": true - } - }, - "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", - "title": "FineTuningJobCheckpoint", - "x-oaiMeta": { - "name": "The fine-tuning job checkpoint object", - "example": "{\n \"object\": \"fine_tuning.job.checkpoint\",\n \"id\": \"ftckpt_qtZ5Gyk4BLq1SfLFWp3RtO3P\",\n \"created_at\": 1712211699,\n \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom_suffix:9ABel2dg:ckpt-step-88\",\n \"fine_tuning_job_id\": \"ftjob-fpbNQ3H1GrMehXRf8cO97xTN\",\n \"metrics\": {\n \"step\": 88,\n \"train_loss\": 0.478,\n \"train_mean_token_accuracy\": 0.924,\n \"valid_loss\": 10.112,\n \"valid_mean_token_accuracy\": 0.145,\n \"full_valid_loss\": 0.567,\n \"full_valid_mean_token_accuracy\": 0.944\n },\n \"step_number\": 88\n}\n" - } - }, - "OpenAI.FineTuningJobCheckpointMetrics": { - "type": "object", - "properties": { - "step": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "train_loss": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "train_mean_token_accuracy": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "valid_loss": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "valid_mean_token_accuracy": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "full_valid_loss": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "full_valid_mean_token_accuracy": { - "$ref": "#/components/schemas/OpenAI.numeric" - } - } - }, - "OpenAI.FineTuningJobError": { - "type": "object", - "required": [ - "code", - "message", - "param" - ], - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "param": { - "type": "string", - "nullable": true - } - } - }, - "OpenAI.FineTuningJobEvent": { - "type": "object", - "required": [ - "object", - "id", - "created_at", - "level", - "message" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "fine_tuning.job.event" - ], - "description": "The object type, which is always \"fine_tuning.job.event\".", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The object identifier." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created." - }, - "level": { - "type": "string", - "enum": [ - "info", - "warn", - "error" - ], - "description": "The log level of the event." - }, - "message": { - "type": "string", - "description": "The message of the event." - }, - "type": { - "type": "string", - "enum": [ - "message", - "metrics" - ], - "description": "The type of event." - }, - "data": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FineTuningJobEventData" - } - ], - "description": "The data associated with the event." - } - }, - "description": "Fine-tuning job event object", - "x-oaiMeta": { - "name": "The fine-tuning job event object", - "example": "{\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ftevent-abc123\"\n \"created_at\": 1677610602,\n \"level\": \"info\",\n \"message\": \"Created fine-tuning job\",\n \"data\": {},\n \"type\": \"message\"\n}\n" - } - }, - "OpenAI.FineTuningJobEventData": { - "type": "object" - }, - "OpenAI.FineTuningJobHyperparameters": { - "type": "object", - "properties": { - "batch_size": { - "anyOf": [ - { - "type": "string", - "enum": [ - "auto" - ], - "nullable": true - }, - { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - } - ], - "default": "auto" - }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "default": "auto" - }, - "n_epochs": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "default": "auto" - } - } - }, - "OpenAI.FunctionAndCustomToolCallOutput": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "input_text": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputTextContent", - "input_image": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputImageContent", - "input_file": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputFileContent" - } - } - }, - "OpenAI.FunctionAndCustomToolCallOutputInputFileContent": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_file" - ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" - }, - "file_id": { - "type": "string", - "nullable": true - }, - "filename": { - "type": "string", - "description": "The name of the file to be sent to the model." - }, - "file_url": { - "type": "string", - "format": "uri", - "description": "The URL of the file to be sent to the model." - }, - "file_data": { - "type": "string", - "description": "The content of the file to be sent to the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - ], - "description": "A file input to the model.", - "title": "Input file" - }, - "OpenAI.FunctionAndCustomToolCallOutputInputImageContent": { - "type": "object", - "required": [ - "type", - "detail" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_image" - ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" - }, - "image_url": { - "type": "string", - "format": "uri", - "nullable": true - }, - "file_id": { - "type": "string", - "nullable": true - }, - "detail": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ImageDetail" - } - ], - "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - ], - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" - }, - "OpenAI.FunctionAndCustomToolCallOutputInputTextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_text" - ], - "description": "The type of the input item. Always `input_text`.", - "x-stainless-const": true, - "default": "input_text" - }, - "text": { - "type": "string", - "description": "The text input to the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - ], - "description": "A text input to the model.", - "title": "Input text" - }, - "OpenAI.FunctionAndCustomToolCallOutputType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "input_text", - "input_image", - "input_file" - ] - } - ] - }, - "OpenAI.FunctionCallItemStatus": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ] - }, - "OpenAI.FunctionObject": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "description": { - "type": "string", - "description": "A description of what the function does, used by the model to choose when and how to call the function." - }, - "name": { - "type": "string", - "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64." - }, - "parameters": { - "$ref": "#/components/schemas/OpenAI.FunctionParameters" - }, - "strict": { - "type": "boolean", - "nullable": true - } - } - }, - "OpenAI.FunctionParameters": { - "type": "object", - "additionalProperties": {}, - "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\nOmitting `parameters` defines a function with an empty parameter list." - }, - "OpenAI.FunctionShellAction": { - "type": "object", - "required": [ - "commands", - "timeout_ms", - "max_output_length" - ], - "properties": { - "commands": { - "type": "array", - "items": { - "type": "string" - } - }, - "timeout_ms": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - } - }, - "description": "Execute a shell command.", - "title": "Shell exec action" - }, - "OpenAI.FunctionShellActionParam": { - "type": "object", - "required": [ - "commands" - ], - "properties": { - "commands": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Ordered shell commands for the execution environment to run." - }, - "timeout_ms": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - } - }, - "description": "Commands and limits describing how to run the shell tool call.", - "title": "Shell action" - }, - "OpenAI.FunctionShellCallEnvironment": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironmentType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "local": "#/components/schemas/OpenAI.LocalEnvironmentResource", - "container_reference": "#/components/schemas/OpenAI.ContainerReferenceResource" - } - } - }, - "OpenAI.FunctionShellCallEnvironmentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "local", - "container_reference" - ] - } - ] - }, - "OpenAI.FunctionShellCallItemParamEnvironment": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "local": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam", - "container_reference": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam" - } - }, - "description": "The environment to execute the shell commands in." - }, - "OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam": { - "type": "object", - "required": [ - "type", - "container_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "container_reference" - ], - "description": "References a container created with the /v1/containers endpoint", - "x-stainless-const": true, - "default": "container_reference" - }, - "container_id": { - "type": "string", - "description": "The ID of the referenced container." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" - } - ] - }, - "OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local" - ], - "description": "Use a local computer environment.", - "x-stainless-const": true, - "default": "local" - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.LocalSkillParam" - }, - "maxItems": 200, - "description": "An optional list of skills." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" - } - ] - }, - "OpenAI.FunctionShellCallItemParamEnvironmentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "local", - "container_reference" - ] - } - ] - }, - "OpenAI.FunctionShellCallItemStatus": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "Status values reported for shell tool calls.", - "title": "Shell call status" - }, - "OpenAI.FunctionShellCallOutputContent": { - "type": "object", - "required": [ - "stdout", - "stderr", - "outcome" - ], - "properties": { - "stdout": { - "type": "string", - "description": "The standard output that was captured." - }, - "stderr": { - "type": "string", - "description": "The standard error output that was captured." - }, - "outcome": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" - } - ], - "description": "Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.", - "title": "Shell call outcome" - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." - } - }, - "description": "The content of a shell tool call output that was emitted.", - "title": "Shell call output content" - }, - "OpenAI.FunctionShellCallOutputContentParam": { - "type": "object", - "required": [ - "stdout", - "stderr", - "outcome" - ], - "properties": { - "stdout": { - "type": "string", - "maxLength": 10485760, - "description": "Captured stdout output for the shell call." - }, - "stderr": { - "type": "string", - "maxLength": 10485760, - "description": "Captured stderr output for the shell call." - }, - "outcome": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" - } - ], - "description": "The exit or timeout outcome associated with this shell call." - } - }, - "description": "Captured stdout and stderr for a portion of a shell tool call output.", - "title": "Shell output content" - }, - "OpenAI.FunctionShellCallOutputExitOutcome": { - "type": "object", - "required": [ - "type", - "exit_code" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "exit" - ], - "description": "The outcome type. Always `exit`.", - "x-stainless-const": true, - "default": "exit" - }, - "exit_code": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "Exit code from the shell process." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" - } - ], - "description": "Indicates that the shell commands finished and returned an exit code.", - "title": "Shell call exit outcome" - }, - "OpenAI.FunctionShellCallOutputExitOutcomeParam": { - "type": "object", - "required": [ - "type", - "exit_code" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "exit" - ], - "description": "The outcome type. Always `exit`.", - "x-stainless-const": true, - "default": "exit" - }, - "exit_code": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The exit code returned by the shell process." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" - } - ], - "description": "Indicates that the shell commands finished and returned an exit code.", - "title": "Shell call exit outcome" - }, - "OpenAI.FunctionShellCallOutputOutcome": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "timeout": "#/components/schemas/OpenAI.FunctionShellCallOutputTimeoutOutcome", - "exit": "#/components/schemas/OpenAI.FunctionShellCallOutputExitOutcome" - } - }, - "description": "Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.", - "title": "Shell call outcome" - }, - "OpenAI.FunctionShellCallOutputOutcomeParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParamType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "timeout": "#/components/schemas/OpenAI.FunctionShellCallOutputTimeoutOutcomeParam", - "exit": "#/components/schemas/OpenAI.FunctionShellCallOutputExitOutcomeParam" - } - }, - "description": "The exit or timeout outcome associated with this shell call.", - "title": "Shell call outcome" - }, - "OpenAI.FunctionShellCallOutputOutcomeParamType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "timeout", - "exit" - ] - } - ] - }, - "OpenAI.FunctionShellCallOutputOutcomeType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "timeout", - "exit" - ] - } - ] - }, - "OpenAI.FunctionShellCallOutputTimeoutOutcome": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "timeout" - ], - "description": "The outcome type. Always `timeout`.", - "x-stainless-const": true, - "default": "timeout" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" - } - ], - "description": "Indicates that the shell call exceeded its configured time limit.", - "title": "Shell call timeout outcome" - }, - "OpenAI.FunctionShellCallOutputTimeoutOutcomeParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "timeout" - ], - "description": "The outcome type. Always `timeout`.", - "x-stainless-const": true, - "default": "timeout" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" - } - ], - "description": "Indicates that the shell call exceeded its configured time limit.", - "title": "Shell call timeout outcome" - }, - "OpenAI.FunctionShellToolParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell" - ], - "description": "The type of the shell tool. Always `shell`.", - "x-stainless-const": true, - "default": "shell" - }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" - } - ], - "nullable": true - }, - "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." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool that allows the model to execute shell commands.", - "title": "Shell tool" - }, - "OpenAI.FunctionShellToolParamEnvironment": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "local": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam", - "container_reference": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam", - "container_auto": "#/components/schemas/OpenAI.ContainerAutoParam" - } - } - }, - "OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam": { - "type": "object", - "required": [ - "type", - "container_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "container_reference" - ], - "description": "References a container created with the /v1/containers endpoint", - "x-stainless-const": true, - "default": "container_reference" - }, - "container_id": { - "type": "string", - "description": "The ID of the referenced container." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" - } - ] - }, - "OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local" - ], - "description": "Use a local computer environment.", - "x-stainless-const": true, - "default": "local" - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.LocalSkillParam" - }, - "maxItems": 200, - "description": "An optional list of skills." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" - } - ] - }, - "OpenAI.FunctionShellToolParamEnvironmentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "container_auto", - "local", - "container_reference" - ] - } - ] - }, - "OpenAI.FunctionTool": { - "type": "object", - "required": [ - "type", - "name", - "parameters", - "strict" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "function" - ], - "description": "The type of the function tool. Always `function`.", - "x-stainless-const": true, - "default": "function" - }, - "name": { - "type": "string", - "description": "The name of the function to call." - }, - "description": { - "type": "string", - "nullable": true - }, - "parameters": { - "type": "object", - "additionalProperties": {}, - "nullable": true - }, - "strict": { - "type": "boolean", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).", - "title": "Function" - }, - "OpenAI.FunctionToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call output. Populated when this item\n is returned via API." - }, - "type": { - "type": "string", - "enum": [ - "function_call_output" - ], - "description": "The type of the function tool call output. Always `function_call_output`.", - "x-stainless-const": true - }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." - }, - "output": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - } - ], - "description": "The output from the function call generated by your code.\n Can be a string or an list of output content." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "The output of a function tool call.", - "title": "Function tool call output" - }, - "OpenAI.GraderLabelModel": { - "type": "object", - "required": [ - "type", - "name", - "model", - "input", - "labels", - "passing_labels" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "label_model" - ], - "description": "The object type, which is always `label_model`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "model": { - "type": "string", - "description": "The model to use for the evaluation. Must support structured outputs." - }, - "input": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalItem" - } - }, - "labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels to assign to each item in the evaluation." - }, - "passing_labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels that indicate a passing result. Must be a subset of labels." - } - }, - "description": "A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.", - "title": "LabelModelGrader", - "x-oaiMeta": { - "name": "Label Model Grader", - "group": "graders", - "example": "{\n \"name\": \"First label grader\",\n \"type\": \"label_model\",\n \"model\": \"gpt-4o-2024-08-06\",\n \"input\": [\n {\n \"type\": \"message\",\n \"role\": \"system\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Classify the sentiment of the following statement as one of positive, neutral, or negative\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Statement: {{item.response}}\"\n }\n }\n ],\n \"passing_labels\": [\n \"positive\"\n ],\n \"labels\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ]\n}\n" - } - }, - "OpenAI.GraderMulti": { - "type": "object", - "required": [ - "type", - "name", - "graders", - "calculate_output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "multi" - ], - "description": "The object type, which is always `multi`.", - "x-stainless-const": true, - "default": "multi" - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "graders": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.GraderStringCheck" - }, - { - "$ref": "#/components/schemas/OpenAI.GraderTextSimilarity" - }, - { - "$ref": "#/components/schemas/OpenAI.GraderPython" - }, - { - "$ref": "#/components/schemas/OpenAI.GraderScoreModel" - }, - { - "$ref": "#/components/schemas/OpenAI.GraderLabelModel" - } - ] - }, - "calculate_output": { - "type": "string", - "description": "A formula to calculate the output based on grader results." - } - }, - "description": "A MultiGrader object combines the output of multiple graders to produce a single score.", - "title": "MultiGrader", - "x-oaiMeta": { - "name": "Multi Grader", - "group": "graders", - "example": "{\n \"type\": \"multi\",\n \"name\": \"example multi grader\",\n \"graders\": [\n {\n \"type\": \"text_similarity\",\n \"name\": \"example text similarity grader\",\n \"input\": \"The graded text\",\n \"reference\": \"The reference text\",\n \"evaluation_metric\": \"fuzzy_match\"\n },\n {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n }\n ],\n \"calculate_output\": \"0.5 * text_similarity_score + 0.5 * string_check_score)\"\n}\n" - } - }, - "OpenAI.GraderPython": { - "type": "object", - "required": [ - "type", - "name", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "python" - ], - "description": "The object type, which is always `python`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "source": { - "type": "string", - "description": "The source code of the python script." - }, - "image_tag": { - "type": "string", - "description": "The image tag to use for the python script." - } - }, - "description": "A PythonGrader object that runs a python script on the input.", - "title": "PythonGrader", - "x-oaiMeta": { - "name": "Python Grader", - "group": "graders", - "example": "{\n \"type\": \"python\",\n \"name\": \"Example python grader\",\n \"image_tag\": \"2025-05-08\",\n \"source\": \"\"\"\ndef grade(sample: dict, item: dict) -> float:\n \"\"\"\n Returns 1.0 if `output_text` equals `label`, otherwise 0.0.\n \"\"\"\n output = sample.get(\"output_text\")\n label = item.get(\"label\")\n return 1.0 if output == label else 0.0\n\"\"\",\n}\n" - } - }, - "OpenAI.GraderScoreModel": { - "type": "object", - "required": [ - "type", - "name", - "model", - "input" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "score_model" - ], - "description": "The object type, which is always `score_model`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "model": { - "type": "string", - "description": "The model to use for the evaluation." - }, - "sampling_params": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModelSamplingParams" - } - ], - "description": "The sampling parameters for the model." - }, - "input": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalItem" - }, - "description": "The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings." - }, - "range": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "description": "The range of the score. Defaults to `[0, 1]`." - } - }, - "description": "A ScoreModelGrader object that uses a model to assign a score to the input.", - "title": "ScoreModelGrader", - "x-oaiMeta": { - "name": "Score Model Grader", - "group": "graders", - "example": "{\n \"type\": \"score_model\",\n \"name\": \"Example score model grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"input_text\",\n \"text\": (\n \"Score how close the reference answer is to the model answer. Score 1.0 if they are the same and 0.0 if they are different.\"\n \" Return just a floating point score\n\n\"\n \" Reference answer: {{item.label}}\n\n\"\n \" Model answer: {{sample.output_text}}\"\n )\n },\n {\n \"type\": \"input_image\",\n \"image_url\": \"https://example.com/reference.png\",\n \"file_id\": null,\n \"detail\": \"auto\"\n }\n ],\n }\n ],\n \"model\": \"gpt-5-mini\",\n \"sampling_params\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"seed\": 42,\n \"max_completions_tokens\": 32768,\n \"reasoning_effort\": \"medium\"\n },\n}\n" - } - }, - "OpenAI.GraderStringCheck": { - "type": "object", - "required": [ - "type", - "name", - "input", - "reference", - "operation" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "string_check" - ], - "description": "The object type, which is always `string_check`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "input": { - "type": "string", - "description": "The input text. This may include template strings." - }, - "reference": { - "type": "string", - "description": "The reference text. This may include template strings." - }, - "operation": { - "type": "string", - "enum": [ - "eq", - "ne", - "like", - "ilike" - ], - "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." - } - }, - "description": "A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.", - "title": "StringCheckGrader", - "x-oaiMeta": { - "name": "String Check Grader", - "group": "graders", - "example": "{\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n}\n" - } - }, - "OpenAI.GraderTextSimilarity": { - "type": "object", - "required": [ - "type", - "name", - "input", - "reference", - "evaluation_metric" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "text_similarity" - ], - "description": "The type of grader.", - "x-stainless-const": true, - "default": "text_similarity" - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "input": { - "type": "string", - "description": "The text being graded." - }, - "reference": { - "type": "string", - "description": "The text being graded against." - }, - "evaluation_metric": { - "type": "string", - "enum": [ - "cosine", - "fuzzy_match", - "bleu", - "gleu", - "meteor", - "rouge_1", - "rouge_2", - "rouge_3", - "rouge_4", - "rouge_5", - "rouge_l" - ], - "description": "The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\n or `rouge_l`." - } - }, - "description": "A TextSimilarityGrader object which grades text based on similarity metrics.", - "title": "TextSimilarityGrader", - "x-oaiMeta": { - "name": "Text Similarity Grader", - "group": "graders", - "example": "{\n \"type\": \"text_similarity\",\n \"name\": \"Example text similarity grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"evaluation_metric\": \"fuzzy_match\"\n}\n" - } - }, - "OpenAI.GrammarSyntax1": { - "type": "string", - "enum": [ - "lark", - "regex" - ] - }, - "OpenAI.HybridSearchOptions": { - "type": "object", - "required": [ - "embedding_weight", - "text_weight" - ], - "properties": { - "embedding_weight": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "The weight of the embedding in the reciprocal ranking fusion." - }, - "text_weight": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "The weight of the text in the reciprocal ranking fusion." - } - } - }, - "OpenAI.ImageDetail": { - "type": "string", - "enum": [ - "low", - "high", - "auto" - ] - }, - "OpenAI.ImageGenActionEnum": { - "type": "string", - "enum": [ - "generate", - "edit", - "auto" - ] - }, - "OpenAI.ImageGenTool": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "image_generation" - ], - "description": "The type of the image generation tool. Always `image_generation`.", - "x-stainless-const": true, - "default": "image_generation" - }, - "model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "gpt-image-1", - "gpt-image-1-mini", - "gpt-image-1.5" - ] - } - ], - "default": "gpt-image-1" - }, - "quality": { - "type": "string", - "enum": [ - "low", - "medium", - "high", - "auto" - ], - "description": "The quality of the generated image. One of `low`, `medium`, `high`,\n or `auto`. Default: `auto`.", - "default": "auto" - }, - "size": { - "type": "string", - "enum": [ - "1024x1024", - "1024x1536", - "1536x1024", - "auto" - ], - "description": "The size of the generated image. One of `1024x1024`, `1024x1536`,\n `1536x1024`, or `auto`. Default: `auto`.", - "default": "auto" - }, - "output_format": { - "type": "string", - "enum": [ - "png", - "webp", - "jpeg" - ], - "description": "The output format of the generated image. One of `png`, `webp`, or\n `jpeg`. Default: `png`.", - "default": "png" - }, - "output_compression": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "minimum": 0, - "maximum": 100, - "description": "Compression level for the output image. Default: 100.", - "default": 100 - }, - "moderation": { - "type": "string", - "enum": [ - "auto", - "low" - ], - "description": "Moderation level for the generated image. Default: `auto`.", - "default": "auto" - }, - "background": { - "type": "string", - "enum": [ - "transparent", - "opaque", - "auto" - ], - "description": "Background type for the generated image. One of `transparent`,\n `opaque`, or `auto`. Default: `auto`.", - "default": "auto" - }, - "input_fidelity": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputFidelity" - } - ], - "nullable": true - }, - "input_image_mask": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ImageGenToolInputImageMask" - } - ], - "description": "Optional mask for inpainting. Contains `image_url`\n (string, optional) and `file_id` (string, optional)." - }, - "partial_images": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "minimum": 0, - "maximum": 3, - "description": "Number of partial images to generate in streaming mode, from 0 (default value) to 3." - }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ImageGenActionEnum" - } - ], - "description": "Whether to generate a new image or edit an existing image. Default: `auto`." - }, - "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." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool that generates images using the GPT image models.", - "title": "Image generation tool" - }, - "OpenAI.ImageGenToolInputImageMask": { - "type": "object", - "properties": { - "image_url": { - "type": "string", - "format": "uri" - }, - "file_id": { - "type": "string" - } - } - }, - "OpenAI.IncludeEnum": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "file_search_call.results", - "web_search_call.results", - "web_search_call.action.sources", - "message.input_image.image_url", - "computer_call_output.output.image_url", - "code_interpreter_call.outputs", - "reasoning.encrypted_content", - "message.output_text.logprobs", - "memory_search_call.results" - ] - } - ], - "description": "Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)." - }, - "OpenAI.InlineSkillParam": { - "type": "object", - "required": [ - "type", - "name", - "description", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "inline" - ], - "description": "Defines an inline skill for this request.", - "x-stainless-const": true, - "default": "inline" - }, - "name": { - "type": "string", - "description": "The name of the skill." - }, - "description": { - "type": "string", - "description": "The description of the skill." - }, - "source": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InlineSkillSourceParam" - } - ], - "description": "Inline skill payload" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerSkill" - } - ] - }, - "OpenAI.InlineSkillSourceParam": { - "type": "object", - "required": [ - "type", - "media_type", - "data" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "base64" - ], - "description": "The type of the inline skill source. Must be `base64`.", - "x-stainless-const": true, - "default": "base64" - }, - "media_type": { - "type": "string", - "enum": [ - "application/zip" - ], - "description": "The media type of the inline skill payload. Must be `application/zip`.", - "x-stainless-const": true, - "default": "application/zip" - }, - "data": { - "type": "string", - "minLength": 1, - "maxLength": 70254592, - "description": "Base64-encoded skill zip bundle." - } - }, - "description": "Inline skill payload" - }, - "OpenAI.InputAudio": { - "type": "object", - "required": [ - "type", - "input_audio" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_audio" - ], - "description": "The type of the input item. Always `input_audio`.", - "x-stainless-const": true - }, - "input_audio": { - "$ref": "#/components/schemas/OpenAI.InputAudioInputAudio" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" - } - ], - "description": "An audio input to the model.", - "title": "Input audio" - }, - "OpenAI.InputAudioInputAudio": { - "type": "object", - "required": [ - "data", - "format" - ], - "properties": { - "data": { - "type": "string" - }, - "format": { - "type": "string", - "enum": [ - "mp3", - "wav" - ] - } - } - }, - "OpenAI.InputContent": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.InputContentType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "input_text": "#/components/schemas/OpenAI.InputContentInputTextContent", - "input_image": "#/components/schemas/OpenAI.InputContentInputImageContent", - "input_file": "#/components/schemas/OpenAI.InputContentInputFileContent" - } - } - }, - "OpenAI.InputContentInputFileContent": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_file" - ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" - }, - "file_id": { - "type": "string", - "nullable": true - }, - "filename": { - "type": "string", - "description": "The name of the file to be sent to the model." - }, - "file_url": { - "type": "string", - "format": "uri", - "description": "The URL of the file to be sent to the model." - }, - "file_data": { - "type": "string", - "description": "The content of the file to be sent to the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputContent" - } - ], - "description": "A file input to the model.", - "title": "Input file" - }, - "OpenAI.InputContentInputImageContent": { - "type": "object", - "required": [ - "type", - "detail" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_image" - ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" - }, - "image_url": { - "type": "string", - "format": "uri", - "nullable": true - }, - "file_id": { - "type": "string", - "nullable": true - }, - "detail": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ImageDetail" - } - ], - "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputContent" - } - ], - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" - }, - "OpenAI.InputContentInputTextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_text" - ], - "description": "The type of the input item. Always `input_text`.", - "x-stainless-const": true, - "default": "input_text" - }, - "text": { - "type": "string", - "description": "The text input to the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputContent" - } - ], - "description": "A text input to the model.", - "title": "Input text" - }, - "OpenAI.InputContentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "input_text", - "input_image", - "input_file" - ] - } - ] - }, - "OpenAI.InputFidelity": { - "type": "string", - "enum": [ - "high", - "low" - ], - "description": "Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`." - }, - "OpenAI.InputFileContent": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_file" - ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" - }, - "file_id": { - "type": "string", - "nullable": true - }, - "filename": { - "type": "string", - "description": "The name of the file to be sent to the model." - }, - "file_url": { - "type": "string", - "format": "uri", - "description": "The URL of the file to be sent to the model." - }, - "file_data": { - "type": "string", - "description": "The content of the file to be sent to the model." - } - }, - "description": "A file input to the model.", - "title": "Input file" - }, - "OpenAI.InputFileContentParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_file" - ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" - }, - "file_id": { - "type": "string", - "nullable": true - }, - "filename": { - "type": "string", - "nullable": true - }, - "file_data": { - "type": "string", - "nullable": true - }, - "file_url": { - "type": "string", - "format": "uri", - "nullable": true - } - }, - "description": "A file input to the model.", - "title": "Input file" - }, - "OpenAI.InputImageContent": { - "type": "object", - "required": [ - "type", - "detail" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_image" - ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" - }, - "image_url": { - "type": "string", - "format": "uri", - "nullable": true - }, - "file_id": { - "type": "string", - "nullable": true - }, - "detail": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ImageDetail" - } - ], - "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." - } - }, - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" - }, - "OpenAI.InputImageContentParamAutoParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_image" - ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" - }, - "image_url": { - "type": "string", - "format": "uri", - "nullable": true - }, - "file_id": { - "type": "string", - "nullable": true - }, - "detail": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.DetailEnum" - } - ], - "nullable": true - } - }, - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision)", - "title": "Input image" - }, - "OpenAI.InputItem": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.InputItemType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "message": "#/components/schemas/OpenAI.EasyInputMessage", - "item_reference": "#/components/schemas/OpenAI.ItemReferenceParam", - "output_message": "#/components/schemas/OpenAI.InputItemOutputMessage", - "file_search_call": "#/components/schemas/OpenAI.InputItemFileSearchToolCall", - "computer_call": "#/components/schemas/OpenAI.InputItemComputerToolCall", - "computer_call_output": "#/components/schemas/OpenAI.InputItemComputerCallOutputItemParam", - "web_search_call": "#/components/schemas/OpenAI.InputItemWebSearchToolCall", - "function_call": "#/components/schemas/OpenAI.InputItemFunctionToolCall", - "function_call_output": "#/components/schemas/OpenAI.InputItemFunctionCallOutputItemParam", - "reasoning": "#/components/schemas/OpenAI.InputItemReasoningItem", - "compaction": "#/components/schemas/OpenAI.InputItemCompactionSummaryItemParam", - "image_generation_call": "#/components/schemas/OpenAI.InputItemImageGenToolCall", - "code_interpreter_call": "#/components/schemas/OpenAI.InputItemCodeInterpreterToolCall", - "local_shell_call": "#/components/schemas/OpenAI.InputItemLocalShellToolCall", - "local_shell_call_output": "#/components/schemas/OpenAI.InputItemLocalShellToolCallOutput", - "shell_call": "#/components/schemas/OpenAI.InputItemFunctionShellCallItemParam", - "shell_call_output": "#/components/schemas/OpenAI.InputItemFunctionShellCallOutputItemParam", - "apply_patch_call": "#/components/schemas/OpenAI.InputItemApplyPatchToolCallItemParam", - "apply_patch_call_output": "#/components/schemas/OpenAI.InputItemApplyPatchToolCallOutputItemParam", - "mcp_list_tools": "#/components/schemas/OpenAI.InputItemMcpListTools", - "mcp_approval_request": "#/components/schemas/OpenAI.InputItemMcpApprovalRequest", - "mcp_approval_response": "#/components/schemas/OpenAI.InputItemMcpApprovalResponse", - "mcp_call": "#/components/schemas/OpenAI.InputItemMcpToolCall", - "custom_tool_call_output": "#/components/schemas/OpenAI.InputItemCustomToolCallOutput", - "custom_tool_call": "#/components/schemas/OpenAI.InputItemCustomToolCall" - } - }, - "description": "An item representing part of the context for the response to be\ngenerated by the model. Can contain text, images, and audio inputs,\nas well as previous assistant responses and tool call outputs." - }, - "OpenAI.InputItemApplyPatchToolCallItemParam": { - "type": "object", - "required": [ - "type", - "call_id", - "status", - "operation" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call" - ], - "description": "The type of the item. Always `apply_patch_call`.", - "x-stainless-const": true, - "default": "apply_patch_call" - }, - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatusParam" - } - ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." - }, - "operation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" - } - ], - "description": "The specific create, delete, or update instruction for the apply_patch tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A tool call representing a request to create, delete, or update files using diff patches.", - "title": "Apply patch tool call" - }, - "OpenAI.InputItemApplyPatchToolCallOutputItemParam": { - "type": "object", - "required": [ - "type", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call_output" - ], - "description": "The type of the item. Always `apply_patch_call_output`.", - "x-stainless-const": true, - "default": "apply_patch_call_output" - }, - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatusParam" - } - ], - "description": "The status of the apply patch tool call output. One of `completed` or `failed`." - }, - "output": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "The streamed output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" - }, - "OpenAI.InputItemCodeInterpreterToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "container_id", - "code", - "outputs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code_interpreter_call" - ], - "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", - "x-stainless-const": true, - "default": "code_interpreter_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the code interpreter tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "interpreting", - "failed" - ], - "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." - }, - "container_id": { - "type": "string", - "description": "The ID of the container used to run the code." - }, - "code": { - "type": "string", - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" - }, - "OpenAI.InputItemCompactionSummaryItemParam": { - "type": "object", - "required": [ - "type", - "encrypted_content" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "enum": [ - "compaction" - ], - "description": "The type of the item. Always `compaction`.", - "x-stainless-const": true, - "default": "compaction" - }, - "encrypted_content": { - "type": "string", - "maxLength": 10485760, - "description": "The encrypted content of the compaction summary." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", - "title": "Compaction item" - }, - "OpenAI.InputItemComputerCallOutputItemParam": { - "type": "object", - "required": [ - "call_id", - "type", - "output" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The ID of the computer tool call that produced the output." - }, - "type": { - "type": "string", - "enum": [ - "computer_call_output" - ], - "description": "The type of the computer tool call output. Always `computer_call_output`.", - "x-stainless-const": true, - "default": "computer_call_output" - }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" - }, - "acknowledged_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "nullable": true - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" - } - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "The output of a computer tool call.", - "title": "Computer tool call output" - }, - "OpenAI.InputItemComputerToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_call" - ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." - }, - "call_id": { - "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - }, - "pending_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The pending safety checks for the computer call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", - "title": "Computer tool call" - }, - "OpenAI.InputItemCustomToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "input" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call" - ], - "description": "The type of the custom tool call. Always `custom_tool_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call in the OpenAI platform." - }, - "call_id": { - "type": "string", - "description": "An identifier used to map this custom tool call to a tool call output." - }, - "name": { - "type": "string", - "description": "The name of the custom tool being called." - }, - "input": { - "type": "string", - "description": "The input for the custom tool call generated by the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" - }, - "OpenAI.InputItemCustomToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call_output" - ], - "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call output in the OpenAI platform." - }, - "call_id": { - "type": "string", - "description": "The call ID, used to map this custom tool call output to a custom tool call." - }, - "output": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - } - ], - "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "The output of a custom tool call from your code, being sent back to the model.", - "title": "Custom tool call output" - }, - "OpenAI.InputItemFileSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "queries" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, - "type": { - "type": "string", - "enum": [ - "file_search_call" - ], - "description": "The type of the file search tool call. Always `file_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" - ], - "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," - }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The queries used to search for files." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", - "title": "File search tool call" - }, - "OpenAI.InputItemFunctionCallOutputItemParam": { - "type": "object", - "required": [ - "call_id", - "type", - "output" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the function tool call generated by the model." - }, - "type": { - "type": "string", - "enum": [ - "function_call_output" - ], - "description": "The type of the function tool call output. Always `function_call_output`.", - "x-stainless-const": true, - "default": "function_call_output" - }, - "output": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputTextContentParam" - }, - { - "$ref": "#/components/schemas/OpenAI.InputImageContentParamAutoParam" - }, - { - "$ref": "#/components/schemas/OpenAI.InputFileContentParam" - } - ] - } - } - ], - "description": "Text, image, or file output of the function tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" - } - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "The output of a function tool call.", - "title": "Function tool call output" - }, - "OpenAI.InputItemFunctionShellCallItemParam": { - "type": "object", - "required": [ - "call_id", - "type", - "action" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the shell tool call generated by the model." - }, - "type": { - "type": "string", - "enum": [ - "shell_call" - ], - "description": "The type of the item. Always `shell_call`.", - "x-stainless-const": true, - "default": "shell_call" - }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellActionParam" - } - ], - "description": "The shell commands and limits that describe how to run the tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" - } - ], - "nullable": true - }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" - } - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A tool representing a request to execute one or more shell commands.", - "title": "Shell tool call" - }, - "OpenAI.InputItemFunctionShellCallOutputItemParam": { - "type": "object", - "required": [ - "call_id", - "type", - "output" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the shell tool call generated by the model." - }, - "type": { - "type": "string", - "enum": [ - "shell_call_output" - ], - "description": "The type of the item. Always `shell_call_output`.", - "x-stainless-const": true, - "default": "shell_call_output" - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContentParam" - }, - "description": "Captured chunks of stdout and stderr output, along with their associated outcomes." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" - } - ], - "nullable": true - }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "The streamed output items emitted by a shell tool call.", - "title": "Shell tool call output" - }, - "OpenAI.InputItemFunctionToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, - "type": { - "type": "string", - "enum": [ - "function_call" - ], - "description": "The type of the function tool call. Always `function_call`.", - "x-stainless-const": true - }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the function to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A tool call to run a function. See the\n[function calling guide](/docs/guides/function-calling) for more information.", - "title": "Function tool call" - }, - "OpenAI.InputItemImageGenToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "result" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "image_generation_call" - ], - "description": "The type of the image generation call. Always `image_generation_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the image generation call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "generating", - "failed" - ], - "description": "The status of the image generation call." - }, - "result": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "An image generation request made by the model.", - "title": "Image generation call" - }, - "OpenAI.InputItemLocalShellToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call" - ], - "description": "The type of the local shell call. Always `local_shell_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell call." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" - }, - "OpenAI.InputItemLocalShellToolCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call_output" - ], - "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "output": { - "type": "string", - "description": "A JSON string of the output of the local shell tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" - }, - "OpenAI.InputItemMcpApprovalRequest": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_request" - ], - "description": "The type of the item. Always `mcp_approval_request`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the approval request." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server making the request." - }, - "name": { - "type": "string", - "description": "The name of the tool to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of arguments for the tool." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" - }, - "OpenAI.InputItemMcpApprovalResponse": { - "type": "object", - "required": [ - "type", - "approval_request_id", - "approve" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_response" - ], - "description": "The type of the item. Always `mcp_approval_response`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "nullable": true - }, - "approval_request_id": { - "type": "string", - "description": "The ID of the approval request being answered." - }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." - }, - "reason": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" - }, - "OpenAI.InputItemMcpListTools": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "tools" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_list_tools" - ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the list." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." - }, - "error": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" - }, - "OpenAI.InputItemMcpToolCall": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_call" - ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the tool call." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server running the tool." - }, - "name": { - "type": "string", - "description": "The name of the tool that was run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments passed to the tool." - }, - "output": { - "type": "string", - "nullable": true - }, - "error": { - "type": "object", - "additionalProperties": {} - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" - } - ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." - }, - "approval_request_id": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" - }, - "OpenAI.InputItemOutputMessage": { - "type": "object", - "required": [ - "id", - "type", - "role", - "content", - "status" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, - "type": { - "type": "string", - "enum": [ - "output_message" - ], - "description": "The type of the output message. Always `message`.", - "x-stainless-const": true - }, - "role": { - "type": "string", - "enum": [ - "assistant" - ], - "description": "The role of the output message. Always `assistant`.", - "x-stainless-const": true - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.OutputMessageContent" - }, - "description": "The content of the output message." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "An output message from the model.", - "title": "Output message" - }, - "OpenAI.InputItemReasoningItem": { - "type": "object", - "required": [ - "type", - "id", - "summary" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "reasoning" - ], - "description": "The type of the object. Always `reasoning`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique identifier of the reasoning content." - }, - "encrypted_content": { - "type": "string", - "nullable": true - }, - "summary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.SummaryTextContent" - }, - "description": "Reasoning summary content." - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" - }, - "description": "Reasoning text content." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", - "title": "Reasoning" - }, - "OpenAI.InputItemType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "message", - "output_message", - "file_search_call", - "computer_call", - "computer_call_output", - "web_search_call", - "function_call", - "function_call_output", - "reasoning", - "compaction", - "image_generation_call", - "code_interpreter_call", - "local_shell_call", - "local_shell_call_output", - "shell_call", - "shell_call_output", - "apply_patch_call", - "apply_patch_call_output", - "mcp_list_tools", - "mcp_approval_request", - "mcp_approval_response", - "mcp_call", - "custom_tool_call_output", - "custom_tool_call", - "item_reference" - ] - } - ] - }, - "OpenAI.InputItemWebSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "action" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, - "type": { - "type": "string", - "enum": [ - "web_search_call" - ], - "description": "The type of the web search tool call. Always `web_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" - ], - "description": "The status of the web search tool call." - }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" - } - ], - "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", - "title": "Web search tool call" - }, - "OpenAI.InputMessage": { - "type": "object", - "required": [ - "type", - "role", - "content" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message input. Always set to `message`.", - "x-stainless-const": true - }, - "role": { - "type": "string", - "enum": [ - "user", - "system", - "developer" - ], - "description": "The role of the message input. One of `user`, `system`, or `developer`." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - }, - "content": { - "$ref": "#/components/schemas/OpenAI.InputMessageContentList" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.", - "title": "Input message" - }, - "OpenAI.InputMessageContentList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputContent" - }, - "description": "A list of one or many input items to the model, containing different content\ntypes.", - "title": "Input item content list" - }, - "OpenAI.InputMessageResource": { - "type": "object", - "required": [ - "type", - "role", - "content", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message input. Always set to `message`.", - "x-stainless-const": true - }, - "role": { - "type": "string", - "enum": [ - "user", - "system", - "developer" - ], - "description": "The role of the message input. One of `user`, `system`, or `developer`." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - }, - "content": { - "$ref": "#/components/schemas/OpenAI.InputMessageContentList" - }, - "id": { - "type": "string", - "description": "The unique ID of the message input." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ] - }, - "OpenAI.InputParam": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - } - ], - "description": "Text, image, or file inputs to the model, used to generate a response.\nLearn more:\n- [Text inputs and outputs](/docs/guides/text)\n- [Image inputs](/docs/guides/images)\n- [File inputs](/docs/guides/pdf-files)\n- [Conversation state](/docs/guides/conversation-state)\n- [Function calling](/docs/guides/function-calling)" - }, - "OpenAI.InputTextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_text" - ], - "description": "The type of the input item. Always `input_text`.", - "x-stainless-const": true, - "default": "input_text" - }, - "text": { - "type": "string", - "description": "The text input to the model." - } - }, - "description": "A text input to the model.", - "title": "Input text" - }, - "OpenAI.InputTextContentParam": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_text" - ], - "description": "The type of the input item. Always `input_text`.", - "x-stainless-const": true, - "default": "input_text" - }, - "text": { - "type": "string", - "maxLength": 10485760, - "description": "The text input to the model." - } - }, - "description": "A text input to the model.", - "title": "Input text" - }, - "OpenAI.Item": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ItemType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "memory_search_call": "#/components/schemas/MemorySearchToolCallItemParam", - "message": "#/components/schemas/OpenAI.InputMessage", - "output_message": "#/components/schemas/OpenAI.ItemOutputMessage", - "file_search_call": "#/components/schemas/OpenAI.ItemFileSearchToolCall", - "computer_call": "#/components/schemas/OpenAI.ItemComputerToolCall", - "computer_call_output": "#/components/schemas/OpenAI.ItemComputerCallOutputItemParam", - "web_search_call": "#/components/schemas/OpenAI.ItemWebSearchToolCall", - "function_call": "#/components/schemas/OpenAI.ItemFunctionToolCall", - "function_call_output": "#/components/schemas/OpenAI.ItemFunctionCallOutputItemParam", - "reasoning": "#/components/schemas/OpenAI.ItemReasoningItem", - "compaction": "#/components/schemas/OpenAI.ItemCompactionSummaryItemParam", - "image_generation_call": "#/components/schemas/OpenAI.ItemImageGenToolCall", - "code_interpreter_call": "#/components/schemas/OpenAI.ItemCodeInterpreterToolCall", - "local_shell_call": "#/components/schemas/OpenAI.ItemLocalShellToolCall", - "local_shell_call_output": "#/components/schemas/OpenAI.ItemLocalShellToolCallOutput", - "shell_call": "#/components/schemas/OpenAI.ItemFunctionShellCallItemParam", - "shell_call_output": "#/components/schemas/OpenAI.ItemFunctionShellCallOutputItemParam", - "apply_patch_call": "#/components/schemas/OpenAI.ItemApplyPatchToolCallItemParam", - "apply_patch_call_output": "#/components/schemas/OpenAI.ItemApplyPatchToolCallOutputItemParam", - "mcp_list_tools": "#/components/schemas/OpenAI.ItemMcpListTools", - "mcp_approval_request": "#/components/schemas/OpenAI.ItemMcpApprovalRequest", - "mcp_approval_response": "#/components/schemas/OpenAI.ItemMcpApprovalResponse", - "mcp_call": "#/components/schemas/OpenAI.ItemMcpToolCall", - "custom_tool_call_output": "#/components/schemas/OpenAI.ItemCustomToolCallOutput", - "custom_tool_call": "#/components/schemas/OpenAI.ItemCustomToolCall" - } - }, - "description": "Content item used to generate a response." - }, - "OpenAI.ItemApplyPatchToolCallItemParam": { - "type": "object", - "required": [ - "type", - "call_id", - "status", - "operation" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call" - ], - "description": "The type of the item. Always `apply_patch_call`.", - "x-stainless-const": true, - "default": "apply_patch_call" - }, - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatusParam" - } - ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." - }, - "operation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" - } - ], - "description": "The specific create, delete, or update instruction for the apply_patch tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A tool call representing a request to create, delete, or update files using diff patches.", - "title": "Apply patch tool call" - }, - "OpenAI.ItemApplyPatchToolCallOutputItemParam": { - "type": "object", - "required": [ - "type", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call_output" - ], - "description": "The type of the item. Always `apply_patch_call_output`.", - "x-stainless-const": true, - "default": "apply_patch_call_output" - }, - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatusParam" - } - ], - "description": "The status of the apply patch tool call output. One of `completed` or `failed`." - }, - "output": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "The streamed output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" - }, - "OpenAI.ItemCodeInterpreterToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "container_id", - "code", - "outputs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code_interpreter_call" - ], - "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", - "x-stainless-const": true, - "default": "code_interpreter_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the code interpreter tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "interpreting", - "failed" - ], - "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." - }, - "container_id": { - "type": "string", - "description": "The ID of the container used to run the code." - }, - "code": { - "type": "string", - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" - }, - "OpenAI.ItemCompactionSummaryItemParam": { - "type": "object", - "required": [ - "type", - "encrypted_content" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "enum": [ - "compaction" - ], - "description": "The type of the item. Always `compaction`.", - "x-stainless-const": true, - "default": "compaction" - }, - "encrypted_content": { - "type": "string", - "maxLength": 10485760, - "description": "The encrypted content of the compaction summary." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", - "title": "Compaction item" - }, - "OpenAI.ItemComputerCallOutputItemParam": { - "type": "object", - "required": [ - "call_id", - "type", - "output" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The ID of the computer tool call that produced the output." - }, - "type": { - "type": "string", - "enum": [ - "computer_call_output" - ], - "description": "The type of the computer tool call output. Always `computer_call_output`.", - "x-stainless-const": true, - "default": "computer_call_output" - }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" - }, - "acknowledged_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "nullable": true - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" - } - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "The output of a computer tool call.", - "title": "Computer tool call output" - }, - "OpenAI.ItemComputerToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_call" - ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." - }, - "call_id": { - "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - }, - "pending_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The pending safety checks for the computer call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", - "title": "Computer tool call" - }, - "OpenAI.ItemCustomToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "input" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call" - ], - "description": "The type of the custom tool call. Always `custom_tool_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call in the OpenAI platform." - }, - "call_id": { - "type": "string", - "description": "An identifier used to map this custom tool call to a tool call output." - }, - "name": { - "type": "string", - "description": "The name of the custom tool being called." - }, - "input": { - "type": "string", - "description": "The input for the custom tool call generated by the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" - }, - "OpenAI.ItemCustomToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call_output" - ], - "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call output in the OpenAI platform." - }, - "call_id": { - "type": "string", - "description": "The call ID, used to map this custom tool call output to a custom tool call." - }, - "output": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - } - ], - "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "The output of a custom tool call from your code, being sent back to the model.", - "title": "Custom tool call output" - }, - "OpenAI.ItemField": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ItemFieldType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "function_call_output": "#/components/schemas/OpenAI.FunctionToolCallOutput", - "message": "#/components/schemas/OpenAI.ItemFieldMessage", - "function_call": "#/components/schemas/OpenAI.ItemFieldFunctionToolCall", - "file_search_call": "#/components/schemas/OpenAI.ItemFieldFileSearchToolCall", - "web_search_call": "#/components/schemas/OpenAI.ItemFieldWebSearchToolCall", - "image_generation_call": "#/components/schemas/OpenAI.ItemFieldImageGenToolCall", - "computer_call": "#/components/schemas/OpenAI.ItemFieldComputerToolCall", - "computer_call_output": "#/components/schemas/OpenAI.ItemFieldComputerToolCallOutputResource", - "reasoning": "#/components/schemas/OpenAI.ItemFieldReasoningItem", - "compaction": "#/components/schemas/OpenAI.ItemFieldCompactionBody", - "code_interpreter_call": "#/components/schemas/OpenAI.ItemFieldCodeInterpreterToolCall", - "local_shell_call": "#/components/schemas/OpenAI.ItemFieldLocalShellToolCall", - "local_shell_call_output": "#/components/schemas/OpenAI.ItemFieldLocalShellToolCallOutput", - "shell_call": "#/components/schemas/OpenAI.ItemFieldFunctionShellCall", - "shell_call_output": "#/components/schemas/OpenAI.ItemFieldFunctionShellCallOutput", - "apply_patch_call": "#/components/schemas/OpenAI.ItemFieldApplyPatchToolCall", - "apply_patch_call_output": "#/components/schemas/OpenAI.ItemFieldApplyPatchToolCallOutput", - "mcp_list_tools": "#/components/schemas/OpenAI.ItemFieldMcpListTools", - "mcp_approval_request": "#/components/schemas/OpenAI.ItemFieldMcpApprovalRequest", - "mcp_approval_response": "#/components/schemas/OpenAI.ItemFieldMcpApprovalResponseResource", - "mcp_call": "#/components/schemas/OpenAI.ItemFieldMcpToolCall", - "custom_tool_call": "#/components/schemas/OpenAI.ItemFieldCustomToolCall", - "custom_tool_call_output": "#/components/schemas/OpenAI.ItemFieldCustomToolCallOutput" - } - }, - "description": "An item representing a message, tool call, tool output, reasoning, or other response element." - }, - "OpenAI.ItemFieldApplyPatchToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status", - "operation" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call" - ], - "description": "The type of the item. Always `apply_patch_call`.", - "x-stainless-const": true, - "default": "apply_patch_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" - } - ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." - }, - "operation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" - } - ], - "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", - "title": "Apply patch operation" - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A tool call that applies file diffs by creating, deleting, or updating files.", - "title": "Apply patch tool call" - }, - "OpenAI.ItemFieldApplyPatchToolCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call_output" - ], - "description": "The type of the item. Always `apply_patch_call_output`.", - "x-stainless-const": true, - "default": "apply_patch_call_output" - }, - "id": { - "type": "string", - "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" - } - ], - "description": "The status of the apply patch tool call output. One of `completed` or `failed`." - }, - "output": { - "type": "string", - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call output." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "The output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" - }, - "OpenAI.ItemFieldCodeInterpreterToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "container_id", - "code", - "outputs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code_interpreter_call" - ], - "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", - "x-stainless-const": true, - "default": "code_interpreter_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the code interpreter tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "interpreting", - "failed" - ], - "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." - }, - "container_id": { - "type": "string", - "description": "The ID of the container used to run the code." - }, - "code": { - "type": "string", - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" - }, - "OpenAI.ItemFieldCompactionBody": { - "type": "object", - "required": [ - "type", - "id", - "encrypted_content" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "compaction" - ], - "description": "The type of the item. Always `compaction`.", - "x-stainless-const": true, - "default": "compaction" - }, - "id": { - "type": "string", - "description": "The unique ID of the compaction item." - }, - "encrypted_content": { - "type": "string", - "description": "The encrypted content that was produced by compaction." - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", - "title": "Compaction item" - }, - "OpenAI.ItemFieldComputerToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_call" - ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." - }, - "call_id": { - "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - }, - "pending_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The pending safety checks for the computer call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", - "title": "Computer tool call" - }, - "OpenAI.ItemFieldComputerToolCallOutputResource": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_call_output" - ], - "description": "The type of the computer tool call output. Always `computer_call_output`.", - "x-stainless-const": true, - "default": "computer_call_output" - }, - "id": { - "type": "string", - "description": "The ID of the computer tool call output." - }, - "call_id": { - "type": "string", - "description": "The ID of the computer tool call that produced the output." - }, - "acknowledged_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The safety checks reported by the API that have been acknowledged by the\n developer." - }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ] - }, - "OpenAI.ItemFieldCustomToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "input" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call" - ], - "description": "The type of the custom tool call. Always `custom_tool_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call in the OpenAI platform." - }, - "call_id": { - "type": "string", - "description": "An identifier used to map this custom tool call to a tool call output." - }, - "name": { - "type": "string", - "description": "The name of the custom tool being called." - }, - "input": { - "type": "string", - "description": "The input for the custom tool call generated by the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" - }, - "OpenAI.ItemFieldCustomToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call_output" - ], - "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call output in the OpenAI platform." - }, - "call_id": { - "type": "string", - "description": "The call ID, used to map this custom tool call output to a custom tool call." - }, - "output": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - } - ], - "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "The output of a custom tool call from your code, being sent back to the model.", - "title": "Custom tool call output" - }, - "OpenAI.ItemFieldFileSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "queries" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, - "type": { - "type": "string", - "enum": [ - "file_search_call" - ], - "description": "The type of the file search tool call. Always `file_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" - ], - "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," - }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The queries used to search for files." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", - "title": "File search tool call" - }, - "OpenAI.ItemFieldFunctionShellCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status", - "environment" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell_call" - ], - "description": "The type of the item. Always `shell_call`.", - "x-stainless-const": true, - "default": "shell_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the shell tool call. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the shell tool call generated by the model." - }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellAction" - } - ], - "description": "The shell commands and limits that describe how to run the tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" - } - ], - "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." - }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A tool call that executes one or more shell commands in a managed environment.", - "title": "Shell tool call" - }, - "OpenAI.ItemFieldFunctionShellCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status", - "output", - "max_output_length" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell_call_output" - ], - "description": "The type of the shell call output. Always `shell_call_output`.", - "x-stainless-const": true, - "default": "shell_call_output" - }, - "id": { - "type": "string", - "description": "The unique ID of the shell call output. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the shell tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" - } - ], - "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" - }, - "description": "An array of shell call output contents" - }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" - }, - "OpenAI.ItemFieldFunctionToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, - "type": { - "type": "string", - "enum": [ - "function_call" - ], - "description": "The type of the function tool call. Always `function_call`.", - "x-stainless-const": true - }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the function to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A tool call to run a function. See the\n[function calling guide](/docs/guides/function-calling) for more information.", - "title": "Function tool call" - }, - "OpenAI.ItemFieldImageGenToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "result" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "image_generation_call" - ], - "description": "The type of the image generation call. Always `image_generation_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the image generation call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "generating", - "failed" - ], - "description": "The status of the image generation call." - }, - "result": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "An image generation request made by the model.", - "title": "Image generation call" - }, - "OpenAI.ItemFieldLocalShellToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call" - ], - "description": "The type of the local shell call. Always `local_shell_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell call." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" - }, - "OpenAI.ItemFieldLocalShellToolCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call_output" - ], - "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "output": { - "type": "string", - "description": "A JSON string of the output of the local shell tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" - }, - "OpenAI.ItemFieldMcpApprovalRequest": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_request" - ], - "description": "The type of the item. Always `mcp_approval_request`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the approval request." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server making the request." - }, - "name": { - "type": "string", - "description": "The name of the tool to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of arguments for the tool." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" - }, - "OpenAI.ItemFieldMcpApprovalResponseResource": { - "type": "object", - "required": [ - "type", - "id", - "approval_request_id", - "approve" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_response" - ], - "description": "The type of the item. Always `mcp_approval_response`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the approval response" - }, - "approval_request_id": { - "type": "string", - "description": "The ID of the approval request being answered." - }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." - }, - "reason": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" - }, - "OpenAI.ItemFieldMcpListTools": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "tools" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_list_tools" - ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the list." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." - }, - "error": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" - }, - "OpenAI.ItemFieldMcpToolCall": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_call" - ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the tool call." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server running the tool." - }, - "name": { - "type": "string", - "description": "The name of the tool that was run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments passed to the tool." - }, - "output": { - "type": "string", - "nullable": true - }, - "error": { - "type": "object", - "additionalProperties": {} - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" - } - ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." - }, - "approval_request_id": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" - }, - "OpenAI.ItemFieldMessage": { - "type": "object", - "required": [ - "type", - "id", - "status", - "role", - "content" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message. Always set to `message`.", - "x-stainless-const": true, - "default": "message" - }, - "id": { - "type": "string", - "description": "The unique ID of the message." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageStatus" - } - ], - "description": "The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API." - }, - "role": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageRole" - } - ], - "description": "The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`." - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MessageContent" - }, - "description": "The content of the message" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A message to or from the model.", - "title": "Message" - }, - "OpenAI.ItemFieldReasoningItem": { - "type": "object", - "required": [ - "type", - "id", - "summary" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "reasoning" - ], - "description": "The type of the object. Always `reasoning`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique identifier of the reasoning content." - }, - "encrypted_content": { - "type": "string", - "nullable": true - }, - "summary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.SummaryTextContent" - }, - "description": "Reasoning summary content." - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" - }, - "description": "Reasoning text content." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", - "title": "Reasoning" - }, - "OpenAI.ItemFieldType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "message", - "function_call", - "function_call_output", - "file_search_call", - "web_search_call", - "image_generation_call", - "computer_call", - "computer_call_output", - "reasoning", - "compaction", - "code_interpreter_call", - "local_shell_call", - "local_shell_call_output", - "shell_call", - "shell_call_output", - "apply_patch_call", - "apply_patch_call_output", - "mcp_list_tools", - "mcp_approval_request", - "mcp_approval_response", - "mcp_call", - "custom_tool_call", - "custom_tool_call_output" - ] - } - ] - }, - "OpenAI.ItemFieldWebSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "action" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, - "type": { - "type": "string", - "enum": [ - "web_search_call" - ], - "description": "The type of the web search tool call. Always `web_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" - ], - "description": "The status of the web search tool call." - }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" - } - ], - "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemField" - } - ], - "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", - "title": "Web search tool call" - }, - "OpenAI.ItemFileSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "queries" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, - "type": { - "type": "string", - "enum": [ - "file_search_call" - ], - "description": "The type of the file search tool call. Always `file_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" - ], - "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," - }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The queries used to search for files." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", - "title": "File search tool call" - }, - "OpenAI.ItemFunctionCallOutputItemParam": { - "type": "object", - "required": [ - "call_id", - "type", - "output" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the function tool call generated by the model." - }, - "type": { - "type": "string", - "enum": [ - "function_call_output" - ], - "description": "The type of the function tool call output. Always `function_call_output`.", - "x-stainless-const": true, - "default": "function_call_output" - }, - "output": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputTextContentParam" - }, - { - "$ref": "#/components/schemas/OpenAI.InputImageContentParamAutoParam" - }, - { - "$ref": "#/components/schemas/OpenAI.InputFileContentParam" - } - ] - } - } - ], - "description": "Text, image, or file output of the function tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" - } - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "The output of a function tool call.", - "title": "Function tool call output" - }, - "OpenAI.ItemFunctionShellCallItemParam": { - "type": "object", - "required": [ - "call_id", - "type", - "action" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the shell tool call generated by the model." - }, - "type": { - "type": "string", - "enum": [ - "shell_call" - ], - "description": "The type of the item. Always `shell_call`.", - "x-stainless-const": true, - "default": "shell_call" - }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellActionParam" - } - ], - "description": "The shell commands and limits that describe how to run the tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" - } - ], - "nullable": true - }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" - } - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A tool representing a request to execute one or more shell commands.", - "title": "Shell tool call" - }, - "OpenAI.ItemFunctionShellCallOutputItemParam": { - "type": "object", - "required": [ - "call_id", - "type", - "output" - ], - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "call_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the shell tool call generated by the model." - }, - "type": { - "type": "string", - "enum": [ - "shell_call_output" - ], - "description": "The type of the item. Always `shell_call_output`.", - "x-stainless-const": true, - "default": "shell_call_output" - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContentParam" - }, - "description": "Captured chunks of stdout and stderr output, along with their associated outcomes." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" - } - ], - "nullable": true - }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "The streamed output items emitted by a shell tool call.", - "title": "Shell tool call output" - }, - "OpenAI.ItemFunctionToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, - "type": { - "type": "string", - "enum": [ - "function_call" - ], - "description": "The type of the function tool call. Always `function_call`.", - "x-stainless-const": true - }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the function to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A tool call to run a function. See the\n[function calling guide](/docs/guides/function-calling) for more information.", - "title": "Function tool call" - }, - "OpenAI.ItemImageGenToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "result" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "image_generation_call" - ], - "description": "The type of the image generation call. Always `image_generation_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the image generation call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "generating", - "failed" - ], - "description": "The status of the image generation call." - }, - "result": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "An image generation request made by the model.", - "title": "Image generation call" - }, - "OpenAI.ItemLocalShellToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call" - ], - "description": "The type of the local shell call. Always `local_shell_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell call." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" - }, - "OpenAI.ItemLocalShellToolCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call_output" - ], - "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "output": { - "type": "string", - "description": "A JSON string of the output of the local shell tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" - }, - "OpenAI.ItemMcpApprovalRequest": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_request" - ], - "description": "The type of the item. Always `mcp_approval_request`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the approval request." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server making the request." - }, - "name": { - "type": "string", - "description": "The name of the tool to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of arguments for the tool." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" - }, - "OpenAI.ItemMcpApprovalResponse": { - "type": "object", - "required": [ - "type", - "approval_request_id", - "approve" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_response" - ], - "description": "The type of the item. Always `mcp_approval_response`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "nullable": true - }, - "approval_request_id": { - "type": "string", - "description": "The ID of the approval request being answered." - }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." - }, - "reason": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" - }, - "OpenAI.ItemMcpListTools": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "tools" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_list_tools" - ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the list." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." - }, - "error": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" - }, - "OpenAI.ItemMcpToolCall": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_call" - ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the tool call." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server running the tool." - }, - "name": { - "type": "string", - "description": "The name of the tool that was run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments passed to the tool." - }, - "output": { - "type": "string", - "nullable": true - }, - "error": { - "type": "object", - "additionalProperties": {} - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" - } - ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." - }, - "approval_request_id": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" - }, - "OpenAI.ItemOutputMessage": { - "type": "object", - "required": [ - "id", - "type", - "role", - "content", - "status" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, - "type": { - "type": "string", - "enum": [ - "output_message" - ], - "description": "The type of the output message. Always `message`.", - "x-stainless-const": true - }, - "role": { - "type": "string", - "enum": [ - "assistant" - ], - "description": "The role of the output message. Always `assistant`.", - "x-stainless-const": true - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.OutputMessageContent" - }, - "description": "The content of the output message." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "An output message from the model.", - "title": "Output message" - }, - "OpenAI.ItemReasoningItem": { - "type": "object", - "required": [ - "type", - "id", - "summary" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "reasoning" - ], - "description": "The type of the object. Always `reasoning`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique identifier of the reasoning content." - }, - "encrypted_content": { - "type": "string", - "nullable": true - }, - "summary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.SummaryTextContent" - }, - "description": "Reasoning summary content." - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" - }, - "description": "Reasoning text content." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", - "title": "Reasoning" - }, - "OpenAI.ItemReferenceParam": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "item_reference" - ], - "description": "The type of item to reference. Always `item_reference`.", - "x-stainless-const": true, - "default": "item_reference" - }, - "id": { - "type": "string", - "description": "The ID of the item to reference." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - ], - "description": "An internal identifier for an item to reference.", - "title": "Item reference" - }, - "OpenAI.ItemResource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ItemResourceType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "message": "#/components/schemas/OpenAI.InputMessageResource", - "output_message": "#/components/schemas/OpenAI.ItemResourceOutputMessage", - "file_search_call": "#/components/schemas/OpenAI.ItemResourceFileSearchToolCall", - "computer_call": "#/components/schemas/OpenAI.ItemResourceComputerToolCall", - "computer_call_output": "#/components/schemas/OpenAI.ItemResourceComputerToolCallOutputResource", - "web_search_call": "#/components/schemas/OpenAI.ItemResourceWebSearchToolCall", - "function_call": "#/components/schemas/OpenAI.ItemResourceFunctionToolCallResource", - "function_call_output": "#/components/schemas/OpenAI.ItemResourceFunctionToolCallOutputResource", - "image_generation_call": "#/components/schemas/OpenAI.ItemResourceImageGenToolCall", - "code_interpreter_call": "#/components/schemas/OpenAI.ItemResourceCodeInterpreterToolCall", - "local_shell_call": "#/components/schemas/OpenAI.ItemResourceLocalShellToolCall", - "local_shell_call_output": "#/components/schemas/OpenAI.ItemResourceLocalShellToolCallOutput", - "shell_call": "#/components/schemas/OpenAI.ItemResourceFunctionShellCall", - "shell_call_output": "#/components/schemas/OpenAI.ItemResourceFunctionShellCallOutput", - "apply_patch_call": "#/components/schemas/OpenAI.ItemResourceApplyPatchToolCall", - "apply_patch_call_output": "#/components/schemas/OpenAI.ItemResourceApplyPatchToolCallOutput", - "mcp_list_tools": "#/components/schemas/OpenAI.ItemResourceMcpListTools", - "mcp_approval_request": "#/components/schemas/OpenAI.ItemResourceMcpApprovalRequest", - "mcp_approval_response": "#/components/schemas/OpenAI.ItemResourceMcpApprovalResponseResource", - "mcp_call": "#/components/schemas/OpenAI.ItemResourceMcpToolCall" - } - }, - "description": "Content item used to generate a response." - }, - "OpenAI.ItemResourceApplyPatchToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status", - "operation" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call" - ], - "description": "The type of the item. Always `apply_patch_call`.", - "x-stainless-const": true, - "default": "apply_patch_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" - } - ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." - }, - "operation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" - } - ], - "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", - "title": "Apply patch operation" - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "A tool call that applies file diffs by creating, deleting, or updating files.", - "title": "Apply patch tool call" - }, - "OpenAI.ItemResourceApplyPatchToolCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call_output" - ], - "description": "The type of the item. Always `apply_patch_call_output`.", - "x-stainless-const": true, - "default": "apply_patch_call_output" - }, - "id": { - "type": "string", - "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" - } - ], - "description": "The status of the apply patch tool call output. One of `completed` or `failed`." - }, - "output": { - "type": "string", - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call output." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "The output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" - }, - "OpenAI.ItemResourceCodeInterpreterToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "container_id", - "code", - "outputs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code_interpreter_call" - ], - "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", - "x-stainless-const": true, - "default": "code_interpreter_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the code interpreter tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "interpreting", - "failed" - ], - "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." - }, - "container_id": { - "type": "string", - "description": "The ID of the container used to run the code." - }, - "code": { - "type": "string", - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" - }, - "OpenAI.ItemResourceComputerToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_call" - ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." - }, - "call_id": { - "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - }, - "pending_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The pending safety checks for the computer call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", - "title": "Computer tool call" - }, - "OpenAI.ItemResourceComputerToolCallOutputResource": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_call_output" - ], - "description": "The type of the computer tool call output. Always `computer_call_output`.", - "x-stainless-const": true, - "default": "computer_call_output" - }, - "id": { - "type": "string", - "description": "The ID of the computer tool call output." - }, - "call_id": { - "type": "string", - "description": "The ID of the computer tool call that produced the output." - }, - "acknowledged_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The safety checks reported by the API that have been acknowledged by the\n developer." - }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ] - }, - "OpenAI.ItemResourceFileSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "queries" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, - "type": { - "type": "string", - "enum": [ - "file_search_call" - ], - "description": "The type of the file search tool call. Always `file_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" - ], - "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," - }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The queries used to search for files." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", - "title": "File search tool call" - }, - "OpenAI.ItemResourceFunctionShellCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status", - "environment" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell_call" - ], - "description": "The type of the item. Always `shell_call`.", - "x-stainless-const": true, - "default": "shell_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the shell tool call. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the shell tool call generated by the model." - }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellAction" - } - ], - "description": "The shell commands and limits that describe how to run the tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" - } - ], - "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." - }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "A tool call that executes one or more shell commands in a managed environment.", - "title": "Shell tool call" - }, - "OpenAI.ItemResourceFunctionShellCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status", - "output", - "max_output_length" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell_call_output" - ], - "description": "The type of the shell call output. Always `shell_call_output`.", - "x-stainless-const": true, - "default": "shell_call_output" - }, - "id": { - "type": "string", - "description": "The unique ID of the shell call output. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the shell tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" - } - ], - "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" - }, - "description": "An array of shell call output contents" - }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" - }, - "OpenAI.ItemResourceFunctionToolCallOutputResource": { - "type": "object", - "required": [ - "type", - "call_id", - "output" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call output. Populated when this item\n is returned via API." - }, - "type": { - "type": "string", - "enum": [ - "function_call_output" - ], - "description": "The type of the function tool call output. Always `function_call_output`.", - "x-stainless-const": true - }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." - }, - "output": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } - } - ], - "description": "The output from the function call generated by your code.\n Can be a string or an list of output content." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ] - }, - "OpenAI.ItemResourceFunctionToolCallResource": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, - "type": { - "type": "string", - "enum": [ - "function_call" - ], - "description": "The type of the function tool call. Always `function_call`.", - "x-stainless-const": true - }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the function to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ] - }, - "OpenAI.ItemResourceImageGenToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "result" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "image_generation_call" - ], - "description": "The type of the image generation call. Always `image_generation_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the image generation call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "generating", - "failed" - ], - "description": "The status of the image generation call." - }, - "result": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "An image generation request made by the model.", - "title": "Image generation call" - }, - "OpenAI.ItemResourceLocalShellToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call" - ], - "description": "The type of the local shell call. Always `local_shell_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell call." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" - }, - "OpenAI.ItemResourceLocalShellToolCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call_output" - ], - "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "output": { - "type": "string", - "description": "A JSON string of the output of the local shell tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" - }, - "OpenAI.ItemResourceMcpApprovalRequest": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_request" - ], - "description": "The type of the item. Always `mcp_approval_request`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the approval request." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server making the request." - }, - "name": { - "type": "string", - "description": "The name of the tool to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of arguments for the tool." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" - }, - "OpenAI.ItemResourceMcpApprovalResponseResource": { - "type": "object", - "required": [ - "type", - "id", - "approval_request_id", - "approve" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_response" - ], - "description": "The type of the item. Always `mcp_approval_response`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the approval response" - }, - "approval_request_id": { - "type": "string", - "description": "The ID of the approval request being answered." - }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." - }, - "reason": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" - }, - "OpenAI.ItemResourceMcpListTools": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "tools" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_list_tools" - ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the list." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." - }, - "error": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" - }, - "OpenAI.ItemResourceMcpToolCall": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_call" - ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the tool call." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server running the tool." - }, - "name": { - "type": "string", - "description": "The name of the tool that was run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments passed to the tool." - }, - "output": { - "type": "string", - "nullable": true - }, - "error": { - "type": "object", - "additionalProperties": {} - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" - } - ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." - }, - "approval_request_id": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" - }, - "OpenAI.ItemResourceOutputMessage": { - "type": "object", - "required": [ - "id", - "type", - "role", - "content", - "status" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, - "type": { - "type": "string", - "enum": [ - "output_message" - ], - "description": "The type of the output message. Always `message`.", - "x-stainless-const": true - }, - "role": { - "type": "string", - "enum": [ - "assistant" - ], - "description": "The role of the output message. Always `assistant`.", - "x-stainless-const": true - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.OutputMessageContent" - }, - "description": "The content of the output message." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "An output message from the model.", - "title": "Output message" - }, - "OpenAI.ItemResourceType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "message", - "output_message", - "file_search_call", - "computer_call", - "computer_call_output", - "web_search_call", - "function_call", - "function_call_output", - "image_generation_call", - "code_interpreter_call", - "local_shell_call", - "local_shell_call_output", - "shell_call", - "shell_call_output", - "apply_patch_call", - "apply_patch_call_output", - "mcp_list_tools", - "mcp_approval_request", - "mcp_approval_response", - "mcp_call", - "structured_outputs", - "oauth_consent_request", - "memory_search_call", - "workflow_action", - "a2a_preview_call", - "a2a_preview_call_output", - "bing_grounding_call", - "bing_grounding_call_output", - "sharepoint_grounding_preview_call", - "sharepoint_grounding_preview_call_output", - "azure_ai_search_call", - "azure_ai_search_call_output", - "bing_custom_search_preview_call", - "bing_custom_search_preview_call_output", - "openapi_call", - "openapi_call_output", - "browser_automation_preview_call", - "browser_automation_preview_call_output", - "fabric_dataagent_preview_call", - "fabric_dataagent_preview_call_output", - "azure_function_call", - "azure_function_call_output" - ] - } - ] - }, - "OpenAI.ItemResourceWebSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "action" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, - "type": { - "type": "string", - "enum": [ - "web_search_call" - ], - "description": "The type of the web search tool call. Always `web_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" - ], - "description": "The status of the web search tool call." - }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" - } - ], - "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ], - "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", - "title": "Web search tool call" - }, - "OpenAI.ItemType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "message", - "output_message", - "file_search_call", - "computer_call", - "computer_call_output", - "web_search_call", - "function_call", - "function_call_output", - "reasoning", - "compaction", - "image_generation_call", - "code_interpreter_call", - "local_shell_call", - "local_shell_call_output", - "shell_call", - "shell_call_output", - "apply_patch_call", - "apply_patch_call_output", - "mcp_list_tools", - "mcp_approval_request", - "mcp_approval_response", - "mcp_call", - "custom_tool_call_output", - "custom_tool_call", - "structured_outputs", - "oauth_consent_request", - "memory_search_call", - "workflow_action", - "a2a_preview_call", - "a2a_preview_call_output", - "bing_grounding_call", - "bing_grounding_call_output", - "sharepoint_grounding_preview_call", - "sharepoint_grounding_preview_call_output", - "azure_ai_search_call", - "azure_ai_search_call_output", - "bing_custom_search_preview_call", - "bing_custom_search_preview_call_output", - "openapi_call", - "openapi_call_output", - "browser_automation_preview_call", - "browser_automation_preview_call_output", - "fabric_dataagent_preview_call", - "fabric_dataagent_preview_call_output", - "azure_function_call", - "azure_function_call_output" - ] - } - ] - }, - "OpenAI.ItemWebSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "action" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, - "type": { - "type": "string", - "enum": [ - "web_search_call" - ], - "description": "The type of the web search tool call. Always `web_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" - ], - "description": "The status of the web search tool call." - }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" - } - ], - "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", - "title": "Web search tool call" - }, - "OpenAI.KeyPressAction": { - "type": "object", - "required": [ - "type", - "keys" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "keypress" - ], - "description": "Specifies the event type. For a keypress action, this property is always set to `keypress`.", - "x-stainless-const": true, - "default": "keypress" - }, - "keys": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A collection of keypresses the model would like to perform.", - "title": "KeyPress" - }, - "OpenAI.ListFineTuningJobCheckpointsResponse": { - "type": "object", - "required": [ - "data", - "object", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpoint" - }, - "x-ms-list-page-items": true - }, - "object": { - "type": "string", - "enum": [ - "list" - ], - "x-stainless-const": true - }, - "first_id": { - "type": "string", - "nullable": true - }, - "last_id": { - "type": "string", - "nullable": true, - "x-ms-list-continuation-token": true - }, - "has_more": { - "type": "boolean" - } - } - }, - "OpenAI.ListFineTuningJobEventsResponse": { - "type": "object", - "required": [ - "data", - "object", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FineTuningJobEvent" - }, - "x-ms-list-page-items": true - }, - "object": { - "type": "string", - "enum": [ - "list" - ], - "x-stainless-const": true - }, - "has_more": { - "type": "boolean" - } - } - }, - "OpenAI.ListPaginatedFineTuningJobsResponse": { - "type": "object", - "required": [ - "data", - "has_more", - "object" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" - }, - "x-ms-list-page-items": true - }, - "has_more": { - "type": "boolean" - }, - "object": { - "type": "string", - "enum": [ - "list" - ], - "x-stainless-const": true - } - } - }, - "OpenAI.LocalEnvironmentResource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local" - ], - "description": "The environment type. Always `local`.", - "x-stainless-const": true, - "default": "local" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], - "description": "Represents the use of a local environment to perform shell actions.", - "title": "Local Environment" - }, - "OpenAI.LocalShellCallOutputStatusEnum": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ] - }, - "OpenAI.LocalShellCallStatus": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ] - }, - "OpenAI.LocalShellExecAction": { - "type": "object", - "required": [ - "type", - "command", - "env" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "exec" - ], - "description": "The type of the local shell action. Always `exec`.", - "x-stainless-const": true, - "default": "exec" - }, - "command": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The command to run." - }, - "timeout_ms": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "working_directory": { - "type": "string", - "nullable": true - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables to set for the command.", - "x-oaiTypeLabel": "map" - }, - "user": { - "type": "string", - "nullable": true - } - }, - "description": "Execute a shell command on the server.", - "title": "Local shell exec action" - }, - "OpenAI.LocalShellToolParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell" - ], - "description": "The type of the local shell tool. Always `local_shell`.", - "x-stainless-const": true, - "default": "local_shell" - }, - "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." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool that allows the model to execute shell commands in a local environment.", - "title": "Local shell tool" - }, - "OpenAI.LocalSkillParam": { - "type": "object", - "required": [ - "name", - "description", - "path" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the skill." - }, - "description": { - "type": "string", - "description": "The description of the skill." - }, - "path": { - "type": "string", - "description": "The path to the directory containing the skill." - } - } - }, - "OpenAI.LogProb": { - "type": "object", - "required": [ - "token", - "logprob", - "bytes", - "top_logprobs" - ], - "properties": { - "token": { - "type": "string" - }, - "logprob": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "bytes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.integer" - } - }, - "top_logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.TopLogProb" - } - } - }, - "description": "The log probability of a token.", - "title": "Log probability" - }, - "OpenAI.MCPListToolsTool": { - "type": "object", - "required": [ - "name", - "input_schema" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the tool." - }, - "description": { - "type": "string", - "nullable": true - }, - "input_schema": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPListToolsToolInputSchema" - } - ], - "description": "The JSON schema describing the tool's input." - }, - "annotations": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPListToolsToolAnnotations" - } - ], - "nullable": true - } - }, - "description": "A tool available on an MCP server.", - "title": "MCP list tools tool" - }, - "OpenAI.MCPListToolsToolAnnotations": { - "type": "object" - }, - "OpenAI.MCPListToolsToolInputSchema": { - "type": "object" - }, - "OpenAI.MCPTool": { - "type": "object", - "required": [ - "type", - "server_label" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp" - ], - "description": "The type of the MCP tool. Always `mcp`.", - "x-stainless-const": true - }, - "server_label": { - "type": "string", - "description": "A label for this MCP server, used to identify it in tool calls." - }, - "server_url": { - "type": "string", - "format": "uri", - "description": "The URL for the MCP server. One of `server_url` or `connector_id` must be\n provided." - }, - "connector_id": { - "type": "string", - "enum": [ - "connector_dropbox", - "connector_gmail", - "connector_googlecalendar", - "connector_googledrive", - "connector_microsoftteams", - "connector_outlookcalendar", - "connector_outlookemail", - "connector_sharepoint" - ], - "description": "Identifier for service connectors, like those available in ChatGPT. One of\n `server_url` or `connector_id` must be provided. Learn more about service\n connectors [here](/docs/guides/tools-remote-mcp#connectors).\n Currently supported `connector_id` values are:\n - Dropbox: `connector_dropbox`\n - Gmail: `connector_gmail`\n - Google Calendar: `connector_googlecalendar`\n - Google Drive: `connector_googledrive`\n - Microsoft Teams: `connector_microsoftteams`\n - Outlook Calendar: `connector_outlookcalendar`\n - Outlook Email: `connector_outlookemail`\n - SharePoint: `connector_sharepoint`" - }, - "authorization": { - "type": "string", - "description": "An OAuth access token that can be used with a remote MCP server, either\n with a custom MCP server URL or a service connector. Your application\n must handle the OAuth authorization flow and provide the token here." - }, - "server_description": { - "type": "string", - "description": "Optional description of the MCP server, used to provide more context." - }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true - }, - "allowed_tools": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolFilter" - } - ], - "nullable": true - } - ] - }, - "require_approval": { - "anyOf": [ - { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolRequireApproval" - } - ], - "nullable": true - }, - { - "type": "string", - "enum": [ - "always", - "never" - ], - "nullable": true - } - ], - "default": "always" - }, - "project_connection_id": { - "type": "string", - "description": "The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).", - "title": "MCP tool" - }, - "OpenAI.MCPToolCallStatus": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "calling", - "failed" - ] - }, - "OpenAI.MCPToolFilter": { - "type": "object", - "properties": { - "tool_names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of allowed tool names.", - "title": "MCP allowed tools" - }, - "read_only": { - "type": "boolean", - "description": "Indicates whether or not a tool modifies data or is read-only. If an\n MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\n it will match this filter." - } - }, - "description": "A filter object to specify which tools are allowed.", - "title": "MCP tool filter" - }, - "OpenAI.MCPToolRequireApproval": { - "type": "object", - "properties": { - "always": { - "$ref": "#/components/schemas/OpenAI.MCPToolFilter" - }, - "never": { - "$ref": "#/components/schemas/OpenAI.MCPToolFilter" - } - } - }, - "OpenAI.MessageContent": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.MessageContentType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "text": "#/components/schemas/OpenAI.TextContent", - "computer_screenshot": "#/components/schemas/OpenAI.ComputerScreenshotContent", - "input_text": "#/components/schemas/OpenAI.MessageContentInputTextContent", - "output_text": "#/components/schemas/OpenAI.MessageContentOutputTextContent", - "reasoning_text": "#/components/schemas/OpenAI.MessageContentReasoningTextContent", - "refusal": "#/components/schemas/OpenAI.MessageContentRefusalContent", - "input_image": "#/components/schemas/OpenAI.MessageContentInputImageContent", - "input_file": "#/components/schemas/OpenAI.MessageContentInputFileContent" - } - }, - "description": "A content part that makes up an input or output item." - }, - "OpenAI.MessageContentInputFileContent": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_file" - ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" - }, - "file_id": { - "type": "string", - "nullable": true - }, - "filename": { - "type": "string", - "description": "The name of the file to be sent to the model." - }, - "file_url": { - "type": "string", - "format": "uri", - "description": "The URL of the file to be sent to the model." - }, - "file_data": { - "type": "string", - "description": "The content of the file to be sent to the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A file input to the model.", - "title": "Input file" - }, - "OpenAI.MessageContentInputImageContent": { - "type": "object", - "required": [ - "type", - "detail" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_image" - ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" - }, - "image_url": { - "type": "string", - "format": "uri", - "nullable": true - }, - "file_id": { - "type": "string", - "nullable": true - }, - "detail": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ImageDetail" - } - ], - "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" - }, - "OpenAI.MessageContentInputTextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "input_text" - ], - "description": "The type of the input item. Always `input_text`.", - "x-stainless-const": true, - "default": "input_text" - }, - "text": { - "type": "string", - "description": "The text input to the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A text input to the model.", - "title": "Input text" - }, - "OpenAI.MessageContentOutputTextContent": { - "type": "object", - "required": [ - "type", - "text", - "annotations", - "logprobs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "output_text" - ], - "description": "The type of the output text. Always `output_text`.", - "x-stainless-const": true, - "default": "output_text" - }, - "text": { - "type": "string", - "description": "The text output from the model." - }, - "annotations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Annotation" - }, - "description": "The annotations of the text output." - }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.LogProb" - } - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A text output from the model.", - "title": "Output text" - }, - "OpenAI.MessageContentReasoningTextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "reasoning_text" - ], - "description": "The type of the reasoning text. Always `reasoning_text`.", - "x-stainless-const": true, - "default": "reasoning_text" - }, - "text": { - "type": "string", - "description": "The reasoning text from the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "Reasoning text from the model.", - "title": "Reasoning text" - }, - "OpenAI.MessageContentRefusalContent": { - "type": "object", - "required": [ - "type", - "refusal" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "refusal" - ], - "description": "The type of the refusal. Always `refusal`.", - "x-stainless-const": true, - "default": "refusal" - }, - "refusal": { - "type": "string", - "description": "The refusal explanation from the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A refusal from the model.", - "title": "Refusal" - }, - "OpenAI.MessageContentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "input_text", - "output_text", - "text", - "summary_text", - "reasoning_text", - "refusal", - "input_image", - "computer_screenshot", - "input_file" - ] - } - ] - }, - "OpenAI.MessageRole": { - "type": "string", - "enum": [ - "unknown", - "user", - "assistant", - "system", - "critic", - "discriminator", - "developer", - "tool" - ] - }, - "OpenAI.MessageStatus": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ] - }, - "OpenAI.Metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "OpenAI.ModelIdsCompaction": { - "anyOf": [ - { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ModelIdsResponses" - } - ], - "description": "Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models.", - "nullable": true - }, - { - "type": "string", - "description": "Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models.", - "nullable": true - } - ], - "description": "Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models." - }, - "OpenAI.ModelIdsResponses": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.ModelIdsShared" - }, - { - "type": "string", - "enum": [ - "o1-pro", - "o1-pro-2025-03-19", - "o3-pro", - "o3-pro-2025-06-10", - "o3-deep-research", - "o3-deep-research-2025-06-26", - "o4-mini-deep-research", - "o4-mini-deep-research-2025-06-26", - "computer-use-preview", - "computer-use-preview-2025-03-11", - "gpt-5-codex", - "gpt-5-pro", - "gpt-5-pro-2025-10-06", - "gpt-5.1-codex-max" - ] - } - ] - }, - "OpenAI.ModelIdsShared": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.ChatModel" - } - ] - }, - "OpenAI.MoveParam": { - "type": "object", - "required": [ - "type", - "x", - "y" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "move" - ], - "description": "Specifies the event type. For a move action, this property is always set to `move`.", - "x-stainless-const": true, - "default": "move" - }, - "x": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The x-coordinate to move to." - }, - "y": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The y-coordinate to move to." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A mouse move action.", - "title": "Move" - }, - "OpenAI.OutputContent": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.OutputContentType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "output_text": "#/components/schemas/OpenAI.OutputContentOutputTextContent", - "refusal": "#/components/schemas/OpenAI.OutputContentRefusalContent", - "reasoning_text": "#/components/schemas/OpenAI.OutputContentReasoningTextContent" - } - } - }, - "OpenAI.OutputContentOutputTextContent": { - "type": "object", - "required": [ - "type", - "text", - "annotations", - "logprobs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "output_text" - ], - "description": "The type of the output text. Always `output_text`.", - "x-stainless-const": true, - "default": "output_text" - }, - "text": { - "type": "string", - "description": "The text output from the model." - }, - "annotations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Annotation" - }, - "description": "The annotations of the text output." - }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.LogProb" - } - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputContent" - } - ], - "description": "A text output from the model.", - "title": "Output text" - }, - "OpenAI.OutputContentReasoningTextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "reasoning_text" - ], - "description": "The type of the reasoning text. Always `reasoning_text`.", - "x-stainless-const": true, - "default": "reasoning_text" - }, - "text": { - "type": "string", - "description": "The reasoning text from the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputContent" - } - ], - "description": "Reasoning text from the model.", - "title": "Reasoning text" - }, - "OpenAI.OutputContentRefusalContent": { - "type": "object", - "required": [ - "type", - "refusal" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "refusal" - ], - "description": "The type of the refusal. Always `refusal`.", - "x-stainless-const": true, - "default": "refusal" - }, - "refusal": { - "type": "string", - "description": "The refusal explanation from the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputContent" - } - ], - "description": "A refusal from the model.", - "title": "Refusal" - }, - "OpenAI.OutputContentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "output_text", - "refusal", - "reasoning_text" - ] - } - ] - }, - "OpenAI.OutputItem": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.OutputItemType" - }, - "agent_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentReference" - } - ], - "description": "The agent that created the item." - }, - "response_id": { - "type": "string", - "description": "The response on which the item is created." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "structured_outputs": "#/components/schemas/StructuredOutputsOutputItem", - "workflow_action": "#/components/schemas/WorkflowActionOutputItem", - "oauth_consent_request": "#/components/schemas/OAuthConsentRequestOutputItem", - "memory_search_call": "#/components/schemas/MemorySearchToolCallItemResource", - "bing_grounding_call": "#/components/schemas/BingGroundingToolCall", - "bing_grounding_call_output": "#/components/schemas/BingGroundingToolCallOutput", - "sharepoint_grounding_preview_call": "#/components/schemas/SharepointGroundingToolCall", - "sharepoint_grounding_preview_call_output": "#/components/schemas/SharepointGroundingToolCallOutput", - "azure_ai_search_call": "#/components/schemas/AzureAISearchToolCall", - "azure_ai_search_call_output": "#/components/schemas/AzureAISearchToolCallOutput", - "bing_custom_search_preview_call": "#/components/schemas/BingCustomSearchToolCall", - "bing_custom_search_preview_call_output": "#/components/schemas/BingCustomSearchToolCallOutput", - "openapi_call": "#/components/schemas/OpenApiToolCall", - "openapi_call_output": "#/components/schemas/OpenApiToolCallOutput", - "browser_automation_preview_call": "#/components/schemas/BrowserAutomationToolCall", - "browser_automation_preview_call_output": "#/components/schemas/BrowserAutomationToolCallOutput", - "fabric_dataagent_preview_call": "#/components/schemas/FabricDataAgentToolCall", - "fabric_dataagent_preview_call_output": "#/components/schemas/FabricDataAgentToolCallOutput", - "azure_function_call": "#/components/schemas/AzureFunctionToolCall", - "azure_function_call_output": "#/components/schemas/AzureFunctionToolCallOutput", - "a2a_preview_call": "#/components/schemas/A2AToolCall", - "a2a_preview_call_output": "#/components/schemas/A2AToolCallOutput", - "output_message": "#/components/schemas/OpenAI.OutputItemOutputMessage", - "file_search_call": "#/components/schemas/OpenAI.OutputItemFileSearchToolCall", - "function_call": "#/components/schemas/OpenAI.OutputItemFunctionToolCall", - "web_search_call": "#/components/schemas/OpenAI.OutputItemWebSearchToolCall", - "computer_call": "#/components/schemas/OpenAI.OutputItemComputerToolCall", - "reasoning": "#/components/schemas/OpenAI.OutputItemReasoningItem", - "compaction": "#/components/schemas/OpenAI.OutputItemCompactionBody", - "image_generation_call": "#/components/schemas/OpenAI.OutputItemImageGenToolCall", - "code_interpreter_call": "#/components/schemas/OpenAI.OutputItemCodeInterpreterToolCall", - "local_shell_call": "#/components/schemas/OpenAI.OutputItemLocalShellToolCall", - "shell_call": "#/components/schemas/OpenAI.OutputItemFunctionShellCall", - "shell_call_output": "#/components/schemas/OpenAI.OutputItemFunctionShellCallOutput", - "apply_patch_call": "#/components/schemas/OpenAI.OutputItemApplyPatchToolCall", - "apply_patch_call_output": "#/components/schemas/OpenAI.OutputItemApplyPatchToolCallOutput", - "mcp_call": "#/components/schemas/OpenAI.OutputItemMcpToolCall", - "mcp_list_tools": "#/components/schemas/OpenAI.OutputItemMcpListTools", - "mcp_approval_request": "#/components/schemas/OpenAI.OutputItemMcpApprovalRequest", - "custom_tool_call": "#/components/schemas/OpenAI.OutputItemCustomToolCall" - } - } - }, - "OpenAI.OutputItemApplyPatchToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status", - "operation" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call" - ], - "description": "The type of the item. Always `apply_patch_call`.", - "x-stainless-const": true, - "default": "apply_patch_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" - } - ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." - }, - "operation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" - } - ], - "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", - "title": "Apply patch operation" - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A tool call that applies file diffs by creating, deleting, or updating files.", - "title": "Apply patch tool call" - }, - "OpenAI.OutputItemApplyPatchToolCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch_call_output" - ], - "description": "The type of the item. Always `apply_patch_call_output`.", - "x-stainless-const": true, - "default": "apply_patch_call_output" - }, - "id": { - "type": "string", - "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" - } - ], - "description": "The status of the apply patch tool call output. One of `completed` or `failed`." - }, - "output": { - "type": "string", - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call output." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" - }, - "OpenAI.OutputItemCodeInterpreterToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "container_id", - "code", - "outputs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code_interpreter_call" - ], - "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", - "x-stainless-const": true, - "default": "code_interpreter_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the code interpreter tool call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "interpreting", - "failed" - ], - "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." - }, - "container_id": { - "type": "string", - "description": "The ID of the container used to run the code." - }, - "code": { - "type": "string", - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" - }, - "OpenAI.OutputItemCompactionBody": { - "type": "object", - "required": [ - "type", - "id", - "encrypted_content" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "compaction" - ], - "description": "The type of the item. Always `compaction`.", - "x-stainless-const": true, - "default": "compaction" - }, - "id": { - "type": "string", - "description": "The unique ID of the compaction item." - }, - "encrypted_content": { - "type": "string", - "description": "The encrypted content that was produced by compaction." - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", - "title": "Compaction item" - }, - "OpenAI.OutputItemComputerToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_call" - ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." - }, - "call_id": { - "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - }, - "pending_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The pending safety checks for the computer call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", - "title": "Computer tool call" - }, - "OpenAI.OutputItemCustomToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "input" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call" - ], - "description": "The type of the custom tool call. Always `custom_tool_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call in the OpenAI platform." - }, - "call_id": { - "type": "string", - "description": "An identifier used to map this custom tool call to a tool call output." - }, - "name": { - "type": "string", - "description": "The name of the custom tool being called." - }, - "input": { - "type": "string", - "description": "The input for the custom tool call generated by the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" - }, - "OpenAI.OutputItemFileSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "queries" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, - "type": { - "type": "string", - "enum": [ - "file_search_call" - ], - "description": "The type of the file search tool call. Always `file_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" - ], - "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," - }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The queries used to search for files." - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", - "title": "File search tool call" - }, - "OpenAI.OutputItemFunctionShellCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status", - "environment" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell_call" - ], - "description": "The type of the item. Always `shell_call`.", - "x-stainless-const": true, - "default": "shell_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the shell tool call. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the shell tool call generated by the model." - }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellAction" - } - ], - "description": "The shell commands and limits that describe how to run the tool call." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" - } - ], - "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." - }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A tool call that executes one or more shell commands in a managed environment.", - "title": "Shell tool call" - }, - "OpenAI.OutputItemFunctionShellCallOutput": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "status", - "output", - "max_output_length" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell_call_output" - ], - "description": "The type of the shell call output. Always `shell_call_output`.", - "x-stainless-const": true, - "default": "shell_call_output" - }, - "id": { - "type": "string", - "description": "The unique ID of the shell call output. Populated when this item is returned via API." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the shell tool call generated by the model." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" - } - ], - "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" - }, - "description": "An array of shell call output contents" - }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" - }, - "OpenAI.OutputItemFunctionToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, - "type": { - "type": "string", - "enum": [ - "function_call" - ], - "description": "The type of the function tool call. Always `function_call`.", - "x-stainless-const": true - }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the function to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A tool call to run a function. See the\n[function calling guide](/docs/guides/function-calling) for more information.", - "title": "Function tool call" - }, - "OpenAI.OutputItemImageGenToolCall": { - "type": "object", - "required": [ - "type", - "id", - "status", - "result" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "image_generation_call" - ], - "description": "The type of the image generation call. Always `image_generation_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the image generation call." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "generating", - "failed" - ], - "description": "The status of the image generation call." - }, - "result": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "An image generation request made by the model.", - "title": "Image generation call" - }, - "OpenAI.OutputItemLocalShellToolCall": { - "type": "object", - "required": [ - "type", - "id", - "call_id", - "action", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local_shell_call" - ], - "description": "The type of the local shell call. Always `local_shell_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the local shell call." - }, - "call_id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" - }, - "OpenAI.OutputItemMcpApprovalRequest": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_request" - ], - "description": "The type of the item. Always `mcp_approval_request`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the approval request." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server making the request." - }, - "name": { - "type": "string", - "description": "The name of the tool to run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of arguments for the tool." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" - }, - "OpenAI.OutputItemMcpListTools": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "tools" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_list_tools" - ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the list." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." - }, - "error": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" - }, - "OpenAI.OutputItemMcpToolCall": { - "type": "object", - "required": [ - "type", - "id", - "server_label", - "name", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_call" - ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the tool call." - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server running the tool." - }, - "name": { - "type": "string", - "description": "The name of the tool that was run." - }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments passed to the tool." - }, - "output": { - "type": "string", - "nullable": true - }, - "error": { - "type": "object", - "additionalProperties": {} - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" - } - ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." - }, - "approval_request_id": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" - }, - "OpenAI.OutputItemOutputMessage": { - "type": "object", - "required": [ - "id", - "type", - "role", - "content", - "status" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, - "type": { - "type": "string", - "enum": [ - "output_message" - ], - "description": "The type of the output message. Always `message`.", - "x-stainless-const": true - }, - "role": { - "type": "string", - "enum": [ - "assistant" - ], - "description": "The role of the output message. Always `assistant`.", - "x-stainless-const": true - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.OutputMessageContent" - }, - "description": "The content of the output message." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "An output message from the model.", - "title": "Output message" - }, - "OpenAI.OutputItemReasoningItem": { - "type": "object", - "required": [ - "type", - "id", - "summary" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "reasoning" - ], - "description": "The type of the object. Always `reasoning`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique identifier of the reasoning content." - }, - "encrypted_content": { - "type": "string", - "nullable": true - }, - "summary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.SummaryTextContent" - }, - "description": "Reasoning summary content." - }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" - }, - "description": "Reasoning text content." - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", - "title": "Reasoning" - }, - "OpenAI.OutputItemType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "output_message", - "file_search_call", - "function_call", - "web_search_call", - "computer_call", - "reasoning", - "compaction", - "image_generation_call", - "code_interpreter_call", - "local_shell_call", - "shell_call", - "shell_call_output", - "apply_patch_call", - "apply_patch_call_output", - "mcp_call", - "mcp_list_tools", - "mcp_approval_request", - "custom_tool_call", - "structured_outputs", - "oauth_consent_request", - "memory_search_call", - "workflow_action", - "a2a_preview_call", - "a2a_preview_call_output", - "bing_grounding_call", - "bing_grounding_call_output", - "sharepoint_grounding_preview_call", - "sharepoint_grounding_preview_call_output", - "azure_ai_search_call", - "azure_ai_search_call_output", - "bing_custom_search_preview_call", - "bing_custom_search_preview_call_output", - "openapi_call", - "openapi_call_output", - "browser_automation_preview_call", - "browser_automation_preview_call_output", - "fabric_dataagent_preview_call", - "fabric_dataagent_preview_call_output", - "azure_function_call", - "azure_function_call_output" - ] - } - ] - }, - "OpenAI.OutputItemWebSearchToolCall": { - "type": "object", - "required": [ - "id", - "type", - "status", - "action" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, - "type": { - "type": "string", - "enum": [ - "web_search_call" - ], - "description": "The type of the web search tool call. Always `web_search_call`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" - ], - "description": "The status of the web search tool call." - }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" - } - ], - "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", - "title": "Web search tool call" - }, - "OpenAI.OutputMessageContent": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.OutputMessageContentType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "output_text": "#/components/schemas/OpenAI.OutputMessageContentOutputTextContent", - "refusal": "#/components/schemas/OpenAI.OutputMessageContentRefusalContent" - } - } - }, - "OpenAI.OutputMessageContentOutputTextContent": { - "type": "object", - "required": [ - "type", - "text", - "annotations", - "logprobs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "output_text" - ], - "description": "The type of the output text. Always `output_text`.", - "x-stainless-const": true, - "default": "output_text" - }, - "text": { - "type": "string", - "description": "The text output from the model." - }, - "annotations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Annotation" - }, - "description": "The annotations of the text output." - }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.LogProb" - } - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputMessageContent" - } - ], - "description": "A text output from the model.", - "title": "Output text" - }, - "OpenAI.OutputMessageContentRefusalContent": { - "type": "object", - "required": [ - "type", - "refusal" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "refusal" - ], - "description": "The type of the refusal. Always `refusal`.", - "x-stainless-const": true, - "default": "refusal" - }, - "refusal": { - "type": "string", - "description": "The refusal explanation from the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputMessageContent" - } - ], - "description": "A refusal from the model.", - "title": "Refusal" - }, - "OpenAI.OutputMessageContentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "output_text", - "refusal" - ] - } - ] - }, - "OpenAI.Prompt": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the prompt template to use." - }, - "version": { - "type": "string", - "nullable": true - }, - "variables": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponsePromptVariables" - } - ], - "nullable": true - } - }, - "description": "Reference to a prompt template and its variables.\n[Learn more](/docs/guides/text?api-mode=responses#reusable-prompts)." - }, - "OpenAI.RankerVersionType": { - "type": "string", - "enum": [ - "auto", - "default-2024-11-15" - ] - }, - "OpenAI.RankingOptions": { - "type": "object", - "properties": { - "ranker": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.RankerVersionType" - } - ], - "description": "The ranker to use for the file search." - }, - "score_threshold": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results." - }, - "hybrid_search": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.HybridSearchOptions" - } - ], - "description": "Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled." - } - } - }, - "OpenAI.Reasoning": { - "type": "object", - "properties": { - "effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" - }, - "summary": { - "type": "string", - "enum": [ - "auto", - "concise", - "detailed" - ], - "nullable": true - }, - "generate_summary": { - "type": "string", - "enum": [ - "auto", - "concise", - "detailed" - ], - "nullable": true - } - }, - "description": "**gpt-5 and o-series models only**\nConfiguration options for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).", - "title": "Reasoning" - }, - "OpenAI.ReasoningEffort": { - "type": "string", - "enum": [ - "none", - "minimal", - "low", - "medium", - "high", - "xhigh" - ], - "description": "Constrains effort on reasoning for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\nCurrently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing\nreasoning effort can result in faster responses and fewer tokens used\non reasoning in a response.\n- `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.\n- All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.\n- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.\n- `xhigh` is supported for all models after `gpt-5.1-codex-max`.", - "nullable": true - }, - "OpenAI.ReasoningTextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "reasoning_text" - ], - "description": "The type of the reasoning text. Always `reasoning_text`.", - "x-stainless-const": true, - "default": "reasoning_text" - }, - "text": { - "type": "string", - "description": "The reasoning text from the model." - } - }, - "description": "Reasoning text from the model.", - "title": "Reasoning text" - }, - "OpenAI.Response": { - "type": "object", - "required": [ - "id", - "object", - "created_at", - "error", - "incomplete_details", - "output", - "instructions", - "parallel_tool_calls", - "agent_reference" - ], - "properties": { - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "top_logprobs": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "temperature": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true, - "default": 1 - }, - "top_p": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true, - "default": 1 - }, - "user": { - "type": "string", - "description": "This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\n A stable identifier for your end-users.\n Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).", - "deprecated": true - }, - "safety_identifier": { - "type": "string", - "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\n The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers)." - }, - "prompt_cache_key": { - "type": "string", - "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching)." - }, - "service_tier": { - "$ref": "#/components/schemas/OpenAI.ServiceTier" - }, - "prompt_cache_retention": { - "type": "string", - "enum": [ - "in-memory", - "24h" - ], - "nullable": true - }, - "previous_response_id": { - "type": "string", - "nullable": true - }, - "model": { - "type": "string", - "description": "The model deployment to use for the creation of this response." - }, - "reasoning": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Reasoning" - } - ], - "nullable": true - }, - "background": { - "type": "boolean", - "nullable": true - }, - "max_output_tokens": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "max_tool_calls": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "text": { - "$ref": "#/components/schemas/OpenAI.ResponseTextParam" - }, - "tools": { - "$ref": "#/components/schemas/OpenAI.ToolsArray" - }, - "tool_choice": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceOptions" - }, - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ] - }, - "prompt": { - "$ref": "#/components/schemas/OpenAI.Prompt" - }, - "truncation": { - "type": "string", - "enum": [ - "auto", - "disabled" - ], - "nullable": true, - "default": "disabled" - }, - "id": { - "type": "string", - "description": "Unique identifier for this Response." - }, - "object": { - "type": "string", - "enum": [ - "response" - ], - "description": "The object type of this resource - always set to `response`.", - "x-stainless-const": true - }, - "status": { - "type": "string", - "enum": [ - "completed", - "failed", - "in_progress", - "cancelled", - "queued", - "incomplete" - ], - "description": "The status of the response generation. One of `completed`, `failed`,\n `in_progress`, `cancelled`, `queued`, or `incomplete`." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "Unix timestamp (in seconds) of when this Response was created." - }, - "completed_at": { - "type": "integer", - "format": "unixtime", - "nullable": true - }, - "error": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseError" - } - ], - "nullable": true - }, - "incomplete_details": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseIncompleteDetails" - } - ], - "nullable": true - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.OutputItem" - }, - "description": "An array of content items generated by the model.\n - The length and order of items in the `output` array is dependent\n on the model's response.\n - Rather than accessing the first item in the `output` array and\n assuming it's an `assistant` message with the content generated by\n the model, you might consider using the `output_text` property where\n supported in SDKs." - }, - "instructions": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - } - ], - "nullable": true - }, - "output_text": { - "type": "string", - "nullable": true - }, - "usage": { - "$ref": "#/components/schemas/OpenAI.ResponseUsage" - }, - "parallel_tool_calls": { - "type": "boolean", - "description": "Whether to allow the model to run tool calls in parallel.", - "default": true - }, - "conversation": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationReference" - } - ], - "nullable": true - }, - "agent_reference": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/AgentReference" - } - ], - "nullable": true, - "description": "The agent used for this response" - }, - "content_filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContentFilterResult" - }, - "description": "The content filter evaluation results." - } - }, - "title": "The response object" - }, - "OpenAI.ResponseAudioDeltaEvent": { - "type": "object", - "required": [ - "type", - "sequence_number", - "delta" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.audio.delta" - ], - "description": "The type of the event. Always `response.audio.delta`.", - "x-stainless-const": true - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "A sequence number for this chunk of the stream response." - }, - "delta": { - "type": "string", - "format": "base64", - "description": "A chunk of Base64 encoded response audio bytes." - } - }, - "description": "Emitted when there is a partial audio response.", - "x-oaiMeta": { - "name": "response.audio.delta", - "group": "responses", - "example": "{\n \"type\": \"response.audio.delta\",\n \"response_id\": \"resp_123\",\n \"delta\": \"base64encoded...\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseAudioDoneEvent": { - "type": "object", - "required": [ - "type", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.audio.done" - ], - "description": "The type of the event. Always `response.audio.done`.", - "x-stainless-const": true - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of the delta." - } - }, - "description": "Emitted when the audio response is complete.", - "x-oaiMeta": { - "name": "response.audio.done", - "group": "responses", - "example": "{\n \"type\": \"response.audio.done\",\n \"response_id\": \"resp-123\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseAudioTranscriptDeltaEvent": { - "type": "object", - "required": [ - "type", - "delta", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.audio.transcript.delta" - ], - "description": "The type of the event. Always `response.audio.transcript.delta`.", - "x-stainless-const": true - }, - "delta": { - "type": "string", - "description": "The partial transcript of the audio response." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when there is a partial transcript of audio.", - "x-oaiMeta": { - "name": "response.audio.transcript.delta", - "group": "responses", - "example": "{\n \"type\": \"response.audio.transcript.delta\",\n \"response_id\": \"resp_123\",\n \"delta\": \" ... partial transcript ... \",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseAudioTranscriptDoneEvent": { - "type": "object", - "required": [ - "type", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.audio.transcript.done" - ], - "description": "The type of the event. Always `response.audio.transcript.done`.", - "x-stainless-const": true - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when the full audio transcript is completed.", - "x-oaiMeta": { - "name": "response.audio.transcript.done", - "group": "responses", - "example": "{\n \"type\": \"response.audio.transcript.done\",\n \"response_id\": \"resp_123\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "delta", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.code_interpreter_call_code.delta" - ], - "description": "The type of the event. Always `response.code_interpreter_call_code.delta`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response for which the code is being streamed." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the code interpreter tool call item." - }, - "delta": { - "type": "string", - "description": "The partial code snippet being streamed by the code interpreter." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event, used to order streaming events." - } - }, - "description": "Emitted when a partial code snippet is streamed by the code interpreter.", - "x-oaiMeta": { - "name": "response.code_interpreter_call_code.delta", - "group": "responses", - "example": "{\n \"type\": \"response.code_interpreter_call_code.delta\",\n \"output_index\": 0,\n \"item_id\": \"ci_12345\",\n \"delta\": \"print('Hello, world')\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseCodeInterpreterCallCodeDoneEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "code", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.code_interpreter_call_code.done" - ], - "description": "The type of the event. Always `response.code_interpreter_call_code.done`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response for which the code is finalized." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the code interpreter tool call item." - }, - "code": { - "type": "string", - "description": "The final code snippet output by the code interpreter." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event, used to order streaming events." - } - }, - "description": "Emitted when the code snippet is finalized by the code interpreter.", - "x-oaiMeta": { - "name": "response.code_interpreter_call_code.done", - "group": "responses", - "example": "{\n \"type\": \"response.code_interpreter_call_code.done\",\n \"output_index\": 3,\n \"item_id\": \"ci_12345\",\n \"code\": \"print('done')\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseCodeInterpreterCallCompletedEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.code_interpreter_call.completed" - ], - "description": "The type of the event. Always `response.code_interpreter_call.completed`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response for which the code interpreter call is completed." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the code interpreter tool call item." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event, used to order streaming events." - } - }, - "description": "Emitted when the code interpreter call is completed.", - "x-oaiMeta": { - "name": "response.code_interpreter_call.completed", - "group": "responses", - "example": "{\n \"type\": \"response.code_interpreter_call.completed\",\n \"output_index\": 5,\n \"item_id\": \"ci_12345\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseCodeInterpreterCallInProgressEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.code_interpreter_call.in_progress" - ], - "description": "The type of the event. Always `response.code_interpreter_call.in_progress`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response for which the code interpreter call is in progress." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the code interpreter tool call item." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event, used to order streaming events." - } - }, - "description": "Emitted when a code interpreter call is in progress.", - "x-oaiMeta": { - "name": "response.code_interpreter_call.in_progress", - "group": "responses", - "example": "{\n \"type\": \"response.code_interpreter_call.in_progress\",\n \"output_index\": 0,\n \"item_id\": \"ci_12345\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseCodeInterpreterCallInterpretingEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.code_interpreter_call.interpreting" - ], - "description": "The type of the event. Always `response.code_interpreter_call.interpreting`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response for which the code interpreter is interpreting code." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the code interpreter tool call item." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event, used to order streaming events." - } - }, - "description": "Emitted when the code interpreter is actively interpreting the code snippet.", - "x-oaiMeta": { - "name": "response.code_interpreter_call.interpreting", - "group": "responses", - "example": "{\n \"type\": \"response.code_interpreter_call.interpreting\",\n \"output_index\": 4,\n \"item_id\": \"ci_12345\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseCompletedEvent": { - "type": "object", - "required": [ - "type", - "response", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.completed" - ], - "description": "The type of the event. Always `response.completed`.", - "x-stainless-const": true - }, - "response": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Response" - } - ], - "description": "Properties of the completed response." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number for this event." - } - }, - "description": "Emitted when the model response is complete.", - "x-oaiMeta": { - "name": "response.completed", - "group": "responses", - "example": "{\n \"type\": \"response.completed\",\n \"response\": {\n \"id\": \"resp_123\",\n \"object\": \"response\",\n \"created_at\": 1740855869,\n \"status\": \"completed\",\n \"completed_at\": 1740855870,\n \"error\": null,\n \"incomplete_details\": null,\n \"input\": [],\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"output\": [\n {\n \"id\": \"msg_123\",\n \"type\": \"message\",\n \"role\": \"assistant\",\n \"content\": [\n {\n \"type\": \"output_text\",\n \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n \"annotations\": []\n }\n ]\n }\n ],\n \"previous_response_id\": null,\n \"reasoning_effort\": null,\n \"store\": false,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": {\n \"input_tokens\": 0,\n \"output_tokens\": 0,\n \"output_tokens_details\": {\n \"reasoning_tokens\": 0\n },\n \"total_tokens\": 0\n },\n \"user\": null,\n \"metadata\": {}\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseContentPartAddedEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "content_index", - "part", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.content_part.added" - ], - "description": "The type of the event. Always `response.content_part.added`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the content part was added to." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the content part was added to." - }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the content part that was added." - }, - "part": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputContent" - } - ], - "description": "The content part that was added." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when a new content part is added.", - "x-oaiMeta": { - "name": "response.content_part.added", - "group": "responses", - "example": "{\n \"type\": \"response.content_part.added\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"part\": {\n \"type\": \"output_text\",\n \"text\": \"\",\n \"annotations\": []\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseContentPartDoneEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "content_index", - "sequence_number", - "part" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.content_part.done" - ], - "description": "The type of the event. Always `response.content_part.done`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the content part was added to." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the content part was added to." - }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the content part that is done." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "part": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputContent" - } - ], - "description": "The content part that is done." - } - }, - "description": "Emitted when a content part is done.", - "x-oaiMeta": { - "name": "response.content_part.done", - "group": "responses", - "example": "{\n \"type\": \"response.content_part.done\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"sequence_number\": 1,\n \"part\": {\n \"type\": \"output_text\",\n \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n \"annotations\": []\n }\n}\n" - } - }, - "OpenAI.ResponseCreatedEvent": { - "type": "object", - "required": [ - "type", - "response", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.created" - ], - "description": "The type of the event. Always `response.created`.", - "x-stainless-const": true - }, - "response": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Response" - } - ], - "description": "The response that was created." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number for this event." - } - }, - "description": "An event that is emitted when a response is created.", - "x-oaiMeta": { - "name": "response.created", - "group": "responses", - "example": "{\n \"type\": \"response.created\",\n \"response\": {\n \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n \"object\": \"response\",\n \"created_at\": 1741487325,\n \"status\": \"in_progress\",\n \"completed_at\": null,\n \"error\": null,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-2024-08-06\",\n \"output\": [],\n \"parallel_tool_calls\": true,\n \"previous_response_id\": null,\n \"reasoning\": {\n \"effort\": null,\n \"summary\": null\n },\n \"store\": true,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": null,\n \"user\": null,\n \"metadata\": {}\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseCustomToolCallInputDeltaEvent": { - "type": "object", - "required": [ - "type", - "sequence_number", - "output_index", - "item_id", - "delta" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.custom_tool_call_input.delta" - ], - "description": "The event type identifier.", - "x-stainless-const": true - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output this delta applies to." - }, - "item_id": { - "type": "string", - "description": "Unique identifier for the API item associated with this event." - }, - "delta": { - "type": "string", - "description": "The incremental input data (delta) for the custom tool call." - } - }, - "description": "Event representing a delta (partial update) to the input of a custom tool call.", - "title": "ResponseCustomToolCallInputDelta", - "x-oaiMeta": { - "name": "response.custom_tool_call_input.delta", - "group": "responses", - "example": "{\n \"type\": \"response.custom_tool_call_input.delta\",\n \"output_index\": 0,\n \"item_id\": \"ctc_1234567890abcdef\",\n \"delta\": \"partial input text\"\n}\n" - } - }, - "OpenAI.ResponseCustomToolCallInputDoneEvent": { - "type": "object", - "required": [ - "type", - "sequence_number", - "output_index", - "item_id", - "input" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.custom_tool_call_input.done" - ], - "description": "The event type identifier.", - "x-stainless-const": true - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output this event applies to." - }, - "item_id": { - "type": "string", - "description": "Unique identifier for the API item associated with this event." - }, - "input": { - "type": "string", - "description": "The complete input data for the custom tool call." - } - }, - "description": "Event indicating that input for a custom tool call is complete.", - "title": "ResponseCustomToolCallInputDone", - "x-oaiMeta": { - "name": "response.custom_tool_call_input.done", - "group": "responses", - "example": "{\n \"type\": \"response.custom_tool_call_input.done\",\n \"output_index\": 0,\n \"item_id\": \"ctc_1234567890abcdef\",\n \"input\": \"final complete input text\"\n}\n" - } - }, - "OpenAI.ResponseError": { - "type": "object", - "required": [ - "code", - "message" - ], - "properties": { - "code": { - "$ref": "#/components/schemas/OpenAI.ResponseErrorCode" - }, - "message": { - "type": "string", - "description": "A human-readable description of the error." - } - }, - "description": "An error object returned when the model fails to generate a Response." - }, - "OpenAI.ResponseErrorCode": { - "type": "string", - "enum": [ - "server_error", - "rate_limit_exceeded", - "invalid_prompt", - "vector_store_timeout", - "invalid_image", - "invalid_image_format", - "invalid_base64_image", - "invalid_image_url", - "image_too_large", - "image_too_small", - "image_parse_error", - "image_content_policy_violation", - "invalid_image_mode", - "image_file_too_large", - "unsupported_image_media_type", - "empty_image_file", - "failed_to_download_image", - "image_file_not_found" - ], - "description": "The error code for the response." - }, - "OpenAI.ResponseErrorEvent": { - "type": "object", - "required": [ - "type", - "code", - "message", - "param", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "error" - ], - "description": "The type of the event. Always `error`.", - "x-stainless-const": true - }, - "code": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string", - "description": "The error message." - }, - "param": { - "type": "string", - "nullable": true - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when an error occurs.", - "x-oaiMeta": { - "name": "error", - "group": "responses", - "example": "{\n \"type\": \"error\",\n \"code\": \"ERR_SOMETHING\",\n \"message\": \"Something went wrong\",\n \"param\": null,\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseFailedEvent": { - "type": "object", - "required": [ - "type", - "sequence_number", - "response" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.failed" - ], - "description": "The type of the event. Always `response.failed`.", - "x-stainless-const": true - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "response": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Response" - } - ], - "description": "The response that failed." - } - }, - "description": "An event that is emitted when a response fails.", - "x-oaiMeta": { - "name": "response.failed", - "group": "responses", - "example": "{\n \"type\": \"response.failed\",\n \"response\": {\n \"id\": \"resp_123\",\n \"object\": \"response\",\n \"created_at\": 1740855869,\n \"status\": \"failed\",\n \"completed_at\": null,\n \"error\": {\n \"code\": \"server_error\",\n \"message\": \"The model failed to generate a response.\"\n },\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"output\": [],\n \"previous_response_id\": null,\n \"reasoning_effort\": null,\n \"store\": false,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": null,\n \"user\": null,\n \"metadata\": {}\n }\n}\n" - } - }, - "OpenAI.ResponseFileSearchCallCompletedEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.file_search_call.completed" - ], - "description": "The type of the event. Always `response.file_search_call.completed`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the file search call is initiated." - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the file search call is initiated." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when a file search call is completed (results found).", - "x-oaiMeta": { - "name": "response.file_search_call.completed", - "group": "responses", - "example": "{\n \"type\": \"response.file_search_call.completed\",\n \"output_index\": 0,\n \"item_id\": \"fs_123\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseFileSearchCallInProgressEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.file_search_call.in_progress" - ], - "description": "The type of the event. Always `response.file_search_call.in_progress`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the file search call is initiated." - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the file search call is initiated." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when a file search call is initiated.", - "x-oaiMeta": { - "name": "response.file_search_call.in_progress", - "group": "responses", - "example": "{\n \"type\": \"response.file_search_call.in_progress\",\n \"output_index\": 0,\n \"item_id\": \"fs_123\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseFileSearchCallSearchingEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.file_search_call.searching" - ], - "description": "The type of the event. Always `response.file_search_call.searching`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the file search call is searching." - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the file search call is initiated." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when a file search is currently searching.", - "x-oaiMeta": { - "name": "response.file_search_call.searching", - "group": "responses", - "example": "{\n \"type\": \"response.file_search_call.searching\",\n \"output_index\": 0,\n \"item_id\": \"fs_123\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseFormatJsonObject": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "json_object" - ], - "description": "The type of response format being defined. Always `json_object`.", - "x-stainless-const": true - } - }, - "description": "JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.", - "title": "JSON object" - }, - "OpenAI.ResponseFormatJsonSchema": { - "type": "object", - "required": [ - "type", - "json_schema" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "json_schema" - ], - "description": "The type of response format being defined. Always `json_schema`.", - "x-stainless-const": true - }, - "json_schema": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaJsonSchema" - } - ], - "description": "Structured Outputs configuration options, including a JSON Schema.", - "title": "JSON schema" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" - } - ], - "description": "JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/docs/guides/structured-outputs).", - "title": "JSON schema" - }, - "OpenAI.ResponseFormatJsonSchemaJsonSchema": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "schema": { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaSchema" - }, - "strict": { - "type": "boolean", - "nullable": true - } - } - }, - "OpenAI.ResponseFormatJsonSchemaSchema": { - "type": "object", - "additionalProperties": {}, - "description": "The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).", - "title": "JSON schema" - }, - "OpenAI.ResponseFormatText": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ], - "description": "The type of response format being defined. Always `text`.", - "x-stainless-const": true - } - }, - "description": "Default response format. Used to generate text responses.", - "title": "Text" - }, - "OpenAI.ResponseFunctionCallArgumentsDeltaEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "sequence_number", - "delta" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.function_call_arguments.delta" - ], - "description": "The type of the event. Always `response.function_call_arguments.delta`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the function-call arguments delta is added to." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the function-call arguments delta is added to." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "delta": { - "type": "string", - "description": "The function-call arguments delta that is added." - } - }, - "description": "Emitted when there is a partial function-call arguments delta.", - "x-oaiMeta": { - "name": "response.function_call_arguments.delta", - "group": "responses", - "example": "{\n \"type\": \"response.function_call_arguments.delta\",\n \"item_id\": \"item-abc\",\n \"output_index\": 0,\n \"delta\": \"{ \"arg\":\"\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseFunctionCallArgumentsDoneEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "name", - "output_index", - "sequence_number", - "arguments" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.function_call_arguments.done" - ], - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the item." - }, - "name": { - "type": "string", - "description": "The name of the function that was called." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "arguments": { - "type": "string", - "description": "The function-call arguments." - } - }, - "description": "Emitted when function-call arguments are finalized.", - "x-oaiMeta": { - "name": "response.function_call_arguments.done", - "group": "responses", - "example": "{\n \"type\": \"response.function_call_arguments.done\",\n \"item_id\": \"item-abc\",\n \"name\": \"get_weather\",\n \"output_index\": 1,\n \"arguments\": \"{ \"arg\": 123 }\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseImageGenCallCompletedEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "sequence_number", - "item_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.image_generation_call.completed" - ], - "description": "The type of the event. Always 'response.image_generation_call.completed'.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response's output array." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the image generation item being processed." - } - }, - "description": "Emitted when an image generation tool call has completed and the final image is available.", - "title": "ResponseImageGenCallCompletedEvent", - "x-oaiMeta": { - "name": "response.image_generation_call.completed", - "group": "responses", - "example": "{\n \"type\": \"response.image_generation_call.completed\",\n \"output_index\": 0,\n \"item_id\": \"item-123\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseImageGenCallGeneratingEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.image_generation_call.generating" - ], - "description": "The type of the event. Always 'response.image_generation_call.generating'.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response's output array." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the image generation item being processed." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of the image generation item being processed." - } - }, - "description": "Emitted when an image generation tool call is actively generating an image (intermediate state).", - "title": "ResponseImageGenCallGeneratingEvent", - "x-oaiMeta": { - "name": "response.image_generation_call.generating", - "group": "responses", - "example": "{\n \"type\": \"response.image_generation_call.generating\",\n \"output_index\": 0,\n \"item_id\": \"item-123\",\n \"sequence_number\": 0\n}\n" - } - }, - "OpenAI.ResponseImageGenCallInProgressEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.image_generation_call.in_progress" - ], - "description": "The type of the event. Always 'response.image_generation_call.in_progress'.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response's output array." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the image generation item being processed." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of the image generation item being processed." - } - }, - "description": "Emitted when an image generation tool call is in progress.", - "title": "ResponseImageGenCallInProgressEvent", - "x-oaiMeta": { - "name": "response.image_generation_call.in_progress", - "group": "responses", - "example": "{\n \"type\": \"response.image_generation_call.in_progress\",\n \"output_index\": 0,\n \"item_id\": \"item-123\",\n \"sequence_number\": 0\n}\n" - } - }, - "OpenAI.ResponseImageGenCallPartialImageEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number", - "partial_image_index", - "partial_image_b64" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.image_generation_call.partial_image" - ], - "description": "The type of the event. Always 'response.image_generation_call.partial_image'.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response's output array." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the image generation item being processed." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of the image generation item being processed." - }, - "partial_image_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "0-based index for the partial image (backend is 1-based, but this is 0-based for the user)." - }, - "partial_image_b64": { - "type": "string", - "description": "Base64-encoded partial image data, suitable for rendering as an image." - } - }, - "description": "Emitted when a partial image is available during image generation streaming.", - "title": "ResponseImageGenCallPartialImageEvent", - "x-oaiMeta": { - "name": "response.image_generation_call.partial_image", - "group": "responses", - "example": "{\n \"type\": \"response.image_generation_call.partial_image\",\n \"output_index\": 0,\n \"item_id\": \"item-123\",\n \"sequence_number\": 0,\n \"partial_image_index\": 0,\n \"partial_image_b64\": \"...\"\n}\n" - } - }, - "OpenAI.ResponseInProgressEvent": { - "type": "object", - "required": [ - "type", - "response", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.in_progress" - ], - "description": "The type of the event. Always `response.in_progress`.", - "x-stainless-const": true - }, - "response": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Response" - } - ], - "description": "The response that is in progress." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when the response is in progress.", - "x-oaiMeta": { - "name": "response.in_progress", - "group": "responses", - "example": "{\n \"type\": \"response.in_progress\",\n \"response\": {\n \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n \"object\": \"response\",\n \"created_at\": 1741487325,\n \"status\": \"in_progress\",\n \"completed_at\": null,\n \"error\": null,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-2024-08-06\",\n \"output\": [],\n \"parallel_tool_calls\": true,\n \"previous_response_id\": null,\n \"reasoning\": {\n \"effort\": null,\n \"summary\": null\n },\n \"store\": true,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": null,\n \"user\": null,\n \"metadata\": {}\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseIncompleteDetails": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "enum": [ - "max_output_tokens", - "content_filter" - ] - } - } - }, - "OpenAI.ResponseIncompleteEvent": { - "type": "object", - "required": [ - "type", - "response", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.incomplete" - ], - "description": "The type of the event. Always `response.incomplete`.", - "x-stainless-const": true - }, - "response": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Response" - } - ], - "description": "The response that was incomplete." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "An event that is emitted when a response finishes as incomplete.", - "x-oaiMeta": { - "name": "response.incomplete", - "group": "responses", - "example": "{\n \"type\": \"response.incomplete\",\n \"response\": {\n \"id\": \"resp_123\",\n \"object\": \"response\",\n \"created_at\": 1740855869,\n \"status\": \"incomplete\",\n \"completed_at\": null,\n \"error\": null,\n \"incomplete_details\": {\n \"reason\": \"max_tokens\"\n },\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"output\": [],\n \"previous_response_id\": null,\n \"reasoning_effort\": null,\n \"store\": false,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": null,\n \"user\": null,\n \"metadata\": {}\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseLogProb": { - "type": "object", - "required": [ - "token", - "logprob" - ], - "properties": { - "token": { - "type": "string", - "description": "A possible text token." - }, - "logprob": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "description": "The log probability of this token." - }, - "top_logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ResponseLogProbTopLogprobs" - }, - "description": "The log probability of the top 20 most likely tokens." - } - }, - "description": "A logprob is the logarithmic probability that the model assigns to producing\na particular token at a given position in the sequence. Less-negative (higher)\nlogprob values indicate greater model confidence in that token choice." - }, - "OpenAI.ResponseLogProbTopLogprobs": { - "type": "object", - "properties": { - "token": { - "type": "string" - }, - "logprob": { - "$ref": "#/components/schemas/OpenAI.numeric" - } - } - }, - "OpenAI.ResponseMCPCallArgumentsDeltaEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "delta", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.mcp_call_arguments.delta" - ], - "description": "The type of the event. Always 'response.mcp_call_arguments.delta'.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response's output array." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the MCP tool call item being processed." - }, - "delta": { - "type": "string", - "description": "A JSON string containing the partial update to the arguments for the MCP tool call." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when there is a delta (partial update) to the arguments of an MCP tool call.", - "title": "ResponseMCPCallArgumentsDeltaEvent", - "x-oaiMeta": { - "name": "response.mcp_call_arguments.delta", - "group": "responses", - "example": "{\n \"type\": \"response.mcp_call_arguments.delta\",\n \"output_index\": 0,\n \"item_id\": \"item-abc\",\n \"delta\": \"{\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseMCPCallArgumentsDoneEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "arguments", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.mcp_call_arguments.done" - ], - "description": "The type of the event. Always 'response.mcp_call_arguments.done'.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response's output array." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the MCP tool call item being processed." - }, - "arguments": { - "type": "string", - "description": "A JSON string containing the finalized arguments for the MCP tool call." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when the arguments for an MCP tool call are finalized.", - "title": "ResponseMCPCallArgumentsDoneEvent", - "x-oaiMeta": { - "name": "response.mcp_call_arguments.done", - "group": "responses", - "example": "{\n \"type\": \"response.mcp_call_arguments.done\",\n \"output_index\": 0,\n \"item_id\": \"item-abc\",\n \"arguments\": \"{\"arg1\": \"value1\", \"arg2\": \"value2\"}\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseMCPCallCompletedEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.mcp_call.completed" - ], - "description": "The type of the event. Always 'response.mcp_call.completed'.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the MCP tool call item that completed." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that completed." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when an MCP tool call has completed successfully.", - "title": "ResponseMCPCallCompletedEvent", - "x-oaiMeta": { - "name": "response.mcp_call.completed", - "group": "responses", - "example": "{\n \"type\": \"response.mcp_call.completed\",\n \"sequence_number\": 1,\n \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n \"output_index\": 0\n}\n" - } - }, - "OpenAI.ResponseMCPCallFailedEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.mcp_call.failed" - ], - "description": "The type of the event. Always 'response.mcp_call.failed'.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the MCP tool call item that failed." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that failed." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when an MCP tool call has failed.", - "title": "ResponseMCPCallFailedEvent", - "x-oaiMeta": { - "name": "response.mcp_call.failed", - "group": "responses", - "example": "{\n \"type\": \"response.mcp_call.failed\",\n \"sequence_number\": 1,\n \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n \"output_index\": 0\n}\n" - } - }, - "OpenAI.ResponseMCPCallInProgressEvent": { - "type": "object", - "required": [ - "type", - "sequence_number", - "output_index", - "item_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.mcp_call.in_progress" - ], - "description": "The type of the event. Always 'response.mcp_call.in_progress'.", - "x-stainless-const": true - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response's output array." - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the MCP tool call item being processed." - } - }, - "description": "Emitted when an MCP tool call is in progress.", - "title": "ResponseMCPCallInProgressEvent", - "x-oaiMeta": { - "name": "response.mcp_call.in_progress", - "group": "responses", - "example": "{\n \"type\": \"response.mcp_call.in_progress\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\"\n}\n" - } - }, - "OpenAI.ResponseMCPListToolsCompletedEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.mcp_list_tools.completed" - ], - "description": "The type of the event. Always 'response.mcp_list_tools.completed'.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the MCP tool call item that produced this output." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that was processed." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when the list of available MCP tools has been successfully retrieved.", - "title": "ResponseMCPListToolsCompletedEvent", - "x-oaiMeta": { - "name": "response.mcp_list_tools.completed", - "group": "responses", - "example": "{\n \"type\": \"response.mcp_list_tools.completed\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n" - } - }, - "OpenAI.ResponseMCPListToolsFailedEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.mcp_list_tools.failed" - ], - "description": "The type of the event. Always 'response.mcp_list_tools.failed'.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the MCP tool call item that failed." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that failed." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when the attempt to list available MCP tools has failed.", - "title": "ResponseMCPListToolsFailedEvent", - "x-oaiMeta": { - "name": "response.mcp_list_tools.failed", - "group": "responses", - "example": "{\n \"type\": \"response.mcp_list_tools.failed\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n" - } - }, - "OpenAI.ResponseMCPListToolsInProgressEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.mcp_list_tools.in_progress" - ], - "description": "The type of the event. Always 'response.mcp_list_tools.in_progress'.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the MCP tool call item that is being processed." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that is being processed." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when the system is in the process of retrieving the list of available MCP tools.", - "title": "ResponseMCPListToolsInProgressEvent", - "x-oaiMeta": { - "name": "response.mcp_list_tools.in_progress", - "group": "responses", - "example": "{\n \"type\": \"response.mcp_list_tools.in_progress\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n" - } - }, - "OpenAI.ResponseOutputItemAddedEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "sequence_number", - "item" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.output_item.added" - ], - "description": "The type of the event. Always `response.output_item.added`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that was added." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "item": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output item that was added." - } - }, - "description": "Emitted when a new output item is added.", - "x-oaiMeta": { - "name": "response.output_item.added", - "group": "responses", - "example": "{\n \"type\": \"response.output_item.added\",\n \"output_index\": 0,\n \"item\": {\n \"id\": \"msg_123\",\n \"status\": \"in_progress\",\n \"type\": \"message\",\n \"role\": \"assistant\",\n \"content\": []\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseOutputItemDoneEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "sequence_number", - "item" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.output_item.done" - ], - "description": "The type of the event. Always `response.output_item.done`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that was marked done." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "item": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output item that was marked done." - } - }, - "description": "Emitted when an output item is marked done.", - "x-oaiMeta": { - "name": "response.output_item.done", - "group": "responses", - "example": "{\n \"type\": \"response.output_item.done\",\n \"output_index\": 0,\n \"item\": {\n \"id\": \"msg_123\",\n \"status\": \"completed\",\n \"type\": \"message\",\n \"role\": \"assistant\",\n \"content\": [\n {\n \"type\": \"output_text\",\n \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n \"annotations\": []\n }\n ]\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseOutputTextAnnotationAddedEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "content_index", - "annotation_index", - "sequence_number", - "annotation" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.output_text.annotation.added" - ], - "description": "The type of the event. Always 'response.output_text.annotation.added'.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The unique identifier of the item to which the annotation is being added." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item in the response's output array." - }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the content part within the output item." - }, - "annotation_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the annotation within the content part." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "annotation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Annotation" - } - ], - "description": "The annotation object being added. (See annotation schema for details.)" - } - }, - "description": "Emitted when an annotation is added to output text content.", - "title": "ResponseOutputTextAnnotationAddedEvent", - "x-oaiMeta": { - "name": "response.output_text.annotation.added", - "group": "responses", - "example": "{\n \"type\": \"response.output_text.annotation.added\",\n \"item_id\": \"item-abc\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"annotation_index\": 0,\n \"annotation\": {\n \"type\": \"text_annotation\",\n \"text\": \"This is a test annotation\",\n \"start\": 0,\n \"end\": 10\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponsePromptVariables": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.InputTextContent" - }, - { - "$ref": "#/components/schemas/OpenAI.InputImageContent" - }, - { - "$ref": "#/components/schemas/OpenAI.InputFileContent" - } - ] - }, - "description": "Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.", - "title": "Prompt Variables", - "x-oaiExpandable": true, - "x-oaiTypeLabel": "map" - }, - "OpenAI.ResponseQueuedEvent": { - "type": "object", - "required": [ - "type", - "response", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.queued" - ], - "description": "The type of the event. Always 'response.queued'.", - "x-stainless-const": true - }, - "response": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Response" - } - ], - "description": "The full response object that is queued." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number for this event." - } - }, - "description": "Emitted when a response is queued and waiting to be processed.", - "title": "ResponseQueuedEvent", - "x-oaiMeta": { - "name": "response.queued", - "group": "responses", - "example": "{\n \"type\": \"response.queued\",\n \"response\": {\n \"id\": \"res_123\",\n \"status\": \"queued\",\n \"created_at\": \"2021-01-01T00:00:00Z\",\n \"updated_at\": \"2021-01-01T00:00:00Z\"\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseReasoningSummaryPartAddedEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "summary_index", - "sequence_number", - "part" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.reasoning_summary_part.added" - ], - "description": "The type of the event. Always `response.reasoning_summary_part.added`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the item this summary part is associated with." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item this summary part is associated with." - }, - "summary_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the summary part within the reasoning summary." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "part": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartAddedEventPart" - } - ], - "description": "The summary part that was added." - } - }, - "description": "Emitted when a new reasoning summary part is added.", - "x-oaiMeta": { - "name": "response.reasoning_summary_part.added", - "group": "responses", - "example": "{\n \"type\": \"response.reasoning_summary_part.added\",\n \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n \"output_index\": 0,\n \"summary_index\": 0,\n \"part\": {\n \"type\": \"summary_text\",\n \"text\": \"\"\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseReasoningSummaryPartAddedEventPart": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "summary_text" - ], - "x-stainless-const": true - }, - "text": { - "type": "string" - } - } - }, - "OpenAI.ResponseReasoningSummaryPartDoneEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "summary_index", - "sequence_number", - "part" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.reasoning_summary_part.done" - ], - "description": "The type of the event. Always `response.reasoning_summary_part.done`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the item this summary part is associated with." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item this summary part is associated with." - }, - "summary_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the summary part within the reasoning summary." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - }, - "part": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEventPart" - } - ], - "description": "The completed summary part." - } - }, - "description": "Emitted when a reasoning summary part is completed.", - "x-oaiMeta": { - "name": "response.reasoning_summary_part.done", - "group": "responses", - "example": "{\n \"type\": \"response.reasoning_summary_part.done\",\n \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n \"output_index\": 0,\n \"summary_index\": 0,\n \"part\": {\n \"type\": \"summary_text\",\n \"text\": \"**Responding to a greeting**\n\nThe user just said, \"Hello!\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \"Hello! How can I assist you today?\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\"\n },\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseReasoningSummaryPartDoneEventPart": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "summary_text" - ], - "x-stainless-const": true - }, - "text": { - "type": "string" - } - } - }, - "OpenAI.ResponseReasoningSummaryTextDeltaEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "summary_index", - "delta", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.reasoning_summary_text.delta" - ], - "description": "The type of the event. Always `response.reasoning_summary_text.delta`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the item this summary text delta is associated with." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item this summary text delta is associated with." - }, - "summary_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the summary part within the reasoning summary." - }, - "delta": { - "type": "string", - "description": "The text delta that was added to the summary." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when a delta is added to a reasoning summary text.", - "x-oaiMeta": { - "name": "response.reasoning_summary_text.delta", - "group": "responses", - "example": "{\n \"type\": \"response.reasoning_summary_text.delta\",\n \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n \"output_index\": 0,\n \"summary_index\": 0,\n \"delta\": \"**Responding to a greeting**\n\nThe user just said, \"Hello!\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \"Hello! How can I assist you today?\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseReasoningSummaryTextDoneEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "summary_index", - "text", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.reasoning_summary_text.done" - ], - "description": "The type of the event. Always `response.reasoning_summary_text.done`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the item this summary text is associated with." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item this summary text is associated with." - }, - "summary_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the summary part within the reasoning summary." - }, - "text": { - "type": "string", - "description": "The full text of the completed reasoning summary." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when a reasoning summary text is completed.", - "x-oaiMeta": { - "name": "response.reasoning_summary_text.done", - "group": "responses", - "example": "{\n \"type\": \"response.reasoning_summary_text.done\",\n \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n \"output_index\": 0,\n \"summary_index\": 0,\n \"text\": \"**Responding to a greeting**\n\nThe user just said, \"Hello!\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \"Hello! How can I assist you today?\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseReasoningTextDeltaEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "content_index", - "delta", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.reasoning_text.delta" - ], - "description": "The type of the event. Always `response.reasoning_text.delta`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the item this reasoning text delta is associated with." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item this reasoning text delta is associated with." - }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the reasoning content part this delta is associated with." - }, - "delta": { - "type": "string", - "description": "The text delta that was added to the reasoning content." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when a delta is added to a reasoning text.", - "x-oaiMeta": { - "name": "response.reasoning_text.delta", - "group": "responses", - "example": "{\n \"type\": \"response.reasoning_text.delta\",\n \"item_id\": \"rs_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"delta\": \"The\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseReasoningTextDoneEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "content_index", - "text", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.reasoning_text.done" - ], - "description": "The type of the event. Always `response.reasoning_text.done`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the item this reasoning text is associated with." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item this reasoning text is associated with." - }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the reasoning content part." - }, - "text": { - "type": "string", - "description": "The full text of the completed reasoning content." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when a reasoning text is completed.", - "x-oaiMeta": { - "name": "response.reasoning_text.done", - "group": "responses", - "example": "{\n \"type\": \"response.reasoning_text.done\",\n \"item_id\": \"rs_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"text\": \"The user is asking...\",\n \"sequence_number\": 4\n}\n" - } - }, - "OpenAI.ResponseRefusalDeltaEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "content_index", - "delta", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.refusal.delta" - ], - "description": "The type of the event. Always `response.refusal.delta`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the refusal text is added to." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the refusal text is added to." - }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the content part that the refusal text is added to." - }, - "delta": { - "type": "string", - "description": "The refusal text that is added." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when there is a partial refusal text.", - "x-oaiMeta": { - "name": "response.refusal.delta", - "group": "responses", - "example": "{\n \"type\": \"response.refusal.delta\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"delta\": \"refusal text so far\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseRefusalDoneEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "content_index", - "refusal", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.refusal.done" - ], - "description": "The type of the event. Always `response.refusal.done`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the refusal text is finalized." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the refusal text is finalized." - }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the content part that the refusal text is finalized." - }, - "refusal": { - "type": "string", - "description": "The refusal text that is finalized." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." - } - }, - "description": "Emitted when refusal text is finalized.", - "x-oaiMeta": { - "name": "response.refusal.done", - "group": "responses", - "example": "{\n \"type\": \"response.refusal.done\",\n \"item_id\": \"item-abc\",\n \"output_index\": 1,\n \"content_index\": 2,\n \"refusal\": \"final refusal text\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseStreamOptions": { - "type": "object", - "properties": { - "include_obfuscation": { - "type": "boolean", - "description": "When true, stream obfuscation will be enabled. Stream obfuscation adds\n random characters to an `obfuscation` field on streaming delta events to\n normalize payload sizes as a mitigation to certain side-channel attacks.\n These obfuscation fields are included by default, but add a small amount\n of overhead to the data stream. You can set `include_obfuscation` to\n false to optimize for bandwidth if you trust the network links between\n your application and the OpenAI API." - } - }, - "description": "Options for streaming responses. Only set this when you set `stream: true`." - }, - "OpenAI.ResponseTextDeltaEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "content_index", - "delta", - "sequence_number", - "logprobs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.output_text.delta" - ], - "description": "The type of the event. Always `response.output_text.delta`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the text delta was added to." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the text delta was added to." - }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the content part that the text delta was added to." - }, - "delta": { - "type": "string", - "description": "The text delta that was added." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number for this event." - }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ResponseLogProb" - }, - "description": "The log probabilities of the tokens in the delta." - } - }, - "description": "Emitted when there is an additional text delta.", - "x-oaiMeta": { - "name": "response.output_text.delta", - "group": "responses", - "example": "{\n \"type\": \"response.output_text.delta\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"delta\": \"In\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseTextDoneEvent": { - "type": "object", - "required": [ - "type", - "item_id", - "output_index", - "content_index", - "text", - "sequence_number", - "logprobs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.output_text.done" - ], - "description": "The type of the event. Always `response.output_text.done`.", - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the output item that the text content is finalized." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the text content is finalized." - }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the content part that the text content is finalized." - }, - "text": { - "type": "string", - "description": "The text content that is finalized." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number for this event." - }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ResponseLogProb" - }, - "description": "The log probabilities of the tokens in the delta." - } - }, - "description": "Emitted when text content is finalized.", - "x-oaiMeta": { - "name": "response.output_text.done", - "group": "responses", - "example": "{\n \"type\": \"response.output_text.done\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n \"sequence_number\": 1\n}\n" - } - }, - "OpenAI.ResponseTextParam": { - "type": "object", - "properties": { - "format": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" - }, - "verbosity": { - "$ref": "#/components/schemas/OpenAI.Verbosity" - } - }, - "description": "Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](/docs/guides/text)\n- [Structured Outputs](/docs/guides/structured-outputs)" - }, - "OpenAI.ResponseUsage": { - "type": "object", - "required": [ - "input_tokens", - "input_tokens_details", - "output_tokens", - "output_tokens_details", - "total_tokens" - ], - "properties": { - "input_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of input tokens." - }, - "input_tokens_details": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" - } - ], - "description": "A detailed breakdown of the input tokens." - }, - "output_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of output tokens." - }, - "output_tokens_details": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" - } - ], - "description": "A detailed breakdown of the output tokens." - }, - "total_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The total number of tokens used." - } - }, - "description": "Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used." - }, - "OpenAI.ResponseUsageInputTokensDetails": { - "type": "object", - "required": [ - "cached_tokens" - ], - "properties": { - "cached_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - } - } - }, - "OpenAI.ResponseUsageOutputTokensDetails": { - "type": "object", - "required": [ - "reasoning_tokens" - ], - "properties": { - "reasoning_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" - } - } - }, - "OpenAI.ResponseWebSearchCallCompletedEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.web_search_call.completed" - ], - "description": "The type of the event. Always `response.web_search_call.completed`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the web search call is associated with." - }, - "item_id": { - "type": "string", - "description": "Unique ID for the output item associated with the web search call." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of the web search call being processed." - } - }, - "description": "Emitted when a web search call is completed.", - "x-oaiMeta": { - "name": "response.web_search_call.completed", - "group": "responses", - "example": "{\n \"type\": \"response.web_search_call.completed\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" - } - }, - "OpenAI.ResponseWebSearchCallInProgressEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.web_search_call.in_progress" - ], - "description": "The type of the event. Always `response.web_search_call.in_progress`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the web search call is associated with." - }, - "item_id": { - "type": "string", - "description": "Unique ID for the output item associated with the web search call." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of the web search call being processed." - } - }, - "description": "Emitted when a web search call is initiated.", - "x-oaiMeta": { - "name": "response.web_search_call.in_progress", - "group": "responses", - "example": "{\n \"type\": \"response.web_search_call.in_progress\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" - } - }, - "OpenAI.ResponseWebSearchCallSearchingEvent": { - "type": "object", - "required": [ - "type", - "output_index", - "item_id", - "sequence_number" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response.web_search_call.searching" - ], - "description": "The type of the event. Always `response.web_search_call.searching`.", - "x-stainless-const": true - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that the web search call is associated with." - }, - "item_id": { - "type": "string", - "description": "Unique ID for the output item associated with the web search call." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of the web search call being processed." - } - }, - "description": "Emitted when a web search call is executing.", - "x-oaiMeta": { - "name": "response.web_search_call.searching", - "group": "responses", - "example": "{\n \"type\": \"response.web_search_call.searching\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" - } - }, - "OpenAI.ScreenshotParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "screenshot" - ], - "description": "Specifies the event type. For a screenshot action, this property is always set to `screenshot`.", - "x-stainless-const": true, - "default": "screenshot" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A screenshot action.", - "title": "Screenshot" - }, - "OpenAI.ScrollParam": { - "type": "object", - "required": [ - "type", - "x", - "y", - "scroll_x", - "scroll_y" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "scroll" - ], - "description": "Specifies the event type. For a scroll action, this property is always set to `scroll`.", - "x-stainless-const": true, - "default": "scroll" - }, - "x": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The x-coordinate where the scroll occurred." - }, - "y": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The y-coordinate where the scroll occurred." - }, - "scroll_x": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The horizontal scroll distance." - }, - "scroll_y": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The vertical scroll distance." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A scroll action.", - "title": "Scroll" - }, - "OpenAI.SearchContextSize": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - "OpenAI.ServiceTier": { - "type": "string", - "enum": [ - "auto", - "default", - "flex", - "scale", - "priority" - ], - "description": "Specifies the processing type used for serving the request.\n- If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n- If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n- If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n- When not set, the default behavior is 'auto'.\nWhen the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.", - "nullable": true - }, - "OpenAI.SkillReferenceParam": { - "type": "object", - "required": [ - "type", - "skill_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "skill_reference" - ], - "description": "References a skill created with the /v1/skills endpoint.", - "x-stainless-const": true, - "default": "skill_reference" - }, - "skill_id": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The ID of the referenced skill." - }, - "version": { - "type": "string", - "description": "Optional skill version. Use a positive integer or 'latest'. Omit for default." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerSkill" - } - ] - }, - "OpenAI.SpecificApplyPatchParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apply_patch" - ], - "description": "The tool to call. Always `apply_patch`.", - "x-stainless-const": true, - "default": "apply_patch" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Forces the model to call the apply_patch tool when executing a tool call.", - "title": "Specific apply patch tool choice" - }, - "OpenAI.SpecificFunctionShellParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "shell" - ], - "description": "The tool to call. Always `shell`.", - "x-stainless-const": true, - "default": "shell" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Forces the model to call the shell tool when a tool call is required.", - "title": "Specific shell tool choice" - }, - "OpenAI.SummaryTextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "summary_text" - ], - "description": "The type of the object. Always `summary_text`.", - "x-stainless-const": true, - "default": "summary_text" - }, - "text": { - "type": "string", - "description": "A summary of the reasoning output from the model so far." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A summary text from the model.", - "title": "Summary text" - }, - "OpenAI.TextContent": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ], - "x-stainless-const": true, - "default": "text" - }, - "text": { - "type": "string" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A text content.", - "title": "Text Content" - }, - "OpenAI.TextResponseFormatConfiguration": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfigurationType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "json_schema": "#/components/schemas/OpenAI.TextResponseFormatJsonSchema", - "text": "#/components/schemas/OpenAI.TextResponseFormatConfigurationResponseFormatText", - "json_object": "#/components/schemas/OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject" - } - }, - "description": "An object specifying the format that the model must output.\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\nwhich ensures the model will match your supplied JSON schema. Learn more in the\n[Structured Outputs guide](/docs/guides/structured-outputs).\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n*Not recommended for gpt-4o and newer models:**\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it." - }, - "OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "json_object" - ], - "description": "The type of response format being defined. Always `json_object`.", - "x-stainless-const": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" - } - ], - "description": "JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.", - "title": "JSON object" - }, - "OpenAI.TextResponseFormatConfigurationResponseFormatText": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ], - "description": "The type of response format being defined. Always `text`.", - "x-stainless-const": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" - } - ], - "description": "Default response format. Used to generate text responses.", - "title": "Text" - }, - "OpenAI.TextResponseFormatConfigurationType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "text", - "json_schema", - "json_object" - ] - } - ] - }, - "OpenAI.TextResponseFormatJsonSchema": { - "type": "object", - "required": [ - "type", - "name", - "schema" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "json_schema" - ], - "description": "The type of response format being defined. Always `json_schema`.", - "x-stainless-const": true - }, - "description": { - "type": "string", - "description": "A description of what the response format is for, used by the model to\n determine how to respond in the format." - }, - "name": { - "type": "string", - "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain\n underscores and dashes, with a maximum length of 64." - }, - "schema": { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaSchema" - }, - "strict": { - "type": "boolean", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" - } - ], - "description": "JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/docs/guides/structured-outputs).", - "title": "JSON schema" - }, - "OpenAI.Tool": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ToolType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "bing_grounding": "#/components/schemas/BingGroundingTool", - "fabric_dataagent_preview": "#/components/schemas/MicrosoftFabricPreviewTool", - "sharepoint_grounding_preview": "#/components/schemas/SharepointPreviewTool", - "azure_ai_search": "#/components/schemas/AzureAISearchTool", - "openapi": "#/components/schemas/OpenApiTool", - "bing_custom_search_preview": "#/components/schemas/BingCustomSearchPreviewTool", - "browser_automation_preview": "#/components/schemas/BrowserAutomationPreviewTool", - "azure_function": "#/components/schemas/AzureFunctionTool", - "capture_structured_outputs": "#/components/schemas/CaptureStructuredOutputsTool", - "a2a_preview": "#/components/schemas/A2APreviewTool", - "work_iq_preview": "#/components/schemas/WorkIQPreviewTool", - "fabric_iq_preview": "#/components/schemas/FabricIQPreviewTool", - "memory_search_preview": "#/components/schemas/MemorySearchPreviewTool", - "toolbox_search_preview": "#/components/schemas/ToolboxSearchPreviewTool", - "code_interpreter": "#/components/schemas/OpenAI.CodeInterpreterTool", - "function": "#/components/schemas/OpenAI.FunctionTool", - "file_search": "#/components/schemas/OpenAI.FileSearchTool", - "computer_use_preview": "#/components/schemas/OpenAI.ComputerUsePreviewTool", - "web_search": "#/components/schemas/OpenAI.WebSearchTool", - "mcp": "#/components/schemas/OpenAI.MCPTool", - "image_generation": "#/components/schemas/OpenAI.ImageGenTool", - "local_shell": "#/components/schemas/OpenAI.LocalShellToolParam", - "shell": "#/components/schemas/OpenAI.FunctionShellToolParam", - "custom": "#/components/schemas/OpenAI.CustomToolParam", - "web_search_preview": "#/components/schemas/OpenAI.WebSearchPreviewTool", - "apply_patch": "#/components/schemas/OpenAI.ApplyPatchToolParam" - } - }, - "description": "A tool that can be used to generate a response." - }, - "OpenAI.ToolChoiceAllowed": { - "type": "object", - "required": [ - "type", - "mode", - "tools" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "allowed_tools" - ], - "description": "Allowed tool configuration type. Always `allowed_tools`.", - "x-stainless-const": true - }, - "mode": { - "type": "string", - "enum": [ - "auto", - "required" - ], - "description": "Constrains the tools available to the model to a pre-defined set.\n `auto` allows the model to pick from among the allowed tools and generate a\n message.\n `required` requires the model to call one or more of the allowed tools." - }, - "tools": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - }, - "description": "A list of tool definitions that the model should be allowed to call.\n For the Responses API, the list of tool definitions might look like:\n ```json\n [\n { \"type\": \"function\", \"name\": \"get_weather\" },\n { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n { \"type\": \"image_generation\" }\n ]\n ```" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Constrains the tools available to the model to a pre-defined set.", - "title": "Allowed tools" - }, - "OpenAI.ToolChoiceCodeInterpreter": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "code_interpreter" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." - }, - "OpenAI.ToolChoiceComputerUsePreview": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "computer_use_preview" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." - }, - "OpenAI.ToolChoiceCustom": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "custom" - ], - "description": "For custom tool calling, the type is always `custom`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the custom tool to call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Use this option to force the model to call a specific custom tool.", - "title": "Custom tool" - }, - "OpenAI.ToolChoiceFileSearch": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "file_search" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." - }, - "OpenAI.ToolChoiceFunction": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "function" - ], - "description": "For function calling, the type is always `function`.", - "x-stainless-const": true - }, - "name": { - "type": "string", - "description": "The name of the function to call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Use this option to force the model to call a specific function.", - "title": "Function tool" - }, - "OpenAI.ToolChoiceImageGeneration": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "image_generation" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." - }, - "OpenAI.ToolChoiceMCP": { - "type": "object", - "required": [ - "type", - "server_label" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "mcp" - ], - "description": "For MCP tools, the type is always `mcp`.", - "x-stainless-const": true - }, - "server_label": { - "type": "string", - "description": "The label of the MCP server to use." - }, - "name": { - "type": "string", - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Use this option to force the model to call a specific tool on a remote MCP server.", - "title": "MCP tool" - }, - "OpenAI.ToolChoiceOptions": { - "type": "string", - "enum": [ - "none", - "auto", - "required" - ], - "description": "Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n`required` means the model must call one or more tools.", - "title": "Tool choice mode" - }, - "OpenAI.ToolChoiceParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParamType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "allowed_tools": "#/components/schemas/OpenAI.ToolChoiceAllowed", - "function": "#/components/schemas/OpenAI.ToolChoiceFunction", - "mcp": "#/components/schemas/OpenAI.ToolChoiceMCP", - "custom": "#/components/schemas/OpenAI.ToolChoiceCustom", - "apply_patch": "#/components/schemas/OpenAI.SpecificApplyPatchParam", - "shell": "#/components/schemas/OpenAI.SpecificFunctionShellParam", - "file_search": "#/components/schemas/OpenAI.ToolChoiceFileSearch", - "web_search_preview": "#/components/schemas/OpenAI.ToolChoiceWebSearchPreview", - "computer_use_preview": "#/components/schemas/OpenAI.ToolChoiceComputerUsePreview", - "web_search_preview_2025_03_11": "#/components/schemas/OpenAI.ToolChoiceWebSearchPreview20250311", - "image_generation": "#/components/schemas/OpenAI.ToolChoiceImageGeneration", - "code_interpreter": "#/components/schemas/OpenAI.ToolChoiceCodeInterpreter" - } - }, - "description": "How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call." - }, - "OpenAI.ToolChoiceParamType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "allowed_tools", - "function", - "mcp", - "custom", - "apply_patch", - "shell", - "file_search", - "web_search_preview", - "computer_use_preview", - "web_search_preview_2025_03_11", - "image_generation", - "code_interpreter" - ] - } - ] - }, - "OpenAI.ToolChoiceWebSearchPreview": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "web_search_preview" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." - }, - "OpenAI.ToolChoiceWebSearchPreview20250311": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "web_search_preview_2025_03_11" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." - }, - "OpenAI.ToolType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "function", - "file_search", - "computer_use_preview", - "web_search", - "mcp", - "code_interpreter", - "image_generation", - "local_shell", - "shell", - "custom", - "web_search_preview", - "apply_patch", - "a2a_preview", - "bing_custom_search_preview", - "browser_automation_preview", - "fabric_dataagent_preview", - "sharepoint_grounding_preview", - "memory_search_preview", - "work_iq_preview", - "fabric_iq_preview", - "toolbox_search_preview", - "azure_ai_search", - "azure_function", - "bing_grounding", - "capture_structured_outputs", - "openapi" - ] - } - ] - }, - "OpenAI.ToolsArray": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter.\nWe support the following categories of tools:\n- **Built-in tools**: Tools that are provided by OpenAI that extend the\nmodel's capabilities, like [web search](/docs/guides/tools-web-search)\nor [file search](/docs/guides/tools-file-search). Learn more about\n[built-in tools](/docs/guides/tools).\n- **MCP Tools**: Integrations with third-party systems via custom MCP servers\nor predefined connectors such as Google Drive and SharePoint. Learn more about\n[MCP Tools](/docs/guides/tools-connectors-mcp).\n- **Function calls (custom tools)**: Functions that are defined by you,\nenabling the model to call your own code with strongly typed arguments\nand outputs. Learn more about\n[function calling](/docs/guides/function-calling). You can also use\ncustom tools to call your own code." - }, - "OpenAI.TopLogProb": { - "type": "object", - "required": [ - "token", - "logprob", - "bytes" - ], - "properties": { - "token": { - "type": "string" - }, - "logprob": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "bytes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.integer" - } - } - }, - "description": "The top log probability of a token.", - "title": "Top log probability" - }, - "OpenAI.TypeParam": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "type" - ], - "description": "Specifies the event type. For a type action, this property is always set to `type`.", - "x-stainless-const": true, - "default": "type" - }, - "text": { - "type": "string", - "description": "The text to type." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "An action to type in text.", - "title": "Type" - }, - "OpenAI.UpdateConversationBody": { - "type": "object", - "required": [ - "metadata" - ], - "properties": { - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." - } - } - }, - "OpenAI.UrlCitationBody": { - "type": "object", - "required": [ - "type", - "url", - "start_index", - "end_index", - "title" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "url_citation" - ], - "description": "The type of the URL citation. Always `url_citation`.", - "x-stainless-const": true, - "default": "url_citation" - }, - "url": { - "type": "string", - "format": "uri", - "description": "The URL of the web resource." - }, - "start_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the first character of the URL citation in the message." - }, - "end_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the last character of the URL citation in the message." - }, - "title": { - "type": "string", - "description": "The title of the web resource." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Annotation" - } - ], - "description": "A citation for a web resource used to generate a model response.", - "title": "URL citation" - }, - "OpenAI.VectorStoreFileAttributes": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - { - "type": "boolean" - } - ] - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.", - "x-oaiTypeLabel": "map" - }, - "OpenAI.Verbosity": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ], - "description": "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.", - "nullable": true - }, - "OpenAI.WaitParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wait" - ], - "description": "Specifies the event type. For a wait action, this property is always set to `wait`.", - "x-stainless-const": true, - "default": "wait" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A wait action.", - "title": "Wait" - }, - "OpenAI.WebSearchActionFind": { - "type": "object", - "required": [ - "type", - "url", - "pattern" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "find_in_page" - ], - "description": "The action type.", - "x-stainless-const": true - }, - "url": { - "type": "string", - "format": "uri", - "description": "The URL of the page searched for the pattern." - }, - "pattern": { - "type": "string", - "description": "The pattern or text to search for within the page." - } - }, - "description": "Action type \"find_in_page\": Searches for a pattern within a loaded page.", - "title": "Find action" - }, - "OpenAI.WebSearchActionOpenPage": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "open_page" - ], - "description": "The action type.", - "x-stainless-const": true - }, - "url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL opened by the model." - } - }, - "description": "Action type \"open_page\" - Opens a specific URL from search results.", - "title": "Open page action" - }, - "OpenAI.WebSearchActionSearch": { - "type": "object", - "required": [ - "type", - "query" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "search" - ], - "description": "The action type.", - "x-stainless-const": true - }, - "query": { - "type": "string", - "description": "[DEPRECATED] The search query.", - "deprecated": true - }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The search queries.", - "title": "Search queries" - }, - "sources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearchSources" - }, - "description": "The sources used in the search.", - "title": "Web search sources" - } - }, - "description": "Action type \"search\" - Performs a web search query.", - "title": "Search action" - }, - "OpenAI.WebSearchActionSearchSources": { - "type": "object", - "required": [ - "type", - "url" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "url" - ], - "x-stainless-const": true - }, - "url": { - "type": "string" - } - } - }, - "OpenAI.WebSearchApproximateLocation": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "approximate" - ], - "description": "The type of location approximation. Always `approximate`.", - "x-stainless-const": true, - "default": "approximate" - }, - "country": { - "type": "string", - "nullable": true - }, - "region": { - "type": "string", - "nullable": true - }, - "city": { - "type": "string", - "nullable": true - }, - "timezone": { - "type": "string", - "nullable": true - } - }, - "description": "The approximate location of the user.", - "title": "Web search approximate location" - }, - "OpenAI.WebSearchPreviewTool": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "web_search_preview" - ], - "description": "The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.", - "x-stainless-const": true, - "default": "web_search_preview" - }, - "user_location": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApproximateLocation" - } - ], - "nullable": true - }, - "search_context_size": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.SearchContextSize" - } - ], - "description": "High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).", - "title": "Web search preview" - }, - "OpenAI.WebSearchTool": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "web_search" - ], - "description": "The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.", - "default": "web_search" - }, - "filters": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchToolFilters" - } - ], - "nullable": true - }, - "user_location": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchApproximateLocation" - } - ], - "nullable": true - }, - "search_context_size": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ], - "description": "High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.", - "default": "medium" - }, - "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." - }, - "custom_search_configuration": { - "allOf": [ - { - "$ref": "#/components/schemas/WebSearchConfiguration" - } - ], - "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](/docs/guides/tools-web-search).", - "title": "Web search" - }, - "OpenAI.WebSearchToolFilters": { - "type": "object", - "properties": { - "allowed_domains": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - } - }, - "OpenAI.integer": { - "type": "integer", - "format": "int64" - }, - "OpenAI.numeric": { - "type": "number", - "format": "double" - }, - "OpenApiAnonymousAuthDetails": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "anonymous" - ], - "description": "The object type, which is always 'anonymous'." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenApiAuthDetails" - } - ], - "description": "Security details for OpenApi anonymous authentication" - }, - "OpenApiAuthDetails": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenApiAuthType" - } - ], - "description": "The type of authentication, must be anonymous/project_connection/managed_identity" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "anonymous": "#/components/schemas/OpenApiAnonymousAuthDetails", - "project_connection": "#/components/schemas/OpenApiProjectConnectionAuthDetails", - "managed_identity": "#/components/schemas/OpenApiManagedAuthDetails" - } - }, - "description": "authentication details for OpenApiFunctionDefinition" - }, - "OpenApiAuthType": { - "anyOf": [ - { - "type": "string", - "enum": [ - "anonymous", - "project_connection", - "managed_identity" - ] - }, - { - "type": "string" - } - ], - "description": "Authentication type for OpenApi endpoint. Allowed types are:\n- Anonymous (no authentication required)\n- Project Connection (requires project_connection_id to endpoint, as setup in AI Foundry)\n- Managed_Identity (requires audience for identity based auth)" - }, - "OpenApiFunctionDefinition": { - "type": "object", - "required": [ - "name", - "spec", - "auth" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the function to be called." - }, - "description": { - "type": "string", - "description": "A description of what the function does, used by the model to choose when and how to call the function." - }, - "spec": { - "type": "object", - "additionalProperties": {}, - "description": "The openapi function shape, described as a JSON Schema object." - }, - "auth": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenApiAuthDetails" - } - ], - "description": "Open API authentication details" - }, - "default_params": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of OpenAPI spec parameters that will use user-provided defaults" - }, - "functions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the function to be called." - }, - "description": { - "type": "string", - "description": "A description of what the function does, used by the model to choose when and how to call the function." - }, - "parameters": { - "type": "object", - "additionalProperties": {}, - "description": "The parameters the functions accepts, described as a JSON Schema object." - } - }, - "required": [ - "name", - "parameters" - ] - }, - "description": "List of function definitions used by OpenApi tool", - "readOnly": true - } - }, - "description": "The input definition information for an openapi function." - }, - "OpenApiManagedAuthDetails": { - "type": "object", - "required": [ - "type", - "security_scheme" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "managed_identity" - ], - "description": "The object type, which is always 'managed_identity'." - }, - "security_scheme": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenApiManagedSecurityScheme" - } - ], - "description": "Connection auth security details" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenApiAuthDetails" - } - ], - "description": "Security details for OpenApi managed_identity authentication" - }, - "OpenApiManagedSecurityScheme": { - "type": "object", - "required": [ - "audience" - ], - "properties": { - "audience": { - "type": "string", - "description": "Authentication scope for managed_identity auth type" - } - }, - "description": "Security scheme for OpenApi managed_identity authentication" - }, - "OpenApiProjectConnectionAuthDetails": { - "type": "object", - "required": [ - "type", - "security_scheme" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "project_connection" - ], - "description": "The object type, which is always 'project_connection'." - }, - "security_scheme": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenApiProjectConnectionSecurityScheme" - } - ], - "description": "Project connection auth security details" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenApiAuthDetails" - } - ], - "description": "Security details for OpenApi project connection authentication" - }, - "OpenApiProjectConnectionSecurityScheme": { - "type": "object", - "required": [ - "project_connection_id" - ], - "properties": { - "project_connection_id": { - "type": "string", - "description": "Project connection id for Project Connection auth type" - } - }, - "description": "Security scheme for OpenApi managed_identity authentication" - }, - "OpenApiTool": { - "type": "object", - "required": [ - "type", - "openapi" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openapi" - ], - "description": "The object type, which is always 'openapi'." - }, - "openapi": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenApiFunctionDefinition" - } - ], - "description": "The openapi function definition." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for an OpenAPI tool as used to configure an agent." - }, - "OpenApiToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openapi_call" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the OpenAPI operation being called." - }, - "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": "An OpenAPI tool call." - }, - "OpenApiToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openapi_call_output" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." - }, - "name": { - "type": "string", - "description": "The name of the OpenAPI operation that was called." - }, - "output": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallOutputContent" - } - ], - "description": "The output from the OpenAPI 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 an OpenAPI tool call." - }, - "OptimizationAgentDefinition": { - "type": "object", - "required": [ - "agent_name" - ], - "properties": { - "agent_name": { - "type": "string", - "description": "Registered Foundry agent name. Required — bare-model mode is not supported." - }, - "agent_version": { - "type": "string", - "description": "Pinned agent version. Defaults to latest if omitted." - }, - "model": { - "type": "string", - "description": "Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model." - }, - "system_prompt": { - "type": "string", - "description": "System prompt / instructions override. When set, used as the baseline instructions for the agent." - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationAgentSkill" - }, - "description": "Optional named skills the optimizer may tune. Tool descriptions and parameters." - } - }, - "description": "The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides." - }, - "OptimizationAgentSkill": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "Skill name (matches the tool name on the agent)." - }, - "description": { - "type": "string", - "description": "Free-form description used as the seed when tuning skill descriptions." - } - }, - "description": "A named skill on the agent that the optimizer may tune." - }, - "OptimizationCandidate": { - "type": "object", - "required": [ - "name", - "config", - "mutations", - "rationale", - "avg_score", - "avg_tokens", - "pass_rate", - "task_scores", - "is_pareto_optimal" - ], - "properties": { - "candidate_id": { - "type": "string", - "description": "Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints." - }, - "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", - "additionalProperties": {}, - "description": "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." - }, - "rationale": { - "type": "string", - "description": "Strategy rationale — why this candidate was generated." - }, - "avg_score": { - "type": "number", - "format": "double", - "description": "Average composite score across all tasks." - }, - "avg_tokens": { - "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)." - }, - "sample_avg_score": { - "type": "number", - "format": "double", - "description": "Average score from sampled evaluation (null if full dataset was used)." - }, - "sample_size": { - "type": "integer", - "format": "int32", - "description": "Number of tasks in the sample (null if full dataset was used)." - }, - "evaluation_type": { - "type": "string", - "description": "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." - }, - "strategy": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationStrategy" - } - ], - "description": "Identifies the strategy that produced this candidate." - }, - "eval_id": { - "type": "string", - "description": "Foundry evaluation identifier used to score this candidate." - }, - "eval_run_id": { - "type": "string", - "description": "Foundry evaluation run identifier for this candidate's scoring run." - } - }, - "description": "Aggregated evaluation result for a single candidate agent configuration across all tasks." - }, - "OptimizationJob": { - "type": "object", - "required": [ - "id", - "status", - "created_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" - } - ], - "description": "Current lifecycle status.", - "readOnly": true - }, - "error": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Error" - } - ], - "description": "Error details — populated only on failure.", - "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 - }, - "progress": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationJobProgress" - } - ], - "description": "Progress while in flight. Absent in terminal states.", - "readOnly": true - } - }, - "description": "Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates." - }, - "OptimizationJobInputs": { - "type": "object", - "required": [ - "agent" - ], - "properties": { - "agent": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationAgentDefinition" - } - ], - "description": "The agent (and pinned version) being optimized." - }, - "dataset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetItem" - }, - "description": "Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`." - }, - "train_dataset_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/DatasetRef" - } - ], - "description": "Reference to a registered training dataset. Mutually exclusive with `dataset`." - }, - "validation_dataset_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/DatasetRef" - } - ], - "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']." - }, - "criteria": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationCriterion" - }, - "description": "Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`." - }, - "options": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationOptions" - } - ], - "description": "Tuning knobs and run-mode." - } - }, - "description": "Caller-supplied inputs for an optimization job." - }, - "OptimizationJobProgress": { - "type": "object", - "required": [ - "current_strategy", - "current_iteration", - "tasks_completed", - "tasks_total", - "best_score", - "elapsed_seconds" - ], - "properties": { - "current_strategy": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationStrategy" - } - ], - "description": "Strategy currently being explored." - }, - "current_iteration": { - "type": "integer", - "format": "int32", - "description": "1-based current iteration index." - }, - "tasks_completed": { - "type": "integer", - "format": "int32", - "description": "Tasks evaluated so far this iteration." - }, - "tasks_total": { - "type": "integer", - "format": "int32", - "description": "Total tasks scheduled this iteration." - }, - "best_score": { - "type": "number", - "format": "double", - "description": "Best score observed so far across all candidates." - }, - "elapsed_seconds": { - "type": "number", - "format": "double", - "description": "Wall-clock time elapsed since the job began executing." - } - }, - "description": "In-flight progress; only populated while status is `queued` or `in_progress`." - }, - "OptimizationJobResult": { - "type": "object", - "properties": { - "baseline": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationCandidate" - } - ], - "description": "Evaluation scores for the original (un-optimized) agent configuration." - }, - "best": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationCandidate" - } - ], - "description": "The highest-scoring candidate found during optimization." - }, - "candidates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationCandidate" - }, - "description": "All evaluated candidates including baseline." - }, - "pareto_frontier": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationCandidate" - }, - "description": "Candidates on the Pareto frontier (maximize score, minimize cost)." - }, - "validation_score": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationCandidate" - } - ], - "description": "Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided." - }, - "options": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationOptions" - } - ], - "description": "The options used for this optimization run." - }, - "sample_size": { - "type": "integer", - "format": "int32", - "description": "Number of tasks sampled during optimization iterations (null if sampling was not used)." - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped)." - }, - "all_strategies_failed": { - "type": "boolean", - "description": "True when all optimization strategies failed — only the baseline was evaluated." - } - }, - "description": "Terminal-state result body. Populated when `status` is `succeeded` or `failed`." - }, - "OptimizationMode": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "optimize" - ] - } - ], - "description": "Run mode for an optimization job." - }, - "OptimizationOptions": { - "type": "object", - "properties": { - "strategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationStrategy" - }, - "description": "Strategies to apply this run. Default: ['instruction'].", - "default": [ - "instruction" - ] - }, - "budget": { - "type": "integer", - "format": "int32", - "description": "Total candidate generation budget (number of candidates explored). Default: 10.", - "default": 10 - }, - "max_iterations": { - "type": "integer", - "format": "int32", - "description": "Maximum optimization iterations per strategy. Default: 5.", - "default": 5 - }, - "tasks_per_iteration": { - "type": "integer", - "format": "int32", - "description": "Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed)." - }, - "max_reflection_tasks": { - "type": "integer", - "format": "int32", - "description": "Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.", - "default": 5 - }, - "min_improvement": { - "type": "number", - "format": "double", - "description": "Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.", - "default": 0.005 - }, - "pass_threshold": { - "type": "number", - "format": "double", - "description": "Composite score threshold for a task to be considered passing. Default: 0.5.", - "default": 0.5 - }, - "improvement_threshold": { - "type": "number", - "format": "double", - "description": "Target average score at which optimization stops early (quality ceiling). Default: 0.95.", - "default": 0.95 - }, - "mode": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationMode" - } - ], - "description": "Run mode." - }, - "eval_model": { - "type": "string", - "description": "Foundry deployment name to use as the LLM-as-judge evaluation model. Required." - }, - "reflection_model": { - "type": "string", - "description": "Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset." - }, - "task_timeout_seconds": { - "type": "integer", - "format": "int32", - "description": "Per-task timeout for agent execution. Default: 300 seconds (5 minutes).", - "default": 300 - }, - "keep_versions": { - "type": "boolean", - "description": "If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.", - "default": false - } - }, - "description": "Tuning knobs and run-mode for an optimization job." - }, - "OptimizationStrategy": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "instruction", - "model", - "skill" - ] - } - ], - "description": "Optimization strategy dimension." - }, - "OptimizationTaskResult": { - "type": "object", - "required": [ - "task_name", - "scores", - "composite_score", - "tokens", - "duration_seconds", - "passed" - ], - "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", - "additionalProperties": { - "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": "int32", - "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": "string", - "description": "Error message if the task failed during execution." - }, - "rationales": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Per-evaluator reasoning keyed by evaluator name." - }, - "response": { - "type": "string", - "description": "Raw agent response text." - }, - "run_id": { - "type": "string", - "description": "Identifier of the agent run that produced this result." - } - }, - "description": "Per-task evaluation result for a single candidate." - }, - "OtlpTelemetryEndpoint": { - "type": "object", - "required": [ - "kind", - "endpoint", - "protocol" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "OTLP" - ], - "description": "The endpoint kind, always 'OTLP' for OpenTelemetry Protocol endpoints." - }, - "endpoint": { - "type": "string", - "description": "The OTLP collector endpoint URL.", - "example": "https://my-collector.example.com/otlp" - }, - "protocol": { - "allOf": [ - { - "$ref": "#/components/schemas/TelemetryTransportProtocol" - } - ], - "description": "The transport protocol for the OTLP endpoint.", - "example": "Http" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/TelemetryEndpoint" - } - ], - "description": "An OTLP (OpenTelemetry Protocol) telemetry export endpoint.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "PageOrder": { - "type": "string", - "enum": [ - "asc", - "desc" - ] - }, - "PagedConnection": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Connection" - }, - "description": "The Connection items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of Connection items" - }, - "PagedDatasetVersion": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetVersion" - }, - "description": "The DatasetVersion items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of DatasetVersion items" - }, - "PagedDeployment": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Deployment" - }, - "description": "The Deployment items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of Deployment items" - }, - "PagedEvaluationRule": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationRule" - }, - "description": "The EvaluationRule items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of EvaluationRule items" - }, - "PagedEvaluationSuiteVersion": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationSuiteVersion" - }, - "description": "The EvaluationSuiteVersion items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of EvaluationSuiteVersion items" - }, - "PagedEvaluationTaxonomy": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationTaxonomy" - }, - "description": "The EvaluationTaxonomy items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of EvaluationTaxonomy items" - }, - "PagedEvaluatorVersion": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorVersion" - }, - "description": "The EvaluatorVersion items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of EvaluatorVersion items" - }, - "PagedIndex": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Index" - }, - "description": "The Index items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of Index items" - }, - "PagedInsight": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Insight" - }, - "description": "The Insight items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of Insight items" - }, - "PagedModelVersion": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelVersion" - }, - "description": "The ModelVersion items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of ModelVersion items" - }, - "PagedRedTeam": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RedTeam" - }, - "description": "The RedTeam items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of RedTeam items" - }, - "PagedSchedule": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schedule" - }, - "description": "The Schedule items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of Schedule items" - }, - "PagedScheduleRun": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduleRun" - }, - "description": "The ScheduleRun items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" - } - }, - "description": "Paged collection of ScheduleRun items" - }, - "PatchAgentRequest": { - "type": "object", - "properties": { - "agent_endpoint": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentEndpointConfigUpdate" - } - ], - "description": "The endpoint configuration for the agent" - }, - "agent_card": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentCardUpdate" - } - ], - "description": "Optional agent card for the agent" - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "PendingUploadRequest": { - "type": "object", - "required": [ - "pendingUploadType" - ], - "properties": { - "pendingUploadId": { - "type": "string", - "description": "If PendingUploadId is not provided, a random GUID will be used." - }, - "connectionName": { - "type": "string", - "description": "Azure Storage Account connection name to use for generating temporary SAS token" - }, - "pendingUploadType": { - "type": "string", - "enum": [ - "BlobReference" - ], - "description": "The type of pending upload." - } - }, - "description": "Represents a request for a pending upload." - }, - "PendingUploadResponse": { - "type": "object", - "required": [ - "blobReference", - "pendingUploadId", - "pendingUploadType" - ], - "properties": { - "blobReference": { - "allOf": [ - { - "$ref": "#/components/schemas/BlobReference" - } - ], - "description": "Container-level read, write, list SAS." - }, - "pendingUploadId": { - "type": "string", - "description": "ID for this upload request." - }, - "version": { - "type": "string", - "description": "Version of asset to be created if user did not specify version when initially creating upload" - }, - "pendingUploadType": { - "type": "string", - "enum": [ - "BlobReference" - ], - "description": "The type of pending upload." - } - }, - "description": "Represents the response for a pending upload request" - }, - "PromptAgentDefinition": { - "type": "object", - "required": [ - "kind", - "model" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "prompt" - ] - }, - "model": { - "type": "string", - "description": "The model deployment to use for this agent." - }, - "instructions": { - "type": "string", - "nullable": true, - "description": "A system (or developer) message inserted into the model's context." - }, - "temperature": { - "type": "number", - "format": "float", - "nullable": true, - "minimum": 0, - "maximum": 2, - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.", - "default": 1 - }, - "top_p": { - "type": "number", - "format": "float", - "nullable": true, - "minimum": 0, - "maximum": 1, - "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.", - "default": 1 - }, - "reasoning": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Reasoning" - } - ], - "nullable": true - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter." - }, - "tool_choice": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "How the model should select which tool (or tools) to use when generating a response.\nSee the `tools` parameter to see how to specify which tools the model can call." - }, - "text": { - "allOf": [ - { - "$ref": "#/components/schemas/PromptAgentDefinitionTextOptions" - } - ], - "description": "Configuration options for a text response from the model. Can be plain text or structured JSON data." - }, - "structured_inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/StructuredInputDefinition" - }, - "description": "Set of structured inputs that can participate in prompt template substitution or tool argument bindings." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentDefinition" - } - ], - "description": "The prompt agent definition" - }, - "PromptAgentDefinitionTextOptions": { - "type": "object", - "properties": { - "format": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" - } - }, - "description": "Configuration options for a text response from the model. Can be plain text or structured JSON data." - }, - "PromptBasedEvaluatorDefinition": { - "type": "object", - "required": [ - "type", - "prompt_text" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "prompt" - ] - }, - "prompt_text": { - "type": "string", - "description": "The prompt text used for evaluation" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorDefinition" - } - ], - "description": "Prompt-based evaluator" - }, - "ProtocolVersionRecord": { - "type": "object", - "required": [ - "protocol", - "version" - ], - "properties": { - "protocol": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentProtocol" - } - ], - "description": "The protocol type." - }, - "version": { - "type": "string", - "description": "The version string for the protocol, e.g. 'v0.1.1'." - } - }, - "description": "A record mapping for a single protocol and its version." - }, - "RaiConfig": { - "type": "object", - "required": [ - "rai_policy_name" - ], - "properties": { - "rai_policy_name": { - "type": "string", - "description": "The name of the RAI policy to apply." - } - }, - "description": "Configuration for Responsible AI (RAI) content filtering and safety features." - }, - "RecurrenceSchedule": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/RecurrenceType" - } - ], - "description": "Recurrence type for the recurrence schedule." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "Hourly": "#/components/schemas/HourlyRecurrenceSchedule", - "Daily": "#/components/schemas/DailyRecurrenceSchedule", - "Weekly": "#/components/schemas/WeeklyRecurrenceSchedule", - "Monthly": "#/components/schemas/MonthlyRecurrenceSchedule" - } - }, - "description": "Recurrence schedule model." - }, - "RecurrenceTrigger": { - "type": "object", - "required": [ - "type", - "interval", - "schedule" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Recurrence" - ], - "description": "Type of the trigger." - }, - "startTime": { - "type": "string", - "description": "Start time for the recurrence schedule in ISO 8601 format." - }, - "endTime": { - "type": "string", - "description": "End time for the recurrence schedule in ISO 8601 format." - }, - "timeZone": { - "type": "string", - "description": "Time zone for the recurrence schedule.", - "default": "UTC" - }, - "interval": { - "type": "integer", - "format": "int32", - "description": "Interval for the recurrence schedule." - }, - "schedule": { - "allOf": [ - { - "$ref": "#/components/schemas/RecurrenceSchedule" - } - ], - "description": "Recurrence schedule for the recurrence trigger." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Trigger" - } - ], - "description": "Recurrence based trigger." - }, - "RecurrenceType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "Hourly", - "Daily", - "Weekly", - "Monthly" - ] - } - ], - "description": "Recurrence type." - }, - "RedTeam": { - "type": "object", - "required": [ - "id", - "target" - ], - "properties": { - "id": { - "type": "string", - "description": "Identifier of the red team run.", - "readOnly": true - }, - "displayName": { - "type": "string", - "description": "Name of the red-team run." - }, - "numTurns": { - "type": "integer", - "format": "int32", - "description": "Number of simulation rounds." - }, - "attackStrategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttackStrategy" - }, - "description": "List of attack strategies or nested lists of attack strategies." - }, - "simulationOnly": { - "type": "boolean", - "description": "Simulation-only or Simulation + Evaluation. Default false, if true the scan outputs conversation not evaluation result.", - "default": false - }, - "riskCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RiskCategory" - }, - "description": "List of risk categories to generate attack objectives for." - }, - "applicationScenario": { - "type": "string", - "description": "Application scenario for the red team operation, to generate scenario specific attacks." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Red team's tags. Unlike properties, tags are fully mutable." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Red team's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed." - }, - "status": { - "type": "string", - "description": "Status of the red-team. It is set by service and is read-only.", - "readOnly": true - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/RedTeamTargetConfig" - } - ], - "description": "Target configuration for the red-team run." - } - }, - "description": "Red team details." - }, - "RedTeamEvalRunDataSource": { - "type": "object", - "required": [ - "type", - "item_generation_params", - "target" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_red_team" - ], - "description": "The type of data source. Always `azure_ai_red_team`." - }, - "item_generation_params": { - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ], - "description": "The parameters for item generation." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "The target configuration for the evaluation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a data source for red team evaluation runs." - }, - "RedTeamItemGenerationParams": { - "type": "object", - "required": [ - "type", - "attack_strategies", - "num_turns" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "red_team" - ], - "description": "The type of item generation parameters." - }, - "attack_strategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttackStrategy" - }, - "description": "The collection of attack strategies to be used." - }, - "num_turns": { - "type": "integer", - "format": "int32", - "description": "The number of turns allowed in the game.", - "default": 20 - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ], - "description": "Represents the parameters for red team item generation." - }, - "RedTeamSeedPromptsItemGenerationParams": { - "type": "object", - "required": [ - "type", - "attack_strategies", - "num_turns", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "red_team_seed_prompts" - ], - "description": "The type of item generation parameters, always `red_team_seed_prompts`." - }, - "attack_strategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttackStrategy" - }, - "description": "The collection of attack strategies to be used." - }, - "num_turns": { - "type": "integer", - "format": "int32", - "description": "The number of turns allowed in the game.", - "default": 20 - }, - "source": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - } - ], - "description": "The source of JSONL content to be processed." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ], - "description": "Represents the parameters for red team seed prompts item generation." - }, - "RedTeamTargetConfig": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "Type of the model configuration." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "AzureOpenAIModel": "#/components/schemas/AzureOpenAIModelConfiguration" - } - }, - "description": "Abstract class for target configuration." - }, - "RedTeamTaxonomyItemGenerationParams": { - "type": "object", - "required": [ - "type", - "attack_strategies", - "num_turns", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "red_team_taxonomy" - ], - "description": "The type of item generation parameters, always `red_team_taxonomy`." - }, - "attack_strategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttackStrategy" - }, - "description": "The collection of attack strategies to be used." - }, - "num_turns": { - "type": "integer", - "format": "int32", - "description": "The number of turns allowed in the game.", - "default": 20 - }, - "source": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - } - ], - "description": "The source from which JSONL content is read." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ], - "description": "Represents the parameters for red team taxonomy item generation." - }, - "ResponseRetrievalItemGenerationParams": { - "type": "object", - "required": [ - "type", - "max_num_turns", - "data_mapping", - "source" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "response_retrieval" - ], - "description": "The type of item generation parameters, always `response_retrieval`." - }, - "max_num_turns": { - "type": "integer", - "format": "int32", - "description": "The maximum number of turns of chat history to evaluate." - }, - "data_mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Mapping from source fields to response_id field, required for retrieving chat history." - }, - "source": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - } - ], - "description": "The source from which JSONL content is read." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ], - "description": "Represents the parameters for response retrieval item generation." - }, - "RiskCategory": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "HateUnfairness", - "Violence", - "Sexual", - "SelfHarm", - "ProtectedMaterial", - "CodeVulnerability", - "UngroundedAttributes", - "ProhibitedActions", - "SensitiveDataLeakage", - "TaskAdherence" - ] - } - ], - "description": "Risk category for the attack objective." - }, - "SASCredentials": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "SAS" - ], - "description": "The credential type", - "readOnly": true - }, - "SAS": { - "type": "string", - "description": "SAS token", - "readOnly": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "Shared Access Signature (SAS) credential definition" - }, - "SampleType": { - "anyOf": [ - { - "type": "string", - "enum": [ - "EvaluationResultSample" - ] - }, - { - "type": "string" - } - ], - "description": "The type of sample used in the analysis." - }, - "SasCredential": { - "type": "object", - "required": [ - "sasUri", - "type" - ], - "properties": { - "sasUri": { - "type": "string", - "description": "SAS uri", - "readOnly": true - }, - "type": { - "type": "string", - "enum": [ - "SAS" - ], - "description": "Type of credential", - "readOnly": true - } - }, - "description": "SAS Credential definition" - }, - "Schedule": { - "type": "object", - "required": [ - "id", - "enabled", - "trigger", - "task", - "systemData" - ], - "properties": { - "id": { - "type": "string", - "description": "Identifier of the schedule.", - "readOnly": true - }, - "displayName": { - "type": "string", - "description": "Name of the schedule." - }, - "description": { - "type": "string", - "description": "Description of the schedule." - }, - "enabled": { - "type": "boolean", - "description": "Enabled status of the schedule." - }, - "provisioningStatus": { - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleProvisioningStatus" - } - ], - "description": "Provisioning status of the schedule.", - "readOnly": true - }, - "trigger": { - "allOf": [ - { - "$ref": "#/components/schemas/Trigger" - } - ], - "description": "Trigger for the schedule." - }, - "task": { - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleTask" - } - ], - "description": "Task for the schedule." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Schedule's tags. Unlike properties, tags are fully mutable." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Schedule's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed." - }, - "systemData": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "System metadata for the resource.", - "readOnly": true - } - }, - "description": "Schedule model." - }, - "ScheduleProvisioningStatus": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "Creating", - "Updating", - "Deleting", - "Succeeded", - "Failed" - ] - } - ], - "description": "Schedule provisioning status." - }, - "ScheduleRun": { - "type": "object", - "required": [ - "id", - "scheduleId", - "success", - "properties" - ], - "properties": { - "id": { - "type": "string", - "description": "Identifier of the schedule run.", - "readOnly": true - }, - "scheduleId": { - "type": "string", - "description": "Identifier of the schedule." - }, - "success": { - "type": "boolean", - "description": "Trigger success status of the schedule run.", - "readOnly": true - }, - "triggerTime": { - "type": "string", - "description": "Trigger time of the schedule run." - }, - "error": { - "type": "string", - "description": "Error information for the schedule run.", - "readOnly": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Properties of the schedule run.", - "readOnly": true - } - }, - "description": "Schedule run model." - }, - "ScheduleTask": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleTaskType" - } - ], - "description": "Type of the task." - }, - "configuration": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Configuration for the task." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "Evaluation": "#/components/schemas/EvaluationScheduleTask", - "Insight": "#/components/schemas/InsightScheduleTask" - } - }, - "description": "Schedule task model." - }, - "ScheduleTaskType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "Evaluation", - "Insight" - ] - } - ], - "description": "Type of the task." - }, - "SessionDirectoryEntry": { - "type": "object", - "required": [ - "name", - "size", - "is_directory", - "modified_time" - ], - "properties": { - "name": { - "type": "string", - "maxLength": 255, - "description": "The name of the file or directory." - }, - "size": { - "type": "integer", - "format": "int64", - "description": "The size in bytes (0 for directories)." - }, - "is_directory": { - "type": "boolean", - "description": "Whether this entry is a directory." - }, - "modified_time": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) when the file was last modified." - } - }, - "description": "A single entry in a directory listing." - }, - "SessionDirectoryListResponse": { - "type": "object", - "required": [ - "path", - "entries" - ], - "properties": { - "path": { - "type": "string", - "description": "The path that was listed, relative to the session home directory." - }, - "entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SessionDirectoryEntry" - }, - "description": "The directory entries." - } - }, - "description": "Response from listing a directory in a session sandbox." - }, - "SessionFileWriteResponse": { - "type": "object", - "required": [ - "path", - "bytes_written" - ], - "properties": { - "path": { - "type": "string", - "description": "The path where the file was written, relative to the session home directory." - }, - "bytes_written": { - "type": "integer", - "format": "int64", - "description": "Number of bytes written." - } - }, - "description": "Response from uploading a file to a session sandbox." - }, - "SessionLogEvent": { - "type": "object", - "required": [ - "event", - "data" - ], - "properties": { - "event": { - "allOf": [ - { - "$ref": "#/components/schemas/SessionLogEventType" - } - ], - "description": "The SSE event type. Currently `log`, but additional event types may be added in the future. Clients should ignore unrecognized event types.", - "example": "log" - }, - "data": { - "type": "string", - "description": "The event payload as plain text. Currently JSON-formatted but the schema is not contractual and may change.", - "example": "{\"timestamp\":\"2026-03-10T09:33:17.121467567+00:00\",\"stream\":\"stdout\",\"message\":\"Starting server on port 18080\"}" - } - }, - "description": "A single Server-Sent Event frame emitted by the hosted agent session log stream.\n\nEach frame contains an `event` field identifying the event type and a `data`\nfield carrying the payload as plain text. Although the current `data` payload\nis JSON-formatted, its schema is not contractual — additional keys may appear\nand the format may change over time. Clients should treat `data` as an\nopaque string and optionally attempt JSON parsing.\n\nNew event types may be added in the future. Clients should gracefully\nignore unrecognized event types.\n\nWire format:\n```\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:33:17.121Z\",\"stream\":\"stdout\",\"message\":\"Starting server on port 18080\"}\n\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:34:52.714Z\",\"stream\":\"status\",\"message\":\"Successfully connected to container\"}\n```", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "SessionLogEventType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "log" - ] - } - ], - "description": "Known SSE event types emitted by the hosted agent session log stream.\nAdditional event types may be introduced in future versions.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "SharepointGroundingToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "sharepoint_grounding_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 SharePoint grounding tool call." - }, - "SharepointGroundingToolCallOutput": { - "type": "object", - "required": [ - "type", - "call_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "sharepoint_grounding_preview_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 SharePoint 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 SharePoint grounding tool call." - }, - "SharepointGroundingToolParameters": { - "type": "object", - "properties": { - "project_connections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolProjectConnection" - }, - "maxItems": 1, - "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." - } - }, - "description": "The sharepoint grounding tool parameters." - }, - "SharepointPreviewTool": { - "type": "object", - "required": [ - "type", - "sharepoint_grounding_preview" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "sharepoint_grounding_preview" - ], - "description": "The object type, which is always 'sharepoint_grounding_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." - }, - "sharepoint_grounding_preview": { - "allOf": [ - { - "$ref": "#/components/schemas/SharepointGroundingToolParameters" - } - ], - "description": "The sharepoint grounding tool parameters." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for a sharepoint tool as used to configure an agent." - }, - "SkillObject": { - "type": "object", - "required": [ - "skill_id", - "has_blob", - "name" - ], - "properties": { - "skill_id": { - "type": "string", - "description": "The unique identifier of the skill." - }, - "has_blob": { - "type": "boolean", - "description": "Whether the skill was created from a zip blob package." - }, - "name": { - "type": "string", - "maxLength": 63, - "description": "The unique name of the skill." - }, - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - } - }, - "description": "A skill object." - }, - "Sku": { - "type": "object", - "required": [ - "capacity", - "family", - "name", - "size", - "tier" - ], - "properties": { - "capacity": { - "type": "integer", - "format": "int64", - "description": "Sku capacity" - }, - "family": { - "type": "string", - "description": "Sku family" - }, - "name": { - "type": "string", - "description": "Sku name" - }, - "size": { - "type": "string", - "description": "Sku size" - }, - "tier": { - "type": "string", - "description": "Sku tier" - } - }, - "description": "Sku information" - }, - "StructuredInputDefinition": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "A human-readable description of the input." - }, - "default_value": { - "description": "The default value for the input if no run-time value is provided." - }, - "schema": { - "type": "object", - "additionalProperties": {}, - "description": "The JSON schema for the structured input (optional)." - }, - "required": { - "type": "boolean", - "description": "Whether the input property is required when the agent is invoked.", - "default": false - } - }, - "description": "An structured input that can participate in prompt template substitutions and tool argument binding." - }, - "StructuredOutputDefinition": { - "type": "object", - "required": [ - "name", - "description", - "schema", - "strict" - ], - "properties": { - "name": { - "type": "string", - "description": "The name of the structured output." - }, - "description": { - "type": "string", - "description": "A description of the output to emit. Used by the model to determine when to emit the output." - }, - "schema": { - "type": "object", - "additionalProperties": {}, - "description": "The JSON schema for the structured output." - }, - "strict": { - "type": "boolean", - "nullable": true, - "description": "Whether to enforce strict validation. Default `true`." - } - }, - "description": "A structured output that can be produced by the agent." - }, - "StructuredOutputsOutputItem": { - "type": "object", - "required": [ - "type", - "output" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "structured_outputs" - ] - }, - "output": { - "description": "The structured output captured during the response." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ] - }, - "SyntheticDataGenerationPreviewEvalRunDataSource": { - "type": "object", - "required": [ - "type", - "item_generation_params", - "target" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_synthetic_data_gen_preview" - ], - "description": "The type of data source, always `azure_ai_synthetic_data_gen_preview`." - }, - "item_generation_params": { - "allOf": [ - { - "$ref": "#/components/schemas/SyntheticDataGenerationPreviewItemGenerationParams" - } - ], - "description": "The parameters for item generation." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "The target configuration for the evaluation." - }, - "input_messages": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - } - ], - "description": "Input messages template configuration applicable only if target is of type 'azure_ai_model'" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a data source for evaluation runs that evaluates based on generated synthetic data for testing purposes." - }, - "SyntheticDataGenerationPreviewItemGenerationParams": { - "type": "object", - "required": [ - "type", - "samples_count", - "model_deployment_name", - "sources" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "synthetic_data_gen_preview" - ], - "description": "The type of item generation parameters." - }, - "samples_count": { - "type": "integer", - "format": "int32", - "description": "The maximum number of data samples to generate." - }, - "prompt": { - "type": "string", - "description": "The prompt used for generating synthetic data. This is option if target is of type 'azure_ai_agent' with instructions configured in agent." - }, - "model_deployment_name": { - "type": "string", - "description": "The name of the model deployment to use for generating synthetic data." - }, - "output_dataset_name": { - "type": "string", - "description": "The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically." - }, - "output_dataset_id": { - "type": "string", - "description": "The identifier of the output dataset where generated synthetic data is stored. The generated data is a jsonl file with columns id, query and test_description.", - "readOnly": true - }, - "sources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - }, - "description": "The optional seed data content source files for data generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ], - "description": "Represents the parameters for synthetic data generation item generation." - }, - "SystemDataV3": { - "type": "object", - "properties": { - "createdAt": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp of resource creation" - }, - "createdBy": { - "type": "string", - "description": "Identity that created the resource" - }, - "createdByType": { - "type": "string", - "description": "Type of identity that created the resource" - }, - "lastModifiedAt": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp of last resource modification" - } - }, - "description": "System metadata for a resource" - }, - "Target": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The type of target." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "azure_ai_model": "#/components/schemas/AzureAIModelTarget", - "azure_ai_agent": "#/components/schemas/AzureAIAgentTarget" - } - }, - "description": "Base class for targets with discriminator support." - }, - "TargetCompletionEvalRunDataSource": { - "type": "object", - "required": [ - "type", - "source", - "target" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_target_completions" - ], - "description": "The type of data source, always `azure_ai_target_completions`." - }, - "input_messages": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" - } - ], - "description": "Input messages configuration." - }, - "source": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - } - ], - "description": "The source configuration for inline or file data." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "The target configuration for the evaluation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a data source for target-based completion evaluation configuration." - }, - "TargetUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The type of target." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "azure_ai_model": "#/components/schemas/AzureAIModelTargetUpdate", - "azure_ai_agent": "#/components/schemas/AzureAIAgentTargetUpdate" - } - }, - "description": "Base class for targets with discriminator support." - }, - "TaxonomyCategory": { - "type": "object", - "required": [ - "id", - "name", - "riskCategory", - "subCategories" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the taxonomy category." - }, - "name": { - "type": "string", - "description": "Name of the taxonomy category." - }, - "description": { - "type": "string", - "description": "Description of the taxonomy category." - }, - "riskCategory": { - "allOf": [ - { - "$ref": "#/components/schemas/RiskCategory" - } - ], - "description": "Risk category associated with this taxonomy category." - }, - "subCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxonomySubCategory" - }, - "description": "List of taxonomy sub categories." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the taxonomy category." - } - }, - "description": "Taxonomy category definition." - }, - "TaxonomySubCategory": { - "type": "object", - "required": [ - "id", - "name", - "enabled" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the taxonomy sub-category." - }, - "name": { - "type": "string", - "description": "Name of the taxonomy sub-category." - }, - "description": { - "type": "string", - "description": "Description of the taxonomy sub-category." - }, - "enabled": { - "type": "boolean", - "description": "List of taxonomy items under this sub-category." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the taxonomy sub-category." - } - }, - "description": "Taxonomy sub-category definition." - }, - "TelemetryConfig": { - "type": "object", - "required": [ - "endpoints" - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TelemetryEndpoint" - }, - "minItems": 1, - "maxItems": 3, - "description": "Customer-supplied telemetry export endpoint configurations." - } - }, - "description": "Customer-supplied telemetry configuration for exporting container logs, traces, and metrics.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "TelemetryDataKind": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "ContainerStdoutStderr", - "ContainerOtel", - "Metrics" - ] - } - ], - "description": "The type of telemetry data to export.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "TelemetryEndpoint": { - "type": "object", - "required": [ - "kind", - "data" - ], - "properties": { - "kind": { - "allOf": [ - { - "$ref": "#/components/schemas/TelemetryEndpointKind" - } - ], - "description": "The telemetry export endpoint kind." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TelemetryDataKind" - }, - "description": "Data types to export to this endpoint. Use an empty array to export no data.", - "example": [ - "ContainerStdoutStderr", - "ContainerOtel", - "Metrics" - ] - }, - "auth": { - "allOf": [ - { - "$ref": "#/components/schemas/TelemetryEndpointAuth" - } - ], - "description": "Optional authentication configuration." - } - }, - "discriminator": { - "propertyName": "kind", - "mapping": { - "OTLP": "#/components/schemas/OtlpTelemetryEndpoint" - } - }, - "description": "A telemetry export endpoint configuration.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "TelemetryEndpointAuth": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/TelemetryEndpointAuthType" - } - ], - "description": "The authentication type." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "header": "#/components/schemas/HeaderTelemetryEndpointAuth" - } - }, - "description": "Authentication configuration for a telemetry endpoint.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "TelemetryEndpointAuthType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "header" - ] - } - ], - "description": "The type of authentication for a telemetry endpoint.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "TelemetryEndpointKind": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "OTLP" - ] - } - ], - "description": "The kind of telemetry export endpoint.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "TelemetryTransportProtocol": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "Http", - "Grpc" - ] - } - ], - "description": "The transport protocol for telemetry export.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } - }, - "TestingCriterionAzureAIEvaluator": { - "type": "object", - "required": [ - "type", - "name", - "evaluator_name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_evaluator" - ], - "description": "The object type, which is always `azure_ai_evaluator`." - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "evaluator_name": { - "type": "string", - "description": "The name of the evaluator." - }, - "evaluator_version": { - "type": "string", - "description": "The version of the evaluator. Latest version if not specified." - }, - "initialization_parameters": { - "type": "object", - "description": "The initialization parameters for the evaluation. Must support structured outputs." - }, - "data_mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "The model to use for the evaluation. Must support structured outputs." - } - }, - "description": "An Azure AI Evaluator grader used as testing criterion in evaluations.", - "title": "AzureAIEvaluatorGrader" - }, - "ToolCallOutputContent": { - "anyOf": [ - { - "type": "object", - "additionalProperties": {} - }, - { - "type": "string" - }, - { - "type": "array", - "items": {} - } - ], - "description": "The output content from a tool call, which can be a dictionary, string, or array." - }, - "ToolCallStatus": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "failed" - ], - "description": "The status of a tool call." - }, - "ToolDescription": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the tool." - }, - "description": { - "type": "string", - "description": "A brief description of the tool's purpose." - } - }, - "description": "Description of a tool that can be used by an agent." - }, - "ToolProjectConnection": { - "type": "object", - "required": [ - "project_connection_id" - ], - "properties": { - "project_connection_id": { - "type": "string", - "description": "A project connection in a ToolProjectConnectionList attached to this tool." - } - }, - "description": "A project connection resource." - }, - "ToolboxObject": { - "type": "object", - "required": [ - "id", - "name", - "default_version" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the toolbox." - }, - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the toolbox." - }, - "default_version": { - "type": "string", - "description": "The version identifier that the toolbox currently points to. Defaults to the latest version. Can be changed via updateToolbox." - } - }, - "description": "A toolbox that stores reusable tool definitions for agents." - }, - "ToolboxPolicies": { - "type": "object", - "properties": { - "rai_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RaiConfig" - } - ], - "description": "Responsible AI content filtering configuration." - } - }, - "description": "Policy configuration for a toolbox, including content safety and other governance settings." - }, - "ToolboxSearchPreviewTool": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "toolbox_search_preview" - ], - "description": "The type of the tool. Always `toolbox_search_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." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool for searching over the agent's toolbox.\nWhen present, deferred tools are hidden from `tools/list` and only\ndiscoverable via `search_tools` queries at runtime." - }, - "ToolboxVersionObject": { - "type": "object", - "required": [ - "metadata", - "id", - "name", - "version", - "created_at", - "tools" - ], - "properties": { - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "id": { - "type": "string", - "description": "The unique identifier of the toolbox version." - }, - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the toolbox." - }, - "version": { - "type": "string", - "description": "The version identifier of the toolbox. Toolbox versions are immutable and every update creates a new version." - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolbox." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (seconds) when the toolbox version was created." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools contained in this toolbox version." - }, - "policies": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolboxPolicies" - } - ], - "description": "Policy configuration for the toolbox version." - } - }, - "description": "A specific version of a toolbox." - }, - "TraceIdTraceSource": { - "type": "object", - "required": [ - "type", - "trace_ids" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "trace_id_source" - ], - "description": "The type of trace source, always `trace_id_source`." - }, - "trace_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Collection of trace identifiers to evaluate." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/TraceSource" - } - ], - "description": "A trace source that selects traces by explicit trace IDs." - }, - "TraceSource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/TraceSourceType" - } - ], - "description": "The discriminator that identifies which kind of trace source this is." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "trace_id_source": "#/components/schemas/TraceIdTraceSource", - "conversation_id_source": "#/components/schemas/ConversationIdTraceSource", - "agent_filter": "#/components/schemas/AgentFilterTraceSource", - "agent_smart_filter": "#/components/schemas/AgentSmartFilterTraceSource" - } - }, - "description": "Base class for polymorphic trace sources nested within an AzureAITraceDataSourcePreviewEvalRunDataSource." - }, - "TraceSourceType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "trace_id_source", - "conversation_id_source", - "agent_filter", - "agent_smart_filter" - ] - } - ], - "description": "Specifies the type of trace source used to select traces for evaluation." - }, - "TracesPreviewEvalRunDataSource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_traces_preview" - ], - "description": "The type of data source, always `azure_ai_traces_preview`." - }, - "trace_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Collection of Agent trace identifiers that should be evaluated." - }, - "conversation_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Collection of conversation identifiers to filter traces by conversation." - }, - "agent_id": { - "type": "string", - "description": "The agent ID used to filter traces for evaluation." - }, - "agent_name": { - "type": "string", - "description": "The agent name used to filter traces for evaluation." - }, - "lookback_hours": { - "type": "integer", - "format": "int32", - "description": "Lookback window (in hours) applied when retrieving traces from Application Insights.\n For scheduled evaluations this is inferred from the recurrence interval.", - "default": 168 - }, - "end_time": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Unix timestamp (in seconds) marking the end of the trace query window. Defaults to the current time." - }, - "max_traces": { - "type": "integer", - "format": "int32", - "description": "Sampling limit applied to traces retrieved for evaluation.", - "default": 1000 - }, - "ingestion_delay_seconds": { - "type": "integer", - "format": "int32", - "description": "The delay to apply for ingestion when querying traces.", - "default": 300 - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a data source for evaluation runs that operate over Agent traces stored in Application Insights." - }, - "TreatmentEffectType": { - "anyOf": [ - { - "type": "string", - "enum": [ - "TooFewSamples", - "Inconclusive", - "Changed", - "Improved", - "Degraded" - ] - }, - { - "type": "string" - } - ], - "description": "Treatment Effect Type." - }, - "Trigger": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/TriggerType" - } - ], - "description": "Type of the trigger." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "Cron": "#/components/schemas/CronTrigger", - "Recurrence": "#/components/schemas/RecurrenceTrigger", - "OneTime": "#/components/schemas/OneTimeTrigger" - } - }, - "description": "Base model for Trigger of the schedule." - }, - "TriggerType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "Cron", - "Recurrence", - "OneTime" - ] - } - ], - "description": "Type of the trigger." - }, - "UpdateAgentFromManifestRequest": { - "type": "object", - "required": [ - "manifest_id", - "parameter_values" - ], - "properties": { - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "manifest_id": { - "type": "string", - "description": "The manifest ID to import the agent version from." - }, - "parameter_values": { - "type": "object", - "additionalProperties": {}, - "description": "The inputs to the manifest that will result in a fully materialized Agent." - } - } - }, - "UpdateAgentRequest": { - "type": "object", - "required": [ - "definition" - ], - "properties": { - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "definition": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentDefinition" - } - ], - "description": "The agent definition. This can be a workflow, hosted agent, or a simple agent definition.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview", - "CodeAgents=V1Preview", - "ExternalAgents=V1Preview" - ] - } - }, - "blueprint_reference": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentBlueprintReference" - } - ], - "description": "The blueprint reference for the agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - } - } - }, - "UpdateEvalParametersBody": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." - } - } - }, - "UpdateModelVersionRequest": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "The asset description text." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." - } - }, - "description": "Request body for updating a model version. Only description and tags can be modified." - }, - "UpdateToolboxRequest": { - "type": "object", - "required": [ - "default_version" - ], - "properties": { - "default_version": { - "type": "string", - "description": "The version identifier that the toolbox should point to. When set, the toolbox's default version will resolve to this version instead of the latest." - } - } - }, - "UserProfileMemoryItem": { - "type": "object", - "required": [ - "kind" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "user_profile" - ], - "description": "The kind of the memory item." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/MemoryItem" - } - ], - "description": "A memory item specifically containing user profile information extracted from conversations, such as preferences, interests, and personal details.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "VersionIndicator": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/VersionIndicatorType" - } - ], - "description": "The type of version indicator." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "version_ref": "#/components/schemas/VersionRefIndicator" - } - }, - "description": "Version indicator determining which agent version backs the session.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "VersionIndicatorType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "version_ref" - ] - } - ], - "description": "The type of version indicator used to determine the agent version backing a session.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "VersionRefIndicator": { - "type": "object", - "required": [ - "type", - "agent_version" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "version_ref" - ], - "description": "Discriminator value for version_ref." - }, - "agent_version": { - "type": "string", - "description": "The agent version identifier returned by the agent version APIs." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/VersionIndicator" - } - ], - "description": "Version indicator that references a specific agent version by name.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "VersionSelectionRule": { - "type": "object", - "required": [ - "type", - "agent_version" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/VersionSelectorType" - }, - "agent_version": { - "type": "string", - "description": "The agent version to route traffic to" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "FixedRatio": "#/components/schemas/FixedRatioVersionSelectionRule" - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "VersionSelector": { - "type": "object", - "required": [ - "version_selection_rules" - ], - "properties": { - "version_selection_rules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionSelectionRule" - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "VersionSelectorType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "FixedRatio" - ] - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "VersionSelectorUpdate": { - "type": "object", - "properties": { - "version_selection_rules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionSelectionRule" - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "WebSearchConfiguration": { - "type": "object", - "required": [ - "project_connection_id", - "instance_name" - ], - "properties": { - "project_connection_id": { - "type": "string", - "description": "Project connection id for grounding with bing custom search" - }, - "instance_name": { - "type": "string", - "description": "Name of the custom configuration instance given to config." - } - }, - "description": "A web search configuration for bing custom search" - }, - "WeeklyRecurrenceSchedule": { - "type": "object", - "required": [ - "type", - "daysOfWeek" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Weekly" - ], - "description": "Weekly recurrence type." - }, - "daysOfWeek": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DayOfWeek" - }, - "description": "Days of the week for the recurrence schedule." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/RecurrenceSchedule" - } - ], - "description": "Weekly recurrence schedule." - }, - "WorkIQPreviewTool": { - "type": "object", - "required": [ - "type", - "project_connection_id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "work_iq_preview" - ], - "description": "The object type, which is always 'work_iq_preview'." - }, - "project_connection_id": { - "type": "string", - "description": "The ID of the WorkIQ project connection." - }, - "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." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A WorkIQ server-side tool." - }, - "WorkflowActionOutputItem": { - "type": "object", - "required": [ - "type", - "kind", - "action_id", - "status" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "workflow_action" - ] - }, - "kind": { - "type": "string", - "description": "The kind of CSDL action (e.g., 'SetVariable', 'InvokeAzureAgent')." - }, - "action_id": { - "type": "string", - "description": "Unique identifier for the action." - }, - "parent_action_id": { - "type": "string", - "description": "ID of the parent action if this is a nested action." - }, - "previous_action_id": { - "type": "string", - "description": "ID of the previous action if this action follows another." - }, - "status": { - "type": "string", - "enum": [ - "completed", - "failed", - "in_progress", - "cancelled" - ], - "description": "Status of the action (e.g., 'in_progress', 'completed', 'failed', 'cancelled')." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ] - }, - "WorkflowAgentDefinition": { - "type": "object", - "required": [ - "kind" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "workflow" - ] - }, - "workflow": { - "type": "string", - "description": "The CSDL YAML definition of the workflow." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentDefinition" - } - ], - "description": "The workflow agent definition.", - "x-ms-foundry-meta": { - "required_previews": [ - "WorkflowAgents=V1Preview" - ] - } - }, - "integer": { - "type": "integer", - "format": "int64" - } - }, - "securitySchemes": { - "OAuth2Auth": { - "type": "oauth2", - "flows": { - "implicit": { - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", - "scopes": { - "https://ai.azure.com/.default": "" - } - } - } - } - } - }, - "servers": [ - { - "url": "{endpoint}", - "description": "Microsoft Foundry", - "variables": { - "endpoint": { - "default": "", - "description": "Foundry Project endpoint in the form\n\"https://{ai-services-account-name}.services.ai.azure.com/api/projects/{project-name}\".\nIf you only have one Project in your Foundry Hub, or to target the default Project\nin your Hub, use the form\n\"https://{ai-services-account-name}.services.ai.azure.com/api/projects/_project\"" - } - } - } - ] -} 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 04be9b9492f3..ba5175244008 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 @@ -175,11 +175,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OptimizationJob" + "$ref": "#/components/schemas/OptimizationJobInputs" } } }, - "description": "The job to create." + "description": "The optimization job inputs." }, "x-ms-foundry-meta": { "conditional_previews": [ @@ -190,7 +190,7 @@ "get": { "operationId": "AgentOptimizationJobs_list", "summary": "Returns a list of agent optimization jobs.", - "description": "List optimization jobs. Supports cursor pagination and optional `status` / `agent_name` filters.", + "description": "List optimization jobs. Supports cursor pagination and optional status / agentName filters.", "parameters": [ { "name": "Foundry-Features", @@ -257,7 +257,7 @@ "explode": false }, { - "name": "agent_name", + "name": "agentName", "in": "query", "required": false, "description": "Filter to jobs targeting this agent name.", @@ -339,7 +339,7 @@ "get": { "operationId": "AgentOptimizationJobs_get", "summary": "Get info about an agent optimization job.", - "description": "Get an optimization job by id. Emits `Retry-After` while the job is non-terminal.", + "description": "Get an optimization job by id. Returns 202 while in progress, 200 when terminal.", "parameters": [ { "name": "Foundry-Features", @@ -379,7 +379,25 @@ "headers": { "Retry-After": { "required": false, - "description": "Recommended number of seconds to wait before polling again.", + "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, "schema": { "type": "integer", "format": "int32" @@ -440,6 +458,16 @@ "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", @@ -618,7 +646,7 @@ "get": { "operationId": "AgentOptimizationJobs_getCandidate", "summary": "Get a candidate by id.", - "description": "Get a single candidate manifest and aggregated evaluation summary.", + "description": "Get a single candidate's metadata, manifest, and promotion info.", "parameters": [ { "name": "Foundry-Features", @@ -667,7 +695,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OptimizationCandidate" + "$ref": "#/components/schemas/CandidateMetadata" } } } @@ -772,6 +800,96 @@ } } }, + "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/files": { + "get": { + "operationId": "AgentOptimizationJobs_getCandidateFile", + "summary": "Get a candidate file.", + "description": "Stream a specific 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": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "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", @@ -851,6 +969,96 @@ } } }, + "/agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote": { + "post": { + "operationId": "AgentOptimizationJobs_promoteCandidate", + "summary": "Promote a candidate.", + "description": "Promotes a candidate, recording 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" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "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", @@ -1419,7 +1627,7 @@ "name": "force", "in": "query", "required": false, - "description": "For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false.", + "description": "For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types.", "schema": { "type": "boolean", "default": false @@ -2034,6 +2242,15 @@ "type": "string" } }, + { + "name": "x-ms-user-isolation-key", + "in": "header", + "required": false, + "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", + "schema": { + "type": "string" + } + }, { "name": "api-version", "in": "query", @@ -2111,6 +2328,15 @@ "type": "string" } }, + { + "name": "x-ms-user-isolation-key", + "in": "header", + "required": false, + "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", + "schema": { + "type": "string" + } + }, { "name": "limit", "in": "query", @@ -2657,6 +2883,15 @@ "type": "string" } }, + { + "name": "x-ms-user-isolation-key", + "in": "header", + "required": false, + "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", + "schema": { + "type": "string" + } + }, { "name": "api-version", "in": "query", @@ -2702,6 +2937,86 @@ "delete": { "operationId": "Agents_deleteSession", "description": "Deletes a session synchronously.\nReturns 204 No Content when the session is deleted or does not exist.", + "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": [ + "AgentEndpoints=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "description": "The session identifier.", + "schema": { + "type": "string" + } + }, + { + "name": "x-ms-user-isolation-key", + "in": "header", + "required": false, + "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", + "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": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/endpoint/sessions/{session_id}:stop": { + "post": { + "operationId": "Agents_stopSession", + "description": "Stops a session.\nReturns 204 No Content when the stop succeeds.", "parameters": [ { "name": "Foundry-Features", @@ -3346,7 +3661,7 @@ "name": "force", "in": "query", "required": false, - "description": "For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false.", + "description": "For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types.", "schema": { "type": "boolean", "default": false @@ -4583,29 +4898,6 @@ }, "explode": false }, - { - "name": "scenario", - "in": "query", - "required": false, - "description": "Filter data generation jobs by their scenario.", - "schema": { - "$ref": "#/components/schemas/DataGenerationJobScenario" - }, - "explode": false - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter data generation jobs by their type.", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataGenerationJobType" - } - }, - "explode": false - }, { "name": "api-version", "in": "query", @@ -15615,102 +15907,6 @@ } }, "/skills": { - "post": { - "operationId": "Skills_createSkill", - "description": "Creates a skill.", - "parameters": [ - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SkillObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 63, - "description": "The unique name of the skill." - }, - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill." - }, - "instructions": { - "type": "string", - "maxLength": 102400, - "description": "Instructions that define the behavior of the skill." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" - } - }, - "required": [ - "name" - ] - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] - } - }, "get": { "operationId": "Skills_listSkills", "description": "Returns the list of all skills.", @@ -15795,7 +15991,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/Skill" }, "description": "The requested list of items." }, @@ -15849,7 +16045,7 @@ "required": true, "description": "The unique name of the skill.", "schema": { - "type": "string" + "$ref": "#/components/schemas/SkillName" } }, { @@ -15881,7 +16077,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/Skill" } } } @@ -15907,16 +16103,16 @@ } }, "post": { - "operationId": "Skills_updateSkill", - "description": "Updates an existing skill.", + "operationId": "updateSkill", + "description": "Update a skill.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The name of the skill to update.", "schema": { - "type": "string" + "$ref": "#/components/schemas/SkillName" } }, { @@ -15948,7 +16144,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/Skill" } } } @@ -15974,25 +16170,14 @@ "schema": { "type": "object", "properties": { - "description": { + "default_version": { "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill." - }, - "instructions": { - "type": "string", - "maxLength": 102400, - "description": "Instructions that define the behavior of the skill." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" + "description": "The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest." } - } + }, + "required": [ + "default_version" + ] } } } @@ -16013,7 +16198,7 @@ "required": true, "description": "The unique name of the skill.", "schema": { - "type": "string" + "$ref": "#/components/schemas/SkillName" } }, { @@ -16071,18 +16256,18 @@ } } }, - "/skills/{name}:download": { + "/skills/{name}/content": { "get": { - "operationId": "Skills_downloadSkill", - "description": "Downloads a skill package.", + "operationId": "getSkillContent", + "description": "Download the zip content for the default version of a skill.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The name of the skill.", "schema": { - "type": "string" + "$ref": "#/components/schemas/SkillName" } }, { @@ -16141,11 +16326,270 @@ } } }, - "/skills:import": { - "post": { - "operationId": "Skills_createSkillFromPackage", - "description": "Creates a skill from a zip package.", + "/skills/{name}/versions": { + "post": { + "operationId": "createSkillVersion_createSkillVersionFromFiles", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the skill. If the skill does not exist, it will be created.", + "schema": { + "$ref": "#/components/schemas/SkillName" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "description": "Creates a new version of a skill. If the skill does not exist, it will be created. Creates a new version of a skill from uploaded files via multipart form data.", + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] + }, + "tags": [ + "Skills" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "inline_content": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillInlineContent" + } + ], + "description": "Inline skill content for simple skills without file uploads. Foundry-specific extension." + }, + "default": { + "type": "boolean", + "description": "Whether to set this version as the default." + } + } + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateSkillVersionFromFilesBody" + }, + "encoding": { + "files": { + "contentType": "*/*" + }, + "default": { + "contentType": "text/plain" + } + } + } + } + } + }, + "get": { + "operationId": "listSkillVersions", + "description": "List all versions of a skill.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the skill to list versions for.", + "schema": { + "$ref": "#/components/schemas/SkillName" + } + }, + { + "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": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "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/SkillVersion" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] + } + } + }, + "/skills/{name}/versions/{version}": { + "get": { + "operationId": "getSkillVersion", + "description": "Retrieve a specific version of a skill.", "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the skill.", + "schema": { + "$ref": "#/components/schemas/SkillName" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version identifier to retrieve.", + "schema": { + "type": "string" + } + }, { "name": "Foundry-Features", "in": "header", @@ -16170,12 +16614,12 @@ } ], "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + "200": { + "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/SkillVersion" } } } @@ -16194,18 +16638,161 @@ "tags": [ "Skills" ], - "requestBody": { - "required": true, - "content": { - "application/zip": { - "schema": { - "type": "string", - "format": "binary" + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] + } + }, + "delete": { + "operationId": "deleteSkillVersion", + "description": "Delete a specific version of a skill.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the skill.", + "schema": { + "$ref": "#/components/schemas/SkillName" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version identifier to delete.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "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/DeleteSkillVersionResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] + } + } + }, + "/skills/{name}/versions/{version}/content": { + "get": { + "operationId": "getSkillVersionContent", + "description": "Download the zip content for a specific version of a skill.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the skill.", + "schema": { + "$ref": "#/components/schemas/SkillName" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version to download content for.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "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 response body for downloading a skill package.", + "content": { + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } } } }, - "description": "The zip package used to create the skill." + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } }, + "tags": [ + "Skills" + ], "x-ms-foundry-meta": { "required_previews": [ "Skills=V1Preview" @@ -16550,6 +17137,13 @@ }, "description": "The list of tools to include in this version." }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolboxSkill" + }, + "description": "The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used." + }, "policies": { "allOf": [ { @@ -18054,6 +18648,23 @@ } } }, + "AgentIdentifier": { + "type": "object", + "required": [ + "agentName" + ], + "properties": { + "agentName": { + "type": "string", + "description": "Registered Foundry agent name (required)." + }, + "agentVersion": { + "type": "string", + "description": "Pinned agent version. Defaults to latest if omitted." + } + }, + "description": "Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig." + }, "AgentIdentity": { "type": "object", "required": [ @@ -18210,7 +18821,8 @@ "activity_protocol", "responses", "mcp", - "invocations" + "invocations", + "invocations_ws" ] } ] @@ -18309,6 +18921,7 @@ "idle", "updating", "failed", + "stopping", "deleting", "deleted", "expired" @@ -20599,21 +21212,126 @@ "skills": { "type": "array", "items": { - "$ref": "#/components/schemas/OptimizationAgentSkill" + "type": "object", + "additionalProperties": {} }, "description": "Optional skill overrides." + }, + "tools": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "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", + "sizeBytes" + ], + "properties": { + "path": { + "type": "string", + "description": "Relative path of the file." + }, + "type": { + "type": "string", + "description": "File type category (e.g. 'config', 'results')." + }, + "sizeBytes": { + "type": "integer", + "format": "int64", + "description": "File size in bytes." + } + }, + "description": "File entry in a candidate's blob directory." + }, + "CandidateMetadata": { + "type": "object", + "required": [ + "candidateId", + "jobId", + "candidateName", + "status", + "hasResults", + "createdAt", + "updatedAt", + "files" + ], + "properties": { + "candidateId": { + "type": "string", + "description": "Server-assigned candidate identifier." + }, + "jobId": { + "type": "string", + "description": "Owning optimization job id." + }, + "candidateName": { + "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." + }, + "hasResults": { + "type": "boolean", + "description": "Whether detailed results are available for this candidate." + }, + "createdAt": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp when the candidate was created, represented in Unix time." + }, + "updatedAt": { + "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", + "candidateId", "results" ], "properties": { - "candidate_id": { + "candidateId": { "type": "string", "description": "Owning candidate id." }, @@ -21818,6 +22536,26 @@ ] } }, + "CreateSkillVersionFromFilesBody": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "string", + "format": "binary" + }, + "description": "Skill files to upload. Upload a single zip file or multiple individual files with relative paths." + }, + "default": { + "type": "boolean", + "description": "Whether to set this version as the default. Defaults to false." + } + }, + "required": [ + "files" + ] + }, "CreatedBy": { "type": "object", "properties": { @@ -21873,7 +22611,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the cron schedule.", + "description": "Time zone for the cron schedule. Defaults to `UTC`.", "default": "UTC" }, "startTime": { @@ -22239,7 +22977,6 @@ "prompt": "#/components/schemas/PromptDataGenerationJobSource", "agent": "#/components/schemas/AgentDataGenerationJobSource", "traces": "#/components/schemas/TracesDataGenerationJobSource", - "dataset": "#/components/schemas/DatasetDataGenerationJobSource", "file": "#/components/schemas/FileDataGenerationJobSource" } }, @@ -22256,7 +22993,6 @@ "prompt", "agent", "traces", - "dataset", "file" ] } @@ -22393,40 +23129,6 @@ ], "description": "Dataset output for a data generation job." }, - "DatasetDataGenerationJobSource": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "description": { - "type": "string", - "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." - }, - "type": { - "type": "string", - "enum": [ - "dataset" - ], - "description": "The source type for this source, which is Dataset." - }, - "name": { - "type": "string", - "description": "The name of the dataset." - }, - "version": { - "type": "string", - "description": "The version of the dataset. If not specified, the latest version is used." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/DataGenerationJobSource" - } - ], - "description": "Dataset source for data generation jobs — reference to a dataset." - }, "DatasetEvaluationSuiteJobSource": { "type": "object", "required": [ @@ -22495,48 +23197,32 @@ ], "description": "Dataset source for evaluator generation jobs — reference to a dataset." }, - "DatasetItem": { + "DatasetInfo": { "type": "object", "required": [ - "name", - "query" + "taskCount", + "isInline" ], "properties": { "name": { "type": "string", - "description": "Unique-within-the-dataset identifier for this task." + "description": "Dataset name when using a registered dataset reference. Null for inline datasets." }, - "query": { - "type": "string", - "description": "The user query / input for the task." - }, - "ground_truth": { + "version": { "type": "string", - "description": "Optional ground truth used by reference-based evaluators." - }, - "criteria": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationCriterion" - }, - "description": "Per-task evaluation criteria. Defaults to the job-level evaluators if unset." + "description": "Dataset version when using a registered dataset reference. Null for inline datasets." }, - "eval_results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemResult" - }, - "description": "Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped." + "taskCount": { + "type": "integer", + "format": "int32", + "description": "Number of tasks/rows in the dataset." }, - "response_items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.OutputItem" - }, - "description": "Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run." + "isInline": { + "type": "boolean", + "description": "True when the dataset was provided inline in the request body." } }, - "description": "A single evaluation task with input query, expected output, and evaluation criteria." + "description": "Metadata about the dataset used for optimization, surfaced in the response." }, "DatasetRef": { "type": "object", @@ -22897,12 +23583,21 @@ "DeleteSkillResponse": { "type": "object", "required": [ + "id", "name", "deleted" ], "properties": { - "name": { + "id": { "type": "string", + "description": "The unique identifier of the deleted skill." + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], "description": "The unique name of the skill." }, "deleted": { @@ -22910,7 +23605,39 @@ "description": "Whether the skill was successfully deleted." } }, - "description": "A deleted skill Object" + "description": "A deleted skill." + }, + "DeleteSkillVersionResponse": { + "type": "object", + "required": [ + "id", + "name", + "deleted", + "version" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the deleted skill version." + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], + "description": "The name of the skill." + }, + "deleted": { + "type": "boolean", + "description": "Whether the skill version was successfully deleted." + }, + "version": { + "type": "string", + "description": "The version that was deleted." + } + }, + "description": "A deleted skill version." }, "Deployment": { "type": "object", @@ -23005,7 +23732,7 @@ }, "always_applicable": { "type": "boolean", - "description": "When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions.", + "description": "When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`.", "default": false } }, @@ -23968,24 +24695,6 @@ ], "description": "Insights from the evaluation comparison." }, - "EvaluationCriterion": { - "type": "object", - "required": [ - "name", - "instruction" - ], - "properties": { - "name": { - "type": "string", - "description": "Criterion name (referenced in evaluation result rows)." - }, - "instruction": { - "type": "string", - "description": "Natural-language instruction passed to the judge LLM." - } - }, - "description": "LLM-as-judge evaluation criterion applied to a single task." - }, "EvaluationDataGenerationType": { "anyOf": [ { @@ -24474,6 +25183,33 @@ } ], "description": "Data generation options. Controls how the evaluation dataset is generated.\nIf omitted, defaults are used (simple_qna, 100 max_samples)." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "Target for the generated suite. Stored on the suite so it can be run\nimmediately after generation completes.\nSupports azure_ai_agent, azure_ai_model, azure_ai_assistant." + }, + "input_messages": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "How to send dataset rows to the target.\nIf omitted and target is provided, defaults to a template using item.query." + }, + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "Evaluation level for the generated suite.\nDefault: turn (single-turn evaluation).\nUse conversation for multi-turn evaluation." } }, "description": "Caller-supplied inputs for an evaluation suite generation job." @@ -26403,27 +27139,6 @@ }, "description": "An array of tools the hosted agent's model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter." }, - "container_protocol_versions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProtocolVersionRecord" - }, - "description": "The protocols that the agent supports for ingress communication of the containers.", - "example": [ - { - "protocol": "responses", - "version": "v0.1.1" - }, - { - "protocol": "invocations", - "version": "v0.0.1" - }, - { - "protocol": "a2a", - "version": "v0.3.0" - } - ] - }, "cpu": { "type": "string", "description": "The CPU configuration for the hosted agent.", @@ -26445,11 +27160,6 @@ "value": "debug" } }, - "image": { - "type": "string", - "description": "The image ID for the agent, applicable to image-based hosted agents.", - "example": "my-registry.azurecr.io/my-hosted-agent:latest" - }, "container_configuration": { "allOf": [ { @@ -27865,18 +28575,18 @@ }, "chat_summary_enabled": { "type": "boolean", - "description": "Whether to enable chat summary extraction and storage. Default is true.", + "description": "Whether to enable chat summary extraction and storage. Defaults to `true`.", "default": true }, "procedural_memory_enabled": { "type": "boolean", - "description": "Whether to enable procedural memory extraction and storage. Default is true.", + "description": "Whether to enable procedural memory extraction and storage. Defaults to `true`.", "default": true }, "default_ttl_seconds": { "type": "integer", "format": "int32", - "description": "The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire.", + "description": "The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`.", "default": 0 } }, @@ -28703,7 +29413,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the one-time trigger.", + "description": "Time zone for the one-time trigger. Defaults to `UTC`.", "default": "UTC" } }, @@ -48537,52 +49247,41 @@ }, "OptimizationAgentDefinition": { "type": "object", - "required": [ - "agent_name" - ], "properties": { - "agent_name": { + "agentName": { "type": "string", - "description": "Registered Foundry agent name. Required — bare-model mode is not supported." + "description": "Agent name." }, - "agent_version": { + "agentVersion": { "type": "string", - "description": "Pinned agent version. Defaults to latest if omitted." + "description": "Agent version." }, "model": { "type": "string", - "description": "Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model." + "description": "Model deployment name." }, - "system_prompt": { + "systemPrompt": { "type": "string", - "description": "System prompt / instructions override. When set, used as the baseline instructions for the agent." + "description": "System prompt / instructions." }, "skills": { "type": "array", "items": { - "$ref": "#/components/schemas/OptimizationAgentSkill" + "type": "object", + "additionalProperties": {} }, - "description": "Optional named skills the optimizer may tune. Tool descriptions and parameters." - } - }, - "description": "The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides." - }, - "OptimizationAgentSkill": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "Skill name (matches the tool name on the agent)." + "description": "Agent skills." }, - "description": { - "type": "string", - "description": "Free-form description used as the seed when tuning skill descriptions." + "tools": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "description": "Agent tools." } }, - "description": "A named skill on the agent that the optimizer may tune." + "description": "Agent definition returned in response payloads (includes resolved config)." }, "OptimizationCandidate": { "type": "object", @@ -48590,17 +49289,16 @@ "name", "config", "mutations", - "rationale", - "avg_score", - "avg_tokens", - "pass_rate", - "task_scores", - "is_pareto_optimal" + "avgScore", + "avgTokens", + "passRate", + "taskScores", + "isParetoOptimal" ], "properties": { - "candidate_id": { + "candidateId": { "type": "string", - "description": "Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints." + "description": "Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints." }, "name": { "type": "string", @@ -48617,67 +49315,49 @@ "mutations": { "type": "object", "additionalProperties": {}, - "description": "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." - }, - "rationale": { - "type": "string", - "description": "Strategy rationale — why this candidate was generated." + "description": "What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'})." }, - "avg_score": { + "avgScore": { "type": "number", "format": "double", "description": "Average composite score across all tasks." }, - "avg_tokens": { + "avgTokens": { "type": "number", "format": "double", "description": "Average token usage across all tasks." }, - "pass_rate": { + "passRate": { "type": "number", "format": "double", "description": "Fraction of tasks that met the pass threshold." }, - "task_scores": { + "taskScores": { "type": "array", "items": { "$ref": "#/components/schemas/OptimizationTaskResult" }, "description": "Individual task-level scores." }, - "is_pareto_optimal": { + "isParetoOptimal": { "type": "boolean", "description": "Whether this candidate is on the Pareto frontier (score vs cost)." }, - "sample_avg_score": { - "type": "number", - "format": "double", - "description": "Average score from sampled evaluation (null if full dataset was used)." - }, - "sample_size": { - "type": "integer", - "format": "int32", - "description": "Number of tasks in the sample (null if full dataset was used)." + "evalId": { + "type": "string", + "description": "Foundry evaluation identifier used to score this candidate." }, - "evaluation_type": { + "evalRunId": { "type": "string", - "description": "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." + "description": "Foundry evaluation run identifier for this candidate's scoring run." }, - "strategy": { + "promotion": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationStrategy" + "$ref": "#/components/schemas/PromotionInfo" } ], - "description": "Identifies the strategy that produced this candidate." - }, - "eval_id": { - "type": "string", - "description": "Foundry evaluation identifier used to score this candidate." - }, - "eval_run_id": { - "type": "string", - "description": "Foundry evaluation run identifier for this candidate's scoring run." + "description": "Promotion metadata. Null if the candidate has not been promoted." } }, "description": "Aggregated evaluation result for a single candidate agent configuration across all tasks." @@ -48687,7 +49367,7 @@ "required": [ "id", "status", - "created_at" + "createdAt" ], "properties": { "id": { @@ -48695,42 +49375,42 @@ "description": "Server-assigned unique identifier.", "readOnly": true }, - "inputs": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationJobInputs" + "$ref": "#/components/schemas/JobStatus" } ], - "description": "Caller-supplied inputs." + "description": "Current lifecycle status.", + "readOnly": true }, - "result": { + "error": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationJobResult" + "$ref": "#/components/schemas/OpenAI.Error" } ], - "description": "Result produced on success.", + "description": "Error details — populated only on failure.", "readOnly": true }, - "status": { + "result": { "allOf": [ { - "$ref": "#/components/schemas/JobStatus" + "$ref": "#/components/schemas/OptimizationJobResult" } ], - "description": "Current lifecycle status.", + "description": "Result produced on success.", "readOnly": true }, - "error": { + "inputs": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Error" + "$ref": "#/components/schemas/OptimizationJobInputs" } ], - "description": "Error details — populated only on failure.", - "readOnly": true + "description": "Caller-supplied inputs." }, - "created_at": { + "createdAt": { "allOf": [ { "$ref": "#/components/schemas/FoundryTimestamp" @@ -48739,7 +49419,7 @@ "description": "The timestamp when the job was created, represented in Unix time.", "readOnly": true }, - "updated_at": { + "updatedAt": { "allOf": [ { "$ref": "#/components/schemas/FoundryTimestamp" @@ -48756,40 +49436,43 @@ ], "description": "Progress while in flight. Absent in terminal states.", "readOnly": true + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/DatasetInfo" + } + ], + "description": "Metadata about the dataset used for this optimization job.", + "readOnly": true } }, - "description": "Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates." + "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" + "agent", + "trainDatasetReference" ], "properties": { "agent": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationAgentDefinition" + "$ref": "#/components/schemas/AgentIdentifier" } ], "description": "The agent (and pinned version) being optimized." }, - "dataset": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetItem" - }, - "description": "Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`." - }, - "train_dataset_reference": { + "trainDatasetReference": { "allOf": [ { "$ref": "#/components/schemas/DatasetRef" } ], - "description": "Reference to a registered training dataset. Mutually exclusive with `dataset`." + "description": "Reference to a registered training dataset (required)." }, - "validation_dataset_reference": { + "validationDatasetReference": { "allOf": [ { "$ref": "#/components/schemas/DatasetRef" @@ -48802,14 +49485,7 @@ "items": { "type": "string" }, - "description": "Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence']." - }, - "criteria": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationCriterion" - }, - "description": "Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`." + "description": "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." }, "options": { "allOf": [ @@ -48825,49 +49501,28 @@ "OptimizationJobProgress": { "type": "object", "required": [ - "current_strategy", - "current_iteration", - "tasks_completed", - "tasks_total", - "best_score", - "elapsed_seconds" + "currentIteration", + "bestScore", + "elapsedSeconds" ], "properties": { - "current_strategy": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationStrategy" - } - ], - "description": "Strategy currently being explored." - }, - "current_iteration": { + "currentIteration": { "type": "integer", "format": "int32", "description": "1-based current iteration index." }, - "tasks_completed": { - "type": "integer", - "format": "int32", - "description": "Tasks evaluated so far this iteration." - }, - "tasks_total": { - "type": "integer", - "format": "int32", - "description": "Total tasks scheduled this iteration." - }, - "best_score": { + "bestScore": { "type": "number", "format": "double", "description": "Best score observed so far across all candidates." }, - "elapsed_seconds": { + "elapsedSeconds": { "type": "number", "format": "double", - "description": "Wall-clock time elapsed since the job began executing." + "description": "Wall-clock time elapsed in seconds since the job began executing." } }, - "description": "In-flight progress; only populated while status is `queued` or `in_progress`." + "description": "In-flight progress; only populated while status is queued or in_progress." }, "OptimizationJobResult": { "type": "object", @@ -48895,21 +49550,6 @@ }, "description": "All evaluated candidates including baseline." }, - "pareto_frontier": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationCandidate" - }, - "description": "Candidates on the Pareto frontier (maximize score, minimize cost)." - }, - "validation_score": { - "allOf": [ - { - "$ref": "#/components/schemas/OptimizationCandidate" - } - ], - "description": "Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided." - }, "options": { "allOf": [ { @@ -48918,151 +49558,65 @@ ], "description": "The options used for this optimization run." }, - "sample_size": { - "type": "integer", - "format": "int32", - "description": "Number of tasks sampled during optimization iterations (null if sampling was not used)." - }, "warnings": { "type": "array", "items": { "type": "string" }, - "description": "Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped)." + "description": "Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped)." }, - "all_strategies_failed": { + "allTargetAttributesFailed": { "type": "boolean", - "description": "True when all optimization strategies failed — only the baseline was evaluated." + "description": "True when all target attributes failed — only the baseline was evaluated." } }, - "description": "Terminal-state result body. Populated when `status` is `succeeded` or `failed`." - }, - "OptimizationMode": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "optimize" - ] - } - ], - "description": "Run mode for an optimization job." + "description": "Terminal-state result body. Populated when status is succeeded or failed." }, "OptimizationOptions": { "type": "object", "properties": { - "strategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptimizationStrategy" - }, - "description": "Strategies to apply this run. Default: ['instruction'].", - "default": [ - "instruction" - ] - }, - "budget": { - "type": "integer", - "format": "int32", - "description": "Total candidate generation budget (number of candidates explored). Default: 10.", - "default": 10 - }, - "max_iterations": { + "maxIterations": { "type": "integer", "format": "int32", - "description": "Maximum optimization iterations per strategy. Default: 5.", + "description": "Maximum optimization iterations per strategy. Must be >= 1. Default: 5.", "default": 5 }, - "tasks_per_iteration": { - "type": "integer", - "format": "int32", - "description": "Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed)." - }, - "max_reflection_tasks": { - "type": "integer", - "format": "int32", - "description": "Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.", - "default": 5 - }, - "min_improvement": { - "type": "number", - "format": "double", - "description": "Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.", - "default": 0.005 + "optimizationConfig": { + "type": "object", + "additionalProperties": {}, + "description": "Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization." }, - "pass_threshold": { - "type": "number", - "format": "double", - "description": "Composite score threshold for a task to be considered passing. Default: 0.5.", - "default": 0.5 + "evalModel": { + "type": "string", + "description": "Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o')." }, - "improvement_threshold": { - "type": "number", - "format": "double", - "description": "Target average score at which optimization stops early (quality ceiling). Default: 0.95.", - "default": 0.95 + "optimizationModel": { + "type": "string", + "description": "Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set." }, - "mode": { + "evaluationLevel": { "allOf": [ { - "$ref": "#/components/schemas/OptimizationMode" + "$ref": "#/components/schemas/EvaluationLevel" } ], - "description": "Run mode." - }, - "eval_model": { - "type": "string", - "description": "Foundry deployment name to use as the LLM-as-judge evaluation model. Required." - }, - "reflection_model": { - "type": "string", - "description": "Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset." - }, - "task_timeout_seconds": { - "type": "integer", - "format": "int32", - "description": "Per-task timeout for agent execution. Default: 300 seconds (5 minutes).", - "default": 300 - }, - "keep_versions": { - "type": "boolean", - "description": "If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.", - "default": false + "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." }, - "OptimizationStrategy": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "instruction", - "model", - "skill" - ] - } - ], - "description": "Optimization strategy dimension." - }, "OptimizationTaskResult": { "type": "object", "required": [ - "task_name", + "taskName", "scores", - "composite_score", + "compositeScore", "tokens", - "duration_seconds", + "durationSeconds", "passed" ], "properties": { - "task_name": { + "taskName": { "type": "string", "description": "Task name (from the dataset)." }, @@ -49078,7 +49632,7 @@ }, "description": "Per-evaluator scores keyed by evaluator name." }, - "composite_score": { + "compositeScore": { "type": "number", "format": "double", "description": "Composite score combining all evaluator scores." @@ -49088,7 +49642,7 @@ "format": "int32", "description": "Total tokens consumed during the agent run for this task." }, - "duration_seconds": { + "durationSeconds": { "type": "number", "format": "double", "description": "Wall-clock seconds for this task's agent execution." @@ -49097,7 +49651,7 @@ "type": "boolean", "description": "Whether the task met the pass threshold." }, - "error_message": { + "errorMessage": { "type": "string", "description": "Error message if the task failed during execution." }, @@ -49112,7 +49666,7 @@ "type": "string", "description": "Raw agent response text." }, - "run_id": { + "runId": { "type": "string", "description": "Identifier of the agent run that produced this result." } @@ -49593,6 +50147,88 @@ ] } }, + "PromoteCandidateRequest": { + "type": "object", + "required": [ + "agentName", + "agentVersion" + ], + "properties": { + "agentName": { + "type": "string", + "description": "Name of the Foundry agent to promote to." + }, + "agentVersion": { + "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": [ + "candidateId", + "status", + "promotedAt", + "agentName", + "agentVersion" + ], + "properties": { + "candidateId": { + "type": "string", + "description": "The promoted candidate id." + }, + "status": { + "type": "string", + "description": "Status after promotion." + }, + "promotedAt": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp when promotion occurred, represented in Unix time." + }, + "agentName": { + "type": "string", + "description": "Name of the Foundry agent promoted to." + }, + "agentVersion": { + "type": "string", + "description": "Version of the Foundry agent promoted to." + } + }, + "description": "Response after successfully promoting a candidate." + }, + "PromotionInfo": { + "type": "object", + "required": [ + "promotedAt", + "agentName", + "agentVersion" + ], + "properties": { + "promotedAt": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp when promotion occurred, represented in Unix time." + }, + "agentName": { + "type": "string", + "description": "Name of the Foundry agent this candidate was promoted to." + }, + "agentVersion": { + "type": "string", + "description": "Version of the Foundry agent this candidate was promoted to." + } + }, + "description": "Promotion metadata recorded when a candidate is deployed to a Foundry agent." + }, "PromptAgentDefinition": { "type": "object", "required": [ @@ -49621,7 +50257,7 @@ "nullable": true, "minimum": 0, "maximum": 2, - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both. Defaults to `1`.", "default": 1 }, "top_p": { @@ -49630,7 +50266,7 @@ "nullable": true, "minimum": 0, "maximum": 1, - "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.", + "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered. We generally recommend altering this or `temperature` but not both.\nDefaults to `1`.", "default": 1 }, "reasoning": { @@ -49893,7 +50529,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the recurrence schedule.", + "description": "Time zone for the recurrence schedule. Defaults to `UTC`.", "default": "UTC" }, "interval": { @@ -51330,25 +51966,27 @@ ], "description": "The supported question types for SimpleQnA data generation jobs used for fine-tuning scenarios." }, - "SkillObject": { + "Skill": { "type": "object", "required": [ - "skill_id", - "has_blob", - "name" + "id", + "name", + "description", + "created_at", + "default_version", + "latest_version" ], "properties": { - "skill_id": { + "id": { "type": "string", "description": "The unique identifier of the skill." }, - "has_blob": { - "type": "boolean", - "description": "Whether the skill was created from a zip blob package." - }, "name": { - "type": "string", - "maxLength": 63, + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], "description": "The unique name of the skill." }, "description": { @@ -51356,16 +51994,119 @@ "maxLength": 1024, "description": "A human-readable description of the skill." }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The Unix timestamp (seconds) when the skill was created." + }, + "default_version": { + "type": "string", + "description": "The default version for the skill. Can be changed via updateSkill." + }, + "latest_version": { + "type": "string", + "description": "The latest version for the skill." + } + }, + "description": "A skill resource." + }, + "SkillInlineContent": { + "type": "object", + "required": [ + "description", + "instructions" + ], + "properties": { + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of what the skill does and when to use it." + }, + "instructions": { + "type": "string", + "description": "The skill instructions in markdown format. This is the body content of the SKILL.md file." + }, + "license": { + "type": "string", + "description": "License name or reference to a bundled license file." + }, + "compatibility": { + "type": "string", + "maxLength": 500, + "description": "Environment requirements or compatibility notes for the skill." + }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", - "x-oaiTypeLabel": "map" + "description": "Arbitrary key-value metadata for additional properties." + }, + "allowed_tools": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of pre-approved tools the skill may use. Experimental." + } + }, + "description": "Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification." + }, + "SkillName": { + "type": "string", + "maxLength": 64, + "pattern": "^[a-z0-9]([a-z0-9\\-]*[a-z0-9])?$", + "description": "A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens." + }, + "SkillVersion": { + "type": "object", + "required": [ + "id", + "skill_id", + "name", + "version", + "description", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the skill version." + }, + "skill_id": { + "type": "string", + "description": "The identifier of the parent skill." + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], + "description": "The name of the skill version." + }, + "version": { + "type": "string", + "description": "The version identifier. Skill versions are immutable." + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of the skill version." + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The Unix timestamp (seconds) when the skill version was created." } }, - "description": "A skill object." + "description": "A specific version of a skill." }, "Sku": { "type": "object", @@ -51418,7 +52159,7 @@ }, "required": { "type": "boolean", - "description": "Whether the input property is required when the agent is invoked.", + "description": "Whether the input property is required when the agent is invoked. Defaults to `false`.", "default": false } }, @@ -52230,6 +52971,59 @@ ], "description": "A tool for searching over the agent's toolbox.\nWhen present, deferred tools are hidden from `tools/list` and only\ndiscoverable via `search_tools` queries at runtime." }, + "ToolboxSkill": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of skill source." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "skill_reference": "#/components/schemas/ToolboxSkillReference" + } + }, + "description": "A skill source included in a toolbox." + }, + "ToolboxSkillReference": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "skill_reference" + ], + "description": "The type of skill source." + }, + "name": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillName" + } + ], + "description": "The name of the skill." + }, + "version": { + "type": "string", + "description": "The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ToolboxSkill" + } + ], + "description": "A reference to an existing skill to include in a toolbox." + }, "ToolboxVersionObject": { "type": "object", "required": [ @@ -52280,6 +53074,13 @@ }, "description": "The list of tools contained in this toolbox version." }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolboxSkill" + }, + "description": "The list of skill sources included in this toolbox version." + }, "policies": { "allOf": [ { 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 af922eee4513..b567cc0e3b74 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 @@ -90,15 +90,15 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OptimizationJob' - description: The job to create. + $ref: '#/components/schemas/OptimizationJobInputs' + description: The optimization job inputs. x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview get: operationId: AgentOptimizationJobs_list summary: Returns a list of agent optimization jobs. - description: List optimization jobs. Supports cursor pagination and optional `status` / `agent_name` filters. + description: List optimization jobs. Supports cursor pagination and optional status / agentName filters. parameters: - name: Foundry-Features in: header @@ -155,7 +155,7 @@ paths: schema: $ref: '#/components/schemas/JobStatus' explode: false - - name: agent_name + - name: agentName in: query required: false description: Filter to jobs targeting this agent name. @@ -210,7 +210,7 @@ paths: get: operationId: AgentOptimizationJobs_get summary: Get info about an agent optimization job. - description: Get an optimization job by id. Emits `Retry-After` while the job is non-terminal. + description: Get an optimization job by id. Returns 202 while in progress, 200 when terminal. parameters: - name: Foundry-Features in: header @@ -239,7 +239,18 @@ paths: headers: Retry-After: required: false - description: Recommended number of seconds to wait before polling again. + 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 schema: type: integer format: int32 @@ -277,6 +288,13 @@ paths: 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 @@ -406,7 +424,7 @@ paths: get: operationId: AgentOptimizationJobs_getCandidate summary: Get a candidate by id. - description: Get a single candidate manifest and aggregated evaluation summary. + description: Get a single candidate's metadata, manifest, and promotion info. parameters: - name: Foundry-Features in: header @@ -441,7 +459,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OptimizationCandidate' + $ref: '#/components/schemas/CandidateMetadata' default: description: An unexpected error response. content: @@ -504,6 +522,65 @@ paths: x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview + /agent_optimization_jobs/{jobId}/candidates/{candidateId}/files: + get: + operationId: AgentOptimizationJobs_getCandidateFile + summary: Get a candidate file. + description: Stream a specific 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: + type: string + format: binary + default: + description: An unexpected error response. + 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 @@ -555,6 +632,64 @@ paths: x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview + /agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote: + post: + operationId: AgentOptimizationJobs_promoteCandidate + summary: Promote a candidate. + description: Promotes a candidate, recording 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' + default: + description: An unexpected error response. + 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 @@ -958,7 +1093,7 @@ paths: - name: force in: query required: false - description: For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + description: For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. schema: type: boolean default: false @@ -1380,6 +1515,12 @@ paths: description: The name of the agent to create a session for. schema: type: string + - name: x-ms-user-isolation-key + in: header + required: false + description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + schema: + type: string - name: api-version in: query required: true @@ -1429,6 +1570,12 @@ paths: description: The name of the agent. schema: type: string + - name: x-ms-user-isolation-key + in: header + required: false + description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + schema: + type: string - name: limit in: query required: false @@ -1806,6 +1953,12 @@ paths: description: The session identifier. schema: type: string + - name: x-ms-user-isolation-key + in: header + required: false + description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + schema: + type: string - name: api-version in: query required: true @@ -1836,6 +1989,60 @@ paths: description: |- Deletes a session synchronously. Returns 204 No Content when the session is deleted or does not exist. + 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: + - AgentEndpoints=V1Preview + - name: agent_name + in: path + required: true + description: The name of the agent. + schema: + type: string + - name: session_id + in: path + required: true + description: The session identifier. + schema: + type: string + - name: x-ms-user-isolation-key + in: header + required: false + description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + 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: + '204': + description: There is no content to send for this request, but the headers may be useful. + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Agents + x-ms-foundry-meta: + required_previews: + - AgentEndpoints=V1Preview + /agents/{agent_name}/endpoint/sessions/{session_id}:stop: + post: + operationId: Agents_stopSession + description: |- + Stops a session. + Returns 204 No Content when the stop succeeds. parameters: - name: Foundry-Features in: header @@ -2289,7 +2496,7 @@ paths: - name: force in: query required: false - description: For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + description: For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. schema: type: boolean default: false @@ -3168,22 +3375,6 @@ paths: schema: type: string explode: false - - name: scenario - in: query - required: false - description: Filter data generation jobs by their scenario. - schema: - $ref: '#/components/schemas/DataGenerationJobScenario' - explode: false - - name: type - in: query - required: false - description: Filter data generation jobs by their type. - schema: - type: array - items: - $ref: '#/components/schemas/DataGenerationJobType' - explode: false - name: api-version in: query required: true @@ -10378,76 +10569,6 @@ paths: tags: - Schedules /skills: - post: - operationId: Skills_createSkill - description: Creates a skill. - parameters: - - name: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - responses: - '201': - description: The request has succeeded and a new resource has been created as a result. - content: - application/json: - schema: - $ref: '#/components/schemas/SkillObject' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Skills - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - maxLength: 63 - description: The unique name of the skill. - description: - type: string - maxLength: 1024 - description: A human-readable description of the skill. - instructions: - type: string - maxLength: 102400 - description: Instructions that define the behavior of the skill. - metadata: - type: object - additionalProperties: - type: string - description: |- - Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters. - x-oaiTypeLabel: map - required: - - name - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview get: operationId: Skills_listSkills description: Returns the list of all skills. @@ -10521,7 +10642,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/SkillObject' + $ref: '#/components/schemas/Skill' description: The requested list of items. first_id: type: string @@ -10554,7 +10675,7 @@ paths: required: true description: The unique name of the skill. schema: - type: string + $ref: '#/components/schemas/SkillName' - name: Foundry-Features in: header required: true @@ -10576,7 +10697,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SkillObject' + $ref: '#/components/schemas/Skill' default: description: An unexpected error response. content: @@ -10589,15 +10710,15 @@ paths: required_previews: - Skills=V1Preview post: - operationId: Skills_updateSkill - description: Updates an existing skill. + operationId: updateSkill + description: Update a skill. parameters: - name: name in: path required: true - description: The unique name of the skill. + description: The name of the skill to update. schema: - type: string + $ref: '#/components/schemas/SkillName' - name: Foundry-Features in: header required: true @@ -10619,7 +10740,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SkillObject' + $ref: '#/components/schemas/Skill' default: description: An unexpected error response. content: @@ -10635,26 +10756,11 @@ paths: schema: type: object properties: - description: + default_version: type: string - maxLength: 1024 - description: A human-readable description of the skill. - instructions: - type: string - maxLength: 102400 - description: Instructions that define the behavior of the skill. - metadata: - type: object - additionalProperties: - type: string - description: |- - Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters. - x-oaiTypeLabel: map + description: The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest. + required: + - default_version x-ms-foundry-meta: required_previews: - Skills=V1Preview @@ -10667,7 +10773,7 @@ paths: required: true description: The unique name of the skill. schema: - type: string + $ref: '#/components/schemas/SkillName' - name: Foundry-Features in: header required: true @@ -10701,17 +10807,17 @@ paths: x-ms-foundry-meta: required_previews: - Skills=V1Preview - /skills/{name}:download: + /skills/{name}/content: get: - operationId: Skills_downloadSkill - description: Downloads a skill package. + operationId: getSkillContent + description: Download the zip content for the default version of a skill. parameters: - name: name in: path required: true - description: The unique name of the skill. + description: The name of the skill. schema: - type: string + $ref: '#/components/schemas/SkillName' - name: Foundry-Features in: header required: true @@ -10746,11 +10852,16 @@ paths: x-ms-foundry-meta: required_previews: - Skills=V1Preview - /skills:import: + /skills/{name}/versions: post: - operationId: Skills_createSkillFromPackage - description: Creates a skill from a zip package. + operationId: createSkillVersion_createSkillVersionFromFiles parameters: + - name: name + in: path + required: true + description: The name of the skill. If the skill does not exist, it will be created. + schema: + $ref: '#/components/schemas/SkillName' - name: Foundry-Features in: header required: true @@ -10766,29 +10877,296 @@ paths: schema: type: string explode: false + description: Creates a new version of a skill. If the skill does not exist, it will be created. Creates a new version of a skill from uploaded files via multipart form data. responses: - '201': - description: The request has succeeded and a new resource has been created as a result. + '200': + description: The request has succeeded. content: application/json: schema: - $ref: '#/components/schemas/SkillObject' + $ref: '#/components/schemas/SkillVersion' default: description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview tags: - Skills requestBody: required: true content: - application/zip: + application/json: schema: - type: string - format: binary - description: The zip package used to create the skill. + type: object + properties: + inline_content: + allOf: + - $ref: '#/components/schemas/SkillInlineContent' + description: Inline skill content for simple skills without file uploads. Foundry-specific extension. + default: + type: boolean + description: Whether to set this version as the default. + multipart/form-data: + schema: + $ref: '#/components/schemas/CreateSkillVersionFromFilesBody' + encoding: + files: + contentType: '*/*' + default: + contentType: text/plain + get: + operationId: listSkillVersions + description: List all versions of a skill. + parameters: + - name: name + in: path + required: true + description: The name of the skill to list versions for. + schema: + $ref: '#/components/schemas/SkillName' + - 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: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - 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/SkillVersion' + 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. + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Skills + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview + /skills/{name}/versions/{version}: + get: + operationId: getSkillVersion + description: Retrieve a specific version of a skill. + parameters: + - name: name + in: path + required: true + description: The name of the skill. + schema: + $ref: '#/components/schemas/SkillName' + - name: version + in: path + required: true + description: The version identifier to retrieve. + schema: + type: string + - name: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - 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/SkillVersion' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Skills + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview + delete: + operationId: deleteSkillVersion + description: Delete a specific version of a skill. + parameters: + - name: name + in: path + required: true + description: The name of the skill. + schema: + $ref: '#/components/schemas/SkillName' + - name: version + in: path + required: true + description: The version identifier to delete. + schema: + type: string + - name: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - 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/DeleteSkillVersionResponse' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Skills + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview + /skills/{name}/versions/{version}/content: + get: + operationId: getSkillVersionContent + description: Download the zip content for a specific version of a skill. + parameters: + - name: name + in: path + required: true + description: The name of the skill. + schema: + $ref: '#/components/schemas/SkillName' + - name: version + in: path + required: true + description: The version to download content for. + schema: + type: string + - name: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - 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 response body for downloading a skill package. + content: + application/zip: + schema: + type: string + format: binary + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Skills x-ms-foundry-meta: required_previews: - Skills=V1Preview @@ -11027,6 +11405,11 @@ paths: items: $ref: '#/components/schemas/OpenAI.Tool' description: The list of tools to include in this version. + skills: + type: array + items: + $ref: '#/components/schemas/ToolboxSkill' + description: The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used. policies: allOf: - $ref: '#/components/schemas/ToolboxPolicies' @@ -12063,6 +12446,18 @@ components: version: type: string description: The version identifier of the agent. + AgentIdentifier: + type: object + required: + - agentName + properties: + agentName: + type: string + description: Registered Foundry agent name (required). + agentVersion: + type: string + description: Pinned agent version. Defaults to latest if omitted. + description: Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig. AgentIdentity: type: object required: @@ -12162,6 +12557,7 @@ components: - responses - mcp - invocations + - invocations_ws AgentReference: type: object required: @@ -12229,6 +12625,7 @@ components: - idle - updating - failed + - stopping - deleting - deleted - expired @@ -13742,16 +14139,90 @@ components: skills: type: array items: - $ref: '#/components/schemas/OptimizationAgentSkill' + type: object + additionalProperties: {} description: Optional skill overrides. + tools: + type: array + items: + type: object + additionalProperties: {} + 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 + - sizeBytes + properties: + path: + type: string + description: Relative path of the file. + type: + type: string + description: File type category (e.g. 'config', 'results'). + sizeBytes: + type: integer + format: int64 + description: File size in bytes. + description: File entry in a candidate's blob directory. + CandidateMetadata: + type: object + required: + - candidateId + - jobId + - candidateName + - status + - hasResults + - createdAt + - updatedAt + - files + properties: + candidateId: + type: string + description: Server-assigned candidate identifier. + jobId: + type: string + description: Owning optimization job id. + candidateName: + 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. + hasResults: + type: boolean + description: Whether detailed results are available for this candidate. + createdAt: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: Timestamp when the candidate was created, represented in Unix time. + updatedAt: + 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 + - candidateId - results properties: - candidate_id: + candidateId: type: string description: Owning candidate id. results: @@ -14619,6 +15090,20 @@ components: x-ms-foundry-meta: required_previews: - AgentEndpoints=V1Preview + CreateSkillVersionFromFilesBody: + type: object + properties: + files: + type: array + items: + type: string + format: binary + description: Skill files to upload. Upload a single zip file or multiple individual files with relative paths. + default: + type: boolean + description: Whether to set this version as the default. Defaults to false. + required: + - files CreatedBy: type: object properties: @@ -14656,7 +15141,7 @@ components: description: Cron expression that defines the schedule frequency. timeZone: type: string - description: Time zone for the cron schedule. + description: Time zone for the cron schedule. Defaults to `UTC`. default: UTC startTime: type: string @@ -14888,7 +15373,6 @@ components: prompt: '#/components/schemas/PromptDataGenerationJobSource' agent: '#/components/schemas/AgentDataGenerationJobSource' traces: '#/components/schemas/TracesDataGenerationJobSource' - dataset: '#/components/schemas/DatasetDataGenerationJobSource' file: '#/components/schemas/FileDataGenerationJobSource' description: The base source model for data generation jobs. DataGenerationJobSourceType: @@ -14899,7 +15383,6 @@ components: - prompt - agent - traces - - dataset - file description: The supported source types for data generation jobs. DataGenerationJobType: @@ -14995,29 +15478,6 @@ components: allOf: - $ref: '#/components/schemas/DataGenerationJobOutput' description: Dataset output for a data generation job. - DatasetDataGenerationJobSource: - type: object - required: - - type - - name - properties: - description: - type: string - description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). - type: - type: string - enum: - - dataset - description: The source type for this source, which is Dataset. - name: - type: string - description: The name of the dataset. - version: - type: string - description: The version of the dataset. If not specified, the latest version is used. - allOf: - - $ref: '#/components/schemas/DataGenerationJobSource' - description: Dataset source for data generation jobs — reference to a dataset. DatasetEvaluationSuiteJobSource: type: object required: @@ -15064,37 +15524,26 @@ components: allOf: - $ref: '#/components/schemas/EvaluatorGenerationJobSource' description: Dataset source for evaluator generation jobs — reference to a dataset. - DatasetItem: + DatasetInfo: type: object required: - - name - - query + - taskCount + - isInline properties: name: type: string - description: Unique-within-the-dataset identifier for this task. - query: - type: string - description: The user query / input for the task. - ground_truth: + description: Dataset name when using a registered dataset reference. Null for inline datasets. + version: type: string - description: Optional ground truth used by reference-based evaluators. - criteria: - type: array - items: - $ref: '#/components/schemas/EvaluationCriterion' - description: Per-task evaluation criteria. Defaults to the job-level evaluators if unset. - eval_results: - type: array - items: - $ref: '#/components/schemas/EvalRunOutputItemResult' - description: Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped. - response_items: - type: array - items: - $ref: '#/components/schemas/OpenAI.OutputItem' - description: Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run. - description: A single evaluation task with input query, expected output, and evaluation criteria. + description: Dataset version when using a registered dataset reference. Null for inline datasets. + taskCount: + type: integer + format: int32 + description: Number of tasks/rows in the dataset. + isInline: + 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: @@ -15349,16 +15798,43 @@ components: DeleteSkillResponse: type: object required: + - id - name - deleted properties: - name: + id: type: string + description: The unique identifier of the deleted skill. + name: + allOf: + - $ref: '#/components/schemas/SkillName' description: The unique name of the skill. deleted: type: boolean description: Whether the skill was successfully deleted. - description: A deleted skill Object + description: A deleted skill. + DeleteSkillVersionResponse: + type: object + required: + - id + - name + - deleted + - version + properties: + id: + type: string + description: The unique identifier of the deleted skill version. + name: + allOf: + - $ref: '#/components/schemas/SkillName' + description: The name of the skill. + deleted: + type: boolean + description: Whether the skill version was successfully deleted. + version: + type: string + description: The version that was deleted. + description: A deleted skill version. Deployment: type: object required: @@ -15422,7 +15898,7 @@ components: description: Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. always_applicable: type: boolean - description: When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. + description: When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`. default: false description: A single dimension — one independent, measurable quality dimension within a rubric evaluator's scoring blueprint. DispatchRoutineRequest: @@ -16340,19 +16816,6 @@ components: allOf: - $ref: '#/components/schemas/InsightResult' description: Insights from the evaluation comparison. - EvaluationCriterion: - type: object - required: - - name - - instruction - properties: - name: - type: string - description: Criterion name (referenced in evaluation result rows). - instruction: - type: string - description: Natural-language instruction passed to the judge LLM. - description: LLM-as-judge evaluation criterion applied to a single task. EvaluationDataGenerationType: anyOf: - type: string @@ -16667,6 +17130,27 @@ components: description: |- Data generation options. Controls how the evaluation dataset is generated. If omitted, defaults are used (simple_qna, 100 max_samples). + target: + allOf: + - $ref: '#/components/schemas/Target' + description: |- + Target for the generated suite. Stored on the suite so it can be run + immediately after generation completes. + Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. + input_messages: + anyOf: + - $ref: '#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate' + - $ref: '#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference' + description: |- + How to send dataset rows to the target. + If omitted and target is provided, defaults to a template using item.query. + evaluation_level: + allOf: + - $ref: '#/components/schemas/EvaluationLevel' + description: |- + Evaluation level for the generated suite. + Default: turn (single-turn evaluation). + Use conversation for multi-turn evaluation. description: Caller-supplied inputs for an evaluation suite generation job. EvaluationSuiteGenerationTokenUsage: type: object @@ -17959,18 +18443,6 @@ components: description: |- An array of tools the hosted agent's model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter. - container_protocol_versions: - type: array - items: - $ref: '#/components/schemas/ProtocolVersionRecord' - description: The protocols that the agent supports for ingress communication of the containers. - example: - - protocol: responses - version: v0.1.1 - - protocol: invocations - version: v0.0.1 - - protocol: a2a - version: v0.3.0 cpu: type: string description: The CPU configuration for the hosted agent. @@ -17987,10 +18459,6 @@ components: example: name: LOG_LEVEL value: debug - image: - type: string - description: The image ID for the agent, applicable to image-based hosted agents. - example: my-registry.azurecr.io/my-hosted-agent:latest container_configuration: allOf: - $ref: '#/components/schemas/ContainerConfiguration' @@ -18919,16 +19387,16 @@ components: description: Specific categories or types of user profile information to extract and store. chat_summary_enabled: type: boolean - description: Whether to enable chat summary extraction and storage. Default is true. + description: Whether to enable chat summary extraction and storage. Defaults to `true`. default: true procedural_memory_enabled: type: boolean - description: Whether to enable procedural memory extraction and storage. Default is true. + description: Whether to enable procedural memory extraction and storage. Defaults to `true`. default: true default_ttl_seconds: type: integer format: int32 - description: The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire. + description: The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`. default: 0 description: Default memory store configurations. x-ms-foundry-meta: @@ -19475,7 +19943,7 @@ components: description: Date and time for the one-time trigger in ISO 8601 format. timeZone: type: string - description: Time zone for the one-time trigger. + description: Time zone for the one-time trigger. Defaults to `UTC`. default: UTC allOf: - $ref: '#/components/schemas/Trigger' @@ -34329,55 +34797,47 @@ components: description: The output of an OpenAPI tool call. OptimizationAgentDefinition: type: object - required: - - agent_name properties: - agent_name: + agentName: type: string - description: Registered Foundry agent name. Required — bare-model mode is not supported. - agent_version: + description: Agent name. + agentVersion: type: string - description: Pinned agent version. Defaults to latest if omitted. + description: Agent version. model: type: string - description: Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model. - system_prompt: + description: Model deployment name. + systemPrompt: type: string - description: System prompt / instructions override. When set, used as the baseline instructions for the agent. + description: System prompt / instructions. skills: type: array items: - $ref: '#/components/schemas/OptimizationAgentSkill' - description: Optional named skills the optimizer may tune. Tool descriptions and parameters. - description: The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides. - OptimizationAgentSkill: - type: object - required: - - name - properties: - name: - type: string - description: Skill name (matches the tool name on the agent). - description: - type: string - description: Free-form description used as the seed when tuning skill descriptions. - description: A named skill on the agent that the optimizer may tune. + type: object + additionalProperties: {} + description: Agent skills. + tools: + type: array + items: + type: object + additionalProperties: {} + description: Agent tools. + description: Agent definition returned in response payloads (includes resolved config). OptimizationCandidate: type: object required: - name - config - mutations - - rationale - - avg_score - - avg_tokens - - pass_rate - - task_scores - - is_pareto_optimal + - avgScore + - avgTokens + - passRate + - taskScores + - isParetoOptimal properties: - candidate_id: + candidateId: type: string - description: Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints. + description: Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints. name: type: string description: Display name of the candidate (e.g., 'baseline', 'instruction-v2'). @@ -34388,72 +34848,49 @@ components: mutations: type: object additionalProperties: {} - description: "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." - rationale: - type: string - description: Strategy rationale — why this candidate was generated. - avg_score: + description: "What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'})." + avgScore: type: number format: double description: Average composite score across all tasks. - avg_tokens: + avgTokens: type: number format: double description: Average token usage across all tasks. - pass_rate: + passRate: type: number format: double description: Fraction of tasks that met the pass threshold. - task_scores: + taskScores: type: array items: $ref: '#/components/schemas/OptimizationTaskResult' description: Individual task-level scores. - is_pareto_optimal: + isParetoOptimal: type: boolean description: Whether this candidate is on the Pareto frontier (score vs cost). - sample_avg_score: - type: number - format: double - description: Average score from sampled evaluation (null if full dataset was used). - sample_size: - type: integer - format: int32 - description: Number of tasks in the sample (null if full dataset was used). - evaluation_type: - type: string - description: "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." - strategy: - allOf: - - $ref: '#/components/schemas/OptimizationStrategy' - description: Identifies the strategy that produced this candidate. - eval_id: + evalId: type: string description: Foundry evaluation identifier used to score this candidate. - eval_run_id: + evalRunId: type: string description: Foundry evaluation run identifier for this candidate's scoring run. + promotion: + allOf: + - $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. OptimizationJob: type: object required: - id - status - - created_at + - createdAt 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' @@ -34464,12 +34901,21 @@ components: - $ref: '#/components/schemas/OpenAI.Error' description: Error details — populated only on failure. readOnly: true - created_at: + result: + allOf: + - $ref: '#/components/schemas/OptimizationJobResult' + description: Result produced on success. + readOnly: true + inputs: + allOf: + - $ref: '#/components/schemas/OptimizationJobInputs' + description: Caller-supplied inputs. + createdAt: allOf: - $ref: '#/components/schemas/FoundryTimestamp' description: The timestamp when the job was created, represented in Unix time. readOnly: true - updated_at: + updatedAt: allOf: - $ref: '#/components/schemas/FoundryTimestamp' description: The timestamp when the job was last updated, represented in Unix time. @@ -34479,26 +34925,27 @@ components: - $ref: '#/components/schemas/OptimizationJobProgress' description: Progress while in flight. Absent in terminal states. readOnly: true - description: Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates. + dataset: + allOf: + - $ref: '#/components/schemas/DatasetInfo' + description: Metadata about the dataset used for this optimization job. + 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 + - trainDatasetReference properties: agent: allOf: - - $ref: '#/components/schemas/OptimizationAgentDefinition' + - $ref: '#/components/schemas/AgentIdentifier' description: The agent (and pinned version) being optimized. - dataset: - type: array - items: - $ref: '#/components/schemas/DatasetItem' - description: Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`. - train_dataset_reference: + trainDatasetReference: allOf: - $ref: '#/components/schemas/DatasetRef' - description: Reference to a registered training dataset. Mutually exclusive with `dataset`. - validation_dataset_reference: + description: Reference to a registered training dataset (required). + validationDatasetReference: allOf: - $ref: '#/components/schemas/DatasetRef' description: Optional held-out validation dataset for measuring generalization of the final candidate. @@ -34506,12 +34953,7 @@ components: type: array items: type: string - description: "Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence']." - criteria: - type: array - items: - $ref: '#/components/schemas/EvaluationCriterion' - description: Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`. + description: "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." options: allOf: - $ref: '#/components/schemas/OptimizationOptions' @@ -34520,38 +34962,23 @@ components: OptimizationJobProgress: type: object required: - - current_strategy - - current_iteration - - tasks_completed - - tasks_total - - best_score - - elapsed_seconds + - currentIteration + - bestScore + - elapsedSeconds properties: - current_strategy: - allOf: - - $ref: '#/components/schemas/OptimizationStrategy' - description: Strategy currently being explored. - current_iteration: + currentIteration: type: integer format: int32 description: 1-based current iteration index. - tasks_completed: - type: integer - format: int32 - description: Tasks evaluated so far this iteration. - tasks_total: - type: integer - format: int32 - description: Total tasks scheduled this iteration. - best_score: + bestScore: type: number format: double description: Best score observed so far across all candidates. - elapsed_seconds: + elapsedSeconds: type: number format: double - description: Wall-clock time elapsed since the job began executing. - description: In-flight progress; only populated while status is `queued` or `in_progress`. + description: Wall-clock time elapsed in seconds since the job began executing. + description: In-flight progress; only populated while status is queued or in_progress. OptimizationJobResult: type: object properties: @@ -34568,123 +34995,53 @@ components: items: $ref: '#/components/schemas/OptimizationCandidate' description: All evaluated candidates including baseline. - pareto_frontier: - type: array - items: - $ref: '#/components/schemas/OptimizationCandidate' - description: Candidates on the Pareto frontier (maximize score, minimize cost). - validation_score: - allOf: - - $ref: '#/components/schemas/OptimizationCandidate' - description: Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided. options: allOf: - $ref: '#/components/schemas/OptimizationOptions' description: The options used for this optimization run. - sample_size: - type: integer - format: int32 - description: Number of tasks sampled during optimization iterations (null if sampling was not used). warnings: type: array items: type: string - description: Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped). - all_strategies_failed: + description: Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped). + allTargetAttributesFailed: type: boolean - description: True when all optimization strategies failed — only the baseline was evaluated. - description: Terminal-state result body. Populated when `status` is `succeeded` or `failed`. - OptimizationMode: - anyOf: - - type: string - - type: string - enum: - - optimize - description: Run mode for an optimization job. + 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: - strategies: - type: array - items: - $ref: '#/components/schemas/OptimizationStrategy' - description: "Strategies to apply this run. Default: ['instruction']." - default: - - instruction - budget: + maxIterations: type: integer format: int32 - description: 'Total candidate generation budget (number of candidates explored). Default: 10.' - default: 10 - max_iterations: - type: integer - format: int32 - description: 'Maximum optimization iterations per strategy. Default: 5.' - default: 5 - tasks_per_iteration: - type: integer - format: int32 - description: 'Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed).' - max_reflection_tasks: - type: integer - format: int32 - description: 'Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.' + description: 'Maximum optimization iterations per strategy. Must be >= 1. Default: 5.' default: 5 - min_improvement: - type: number - format: double - description: 'Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.' - default: 0.005 - pass_threshold: - type: number - format: double - description: 'Composite score threshold for a task to be considered passing. Default: 0.5.' - default: 0.5 - improvement_threshold: - type: number - format: double - description: 'Target average score at which optimization stops early (quality ceiling). Default: 0.95.' - default: 0.95 - mode: - allOf: - - $ref: '#/components/schemas/OptimizationMode' - description: Run mode. - eval_model: + optimizationConfig: + type: object + additionalProperties: {} + description: Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization. + evalModel: type: string - description: Foundry deployment name to use as the LLM-as-judge evaluation model. Required. - reflection_model: + description: Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o'). + optimizationModel: type: string - description: Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset. - task_timeout_seconds: - type: integer - format: int32 - description: 'Per-task timeout for agent execution. Default: 300 seconds (5 minutes).' - default: 300 - keep_versions: - type: boolean - description: 'If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.' - default: false + description: Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set. + evaluationLevel: + allOf: + - $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. - OptimizationStrategy: - anyOf: - - type: string - - type: string - enum: - - instruction - - model - - skill - description: Optimization strategy dimension. OptimizationTaskResult: type: object required: - - task_name + - taskName - scores - - composite_score + - compositeScore - tokens - - duration_seconds + - durationSeconds - passed properties: - task_name: + taskName: type: string description: Task name (from the dataset). query: @@ -34696,7 +35053,7 @@ components: type: number format: double description: Per-evaluator scores keyed by evaluator name. - composite_score: + compositeScore: type: number format: double description: Composite score combining all evaluator scores. @@ -34704,14 +35061,14 @@ components: type: integer format: int32 description: Total tokens consumed during the agent run for this task. - duration_seconds: + durationSeconds: 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: + errorMessage: type: string description: Error message if the task failed during execution. rationales: @@ -34722,7 +35079,7 @@ components: response: type: string description: Raw agent response text. - run_id: + runId: type: string description: Identifier of the agent run that produced this result. description: Per-task evaluation result for a single candidate. @@ -35053,6 +35410,63 @@ components: x-ms-foundry-meta: required_previews: - MemoryStores=V1Preview + PromoteCandidateRequest: + type: object + required: + - agentName + - agentVersion + properties: + agentName: + type: string + description: Name of the Foundry agent to promote to. + agentVersion: + 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: + - candidateId + - status + - promotedAt + - agentName + - agentVersion + properties: + candidateId: + type: string + description: The promoted candidate id. + status: + type: string + description: Status after promotion. + promotedAt: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: Timestamp when promotion occurred, represented in Unix time. + agentName: + type: string + description: Name of the Foundry agent promoted to. + agentVersion: + type: string + description: Version of the Foundry agent promoted to. + description: Response after successfully promoting a candidate. + PromotionInfo: + type: object + required: + - promotedAt + - agentName + - agentVersion + properties: + promotedAt: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: Timestamp when promotion occurred, represented in Unix time. + agentName: + type: string + description: Name of the Foundry agent this candidate was promoted to. + agentVersion: + type: string + description: Version of the Foundry agent this candidate was promoted to. + description: Promotion metadata recorded when a candidate is deployed to a Foundry agent. PromptAgentDefinition: type: object required: @@ -35078,7 +35492,7 @@ components: maximum: 2 description: |- What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. + We generally recommend altering this or `top_p` but not both. Defaults to `1`. default: 1 top_p: type: number @@ -35090,9 +35504,8 @@ components: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. + are considered. We generally recommend altering this or `temperature` but not both. + Defaults to `1`. default: 1 reasoning: type: object @@ -35267,7 +35680,7 @@ components: description: End time for the recurrence schedule in ISO 8601 format. timeZone: type: string - description: Time zone for the recurrence schedule. + description: Time zone for the recurrence schedule. Defaults to `UTC`. default: UTC interval: type: integer @@ -36225,40 +36638,106 @@ components: - short_answer - long_answer description: The supported question types for SimpleQnA data generation jobs used for fine-tuning scenarios. - SkillObject: + Skill: type: object required: - - skill_id - - has_blob + - id - name + - description + - created_at + - default_version + - latest_version properties: - skill_id: + id: type: string description: The unique identifier of the skill. - has_blob: - type: boolean - description: Whether the skill was created from a zip blob package. name: - type: string - maxLength: 63 + allOf: + - $ref: '#/components/schemas/SkillName' description: The unique name of the skill. description: type: string maxLength: 1024 description: A human-readable description of the skill. + created_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The Unix timestamp (seconds) when the skill was created. + default_version: + type: string + description: The default version for the skill. Can be changed via updateSkill. + latest_version: + type: string + description: The latest version for the skill. + description: A skill resource. + SkillInlineContent: + type: object + required: + - description + - instructions + properties: + description: + type: string + maxLength: 1024 + description: A human-readable description of what the skill does and when to use it. + instructions: + type: string + description: The skill instructions in markdown format. This is the body content of the SKILL.md file. + license: + type: string + description: License name or reference to a bundled license file. + compatibility: + type: string + maxLength: 500 + description: Environment requirements or compatibility notes for the skill. metadata: type: object additionalProperties: type: string - description: |- - Set of 16 key-value pairs that can be attached to an object. This can be - useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - - Keys are strings with a maximum length of 64 characters. Values are strings - with a maximum length of 512 characters. - x-oaiTypeLabel: map - description: A skill object. + description: Arbitrary key-value metadata for additional properties. + allowed_tools: + type: array + items: + type: string + description: List of pre-approved tools the skill may use. Experimental. + description: Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification. + SkillName: + type: string + maxLength: 64 + pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ + description: 'A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens.' + SkillVersion: + type: object + required: + - id + - skill_id + - name + - version + - description + - created_at + properties: + id: + type: string + description: The unique identifier of the skill version. + skill_id: + type: string + description: The identifier of the parent skill. + name: + allOf: + - $ref: '#/components/schemas/SkillName' + description: The name of the skill version. + version: + type: string + description: The version identifier. Skill versions are immutable. + description: + type: string + maxLength: 1024 + description: A human-readable description of the skill version. + created_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The Unix timestamp (seconds) when the skill version was created. + description: A specific version of a skill. Sku: type: object required: @@ -36299,7 +36778,7 @@ components: description: The JSON schema for the structured input (optional). required: type: boolean - description: Whether the input property is required when the agent is invoked. + description: Whether the input property is required when the agent is invoked. Defaults to `false`. default: false description: An structured input that can participate in prompt template substitutions and tool argument binding. StructuredOutputDefinition: @@ -36836,6 +37315,40 @@ components: A tool for searching over the agent's toolbox. When present, deferred tools are hidden from `tools/list` and only discoverable via `search_tools` queries at runtime. + ToolboxSkill: + type: object + required: + - type + properties: + type: + type: string + description: The type of skill source. + discriminator: + propertyName: type + mapping: + skill_reference: '#/components/schemas/ToolboxSkillReference' + description: A skill source included in a toolbox. + ToolboxSkillReference: + type: object + required: + - type + - name + properties: + type: + type: string + enum: + - skill_reference + description: The type of skill source. + name: + allOf: + - $ref: '#/components/schemas/SkillName' + description: The name of the skill. + version: + type: string + description: The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version. + allOf: + - $ref: '#/components/schemas/ToolboxSkill' + description: A reference to an existing skill to include in a toolbox. ToolboxVersionObject: type: object required: @@ -36882,6 +37395,11 @@ components: items: $ref: '#/components/schemas/OpenAI.Tool' description: The list of tools contained in this toolbox version. + skills: + type: array + items: + $ref: '#/components/schemas/ToolboxSkill' + description: The list of skill sources included in this toolbox version. policies: allOf: - $ref: '#/components/schemas/ToolboxPolicies' diff --git a/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp b/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp index df13025626be..acced4bde8e5 100644 --- a/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp +++ b/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp @@ -55,19 +55,20 @@ interface Evaluators {} @@clientLocation(Azure.AI.Projects.EvaluatorGenerationJobs.cancel, Evaluators); @@clientLocation(Azure.AI.Projects.EvaluatorGenerationJobs.delete, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.create, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.get, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.list, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.cancel, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.delete, Evaluators); - -@@clientLocation(Azure.AI.Projects.EvaluationSuites.listVersions, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuites.listLatest, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuites.getVersion, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuites.deleteVersion, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuites.createOrUpdateVersion, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuites.createEvaluationSuiteVersion, Evaluators); -@@clientLocation(Azure.AI.Projects.EvaluationSuites.run, Evaluators); +// These were removed from v1: +// @@clientLocation(Azure.AI.Projects.EvaluationSuites.listVersions, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuites.listLatest, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuites.getVersion, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuites.deleteVersion, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuites.createOrUpdateVersion, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuites.createEvaluationSuiteVersion, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuites.run, Evaluators); + +// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.create, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.get, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.list, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.cancel, Evaluators); +// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.delete, Evaluators); interface Schedules {} @@clientLocation(Azure.AI.Projects.Schedules.delete, Schedules); @@ -104,6 +105,16 @@ interface EvaluationTaxonomies {} EvaluationTaxonomies ); +interface Toolboxes {} +@@clientLocation(Azure.AI.Projects.Toolboxes.createToolboxVersion, Toolboxes); +@@clientLocation(Azure.AI.Projects.Toolboxes.updateToolbox, Toolboxes); +@@clientLocation(Azure.AI.Projects.Toolboxes.getToolbox, Toolboxes); +@@clientLocation(Azure.AI.Projects.Toolboxes.listToolboxes, Toolboxes); +@@clientLocation(Azure.AI.Projects.Toolboxes.listToolboxVersions, Toolboxes); +@@clientLocation(Azure.AI.Projects.Toolboxes.getToolboxVersion, Toolboxes); +@@clientLocation(Azure.AI.Projects.Toolboxes.deleteToolbox, Toolboxes); +@@clientLocation(Azure.AI.Projects.Toolboxes.deleteToolboxVersion, Toolboxes); + interface Skills {} @@clientLocation(Azure.AI.Projects.Skills.createSkill, Skills); @@clientLocation(Azure.AI.Projects.Skills.createSkillFromPackage, Skills); 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 e573f8da4cdc..cfd3e43c65f9 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 @@ -6,13 +6,6 @@ // JobStatus — shared lifecycle union (queued/in_progress/succeeded/failed/cancelled) // FoundryTimestamp — Unix epoch int32 // ApiError — standard error shape -// -// C# code changes required for Foundry alignment: -// - Status vocabulary: Pending/Running/Completed → queued/in_progress/succeeded -// - Timestamps: DateTimeOffset → unix epoch int32 -// - ID field: OperationId → id -// - Route: /optimize → /agent_optimization_jobs -// - Response shape: multiple response types → single JobLike model import "../common/models.tsp"; import "../openai-evaluations/models.tsp"; @@ -26,25 +19,28 @@ namespace Azure.AI.Projects; // Enums / unions // --------------------------------------------------------------------------- -/** Optimization strategy dimension. */ -union OptimizationStrategy { +/** Agent attribute that can be optimized. */ +union TargetAttribute { string, - @doc("Instruction-tuning strategy — rewrites agent system prompts.") + @doc("Instruction-tuning — rewrites agent system prompts.") instruction: "instruction", - @doc("Model-selection strategy — evaluates alternative LLM deployments.") + @doc("Model-selection — evaluates alternative LLM deployments.") `model`: "model", - @doc("Skill-tuning strategy — generates or modifies agent tool descriptions.") + @doc("Skill-tuning — generates or modifies agent skill descriptions.") skill: "skill", + + @doc("Tool-tuning — optimizes function tool descriptions and parameter descriptions.") + tool: "tool", } /** Run mode for an optimization job. */ union OptimizationMode { string, - @doc("Full optimization: baseline + mutation strategies.") + @doc("Full optimization: baseline + mutation target attributes.") optimize: "optimize", } @@ -52,61 +48,34 @@ union OptimizationMode { // Input models // --------------------------------------------------------------------------- -@doc("The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides.") -model OptimizationAgentDefinition { - @doc("Registered Foundry agent name. Required — bare-model mode is not supported.") - agent_name: string; +@doc("Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig.") +model AgentIdentifier { + @doc("Registered Foundry agent name (required).") + agentName: string; @doc("Pinned agent version. Defaults to latest if omitted.") - agent_version?: string; - - @doc("Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model.") - `model`?: string; - - @doc("System prompt / instructions override. When set, used as the baseline instructions for the agent.") - system_prompt?: string; - - @doc("Optional named skills the optimizer may tune. Tool descriptions and parameters.") - skills?: OptimizationAgentSkill[]; -} - -@doc("A named skill on the agent that the optimizer may tune.") -model OptimizationAgentSkill { - @doc("Skill name (matches the tool name on the agent).") - name: string; - - @doc("Free-form description used as the seed when tuning skill descriptions.") - description?: string; + agentVersion?: string; } -@doc("A single evaluation task with input query, expected output, and evaluation criteria.") -model DatasetItem { - @doc("Unique-within-the-dataset identifier for this task.") - name: string; - - @doc("The user query / input for the task.") - query: string; - - @doc("Optional ground truth used by reference-based evaluators.") - ground_truth?: string; +@doc("Agent definition returned in response payloads (includes resolved config).") +model OptimizationAgentDefinition { + @doc("Agent name.") + agentName?: string; - @doc("Per-task evaluation criteria. Defaults to the job-level evaluators if unset.") - criteria?: EvaluationCriterion[]; + @doc("Agent version.") + agentVersion?: string; - @doc("Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped.") - eval_results?: EvalRunOutputItemResult[]; + @doc("Model deployment name.") + `model`?: string; - @doc("Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run.") - response_items?: OpenAI.OutputItem[]; -} + @doc("System prompt / instructions.") + systemPrompt?: string; -@doc("LLM-as-judge evaluation criterion applied to a single task.") -model EvaluationCriterion { - @doc("Criterion name (referenced in evaluation result rows).") - name: string; + @doc("Agent skills.") + skills?: Record[]; - @doc("Natural-language instruction passed to the judge LLM.") - instruction: string; + @doc("Agent tools.") + tools?: Record[]; } @doc("Reference to a registered dataset in the Foundry Dataset Service.") @@ -120,67 +89,36 @@ model DatasetRef { @doc("Tuning knobs and run-mode for an optimization job.") model OptimizationOptions { - @doc("Strategies to apply this run. Default: ['instruction'].") - strategies?: OptimizationStrategy[] = #[OptimizationStrategy.instruction]; - - @doc("Total candidate generation budget (number of candidates explored). Default: 10.") - budget?: int32 = 10; - - @doc("Maximum optimization iterations per strategy. Default: 5.") - max_iterations?: int32 = 5; - - @doc("Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed).") - tasks_per_iteration?: int32; - - @doc("Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.") - max_reflection_tasks?: int32 = 5; + @doc("Maximum optimization iterations per strategy. Must be >= 1. Default: 5.") + maxIterations?: int32 = 5; - @doc("Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.") - min_improvement?: float64 = 0.005; + @doc("Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization.") + optimizationConfig?: Record; - @doc("Composite score threshold for a task to be considered passing. Default: 0.5.") - pass_threshold?: float64 = 0.5; + @doc("Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o').") + evalModel?: string; - @doc("Target average score at which optimization stops early (quality ceiling). Default: 0.95.") - improvement_threshold?: float64 = 0.95; + @doc("Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set.") + optimizationModel?: string; - @doc("Run mode.") - mode?: OptimizationMode; - - @doc("Foundry deployment name to use as the LLM-as-judge evaluation model. Required.") - eval_model?: string; - - @doc("Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset.") - reflection_model?: string; - - @doc("Per-task timeout for agent execution. Default: 300 seconds (5 minutes).") - @encode(DurationKnownEncoding.seconds, int32) - task_timeout_seconds?: duration = duration.fromISO("PT5M"); - - @doc("If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.") - keep_versions?: boolean = false; + @doc("Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for per-conversation multi-turn simulation scoring.") + evaluationLevel?: EvaluationLevel; } @doc("Caller-supplied inputs for an optimization job.") model OptimizationJobInputs { @doc("The agent (and pinned version) being optimized.") - agent: OptimizationAgentDefinition; - - @doc("Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`.") - dataset?: DatasetItem[]; + agent: AgentIdentifier; - @doc("Reference to a registered training dataset. Mutually exclusive with `dataset`.") - train_dataset_reference?: DatasetRef; + @doc("Reference to a registered training dataset (required).") + trainDatasetReference: DatasetRef; @doc("Optional held-out validation dataset for measuring generalization of the final candidate.") - validation_dataset_reference?: DatasetRef; + validationDatasetReference?: DatasetRef; - @doc("Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence'].") + @doc("Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence'].") evaluators?: string[]; - @doc("Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`.") - criteria?: EvaluationCriterion[]; - @doc("Tuning knobs and run-mode.") options?: OptimizationOptions; } @@ -189,32 +127,22 @@ model OptimizationJobInputs { // Progress / result models // --------------------------------------------------------------------------- -@doc("In-flight progress; only populated while status is `queued` or `in_progress`.") +@doc("In-flight progress; only populated while status is queued or in_progress.") model OptimizationJobProgress { - @doc("Strategy currently being explored.") - current_strategy: OptimizationStrategy; - @doc("1-based current iteration index.") - current_iteration: int32; - - @doc("Tasks evaluated so far this iteration.") - tasks_completed: int32; - - @doc("Total tasks scheduled this iteration.") - tasks_total: int32; + currentIteration: int32; @doc("Best score observed so far across all candidates.") - best_score: float64; + bestScore: float64; - @doc("Wall-clock time elapsed since the job began executing.") - @encode(DurationKnownEncoding.seconds, float64) - elapsed_seconds: duration; + @doc("Wall-clock time elapsed in seconds since the job began executing.") + elapsedSeconds: float64; } @doc("Aggregated evaluation result for a single candidate agent configuration across all tasks.") model OptimizationCandidate { - @doc("Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints.") - candidate_id?: string; + @doc("Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints.") + candidateId?: string; @doc("Display name of the candidate (e.g., 'baseline', 'instruction-v2').") name: string; @@ -222,50 +150,38 @@ model OptimizationCandidate { @doc("The agent configuration that produced this candidate.") config: OptimizationAgentDefinition; - @doc("What was mutated from the baseline (e.g., {instructions: 'new prompt'}).") + @doc("What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'}).") mutations: Record; - @doc("Strategy rationale — why this candidate was generated.") - rationale: string; - @doc("Average composite score across all tasks.") - avg_score: float64; + avgScore: float64; @doc("Average token usage across all tasks.") - avg_tokens: float64; + avgTokens: float64; @doc("Fraction of tasks that met the pass threshold.") - pass_rate: float64; + passRate: float64; @doc("Individual task-level scores.") - task_scores: OptimizationTaskResult[]; + taskScores: OptimizationTaskResult[]; @doc("Whether this candidate is on the Pareto frontier (score vs cost).") - is_pareto_optimal: boolean; - - @doc("Average score from sampled evaluation (null if full dataset was used).") - sample_avg_score?: float64; - - @doc("Number of tasks in the sample (null if full dataset was used).") - sample_size?: int32; - - @doc("'sample' if scored on a subset, 'full' if re-evaluated on the full dataset.") - evaluation_type?: string; - - @doc("Identifies the strategy that produced this candidate.") - strategy?: OptimizationStrategy; + isParetoOptimal: boolean; @doc("Foundry evaluation identifier used to score this candidate.") - eval_id?: string; + evalId?: string; @doc("Foundry evaluation run identifier for this candidate's scoring run.") - eval_run_id?: string; + evalRunId?: string; + + @doc("Promotion metadata. Null if the candidate has not been promoted.") + promotion?: PromotionInfo; } @doc("Per-task evaluation result for a single candidate.") model OptimizationTaskResult { @doc("Task name (from the dataset).") - task_name: string; + taskName: string; @doc("The user query / input for the task.") query?: string; @@ -274,19 +190,19 @@ model OptimizationTaskResult { scores: Record; @doc("Composite score combining all evaluator scores.") - composite_score: float64; + compositeScore: float64; @doc("Total tokens consumed during the agent run for this task.") tokens: int32; @doc("Wall-clock seconds for this task's agent execution.") - duration_seconds: float64; + durationSeconds: float64; @doc("Whether the task met the pass threshold.") passed: boolean; @doc("Error message if the task failed during execution.") - error_message?: string; + errorMessage?: string; @doc("Per-evaluator reasoning keyed by evaluator name.") rationales?: Record; @@ -295,10 +211,10 @@ model OptimizationTaskResult { response?: string; @doc("Identifier of the agent run that produced this result.") - run_id?: string; + runId?: string; } -@doc("Terminal-state result body. Populated when `status` is `succeeded` or `failed`.") +@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; @@ -309,43 +225,119 @@ model OptimizationJobResult { @doc("All evaluated candidates including baseline.") candidates?: OptimizationCandidate[]; - @doc("Candidates on the Pareto frontier (maximize score, minimize cost).") - pareto_frontier?: OptimizationCandidate[]; - - @doc("Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided.") - validation_score?: OptimizationCandidate; - @doc("The options used for this optimization run.") options?: OptimizationOptions; - @doc("Number of tasks sampled during optimization iterations (null if sampling was not used).") - sample_size?: int32; - - @doc("Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped).") + @doc("Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped).") warnings?: string[]; - @doc("True when all optimization strategies failed — only the baseline was evaluated.") - all_strategies_failed?: boolean; + @doc("True when all target attributes failed — only the baseline was evaluated.") + allTargetAttributesFailed?: boolean; } // --------------------------------------------------------------------------- -// Job resource (uses shared JobLike template) +// Job resource — flat request body (no `inputs` wrapper) to match vienna contract // --------------------------------------------------------------------------- -@doc("Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates.") -model OptimizationJob - is JobLike { +@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; + @doc("The timestamp when the job was created, represented in Unix time.") @visibility(Lifecycle.Read) - created_at: FoundryTimestamp; + createdAt: FoundryTimestamp; @doc("The timestamp when the job was last updated, represented in Unix time.") @visibility(Lifecycle.Read) - updated_at?: FoundryTimestamp; + updatedAt?: FoundryTimestamp; @doc("Progress while in flight. Absent in terminal states.") @visibility(Lifecycle.Read) progress?: OptimizationJobProgress; + + @doc("Metadata about the dataset used for this optimization job.") + @visibility(Lifecycle.Read) + dataset?: DatasetInfo; +} + +// --------------------------------------------------------------------------- +// Promotion models +// --------------------------------------------------------------------------- + +@doc("Promotion metadata recorded when a candidate is deployed to a Foundry agent.") +model PromotionInfo { + @doc("Timestamp when promotion occurred, represented in Unix time.") + promotedAt: FoundryTimestamp; + + @doc("Name of the Foundry agent this candidate was promoted to.") + agentName: string; + + @doc("Version of the Foundry agent this candidate was promoted to.") + agentVersion: string; +} + +@doc("Request body for promoting a candidate to a Foundry agent version.") +model PromoteCandidateRequest { + @doc("Name of the Foundry agent to promote to.") + agentName: string; + + @doc("Version of the Foundry agent to promote to.") + agentVersion: string; +} + +@doc("Response after successfully promoting a candidate.") +model PromoteCandidateResponse { + @doc("The promoted candidate id.") + candidateId: string; + + @doc("Status after promotion.") + status: string; + + @doc("Timestamp when promotion occurred, represented in Unix time.") + promotedAt: FoundryTimestamp; + + @doc("Name of the Foundry agent promoted to.") + agentName: string; + + @doc("Version of the Foundry agent promoted to.") + agentVersion: 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.") + taskCount: int32; + + @doc("True when the dataset was provided inline in the request body.") + isInline: boolean; } // --------------------------------------------------------------------------- @@ -366,14 +358,62 @@ model CandidateDeployConfig { temperature?: float32; @doc("Optional skill overrides.") - skills?: OptimizationAgentSkill[]; + 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; + candidateId: string; @doc("Per-task evaluation rows.") results: OptimizationTaskResult[]; } + +@doc("Candidate metadata returned by GET /candidates/{id}.") +model CandidateMetadata { + @doc("Server-assigned candidate identifier.") + candidateId: string; + + @doc("Owning optimization job id.") + jobId: string; + + @doc("Display name of the candidate.") + candidateName: string; + + @doc("Candidate lifecycle status.") + status: string; + + @doc("Candidate's aggregate score.") + score?: float64; + + @doc("Whether detailed results are available for this candidate.") + hasResults: boolean; + + @doc("Timestamp when the candidate was created, represented in Unix time.") + createdAt: FoundryTimestamp; + + @doc("Timestamp when the candidate was last updated, represented in Unix time.") + updatedAt: 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.") + sizeBytes: int64; +} 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 e2056554dc1d..b1219520fa7c 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 @@ -1,11 +1,6 @@ // Routes for the AgentsOptimization data-plane surface. // Follows the Foundry job-lifecycle pattern from servicepatterns.tsp // (same pattern as data_generation_jobs, evaluation suites). -// -// C# route changes required for Foundry alignment: -// - /optimize → /agent_optimization_jobs -// - Candidate routes: flat /optimize/candidates/{id} → nested /agent_optimization_jobs/{jobId}/candidates/{id} -// - Add DELETE endpoint (new — C# doesn't have one yet) import "./models.tsp"; @@ -37,22 +32,35 @@ interface AgentOptimizationJobs { @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) - create is postJobPreview< + @post create is FoundryDataPlanePreviewOperation< FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - OptimizationJob + { + ...WithOperationId; + + @doc("The optimization job inputs.") + @body body: OptimizationJobInputs; + }, + JobCreatedResponse >; @summary("Get info about an agent optimization job.") - @doc("Get an optimization job by id. Emits `Retry-After` while the job is non-terminal.") + @doc("Get an optimization job by id. Returns 202 while in progress, 200 when terminal.") @route("agent_optimization_jobs/{jobId}") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - get is queryJobStatusPreview< + @get get is FoundryDataPlanePreviewOperation< FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - OptimizationJob + { + /** The ID of the job. */ + @path jobId: string; + }, + OptimizationJob & { + @statusCode _: 200 | 202; + @header("Retry-After") retryAfter?: int32; + } >; @summary("Returns a list of agent optimization jobs.") - @doc("List optimization jobs. Supports cursor pagination and optional `status` / `agent_name` filters.") + @doc("List optimization jobs. Supports cursor pagination and optional status / agentName filters.") @route("agent_optimization_jobs") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) list is listJobsPreview< @@ -64,8 +72,8 @@ interface AgentOptimizationJobs { status?: JobStatus; @doc("Filter to jobs targeting this agent name.") - @query("agent_name") - agent_name?: string; + @query + agentName?: string; } >; @@ -82,12 +90,22 @@ interface AgentOptimizationJobs { @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 is deleteJobPreview< - FoundryFeaturesOptInKeys.agents_optimization_v1_preview + @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 (custom — no shared template for sub-resources) + // Candidate sub-resource operations // --------------------------------------------------------------------------- @summary("Returns a list of candidates for an optimization job.") @@ -107,7 +125,7 @@ interface AgentOptimizationJobs { >; @summary("Get a candidate by id.") - @doc("Get a single candidate manifest and aggregated evaluation summary.") + @doc("Get a single candidate's metadata, manifest, and promotion info.") @route("agent_optimization_jobs/{jobId}/candidates/{candidateId}") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) @get @@ -120,7 +138,7 @@ interface AgentOptimizationJobs { @doc("The candidate id.") @path candidateId: string; }, - OptimizationCandidate + CandidateMetadata >; @summary("Get candidate deploy config.") @@ -156,4 +174,45 @@ interface AgentOptimizationJobs { }, CandidateResults >; + + @summary("Get a candidate file.") + @doc("Stream a specific file from the candidate's blob directory.") + @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 + >; + + @summary("Promote a candidate.") + @doc("Promotes a candidate, recording the deployment timestamp and target agent version.") + @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 body: PromoteCandidateRequest; + }, + PromoteCandidateResponse + >; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp index f3ce7ec87ebf..04f25f515e9c 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp @@ -286,6 +286,9 @@ union AgentProtocol { responses: "responses", mcp: "mcp", invocations: "invocations", + + @doc("WebSocket-based protocol for hosted voice and real-time streaming agents.") + invocations_ws: "invocations_ws", } union AgentEndpointProtocol { @@ -297,7 +300,6 @@ union AgentEndpointProtocol { invocations: "invocations", @doc("WebSocket-based protocol for hosted voice and real-time streaming agents.") - @removed(Versions.v1) invocations_ws: "invocations_ws", } @@ -339,7 +341,7 @@ model PromptAgentDefinition extends AgentDefinition { @doc(""" What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. + We generally recommend altering this or `top_p` but not both. Defaults to `1`. """) @minValue(0) @maxValue(2) @@ -349,9 +351,8 @@ model PromptAgentDefinition extends AgentDefinition { An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. - - We generally recommend altering this or `temperature` but not both. + are considered. We generally recommend altering this or `temperature` but not both. + Defaults to `1`. """) @minValue(0) @maxValue(1) @@ -483,14 +484,6 @@ model HostedAgentDefinition extends AgentDefinition { """) tools?: OpenAI.Tool[]; - @doc("The protocols that the agent supports for ingress communication of the containers.") - @example(#[ - #{ protocol: "responses", version: "v0.1.1" }, - #{ protocol: "invocations", version: "v0.0.1" }, - #{ protocol: "a2a", version: "v0.3.0" } - ]) - container_protocol_versions?: ProtocolVersionRecord[]; - /** * When specify the `cpu` and `memory`, the total CPU and memory allocated to all the containers in a container app must add up to one of the following combinations. * See [vCPU and memory allocation requirements](https://learn.microsoft.com/azure/container-apps/containers#allocations). @@ -507,10 +500,6 @@ model HostedAgentDefinition extends AgentDefinition { @example(#{ name: "LOG_LEVEL", value: "debug" }) environment_variables?: Record; - @doc("The image ID for the agent, applicable to image-based hosted agents.") - @example("my-registry.azurecr.io/my-hosted-agent:latest") - image?: string; - @doc("Container-based deployment configuration. Provide this for image-based deployments. Mutually exclusive with code_configuration — the service validates that exactly one is set.") @extension( "x-ms-foundry-meta", @@ -623,7 +612,7 @@ model StructuredInputDefinition { @doc("The JSON schema for the structured input (optional).") schema?: Record; - @doc("Whether the input property is required when the agent is invoked.") + @doc("Whether the input property is required when the agent is invoked. Defaults to `false`.") required?: boolean = false; } @@ -990,6 +979,9 @@ union AgentSessionStatus { /** Session initialization or lifecycle handling failed and requires delete to recover. */ Failed: "failed", + /** Session is being stopped */ + Stopping: "stopping", + /** Session is being deleted (cleanup in progress). */ Deleting: "deleting", diff --git a/specification/ai-foundry/data-plane/Foundry/src/agents/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/agents/routes.tsp index 8e32ea766291..591f39a5b464 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/agents/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/agents/routes.tsp @@ -164,7 +164,7 @@ interface Agents { /** The name of the agent to delete. */ @path agent_name: string; - /** For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. */ + /** For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. */ @query force?: boolean = false; }, DeleteAgentResponse @@ -260,7 +260,7 @@ interface Agents { /** The version of the agent to delete */ @path agent_version: string; - /** For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. */ + /** For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. */ @query force?: boolean = false; }, DeleteAgentVersionResponse @@ -397,6 +397,7 @@ interface Agents { /** The name of the agent to create a session for. */ @path agent_name: string; + ...UserIsolationKeyHeader; ...CreateAgentSessionRequest; }, ResourceCreatedResponse @@ -421,6 +422,8 @@ interface Agents { /** The session identifier. */ @path session_id: string; + + ...UserIsolationKeyHeader; }, AgentSessionResource >; @@ -438,6 +441,32 @@ interface Agents { } ) deleteSession is FoundryDataPlanePreviewOperation< + AgentDefinitionOptInKeys.agent_endpoint_v1_preview, + { + /** The name of the agent. */ + @path agent_name: string; + + /** The session identifier. */ + @path session_id: string; + + ...UserIsolationKeyHeader; + }, + NoContentResponse + >; + + /** + * Stops a session. + * Returns 204 No Content when the stop succeeds. + */ + @post + @route("/agents/{agent_name}/endpoint/sessions/{session_id}:stop") + @extension( + "x-ms-foundry-meta", + #{ + required_previews: #[AgentDefinitionOptInKeys.agent_endpoint_v1_preview], + } + ) + stopSession is FoundryDataPlanePreviewOperation< AgentDefinitionOptInKeys.agent_endpoint_v1_preview, { /** The name of the agent. */ @@ -467,6 +496,7 @@ interface Agents { /** The name of the agent. */ @path agent_name: string; + ...UserIsolationKeyHeader; ...CommonPageQueryParameters; }, AgentsPagedResult @@ -519,5 +549,5 @@ interface Agents { @path session_id: string; }, SseResponseOf - >; + >; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/models.tsp index 1d4b739c8d82..2aa71eb97f00 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/models.tsp @@ -217,9 +217,6 @@ union DataGenerationJobSourceType { @doc("Traces source — conversation traces from Application Insights.") traces: "traces", - @doc("Dataset source — reference to a dataset.") - dataset: "dataset", - @doc("File source — Azure OpenAI file.") file: "file", } @@ -248,11 +245,6 @@ model TracesDataGenerationJobSource extends DataGenerationJobSource { ...TracesJobSource; } -@doc("Dataset source for data generation jobs — reference to a dataset.") -model DatasetDataGenerationJobSource extends DataGenerationJobSource { - ...DatasetJobSource; -} - @doc("File source for data generation jobs — Azure OpenAI file input.") model FileDataGenerationJobSource extends DataGenerationJobSource { @doc("The source type for this job, which is File.") diff --git a/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/routes.tsp index c7edb5a41954..b9b43919f8cd 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/routes.tsp @@ -36,16 +36,7 @@ interface DataGenerationJobs { @extension("x-ms-foundry-meta", DataGenerationJobsRequiredPreviews) list is listJobsPreview< FoundryFeaturesOptInKeys.data_generation_jobs_v1_preview, - DataGenerationJob, - { - @doc("Filter data generation jobs by their scenario.") - @query - scenario?: DataGenerationJobScenario; - - @doc("Filter data generation jobs by their type.") - @query(#{ explode: false }) - type?: DataGenerationJobType[]; - } + DataGenerationJob >; /** diff --git a/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/models.tsp index f6597f90e297..2b537c598acc 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/models.tsp @@ -281,6 +281,28 @@ model EvaluationSuiteGenerationJobInputs { If omitted, defaults are used (simple_qna, 100 max_samples). """) data_generation_options?: EvaluationSuiteDataGenerationOptions; + + @doc(""" + Target for the generated suite. Stored on the suite so it can be run + immediately after generation completes. + Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. + """) + target?: Target; + + @doc(""" + How to send dataset rows to the target. + If omitted and target is provided, defaults to a template using item.query. + """) + #suppress "@azure-tools/typespec-azure-core/no-unnamed-union" "Supporting both input message types" + input_messages?: OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate + | OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference; + + @doc(""" + Evaluation level for the generated suite. + Default: turn (single-turn evaluation). + Use conversation for multi-turn evaluation. + """) + evaluation_level?: EvaluationLevel; } @doc("Options for dataset generation within an evaluation suite generation job.") diff --git a/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/routes.tsp index f4d9dbb7a773..e2bf468de1d4 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/routes.tsp @@ -25,6 +25,7 @@ const EvaluationSuitesRequiredPreviews = #{ ], }; +@removed(Versions.v1) interface EvaluationSuites extends VersionedOperations< EvaluationSuiteVersion, @@ -88,6 +89,7 @@ const EvaluationSuiteGenerationJobsRequiredPreviews = #{ #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "OpenAI-based operations are definitionally non-standard" #suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "LRO polling is handled by the client via Operation-Location" @tag("EvaluationSuiteGenerationJobs") +@removed(Versions.v1) interface EvaluationSuiteGenerationJobs { @summary("Creates an evaluation suite generation job.") @route("evaluation_suite_generation_jobs") diff --git a/specification/ai-foundry/data-plane/Foundry/src/evaluators/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/evaluators/models.tsp index 59dc5d177a33..83ad025ebd54 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/evaluators/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/evaluators/models.tsp @@ -129,7 +129,7 @@ model Dimension { @maxValue(10) weight: int32; - @doc("When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions.") + @doc("When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`.") always_applicable?: boolean = false; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/evaluators/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/evaluators/routes.tsp index 6fe5a8c222c2..5ab701224d3d 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/evaluators/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/evaluators/routes.tsp @@ -5,8 +5,6 @@ import "./models.tsp"; namespace Azure.AI.Projects; using Http; using OpenAPI; -using Rest; -using TypeSpec.Versioning; alias EvaluatorsPreviewHeader = WithRequiredFoundryPreviewHeader; @@ -99,7 +97,7 @@ interface Evaluators { ...EvaluatorsPreviewHeader; @Http.bodyRoot - evaluatorVersion: EvaluatorVersion; + evaluator_version: EvaluatorVersion; }, Azure.Core.Foundations.ResourceCreatedResponse >; @@ -121,7 +119,7 @@ interface Evaluators { @doc("Evaluator resource") @Http.bodyRoot - evaluatorVersion: EvaluatorVersion; + evaluator_version: EvaluatorVersion; }, Azure.Core.Foundations.ResourceOkResponse >; @@ -147,7 +145,7 @@ interface Evaluators { @doc("The pending upload request parameters") @Http.bodyRoot - pendingUploadRequest: PendingUploadRequest; + pending_upload_request: PendingUploadRequest; }, PendingUploadResponse >; @@ -169,7 +167,7 @@ interface Evaluators { @doc("The credential request parameters") @Http.bodyRoot - credentialRequest: EvaluatorCredentialRequest; + credential_request: EvaluatorCredentialRequest; @doc("The specific version id of the EvaluatorVersion to operate on.") @Rest.segment("versions") diff --git a/specification/ai-foundry/data-plane/Foundry/src/memory-stores/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/memory-stores/models.tsp index b88a9699aa66..5a9f61c420a5 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/memory-stores/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/memory-stores/models.tsp @@ -104,13 +104,13 @@ model MemoryStoreDefaultOptions { @doc("Specific categories or types of user profile information to extract and store.") user_profile_details?: string; - @doc("Whether to enable chat summary extraction and storage. Default is true.") + @doc("Whether to enable chat summary extraction and storage. Defaults to `true`.") chat_summary_enabled: boolean = true; - @doc("Whether to enable procedural memory extraction and storage. Default is true.") + @doc("Whether to enable procedural memory extraction and storage. Defaults to `true`.") procedural_memory_enabled?: boolean = true; - @doc("The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire.") + @doc("The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`.") @encode(DurationKnownEncoding.seconds, int32) default_ttl_seconds?: duration = duration.fromISO("P0D"); } diff --git a/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp index b6fbeaca9376..897a107a87ba 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp @@ -100,7 +100,7 @@ interface Models @doc("Model version to create.") @bodyRoot - body: ModelVersion; + model_version: ModelVersion; }, CreateModelVersionAsyncResponse >; @@ -123,7 +123,7 @@ interface Models version: string; @bodyRoot - body: ModelPendingUploadRequest; + pending_upload_request: ModelPendingUploadRequest; }, ModelPendingUploadResponse >; @@ -146,7 +146,7 @@ interface Models version: string; @bodyRoot - body: ModelCredentialRequest; + credential_request: ModelCredentialRequest; }, AssetCredentialResponse >; diff --git a/specification/ai-foundry/data-plane/Foundry/src/schedules/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/schedules/models.tsp index dbfa5c4cdb5f..9c2256699006 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/schedules/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/schedules/models.tsp @@ -53,7 +53,7 @@ model CronTrigger extends Trigger { @doc("Cron expression that defines the schedule frequency.") expression: string; - @doc("Time zone for the cron schedule.") + @doc("Time zone for the cron schedule. Defaults to `UTC`.") timeZone?: string = "UTC"; @doc("Start time for the cron schedule in ISO 8601 format.") @@ -156,7 +156,7 @@ model RecurrenceTrigger extends Trigger { @doc("End time for the recurrence schedule in ISO 8601 format.") endTime?: string; - @doc("Time zone for the recurrence schedule.") + @doc("Time zone for the recurrence schedule. Defaults to `UTC`.") timeZone?: string = "UTC"; @doc("Interval for the recurrence schedule.") @@ -173,7 +173,7 @@ model OneTimeTrigger extends Trigger { @doc("Date and time for the one-time trigger in ISO 8601 format.") triggerAt: string; - @doc("Time zone for the one-time trigger.") + @doc("Time zone for the one-time trigger. Defaults to `UTC`.") timeZone?: string = "UTC"; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index ae8d7b003269..253c445cd63a 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -622,3 +622,5 @@ union WebSearchToolSearchContextSizeExpandable { @@clientLocation(AgentOptimizationJobs.getCandidate, Agents); @@clientLocation(AgentOptimizationJobs.getCandidateConfig, Agents); @@clientLocation(AgentOptimizationJobs.getCandidateResults, Agents); +@@clientLocation(AgentOptimizationJobs.promoteCandidate, Agents); +@@clientLocation(AgentOptimizationJobs.getCandidateFile, Agents); diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-extensions-openai/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-extensions-openai/client.tsp index 1d046a6b8cc1..3724fdb449fb 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-extensions-openai/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-extensions-openai/client.tsp @@ -35,7 +35,7 @@ namespace Azure.AI.Projects { @@usage(OpenAI.ConversationResource, Usage.output); @@access(OpenAI.ConversationResource, Access.public); @@clientName(OpenAI.ConversationResource, "ProjectConversation"); - @@usage(OpenAI.CreateConversationBody, Usage.input); + @@usage(OpenAI.CreateConversationBody, Usage.output | Usage.json | Usage.input); @@access(OpenAI.CreateConversationBody, Access.public); @@usage(OpenAI.UpdateConversationBody, Usage.input); @@access(OpenAI.UpdateConversationBody, Access.public); @@ -57,9 +57,6 @@ namespace Azure.AI.Projects { @@clientName(CreatedBy, "AgentResponseItemSource"); @@clientName(FabricDataAgentToolParameters, "FabricDataAgentToolOptions"); - @@clientName(MemorySearchToolCallItemResource, - "MemorySearchToolCallResponseItem" - ); @@clientName(OAuthConsentRequestOutputItem, "OAuthConsentRequestResponseItem" ); diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-projects-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-projects-agents/client.tsp index 3ccfbd9ec444..d8d2a41311ec 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-projects-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-projects-agents/client.tsp @@ -217,6 +217,10 @@ namespace Azure.AI.Projects { @@access(Agents.patchAgentObject, Access.internal); @@access(Agents.getSessionLogStream, Access.internal); + @@usage(CreateAgentFromCodeContent, Usage.input); + @@access(CreateAgentFromCodeContent, Access.public); + @@clientName(CreateAgentFromCodeContent, "CreateAgentFromCodeOptions"); + // -------------------------------------------------------------------------------- // Hide Agent administration opertaions, containing the foundry features // -------------------------------------------------------------------------------- @@ -253,5 +257,5 @@ namespace Azure.AI.Projects { // -------------------------------------------------------------------------------- // Skills sub‐client // -------------------------------------------------------------------------------- - @@clientName(SkillObject, "AgentsSkill"); + @@clientName(Skill, "AgentsSkill"); } diff --git a/specification/ai-foundry/data-plane/Foundry/src/skills/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/skills/models.tsp index 1433b859108e..8d62be889091 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/skills/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/skills/models.tsp @@ -2,62 +2,51 @@ using TypeSpec.Http; namespace Azure.AI.Projects; +@doc("A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens.") +@maxLength(64) +@pattern("^[a-z0-9]([a-z0-9\\-]*[a-z0-9])?$") +scalar SkillName extends string; + const SkillsRequiredPreviews = #{ required_previews: #[FoundryFeaturesOptInKeys.skills_v1_preview], }; -alias CreateSkillRequest = { - @doc("The unique name of the skill.") - @maxLength(63) - name: string; - - @doc("A human-readable description of the skill.") +@doc("Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification.") +model SkillInlineContent { + @doc("A human-readable description of what the skill does and when to use it.") @maxLength(1024) - description?: string; - - @doc("Instructions that define the behavior of the skill.") - @maxLength(102400) - instructions?: string; + description: string; - ...MetadataPropertyForRequest; -}; + @doc("The skill instructions in markdown format. This is the body content of the SKILL.md file.") + instructions: string; -alias CreateSkillFromPackageRequest = { - @doc("The content type of the incoming skill package payload.") - @header("Content-Type") - content_type: "application/zip"; + @doc("License name or reference to a bundled license file.") + license?: string; - @doc("The zip package used to create the skill.") - @body - content: bytes; -}; + @doc("Environment requirements or compatibility notes for the skill.") + @maxLength(500) + compatibility?: string; -alias UpdateSkillRequest = { - @doc("The unique name of the skill.") - @path - name: string; + @doc("Arbitrary key-value metadata for additional properties.") + metadata?: Record; - @doc("A human-readable description of the skill.") - @maxLength(1024) - description?: string; + @doc("List of pre-approved tools the skill may use. Experimental.") + allowed_tools?: string[]; +} - @doc("Instructions that define the behavior of the skill.") - @maxLength(102400) - instructions?: string; +@doc("Multipart request body for creating a skill version from files. Accepts either a single zip file or multiple individual skill files (directory upload). For zip uploads, the server extracts and validates contents. For directory uploads, files are validated as-is.") +model CreateSkillVersionFromFilesBody { + @doc("Skill files to upload. Upload a single zip file or multiple individual files with relative paths.") + files: HttpPart[]; - ...MetadataPropertyForRequest; -}; + @doc("Whether to set this version as the default. Defaults to false.") + default?: HttpPart; +} alias GetSkillRequest = { @doc("The unique name of the skill.") @path - name: string; -}; - -alias DownloadSkillRequest = { - @doc("The unique name of the skill.") - @path - name: string; + name: SkillName; }; alias ListSkillsRequest = { @@ -67,37 +56,146 @@ alias ListSkillsRequest = { alias DeleteSkillRequest = { @doc("The unique name of the skill.") @path - name: string; + name: SkillName; }; -@doc("A skill object.") -model SkillObject { +@doc("A skill resource.") +model Skill { @doc("The unique identifier of the skill.") - skill_id: string; - - @doc("Whether the skill was created from a zip blob package.") - has_blob: boolean; + id: string; @doc("The unique name of the skill.") - @maxLength(63) - name: string; + name: SkillName; @doc("A human-readable description of the skill.") @maxLength(1024) - description?: string; + description: string; + + @doc("The Unix timestamp (seconds) when the skill was created.") + created_at: FoundryTimestamp; + + @doc("The default version for the skill. Can be changed via updateSkill.") + default_version: string; + + @doc("The latest version for the skill.") + latest_version: string; - ...MetadataPropertyForRequest; } -@doc("A deleted skill Object") +@doc("A specific version of a skill.") +model SkillVersion { + @doc("The unique identifier of the skill version.") + id: string; + + @doc("The identifier of the parent skill.") + skill_id: string; + + @doc("The name of the skill version.") + name: SkillName; + + @doc("The version identifier. Skill versions are immutable.") + version: string; + + @doc("A human-readable description of the skill version.") + @maxLength(1024) + description: string; + + @doc("The Unix timestamp (seconds) when the skill version was created.") + created_at: FoundryTimestamp; +} + +alias CreateSkillVersionRequest = { + @doc("The name of the skill. If the skill does not exist, it will be created.") + @path + name: SkillName; + + @doc("Inline skill content for simple skills without file uploads. Foundry-specific extension.") + inline_content?: SkillInlineContent; + + @doc("Whether to set this version as the default.") + default?: boolean; +}; + +alias GetSkillVersionRequest = { + @doc("The name of the skill.") + @path + name: SkillName; + + @doc("The version identifier to retrieve.") + @path + version: string; +}; + +alias ListSkillVersionsRequest = { + @doc("The name of the skill to list versions for.") + @path + name: SkillName; + + ...CommonPageQueryParameters; +}; + +alias GetSkillContentRequest = { + @doc("The name of the skill.") + @path + name: SkillName; +}; + +alias GetSkillVersionContentRequest = { + @doc("The name of the skill.") + @path + name: SkillName; + + @doc("The version to download content for.") + @path + version: string; +}; + +alias UpdateSkillRequest = { + @doc("The name of the skill to update.") + @path + name: SkillName; + + @doc("The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest.") + default_version: string; +}; + +alias DeleteSkillVersionRequest = { + @doc("The name of the skill.") + @path + name: SkillName; + + @doc("The version identifier to delete.") + @path + version: string; +}; + +@doc("A deleted skill.") model DeleteSkillResponse { + @doc("The unique identifier of the deleted skill.") + id: string; + @doc("The unique name of the skill.") - name: string; + name: SkillName; @doc("Whether the skill was successfully deleted.") deleted: boolean; } +@doc("A deleted skill version.") +model DeleteSkillVersionResponse { + @doc("The unique identifier of the deleted skill version.") + id: string; + + @doc("The name of the skill.") + name: SkillName; + + @doc("Whether the skill version was successfully deleted.") + deleted: boolean; + + @doc("The version that was deleted.") + version: string; +} + @doc("The response body for downloading a skill package.") model DownloadSkillResponse { @doc("The media type of the returned package content.") diff --git a/specification/ai-foundry/data-plane/Foundry/src/skills/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/skills/routes.tsp index 76b733e750c7..f6dd67c643db 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/skills/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/skills/routes.tsp @@ -12,28 +12,6 @@ alias SkillsPreviewHeader = WithRequiredFoundryPreviewHeader - >; - - /** - * Creates a skill from a zip package. - */ - @post - @route("/skills:import") - @extension("x-ms-foundry-meta", SkillsRequiredPreviews) - createSkillFromPackage is FoundryDataPlaneOperation< - CreateSkillFromPackageRequest & SkillsPreviewHeader, - ResourceCreatedResponse - >; - /** * Retrieves a skill. */ @@ -42,18 +20,7 @@ interface Skills { @extension("x-ms-foundry-meta", SkillsRequiredPreviews) getSkill is FoundryDataPlaneOperation< GetSkillRequest & SkillsPreviewHeader, - SkillObject - >; - - /** - * Downloads a skill package. - */ - @get - @route("/skills/{name}:download") - @extension("x-ms-foundry-meta", SkillsRequiredPreviews) - downloadSkill is FoundryDataPlaneOperation< - DownloadSkillRequest & SkillsPreviewHeader, - DownloadSkillResponse + Skill >; /** @@ -64,18 +31,20 @@ interface Skills { @extension("x-ms-foundry-meta", SkillsRequiredPreviews) listSkills is FoundryDataPlaneOperation< ListSkillsRequest & SkillsPreviewHeader, - AgentsPagedResult + AgentsPagedResult >; /** - * Updates an existing skill. + * Update a skill. */ + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" + @operationId("updateSkill") @post @route("/skills/{name}") @extension("x-ms-foundry-meta", SkillsRequiredPreviews) updateSkill is FoundryDataPlaneOperation< UpdateSkillRequest & SkillsPreviewHeader, - SkillObject + Skill >; /** @@ -89,4 +58,108 @@ interface Skills { DeleteSkillRequest & SkillsPreviewHeader, DeleteSkillResponse >; + + // ── Versioned Skill Operations ──────────────────────── + + /** + * Creates a new version of a skill. If the skill does not exist, it will be created. + */ + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" + @operationId("createSkillVersion") + @post + @route("/skills/{name}/versions") + @sharedRoute + @extension("x-ms-foundry-meta", SkillsRequiredPreviews) + createSkillVersion is FoundryDataPlaneOperation< + CreateSkillVersionRequest & SkillsPreviewHeader, + SkillVersion + >; + + /** + * Creates a new version of a skill from uploaded files via multipart form data. + */ + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" + #suppress "@azure-tools/typespec-azure-core/byos" "Skill file upload uses multipart form data" + @operationId("createSkillVersionFromFiles") + @post + @route("/skills/{name}/versions") + @sharedRoute + @extension("x-ms-foundry-meta", SkillsRequiredPreviews) + createSkillVersionFromFiles is FoundryDataPlaneOperation< + { + @doc("The name of the skill.") + @path + name: SkillName; + + @header contentType: "multipart/form-data"; + @multipartBody content: CreateSkillVersionFromFilesBody; + } & SkillsPreviewHeader, + SkillVersion + >; + + /** + * List all versions of a skill. + */ + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" + @operationId("listSkillVersions") + @get + @list + @route("/skills/{name}/versions") + @extension("x-ms-foundry-meta", SkillsRequiredPreviews) + listSkillVersions is FoundryDataPlaneOperation< + ListSkillVersionsRequest & SkillsPreviewHeader, + AgentsPagedResult + >; + + /** + * Retrieve a specific version of a skill. + */ + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" + @operationId("getSkillVersion") + @get + @route("/skills/{name}/versions/{version}") + @extension("x-ms-foundry-meta", SkillsRequiredPreviews) + getSkillVersion is FoundryDataPlaneOperation< + GetSkillVersionRequest & SkillsPreviewHeader, + SkillVersion + >; + + /** + * Download the zip content for the default version of a skill. + */ + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" + @operationId("getSkillContent") + @get + @route("/skills/{name}/content") + @extension("x-ms-foundry-meta", SkillsRequiredPreviews) + getSkillContent is FoundryDataPlaneOperation< + GetSkillContentRequest & SkillsPreviewHeader, + DownloadSkillResponse + >; + + /** + * Download the zip content for a specific version of a skill. + */ + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" + @operationId("getSkillVersionContent") + @get + @route("/skills/{name}/versions/{version}/content") + @extension("x-ms-foundry-meta", SkillsRequiredPreviews) + getSkillVersionContent is FoundryDataPlaneOperation< + GetSkillVersionContentRequest & SkillsPreviewHeader, + DownloadSkillResponse + >; + + /** + * Delete a specific version of a skill. + */ + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" + @operationId("deleteSkillVersion") + @delete + @route("/skills/{name}/versions/{version}") + @extension("x-ms-foundry-meta", SkillsRequiredPreviews) + deleteSkillVersion is FoundryDataPlaneOperation< + DeleteSkillVersionRequest & SkillsPreviewHeader, + DeleteSkillVersionResponse + >; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/toolboxes/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/toolboxes/models.tsp index de0c5eb10bd7..807c5208cca3 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/toolboxes/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/toolboxes/models.tsp @@ -1,6 +1,7 @@ import "../common/service.tsp"; import "../tools/models.tsp"; import "../agents/models.tsp"; +import "../skills/models.tsp"; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -13,6 +14,25 @@ model ToolboxPolicies { rai_config?: RaiConfig; } +@doc("A skill source included in a toolbox.") +@discriminator("type") +model ToolboxSkill { + @doc("The type of skill source.") + type: string; +} + +@doc("A reference to an existing skill to include in a toolbox.") +model ToolboxSkillReference extends ToolboxSkill { + @doc("The type of skill source.") + type: "skill_reference"; + + @doc("The name of the skill.") + name: SkillName; + + @doc("The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version.") + version?: string; +} + @doc("A toolbox that stores reusable tool definitions for agents.") model ToolboxObject { @doc("The unique identifier of the toolbox.") @@ -51,6 +71,9 @@ model ToolboxVersionObject { @doc("The list of tools contained in this toolbox version.") tools: OpenAI.Tool[]; + @doc("The list of skill sources included in this toolbox version.") + skills?: ToolboxSkill[]; + @doc("Policy configuration for the toolbox version.") policies?: ToolboxPolicies; } @@ -71,6 +94,9 @@ alias CreateToolboxVersionRequest = { @doc("The list of tools to include in this version.") tools: OpenAI.Tool[]; + @doc("The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used.") + skills?: ToolboxSkill[]; + @doc("Policy configuration for this toolbox version.") policies?: ToolboxPolicies; }; From 8d7195025da01b3b5140780e18d1ffc73b52dc56 Mon Sep 17 00:00:00 2001 From: Kaylie <50653231+kaylieee@users.noreply.github.com> Date: Tue, 26 May 2026 15:32:20 -0700 Subject: [PATCH 16/37] Revert "Ingest spec 52626 (#43522)" (#43523) This reverts commit 2b538a263c45694f2fb4a150b1053694360b87f2. --- .github/CODEOWNERS | 2 +- .../data-plane/Foundry/client.csharp.tsp | 6 - .../data-plane/Foundry/client.java.tsp | 12 + .../ai-foundry/data-plane/Foundry/client.tsp | 100 +- ...ntSessions_StopSession_MaximumSet_Gen.json | 14 - .../v1/microsoft-foundry-openapi3.json | 6493 ++- .../v1/microsoft-foundry-openapi3.yaml | 2604 +- .../v1/microsoft-foundry-openapi3.yaml,json | 45601 ++++++++++++++++ .../microsoft-foundry-openapi3.json | 1957 +- .../microsoft-foundry-openapi3.yaml | 1434 +- .../Foundry/relocate-beta-operations.tsp | 37 +- .../src/agents-optimization/models.tsp | 382 +- .../src/agents-optimization/routes.tsp | 95 +- .../data-plane/Foundry/src/agents/models.tsp | 28 +- .../data-plane/Foundry/src/agents/routes.tsp | 36 +- .../src/data_generation_jobs/models.tsp | 8 + .../src/data_generation_jobs/routes.tsp | 11 +- .../Foundry/src/evaluation-suites/models.tsp | 22 - .../Foundry/src/evaluation-suites/routes.tsp | 2 - .../Foundry/src/evaluators/models.tsp | 2 +- .../Foundry/src/evaluators/routes.tsp | 10 +- .../Foundry/src/memory-stores/models.tsp | 6 +- .../data-plane/Foundry/src/models/routes.tsp | 6 +- .../Foundry/src/schedules/models.tsp | 6 +- .../Foundry/src/sdk-agents/client.tsp | 2 - .../src/sdk-extensions-openai/client.tsp | 5 +- .../src/sdk-projects-agents/client.tsp | 6 +- .../data-plane/Foundry/src/skills/models.tsp | 204 +- .../data-plane/Foundry/src/skills/routes.tsp | 147 +- .../Foundry/src/toolboxes/models.tsp | 26 - 30 files changed, 52392 insertions(+), 6872 deletions(-) delete mode 100644 specification/ai-foundry/data-plane/Foundry/examples/2025-11-15-preview/AgentSessions_StopSession_MaximumSet_Gen.json create mode 100644 specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml,json diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c685afa22a57..052bd9fe89a4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -16,7 +16,7 @@ /dev/cognitiveservices/data-plane/Language/ @assafi @rokulka @ChongTang @annatisch @heaths @deyaaeldeen @joseharriaga @minhanh-phan # PRLabel: %Foundry %Client -/specification/ai-foundry/data-plane/Foundry @johanste @trrwilson @glecaros @balapv @dargilco @qubitron +/specification/ai-foundry/data-plane/Foundry @johanste @trrwilson @glecaros @balapv @dargilco # PRLabel: %Analysis Services /specification/analysisservices/ @taiwu diff --git a/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp b/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp index 7df9ddf5fa9c..a51b2165da4d 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp @@ -217,9 +217,3 @@ namespace Azure.AI.Projects; @@clientName(Models.createAsync, "createModelVersionAsync", "csharp"); @@clientName(Models.startPendingUpload, "startModelPendingUpload", "csharp"); @@clientName(Models.getCredentials, "getModelCredentials", "csharp"); - -// -------------------------------------------------------------------------------- -// Routines sub‐client -// -------------------------------------------------------------------------------- -@@clientName(Routines, "AIProjectRoutines"); -@@clientName(Routine, "ProjectsRoutine"); diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 1591ec29dd52..e739706ed514 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -138,6 +138,9 @@ namespace Azure.AI.Projects; @@clientName(EvalRunResultComparison, "EvaluationRunResultComparison"); @@clientName(EvalRunResultSummary, "EvaluationRunResultSummary"); +@@clientName(SkillObject, "SkillDetails"); +@@clientName(SkillObject.has_blob, "blobPresent"); + @@clientName(Index, "AIProjectIndex", "java"); @@clientName(Azure.Core.Foundations.ResourceBody.resource, "schedule"); @@ -269,6 +272,15 @@ model TimeZoneType {} @@alternateType(RecurrenceTrigger.timeZone, TimeZoneType, "java"); +// -------------------------------------------------------------------------------- +// Javadoc / Documentation overrides +// -------------------------------------------------------------------------------- + +@@clientDoc(Skills.downloadSkill, + "Downloads a skill package as a ZIP archive containing {@code SKILL.md}. Returns the original uploaded archive for skills created via {@code createSkillFromPackage}; materializes a ZIP from stored instructions for skills created via {@code createSkill}.", + DocumentationMode.replace +); + // -------------------------------------------------------------------------------- // Relocate EvaluatorGenerationJobs, EvaluationSuites, and // EvaluationSuiteGenerationJobs onto the Evaluators sub-client diff --git a/specification/ai-foundry/data-plane/Foundry/client.tsp b/specification/ai-foundry/data-plane/Foundry/client.tsp index 7ab36d7a58cd..0e4d07c16df7 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.tsp @@ -26,7 +26,7 @@ import "./src/toolboxes/routes.tsp"; import "./src/skills/routes.tsp"; import "./src/agents-session-files/routes.tsp"; import "./src/data_generation_jobs/routes.tsp"; -//import "./src/evaluation-suites/routes.tsp"; +import "./src/evaluation-suites/routes.tsp"; import "./src/agents-optimization/routes.tsp"; // Create a ".beta" subclient for the above beta operations @@ -222,26 +222,13 @@ using Azure.AI.Projects; @@clientName(AgentOptimizationJobs.getCandidateConfig, "getOptimizationCandidateConfig", "javascript"); @@clientName(AgentOptimizationJobs.getCandidateResults, "getOptimizationCandidateResults", "javascript"); -// 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 -// OpenAI responses classes. We want Foundry SDK to be free of those, therefore for the -// time being we define output item as a generic dictionary. -@@alternateType(OpenAI.OutputItem, Record); - // Make this method internal, since it's patched with a new one that supports either binary or file-path input @@access(AgentSessionFiles.uploadSessionFile, Access.internal, "python"); @@usage(SessionFileWriteResponse, Usage.output); @@access(SessionFileWriteResponse, Access.public); -// Exclude these operations entirely from emitted SDK. These are convenience REST APIs that we don't think bring -// real value on SDK surface. We can do everything using createAgentVersionFromCode. -@@scope(Agents.createAgentFromCode, "!(python, javascript)"); -@@scope(Agents.updateAgentFromCode, "!(python, javascript)"); - -@@clientName(Agents.downloadAgentCode, "download_code", "python"); - -@@clientName(Agents.createAgentVersionFromCode, "create_version_from_code", "python"); -@@clientName(Agents.createAgentVersionFromCode, "createVersionFromCode", "javascript"); +// Exclude these operations entirely from emitted Python SDK +@@scope(Agents.createAgentFromCode, "!(python)"); @@clientName(DownloadAgentCodeResponse, "DownloadAgentCodeResult", "python"); @@clientName(SessionDirectoryListResponse, @@ -277,7 +264,6 @@ using Azure.AI.Projects; @@clientName(MemoryStores.deleteMemoryStore, "delete"); @@clientName(MemoryStoreSearchResponse, "MemoryStoreSearchResult", "python"); @@clientName(DeleteMemoryStoreResponse, "DeleteMemoryStoreResult", "python"); -@@clientName(DeleteMemoryResponse, "DeleteMemoryResult", "python"); @@clientName(MemoryStoreUpdateResponse, "MemoryStoreUpdateResult", "python"); @@clientName(MemoryStoreDeleteScopeResponse, "MemoryStoreDeleteScopeResult", @@ -288,9 +274,6 @@ using Azure.AI.Projects; // define OpenAI.InputItem as inputs. This pulls in ~100 OpenAI classes related to input items. We want the // Foundry SDK to be free of those, therefore for the time being we define input item as a generic dictionary. @@alternateType(OpenAI.InputItem, Record); - -// Note the doc string replacement below is for JavaScript only, because for Python we hand-write the -// relevant methods with proper doc strings (see `begin_update_memories` and `search_memories` methods) @@clientDoc(MemoryStoreUpdateRequest.items, "A list of messages to store in memory, each one represented as an object with `role`, `content` and `type` keys. Similar to how OpenAI defines input items in Responses operations. Example of an item: {\"role\": \"user\", \"type\": \"message\", \"content\": \"my user message\"}. Only messages with `type` equals `message` are currently processed. Others are ignored.", DocumentationMode.replace, @@ -319,6 +302,8 @@ using Azure.AI.Projects; // Rename models ending with 'Object' to end with 'Details' for Python @@clientName(MemoryStoreObject, "MemoryStoreDetails", "python"); +@@clientName(PendingUploadResponse, "PendingUploadResult", "python"); + // Remove 'Object' suffix for JS client @@clientName(MemoryStoreObject, "MemoryStore", "javascript"); @@ -335,8 +320,8 @@ using Azure.AI.Projects; @@clientName(Routines.deleteRoutine, "delete"); @@clientName(Routines.listRoutineRuns, "list_runs", "python"); @@clientName(Routines.listRoutineRuns, "listRuns", "javascript"); -@@clientName(Routines.dispatchRoutineAsync, "dispatch"); -@@clientName(DispatchRoutineResponse, "DispatchRoutineResult", "python"); +@@clientName(Routines.dispatchRoutineAsync, "dispatch_async", "python"); +@@clientName(Routines.dispatchRoutineAsync, "dispatchAsync", "javascript"); // -------------------------------------------------------------------------------- // Beta Evaluators sub‐client @@ -371,6 +356,36 @@ using Azure.AI.Projects; "javascript" ); +// Evaluation Suite Generation Jobs — unscoped names (fixes AllScopes conflict) +@@clientName(EvaluationSuiteGenerationJobs.create, "create_generation_suite_job"); +@@clientName(EvaluationSuiteGenerationJobs.get, "get_generation_suite_job"); +@@clientName(EvaluationSuiteGenerationJobs.list, "list_generation_suite_jobs"); +@@clientName(EvaluationSuiteGenerationJobs.cancel, "cancel_generation_suite_job"); +@@clientName(EvaluationSuiteGenerationJobs.delete, "delete_generation_suite_job"); + +// Evaluation Suite Generation Jobs — renamed for JavaScript SDK discoverability +@@clientName(EvaluationSuiteGenerationJobs.create, "createGenerationSuiteJob", "javascript"); +@@clientName(EvaluationSuiteGenerationJobs.get, "getGenerationSuiteJob", "javascript"); +@@clientName(EvaluationSuiteGenerationJobs.list, "listGenerationSuiteJobs", "javascript"); +@@clientName(EvaluationSuiteGenerationJobs.cancel, "cancelGenerationSuiteJob", "javascript"); +@@clientName(EvaluationSuiteGenerationJobs.delete, "deleteGenerationSuiteJob", "javascript"); + +// EvaluationSuites versioned operations +@@clientName(EvaluationSuites.listVersions, "list_evaluation_suite_versions"); +@@clientName(EvaluationSuites.listLatest, "list_evaluation_suites"); +@@clientName(EvaluationSuites.getVersion, "get_evaluation_suite"); +@@clientName(EvaluationSuites.deleteVersion, "delete_evaluation_suite"); +@@clientName(EvaluationSuites.createOrUpdateVersion, "create_or_update_evaluation_suite"); +@@clientName(EvaluationSuites.createEvaluationSuiteVersion, "create_evaluation_suite"); +@@clientName(EvaluationSuites.run, "run_evaluation_suite"); + +@@clientName(EvaluationSuites.listVersions, "listEvaluationSuiteVersions", "javascript"); +@@clientName(EvaluationSuites.listLatest, "listEvaluationSuites", "javascript"); +@@clientName(EvaluationSuites.getVersion, "getEvaluationSuite", "javascript"); +@@clientName(EvaluationSuites.deleteVersion, "deleteEvaluationSuite", "javascript"); +@@clientName(EvaluationSuites.createOrUpdateVersion, "createOrUpdateEvaluationSuite", "javascript"); +@@clientName(EvaluationSuites.createEvaluationSuiteVersion, "createEvaluationSuite", "javascript"); +@@clientName(EvaluationSuites.run, "runEvaluationSuite", "javascript"); // EvaluatorVersion datetime fields are typed as string in the spec but carry ISO-8601 timestamps @@alternateType(EvaluatorVersion.created_at, utcDateTime, "python"); @@alternateType(EvaluatorVersion.modified_at, utcDateTime, "python"); @@ -381,37 +396,12 @@ using Azure.AI.Projects; @@clientName(EvaluatorGenerationJobs.list, "list_generation_jobs", "python"); @@clientName(EvaluatorGenerationJobs.cancel, "cancel_generation_job", "python"); @@clientName(EvaluatorGenerationJobs.delete, "delete_generation_job", "python"); - -// // EvaluationSuites versioned operations -// @@clientName(EvaluationSuites.listVersions, "list_evaluation_suite_versions"); -// @@clientName(EvaluationSuites.listLatest, "list_evaluation_suites"); -// @@clientName(EvaluationSuites.getVersion, "get_evaluation_suite"); -// @@clientName(EvaluationSuites.deleteVersion, "delete_evaluation_suite"); -// @@clientName(EvaluationSuites.createOrUpdateVersion, "create_or_update_evaluation_suite"); -// @@clientName(EvaluationSuites.createEvaluationSuiteVersion, "create_evaluation_suite"); -// @@clientName(EvaluationSuites.run, "run_evaluation_suite"); - -// @@clientName(EvaluationSuites.listVersions, "listEvaluationSuiteVersions", "javascript"); -// @@clientName(EvaluationSuites.listLatest, "listEvaluationSuites", "javascript"); -// @@clientName(EvaluationSuites.getVersion, "getEvaluationSuite", "javascript"); -// @@clientName(EvaluationSuites.deleteVersion, "deleteEvaluationSuite", "javascript"); -// @@clientName(EvaluationSuites.createOrUpdateVersion, "createOrUpdateEvaluationSuite", "javascript"); -// @@clientName(EvaluationSuites.createEvaluationSuiteVersion, "createEvaluationSuite", "javascript"); -// @@clientName(EvaluationSuites.run, "runEvaluationSuite", "javascript"); - -// // Evaluation Suite Generation Jobs — unscoped names (fixes AllScopes conflict) -// @@clientName(EvaluationSuiteGenerationJobs.create, "create_generation_suite_job"); -// @@clientName(EvaluationSuiteGenerationJobs.get, "get_generation_suite_job"); -// @@clientName(EvaluationSuiteGenerationJobs.list, "list_generation_suite_jobs"); -// @@clientName(EvaluationSuiteGenerationJobs.cancel, "cancel_generation_suite_job"); -// @@clientName(EvaluationSuiteGenerationJobs.delete, "delete_generation_suite_job"); - -// // Evaluation Suite Generation Jobs — renamed for JavaScript SDK discoverability -// @@clientName(EvaluationSuiteGenerationJobs.create, "createGenerationSuiteJob", "javascript"); -// @@clientName(EvaluationSuiteGenerationJobs.get, "getGenerationSuiteJob", "javascript"); -// @@clientName(EvaluationSuiteGenerationJobs.list, "listGenerationSuiteJobs", "javascript"); -// @@clientName(EvaluationSuiteGenerationJobs.cancel, "cancelGenerationSuiteJob", "javascript"); -// @@clientName(EvaluationSuiteGenerationJobs.delete, "deleteGenerationSuiteJob", "javascript"); +// Evaluation Suite Generation Jobs — unique names to avoid collision with evaluator gen methods +@@clientName(EvaluationSuiteGenerationJobs.create, "create_generation_suite_job", "python"); +@@clientName(EvaluationSuiteGenerationJobs.get, "get_generation_suite_job", "python"); +@@clientName(EvaluationSuiteGenerationJobs.list, "list_generation_suite_jobs", "python"); +@@clientName(EvaluationSuiteGenerationJobs.cancel, "cancel_generation_suite_job", "python"); +@@clientName(EvaluationSuiteGenerationJobs.delete, "delete_generation_suite_job", "python"); // -------------------------------------------------------------------------------- // Beta Insights sub‐client @@ -431,10 +421,6 @@ using Azure.AI.Projects; @@clientName(Models.createOrUpdateVersion, "update"); @@clientName(Models.startPendingUpload, "pendingUpload"); @@clientName(Models.getCredentials, "getCredentials"); -@@clientName(Models.createAsync, "pendingCreateVersion"); - -@@clientName(CreateModelVersionAsyncResponse, "ModelPendingCreateVersionResult", "python"); -@@clientName(CreateModelVersionAsyncResponse, "ModelPendingCreateVersionResponse", "javascript"); // -------------------------------------------------------------------------------- // Beta Schedules sub‐client diff --git a/specification/ai-foundry/data-plane/Foundry/examples/2025-11-15-preview/AgentSessions_StopSession_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/2025-11-15-preview/AgentSessions_StopSession_MaximumSet_Gen.json deleted file mode 100644 index d2d57caec351..000000000000 --- a/specification/ai-foundry/data-plane/Foundry/examples/2025-11-15-preview/AgentSessions_StopSession_MaximumSet_Gen.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "title": "AgentSessions_StopSession_MaximumSet", - "operationId": "Agents_StopSession", - "parameters": { - "api-version": "2025-11-15-preview", - "agent_name": "my-agent", - "session_id": "my-session", - "x-session-isolation-key": "sk-abc123", - "Foundry-Features": "AgentEndpoints=V1Preview" - }, - "responses": { - "204": {} - } -} 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 e577097995e9..9c48d6a9b0b9 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 @@ -29,6 +29,9 @@ { "name": "Evaluation Rules" }, + { + "name": "EvaluationSuiteGenerationJobs" + }, { "name": "Evaluators" }, @@ -166,11 +169,11 @@ "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": [ @@ -181,7 +184,7 @@ "get": { "operationId": "AgentOptimizationJobs_list", "summary": "Returns a list of agent optimization jobs.", - "description": "List optimization jobs. Supports cursor pagination and optional status / agentName filters.", + "description": "List optimization jobs. Supports cursor pagination and optional `status` / `agent_name` filters.", "parameters": [ { "name": "Foundry-Features", @@ -248,7 +251,7 @@ "explode": false }, { - "name": "agentName", + "name": "agent_name", "in": "query", "required": false, "description": "Filter to jobs targeting this agent name.", @@ -330,7 +333,7 @@ "get": { "operationId": "AgentOptimizationJobs_get", "summary": "Get info about an agent optimization job.", - "description": "Get an optimization job by id. Returns 202 while in progress, 200 when terminal.", + "description": "Get an optimization job by id. Emits `Retry-After` while the job is non-terminal.", "parameters": [ { "name": "Foundry-Features", @@ -370,25 +373,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" @@ -449,16 +434,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", @@ -637,7 +612,7 @@ "get": { "operationId": "AgentOptimizationJobs_getCandidate", "summary": "Get a candidate by id.", - "description": "Get a single candidate's metadata, manifest, and promotion info.", + "description": "Get a single candidate manifest and aggregated evaluation summary.", "parameters": [ { "name": "Foundry-Features", @@ -686,7 +661,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CandidateMetadata" + "$ref": "#/components/schemas/OptimizationCandidate" } } } @@ -791,11 +766,11 @@ } } }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/files": { + "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/results": { "get": { - "operationId": "AgentOptimizationJobs_getCandidateFile", - "summary": "Get a candidate file.", - "description": "Stream a specific file from the candidate's blob directory.", + "operationId": "AgentOptimizationJobs_getCandidateResults", + "summary": "Get candidate evaluation results.", + "description": "Get full per-task evaluation results for a candidate.", "parameters": [ { "name": "Foundry-Features", @@ -827,16 +802,6 @@ "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", @@ -852,10 +817,9 @@ "200": { "description": "The request has succeeded.", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/CandidateResults" } } } @@ -881,11 +845,11 @@ } } }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/results": { - "get": { - "operationId": "AgentOptimizationJobs_getCandidateResults", - "summary": "Get candidate evaluation results.", - "description": "Get full per-task evaluation results for a candidate.", + "/agent_optimization_jobs/{jobId}:cancel": { + "post": { + "operationId": "AgentOptimizationJobs_cancel", + "summary": "Cancels an agent optimization job.", + "description": "Request cancellation. Idempotent on terminal states.", "parameters": [ { "name": "Foundry-Features", @@ -903,16 +867,7 @@ "name": "jobId", "in": "path", "required": true, - "description": "The optimization job id.", - "schema": { - "type": "string" - } - }, - { - "name": "candidateId", - "in": "path", - "required": true, - "description": "The candidate id.", + "description": "The ID of the job to cancel.", "schema": { "type": "string" } @@ -934,7 +889,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CandidateResults" + "$ref": "#/components/schemas/OptimizationJob" } } } @@ -960,11 +915,9 @@ } } }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote": { + "/agents": { "post": { - "operationId": "AgentOptimizationJobs_promoteCandidate", - "summary": "Promote a candidate.", - "description": "Promotes a candidate, recording the deployment timestamp and target agent version.", + "operationId": "Agents_createAgent_Agents_createAgentFromCode", "parameters": [ { "name": "Foundry-Features", @@ -972,48 +925,47 @@ "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 to promote.", + "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 the 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.", "responses": { "200": { "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PromoteCandidateResponse" + "$ref": "#/components/schemas/AgentObject" } } } @@ -1029,322 +981,165 @@ } } }, + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + }, "tags": [ - "AgentOptimizationJobs" + "Agents" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PromoteCandidateRequest" + "$ref": "#/components/schemas/CreateAgentRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateAgentFromCodeContent" + }, + "encoding": { + "metadata": { + "contentType": "application/json" + } } } - }, - "description": "Promotion details." - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "AgentsOptimization=V1Preview" - ] + } } - } - }, - "/agent_optimization_jobs/{jobId}:cancel": { - "post": { - "operationId": "AgentOptimizationJobs_cancel", - "summary": "Cancels an agent optimization job.", - "description": "Request cancellation. Idempotent on terminal states.", + }, + "get": { + "operationId": "Agents_listAgents", + "description": "Returns the list of all agents.", "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": "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." + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + } + }, + "/agents/{agent_name}": { + "get": { + "operationId": "Agents_getAgent", + "description": "Retrieves the agent.", + "parameters": [ { - "name": "jobId", + "name": "agent_name", "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" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "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 the 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.", - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "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", - "description": "Returns the list of all agents.", - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] - } - }, - "/agents/{agent_name}": { - "get": { - "operationId": "Agents_getAgent", - "description": "Retrieves the agent.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve.", + "description": "The name of the agent to retrieve.", "schema": { "type": "string" } @@ -1496,7 +1291,7 @@ "name": "force", "in": "query", "required": false, - "description": "For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types.", + "description": "For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false.", "schema": { "type": "boolean", "default": false @@ -2111,15 +1906,6 @@ "type": "string" } }, - { - "name": "x-ms-user-isolation-key", - "in": "header", - "required": false, - "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", - "schema": { - "type": "string" - } - }, { "name": "api-version", "in": "query", @@ -2197,15 +1983,6 @@ "type": "string" } }, - { - "name": "x-ms-user-isolation-key", - "in": "header", - "required": false, - "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", - "schema": { - "type": "string" - } - }, { "name": "limit", "in": "query", @@ -2752,15 +2529,6 @@ "type": "string" } }, - { - "name": "x-ms-user-isolation-key", - "in": "header", - "required": false, - "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", - "schema": { - "type": "string" - } - }, { "name": "api-version", "in": "query", @@ -2837,15 +2605,6 @@ "type": "string" } }, - { - "name": "x-ms-user-isolation-key", - "in": "header", - "required": false, - "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", - "schema": { - "type": "string" - } - }, { "name": "api-version", "in": "query", @@ -2882,37 +2641,16 @@ } } }, - "/agents/{agent_name}/endpoint/sessions/{session_id}:stop": { + "/agents/{agent_name}/import": { "post": { - "operationId": "Agents_stopSession", - "description": "Stops a session.\nReturns 204 No Content when the stop succeeds.", + "operationId": "Agents_updateAgentFromManifest", + "description": "Updates the agent from a manifest by adding a new version if there are any changes to the agent definition.\nIf no changes, returns the existing 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": [ - "AgentEndpoints=V1Preview" - ] - } - }, { "name": "agent_name", "in": "path", "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "description": "The session identifier.", + "description": "The name of the agent to update.", "schema": { "type": "string" } @@ -2929,8 +2667,15 @@ } ], "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentObject" + } + } + } }, "default": { "description": "An unexpected error response.", @@ -2946,25 +2691,39 @@ "tags": [ "Agents" ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAgentFromManifestRequest" + } + } + } } } }, - "/agents/{agent_name}/import": { + "/agents/{agent_name}/versions": { "post": { - "operationId": "Agents_updateAgentFromManifest", - "description": "Updates the agent from a manifest by adding a new version if there are any changes to the agent definition.\nIf no changes, returns the existing agent version.", + "operationId": "Agents_createAgentVersion_Agents_createAgentVersionFromCode", "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": "agent_name", "in": "path", "required": true, - "description": "The name of the agent to update.", + "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters.", "schema": { - "type": "string" + "type": "string", + "maxLength": 63 } }, { @@ -2976,15 +2735,25 @@ "type": "string" }, "explode": false + }, + { + "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": "Create a new agent version.", "responses": { "200": { "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentObject" + "$ref": "#/components/schemas/AgentVersionObject" } } } @@ -3000,6 +2769,11 @@ } } }, + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + }, "tags": [ "Agents" ], @@ -3008,36 +2782,77 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateAgentFromManifestRequest" + "$ref": "#/components/schemas/CreateAgentVersionRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateAgentVersionFromCodeContent" + }, + "encoding": { + "metadata": { + "contentType": "application/json" + } } } } } - } - }, - "/agents/{agent_name}/versions": { - "post": { - "operationId": "Agents_createAgentVersion_Agents_createAgentVersionFromCode", + }, + "get": { + "operationId": "Agents_listAgentVersions", + "description": "Returns the list of versions of an agent.", "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": "agent_name", "in": "path", "required": true, - "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters.", + "description": "The name of the agent to retrieve versions for.", "schema": { - "type": "string", - "maxLength": 63 + "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", @@ -3047,220 +2862,93 @@ "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/AgentVersionObject" + }, + "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." + } + } + } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + } + }, + "/agents/{agent_name}/versions/{agent_version}": { + "get": { + "operationId": "Agents_getAgentVersion", + "description": "Retrieves a specific version of an agent.", + "parameters": [ { - "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.", + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to retrieve.", "schema": { "type": "string" } - } - ], - "description": "Create a new agent version.", - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentVersionObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "CodeAgents=V1Preview" - ] - }, - "tags": [ - "Agents" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgentVersionRequest" - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/CreateAgentVersionFromCodeContent" - }, - "encoding": { - "metadata": { - "contentType": "application/json" - } - } - } - } - } - }, - "get": { - "operationId": "Agents_listAgentVersions", - "description": "Returns the list of versions of an agent.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve versions for.", - "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", - "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/AgentVersionObject" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ] - } - }, - "/agents/{agent_name}/versions/{agent_version}": { - "get": { - "operationId": "Agents_getAgentVersion", - "description": "Retrieves a specific version of an agent.", - "parameters": [ - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "agent_version", - "in": "path", - "required": true, - "description": "The version of the agent to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false + }, + { + "name": "agent_version", + "in": "path", + "required": true, + "description": "The version of the agent to retrieve.", + "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": { @@ -3315,7 +3003,7 @@ "name": "force", "in": "query", "required": false, - "description": "For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types.", + "description": "For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false.", "schema": { "type": "boolean", "default": false @@ -3832,6 +3520,29 @@ }, "explode": false }, + { + "name": "scenario", + "in": "query", + "required": false, + "description": "Filter data generation jobs by their scenario.", + "schema": { + "$ref": "#/components/schemas/DataGenerationJobScenario" + }, + "explode": false + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter data generation jobs by their type.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataGenerationJobType" + } + }, + "explode": false + }, { "name": "api-version", "in": "query", @@ -4795,41 +4506,168 @@ ] } }, - "/evaluationrules": { + "/evaluation_suite_generation_jobs": { + "post": { + "operationId": "EvaluationSuiteGenerationJobs_create", + "summary": "Creates an evaluation suite generation job.", + "description": "Create a new job (preview). Includes optional Foundry-Features header and Operation-Id for idempotent retries.", + "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": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "Operation-Id", + "in": "header", + "required": false, + "description": "Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.", + "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": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "headers": { + "Operation-Location": { + "required": true, + "description": "URL to poll for the job status.", + "schema": { + "type": "string" + } + }, + "Location": { + "required": true, + "description": "URL of the created job resource.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteGenerationJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "EvaluationSuiteGenerationJobs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteGenerationJobCreate" + } + } + }, + "description": "The job to create." + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Evaluations=V1Preview" + ] + } + }, "get": { - "operationId": "EvaluationRules_list", - "description": "List all evaluation rules.", + "operationId": "EvaluationSuiteGenerationJobs_list", + "summary": "Returns a list of evaluation suite generation jobs.", + "description": "List jobs with cursor-based pagination (preview). Includes optional Foundry-Features header.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + "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": [ + "Evaluations=V1Preview" + ] + } }, { - "name": "actionType", + "name": "limit", "in": "query", "required": false, - "description": "Filter by the type of evaluation rule.", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the\ndefault is 20.", "schema": { - "$ref": "#/components/schemas/EvaluationRuleActionType" + "type": "integer", + "format": "int32", + "default": 20 }, "explode": false }, { - "name": "agentName", + "name": "order", "in": "query", "required": false, - "description": "Filter by the agent name.", + "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": "enabled", + "name": "before", "in": "query", "required": false, - "description": "Filter by the enabled status.", + "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": "boolean" + "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 } @@ -4840,104 +4678,172 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluationRule" + "type": "object", + "required": [ + "data", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationSuiteGenerationJob" + }, + "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." } } } }, "default": { "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/ApiErrorResponse" } } } } }, "tags": [ - "Evaluation Rules" - ] + "EvaluationSuiteGenerationJobs" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Evaluations=V1Preview" + ] + } } }, - "/evaluationrules/{id}": { + "/evaluation_suite_generation_jobs/{jobId}": { "get": { - "operationId": "EvaluationRules_get", - "description": "Get an evaluation rule.", + "operationId": "EvaluationSuiteGenerationJobs_get", + "summary": "Get info about an evaluation suite generation job.", + "description": "Get a job by ID (preview). Includes optional Foundry-Features header.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + "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": [ + "Evaluations=V1Preview" + ] + } }, { - "name": "id", + "name": "jobId", "in": "path", "required": true, - "description": "Unique identifier for the evaluation rule.", + "description": "The ID of the job.", "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.", + "headers": { + "Retry-After": { + "required": false, + "description": "Recommended number of seconds to wait before polling again.", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationRule" + "$ref": "#/components/schemas/EvaluationSuiteGenerationJob" } } } }, "default": { "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/ApiErrorResponse" } } } } }, "tags": [ - "Evaluation Rules" - ] + "EvaluationSuiteGenerationJobs" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Evaluations=V1Preview" + ] + } }, "delete": { - "operationId": "EvaluationRules_delete", - "description": "Delete an evaluation rule.", + "operationId": "EvaluationSuiteGenerationJobs_delete", + "summary": "Deletes an evaluation suite generation job.", + "description": "Delete a job (preview). Returns 204 No Content.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + "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": [ + "Evaluations=V1Preview" + ] + } }, { - "name": "id", + "name": "jobId", "in": "path", "required": true, - "description": "Unique identifier for the evaluation rule.", + "description": "The ID of the job to delete.", "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": { @@ -4946,44 +4852,31 @@ }, "default": { "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/ApiErrorResponse" } } } } }, "tags": [ - "Evaluation Rules" - ] - }, - "put": { - "operationId": "EvaluationRules_createOrUpdate", - "description": "Create or update an evaluation rule.", + "EvaluationSuiteGenerationJobs" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "/evaluation_suite_generation_jobs/{jobId}:cancel": { + "post": { + "operationId": "EvaluationSuiteGenerationJobs_cancel", + "summary": "Cancels an evaluation suite generation job.", + "description": "Cancel a running job (preview). Returns 200 with the updated job.", "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "id", - "in": "path", - "required": true, - "description": "Unique identifier for the evaluation rule.", - "schema": { - "type": "string" - } - }, { "name": "Foundry-Features", "in": "header", @@ -4995,6 +4888,25 @@ "Evaluations=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": { @@ -5003,96 +4915,49 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationRule" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationRule" + "$ref": "#/components/schemas/EvaluationSuiteGenerationJob" } } } }, "default": { "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/ApiErrorResponse" } } } } }, "tags": [ - "Evaluation Rules" + "EvaluationSuiteGenerationJobs" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationRule" - } - } - }, - "description": "Evaluation rule resource" + "x-ms-foundry-meta": { + "conditional_previews": [ + "Evaluations=V1Preview" + ] } } }, - "/evaluationtaxonomies": { + "/evaluation_suites": { "get": { - "operationId": "EvaluationTaxonomies_list", - "description": "List evaluation taxonomies", + "operationId": "EvaluationSuites_listLatest", + "description": "List the latest version of each EvaluationSuiteVersion", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "inputName", - "in": "query", - "required": false, - "description": "Filter by the evaluation input name.", - "schema": { - "type": "string" - }, - "explode": false - }, - { - "name": "inputType", + "name": "agent_name", "in": "query", "required": false, - "description": "Filter by taxonomy input type.", + "description": "Filter by associated Foundry agent name (from target).", "schema": { "type": "string" }, "explode": false - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } } ], "responses": { @@ -5101,7 +4966,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluationTaxonomy" + "$ref": "#/components/schemas/PagedEvaluationSuiteVersion" } } } @@ -5125,16 +4990,13 @@ } } } - }, - "tags": [ - "Evaluation Taxonomies" - ] + } } }, - "/evaluationtaxonomies/{name}": { + "/evaluation_suites/{name}/versions": { "get": { - "operationId": "EvaluationTaxonomies_get", - "description": "Get an evaluation run by name.", + "operationId": "EvaluationSuites_listVersions", + "description": "List all versions of the given EvaluationSuiteVersion", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -5143,22 +5005,10 @@ "name": "name", "in": "path", "required": true, - "description": "The name of the resource", + "description": "The name of the resource.", "schema": { "type": "string" } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } } ], "responses": { @@ -5167,7 +5017,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" + "$ref": "#/components/schemas/PagedEvaluationSuiteVersion" } } } @@ -5191,92 +5041,106 @@ } } } - }, - "tags": [ - "Evaluation Taxonomies" - ] + } }, - "delete": { - "operationId": "EvaluationTaxonomies_delete", - "description": "Delete an evaluation taxonomy by name.", + "post": { + "operationId": "EvaluationSuites_createEvaluationSuiteVersion", + "description": "Create a new EvaluationSuiteVersion with auto incremented version id", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + "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": [ + "Evaluations=V1Preview" + ] + } }, { "name": "name", "in": "path", "required": true, - "description": "The name of the resource", + "description": "The name of the evaluation suite.", "schema": { "type": "string" } }, { - "name": "Foundry-Features", - "in": "header", + "name": "api-version", + "in": "query", "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "description": "The API version to use for this operation.", "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } + "type": "string" + }, + "explode": false } ], "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/EvaluationSuiteVersion" } } - }, + } + }, + "default": { + "description": "An unexpected error response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/ApiErrorResponse" } } } } }, - "tags": [ - "Evaluation Taxonomies" - ] - }, - "put": { - "operationId": "EvaluationTaxonomies_create", - "description": "Create an evaluation taxonomy.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteVersionCreate" + } + } + }, + "description": "The evaluation suite version to create." + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "/evaluation_suites/{name}/versions/{version}": { + "get": { + "operationId": "EvaluationSuites_getVersion", + "description": "Get the specific version of the EvaluationSuiteVersion. The service returns 404 Not Found error if the EvaluationSuiteVersion does not exist.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "Foundry-Features", - "in": "header", + "name": "name", + "in": "path", "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "description": "The name of the resource.", "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] + "type": "string" } }, { - "name": "name", + "name": "version", "in": "path", "required": true, - "description": "The name of the evaluation taxonomy.", + "description": "The specific version id of the EvaluationSuiteVersion to retrieve.", "schema": { "type": "string" } @@ -5288,20 +5152,61 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" + "$ref": "#/components/schemas/EvaluationSuiteVersion" } } } }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } + } + } + }, + "delete": { + "operationId": "EvaluationSuites_deleteVersion", + "description": "Delete the specific version of the EvaluationSuiteVersion. The service returns 204 No Content if the EvaluationSuiteVersion was deleted successfully or if the EvaluationSuiteVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource.", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version of the EvaluationSuiteVersion to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." }, "default": { "description": "An unexpected error response.", @@ -5322,46 +5227,29 @@ } } } - }, - "tags": [ - "Evaluation Taxonomies" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomyCreateOrUpdate" - } - } - }, - "description": "The evaluation taxonomy." } }, "patch": { - "operationId": "EvaluationTaxonomies_update", - "description": "Update an evaluation taxonomy.", + "operationId": "EvaluationSuites_createOrUpdateVersion", + "description": "Create a new or update an existing EvaluationSuiteVersion with the given version id", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "Foundry-Features", - "in": "header", + "name": "name", + "in": "path", "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "description": "The name of the resource.", "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] + "type": "string" } }, { - "name": "name", + "name": "version", "in": "path", "required": true, - "description": "The name of the evaluation taxonomy.", + "description": "The specific version id of the EvaluationSuiteVersion to create or update.", "schema": { "type": "string" } @@ -5373,7 +5261,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomy" + "$ref": "#/components/schemas/EvaluationSuiteVersion" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteVersion" } } } @@ -5398,27 +5296,23 @@ } } }, - "tags": [ - "Evaluation Taxonomies" - ], "requestBody": { "required": true, "content": { - "application/json": { + "application/merge-patch+json": { "schema": { - "$ref": "#/components/schemas/EvaluationTaxonomyUpdate" + "$ref": "#/components/schemas/EvaluationSuiteVersionUpdate" } } }, - "description": "The evaluation taxonomy." + "description": "The EvaluationSuiteVersion to create or update." } } }, - "/evaluator_generation_jobs": { + "/evaluation_suites/{name}:run": { "post": { - "operationId": "EvaluatorGenerationJobs_create", - "summary": "Creates an evaluator generation job.", - "description": "Creates an evaluator generation job. The service generates rubric-based evaluator\ndefinitions from the provided source materials asynchronously.", + "operationId": "EvaluationSuites_run", + "description": "Run an evaluation using the suite's testing criteria and dataset.", "parameters": [ { "name": "Foundry-Features", @@ -5433,10 +5327,10 @@ } }, { - "name": "Operation-Id", - "in": "header", - "required": false, - "description": "Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.", + "name": "name", + "in": "path", + "required": true, + "description": "The name of the evaluation suite.", "schema": { "type": "string" } @@ -5455,26 +5349,10 @@ "responses": { "201": { "description": "The request has succeeded and a new resource has been created as a result.", - "headers": { - "Operation-Location": { - "required": true, - "description": "URL to poll for the job status.", - "schema": { - "type": "string" - } - }, - "Location": { - "required": true, - "description": "URL of the created job resource.", - "schema": { - "type": "string" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorGenerationJob" + "$ref": "#/components/schemas/EvaluationSuiteRunResponse" } } } @@ -5490,92 +5368,59 @@ } } }, - "tags": [ - "EvaluatorGenerationJobs" - ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorGenerationJobCreate" + "$ref": "#/components/schemas/EvaluationSuiteRunRequest" } } }, - "description": "The job to create." + "description": "The run request parameters." }, "x-ms-foundry-meta": { "required_previews": [ "Evaluations=V1Preview" ] } - }, + } + }, + "/evaluationrules": { "get": { - "operationId": "EvaluatorGenerationJobs_list", - "summary": "Returns a list of evaluator generation jobs.", - "description": "Returns a list of evaluator generation jobs.", + "operationId": "EvaluationRules_list", + "description": "List all evaluation rules.", "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": [ - "Evaluations=V1Preview" - ] - } - }, - { - "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 + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "order", + "name": "actionType", "in": "query", "required": false, - "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", + "description": "Filter by the type of evaluation rule.", "schema": { - "$ref": "#/components/schemas/PageOrder" + "$ref": "#/components/schemas/EvaluationRuleActionType" }, "explode": false }, { - "name": "after", + "name": "agentName", "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.", + "description": "Filter by the agent name.", "schema": { "type": "string" }, "explode": false }, { - "name": "before", + "name": "enabled", "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.", + "description": "Filter by the enabled status.", "schema": { - "type": "string" + "type": "boolean" }, "explode": false } @@ -5586,171 +5431,104 @@ "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "data", - "has_more" - ], - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorGenerationJob" - }, - "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/PagedEvaluationRule" } } } }, "default": { "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } } }, "tags": [ - "EvaluatorGenerationJobs" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } + "Evaluation Rules" + ] } }, - "/evaluator_generation_jobs/{jobId}": { + "/evaluationrules/{id}": { "get": { - "operationId": "EvaluatorGenerationJobs_get", - "summary": "Get info about an evaluator generation job.", - "description": "Gets the details of an evaluator generation job by its ID.", + "operationId": "EvaluationRules_get", + "description": "Get an evaluation rule.", "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": [ - "Evaluations=V1Preview" - ] - } + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "jobId", + "name": "id", "in": "path", "required": true, - "description": "The ID of the job.", + "description": "Unique identifier for the evaluation rule.", "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.", - "headers": { - "Retry-After": { - "required": false, - "description": "Recommended number of seconds to wait before polling again.", - "schema": { - "type": "integer", - "format": "int32" - } - } - }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorGenerationJob" + "$ref": "#/components/schemas/EvaluationRule" } } } }, "default": { "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } } }, "tags": [ - "EvaluatorGenerationJobs" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } + "Evaluation Rules" + ] }, "delete": { - "operationId": "EvaluatorGenerationJobs_delete", - "description": "Deletes an evaluator generation job by its ID. Deletes the job record only;\nthe generated evaluator (if any) is preserved.", + "operationId": "EvaluationRules_delete", + "description": "Delete an evaluation rule.", "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": [ - "Evaluations=V1Preview" - ] - } + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "jobId", + "name": "id", "in": "path", "required": true, - "description": "The ID of the job to delete.", + "description": "Unique identifier for the evaluation rule.", "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": { @@ -5759,61 +5537,55 @@ }, "default": { "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } } }, "tags": [ - "EvaluatorGenerationJobs" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] - } - } - }, - "/evaluator_generation_jobs/{jobId}:cancel": { - "post": { - "operationId": "EvaluatorGenerationJobs_cancel", - "summary": "Cancels an evaluator generation job.", - "description": "Cancels an evaluator generation job by its ID.", + "Evaluation Rules" + ] + }, + "put": { + "operationId": "EvaluationRules_createOrUpdate", + "description": "Create or update an evaluation rule.", "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": [ - "Evaluations=V1Preview" - ] - } + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "jobId", + "name": "id", "in": "path", "required": true, - "description": "The ID of the job to cancel.", + "description": "Unique identifier for the evaluation rule.", "schema": { "type": "string" } }, { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "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" - }, - "explode": false + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } } ], "responses": { @@ -5822,69 +5594,82 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorGenerationJob" + "$ref": "#/components/schemas/EvaluationRule" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationRule" } } } }, "default": { "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" } } } } }, "tags": [ - "EvaluatorGenerationJobs" + "Evaluation Rules" ], - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationRule" + } + } + }, + "description": "Evaluation rule resource" } } }, - "/evaluators": { + "/evaluationtaxonomies": { "get": { - "operationId": "Evaluators_listLatestVersions", - "description": "List the latest version of each evaluator", + "operationId": "EvaluationTaxonomies_list", + "description": "List evaluation taxonomies", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "name": "type", + "name": "inputName", "in": "query", "required": false, - "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", + "description": "Filter by the evaluation input name.", "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/EvaluatorType" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] + "type": "string" }, "explode": false }, { - "name": "limit", + "name": "inputType", "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.", + "description": "Filter by taxonomy input type.", "schema": { - "type": "integer", - "format": "int32", - "default": 20 + "type": "string" }, "explode": false }, @@ -5907,7 +5692,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluatorVersion" + "$ref": "#/components/schemas/PagedEvaluationTaxonomy" } } } @@ -5933,14 +5718,14 @@ } }, "tags": [ - "Evaluators" + "Evaluation Taxonomies" ] } }, - "/evaluators/{name}/versions": { + "/evaluationtaxonomies/{name}": { "get": { - "operationId": "Evaluators_listVersions", - "description": "List all versions of the given evaluator", + "operationId": "EvaluationTaxonomies_get", + "description": "Get an evaluation run by name.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -5954,38 +5739,6 @@ "type": "string" } }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/EvaluatorType" - }, - { - "type": "string", - "enum": [ - "all" - ] - } - ] - }, - "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 default is 20.", - "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false - }, { "name": "Foundry-Features", "in": "header", @@ -6005,7 +5758,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedEvaluatorVersion" + "$ref": "#/components/schemas/EvaluationTaxonomy" } } } @@ -6031,12 +5784,12 @@ } }, "tags": [ - "Evaluators" + "Evaluation Taxonomies" ] }, - "post": { - "operationId": "Evaluators_createVersion", - "description": "Create a new EvaluatorVersion with auto incremented version id", + "delete": { + "operationId": "EvaluationTaxonomies_delete", + "description": "Delete an evaluation taxonomy by name.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -6064,15 +5817,8 @@ } ], "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorVersion" - } - } - } + "204": { + "description": "There is no content to send for this request, but the headers may be useful." }, "default": { "description": "An unexpected error response.", @@ -6095,37 +5841,16 @@ } }, "tags": [ - "Evaluators" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvaluatorVersionCreate" - } - } - } - } - } - }, - "/evaluators/{name}/versions/{version}": { - "get": { - "operationId": "Evaluators_getVersion", - "description": "Get the specific version of the EvaluatorVersion. The service returns 404 Not Found error if the EvaluatorVersion does not exist.", + "Evaluation Taxonomies" + ] + }, + "put": { + "operationId": "EvaluationTaxonomies_create", + "description": "Create an evaluation taxonomy.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, { "name": "Foundry-Features", "in": "header", @@ -6139,10 +5864,10 @@ } }, { - "name": "version", + "name": "name", "in": "path", "required": true, - "description": "The specific version id of the EvaluatorVersion to retrieve.", + "description": "The name of the evaluation taxonomy.", "schema": { "type": "string" } @@ -6154,76 +5879,20 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorVersion" + "$ref": "#/components/schemas/EvaluationTaxonomy" } } } }, - "default": { - "description": "An unexpected error response.", - "headers": { - "x-ms-error-code": { - "required": false, - "description": "String error code indicating what went wrong.", - "schema": { - "type": "string" - } - } - }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + "$ref": "#/components/schemas/EvaluationTaxonomy" } } } - } - }, - "tags": [ - "Evaluators" - ] - }, - "delete": { - "operationId": "Evaluators_deleteVersion", - "description": "Delete the specific version of the EvaluatorVersion. The service returns 204 No Content if the EvaluatorVersion was deleted successfully or if the EvaluatorVersion does not exist.", - "parameters": [ - { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Evaluations=V1Preview" - ] - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version of the EvaluatorVersion to delete.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." }, "default": { "description": "An unexpected error response.", @@ -6246,25 +5915,27 @@ } }, "tags": [ - "Evaluators" - ] + "Evaluation Taxonomies" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationTaxonomyCreateOrUpdate" + } + } + }, + "description": "The evaluation taxonomy." + } }, "patch": { - "operationId": "Evaluators_updateVersion", - "description": "Update an existing EvaluatorVersion with the given version id", + "operationId": "EvaluationTaxonomies_update", + "description": "Update an evaluation taxonomy.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" }, - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the resource", - "schema": { - "type": "string" - } - }, { "name": "Foundry-Features", "in": "header", @@ -6278,10 +5949,10 @@ } }, { - "name": "version", + "name": "name", "in": "path", "required": true, - "description": "The version of the EvaluatorVersion to update.", + "description": "The name of the evaluation taxonomy.", "schema": { "type": "string" } @@ -6293,7 +5964,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorVersion" + "$ref": "#/components/schemas/EvaluationTaxonomy" } } } @@ -6319,25 +5990,26 @@ } }, "tags": [ - "Evaluators" + "Evaluation Taxonomies" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorVersionUpdate" + "$ref": "#/components/schemas/EvaluationTaxonomyUpdate" } } }, - "description": "Evaluator resource" + "description": "The evaluation taxonomy." } } }, - "/evaluators/{name}/versions/{version}/credentials": { + "/evaluator_generation_jobs": { "post": { - "operationId": "Evaluators_getCredentials", - "description": "Get the SAS credential to access the storage account associated with an Evaluator version.", + "operationId": "EvaluatorGenerationJobs_create", + "summary": "Creates an evaluator generation job.", + "description": "Creates an evaluator generation job. The service generates rubric-based evaluator\ndefinitions from the provided source materials asynchronously.", "parameters": [ { "name": "Foundry-Features", @@ -6352,18 +6024,10 @@ } }, { - "name": "name", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The specific version id of the EvaluatorVersion to operate on.", + "name": "Operation-Id", + "in": "header", + "required": false, + "description": "Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.", "schema": { "type": "string" } @@ -6380,12 +6044,28 @@ } ], "responses": { - "200": { - "description": "The request has succeeded.", + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "headers": { + "Operation-Location": { + "required": true, + "description": "URL to poll for the job status.", + "schema": { + "type": "string" + } + }, + "Location": { + "required": true, + "description": "URL of the created job resource.", + "schema": { + "type": "string" + } + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetCredentialResponse" + "$ref": "#/components/schemas/EvaluatorGenerationJob" } } } @@ -6402,30 +6082,29 @@ } }, "tags": [ - "Evaluators" + "EvaluatorGenerationJobs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvaluatorCredentialRequest" + "$ref": "#/components/schemas/EvaluatorGenerationJobCreate" } } }, - "description": "The credential request parameters" + "description": "The job to create." }, "x-ms-foundry-meta": { "required_previews": [ "Evaluations=V1Preview" ] } - } - }, - "/evaluators/{name}/versions/{version}/startPendingUpload": { - "post": { - "operationId": "Evaluators_startPendingUpload", - "description": "Start a new or get an existing pending upload of an evaluator for a specific version.", + }, + "get": { + "operationId": "EvaluatorGenerationJobs_list", + "summary": "Returns a list of evaluator generation jobs.", + "description": "Returns a list of evaluator generation jobs.", "parameters": [ { "name": "Foundry-Features", @@ -6440,21 +6119,46 @@ } }, { - "name": "name", - "in": "path", - "required": true, + "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": "version", - "in": "path", - "required": true, - "description": "The specific version id of the EvaluatorVersion to operate on.", + "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", @@ -6473,7 +6177,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PendingUploadResponse" + "type": "object", + "required": [ + "data", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorGenerationJob" + }, + "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." } } } @@ -6490,19 +6220,8 @@ } }, "tags": [ - "Evaluators" + "EvaluatorGenerationJobs" ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PendingUploadRequest" - } - } - }, - "description": "The pending upload request parameters" - }, "x-ms-foundry-meta": { "required_previews": [ "Evaluations=V1Preview" @@ -6510,13 +6229,267 @@ } } }, - "/indexes": { + "/evaluator_generation_jobs/{jobId}": { "get": { - "operationId": "Indexes_listLatest", - "description": "List the latest version of each Index", + "operationId": "EvaluatorGenerationJobs_get", + "summary": "Get info about an evaluator generation job.", + "description": "Gets the details of an evaluator generation job by its ID.", + "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": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "jobId", + "in": "path", + "required": true, + "description": "The ID of the job.", + "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.", + "headers": { + "Retry-After": { + "required": false, + "description": "Recommended number of seconds to wait before polling again.", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorGenerationJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "EvaluatorGenerationJobs" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + }, + "delete": { + "operationId": "EvaluatorGenerationJobs_delete", + "description": "Deletes an evaluator generation job by its ID. Deletes the job record only;\nthe generated evaluator (if any) is preserved.", + "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": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "jobId", + "in": "path", + "required": true, + "description": "The ID of the job to delete.", + "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": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "EvaluatorGenerationJobs" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "/evaluator_generation_jobs/{jobId}:cancel": { + "post": { + "operationId": "EvaluatorGenerationJobs_cancel", + "summary": "Cancels an evaluator generation job.", + "description": "Cancels an evaluator generation job by its ID.", + "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": [ + "Evaluations=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/EvaluatorGenerationJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "EvaluatorGenerationJobs" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "/evaluators": { + "get": { + "operationId": "Evaluators_listLatestVersions", + "description": "List the latest version of each evaluator", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorType" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + }, + "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 default is 20.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + }, + "explode": false + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } } ], "responses": { @@ -6525,7 +6498,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedIndex" + "$ref": "#/components/schemas/PagedEvaluatorVersion" } } } @@ -6551,14 +6524,14 @@ } }, "tags": [ - "Indexes" + "Evaluators" ] } }, - "/indexes/{name}/versions": { + "/evaluators/{name}/versions": { "get": { - "operationId": "Indexes_listVersions", - "description": "List all versions of the given Index", + "operationId": "Evaluators_listVersions", + "description": "List all versions of the given evaluator", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -6571,6 +6544,50 @@ "schema": { "type": "string" } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorType" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + }, + "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 default is 20.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + }, + "explode": false + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } } ], "responses": { @@ -6579,7 +6596,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedIndex" + "$ref": "#/components/schemas/PagedEvaluatorVersion" } } } @@ -6605,14 +6622,88 @@ } }, "tags": [ - "Indexes" + "Evaluators" ] + }, + "post": { + "operationId": "Evaluators_createVersion", + "description": "Create a new EvaluatorVersion with auto incremented version id", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluators" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorVersionCreate" + } + } + } + } } }, - "/indexes/{name}/versions/{version}": { + "/evaluators/{name}/versions/{version}": { "get": { - "operationId": "Indexes_getVersion", - "description": "Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist.", + "operationId": "Evaluators_getVersion", + "description": "Get the specific version of the EvaluatorVersion. The service returns 404 Not Found error if the EvaluatorVersion does not exist.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -6626,11 +6717,23 @@ "type": "string" } }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + }, { "name": "version", "in": "path", "required": true, - "description": "The specific version id of the Index to retrieve.", + "description": "The specific version id of the EvaluatorVersion to retrieve.", "schema": { "type": "string" } @@ -6642,7 +6745,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Index" + "$ref": "#/components/schemas/EvaluatorVersion" } } } @@ -6668,12 +6771,12 @@ } }, "tags": [ - "Indexes" + "Evaluators" ] }, "delete": { - "operationId": "Indexes_deleteVersion", - "description": "Delete the specific version of the Index. The service returns 204 No Content if the Index was deleted successfully or if the Index does not exist.", + "operationId": "Evaluators_deleteVersion", + "description": "Delete the specific version of the EvaluatorVersion. The service returns 204 No Content if the EvaluatorVersion was deleted successfully or if the EvaluatorVersion does not exist.", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -6687,11 +6790,23 @@ "type": "string" } }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + }, { "name": "version", "in": "path", "required": true, - "description": "The version of the Index to delete.", + "description": "The version of the EvaluatorVersion to delete.", "schema": { "type": "string" } @@ -6722,12 +6837,12 @@ } }, "tags": [ - "Indexes" + "Evaluators" ] }, "patch": { - "operationId": "Indexes_createOrUpdateVersion", - "description": "Create a new or update an existing Index with the given version id", + "operationId": "Evaluators_updateVersion", + "description": "Update an existing EvaluatorVersion with the given version id", "parameters": [ { "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -6741,11 +6856,23 @@ "type": "string" } }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + }, { "name": "version", "in": "path", "required": true, - "description": "The specific version id of the Index to create or update.", + "description": "The version of the EvaluatorVersion to update.", "schema": { "type": "string" } @@ -6757,17 +6884,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Index" - } - } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Index" + "$ref": "#/components/schemas/EvaluatorVersion" } } } @@ -6793,25 +6910,25 @@ } }, "tags": [ - "Indexes" + "Evaluators" ], "requestBody": { "required": true, "content": { - "application/merge-patch+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/IndexUpdate" + "$ref": "#/components/schemas/EvaluatorVersionUpdate" } } }, - "description": "The Index to create or update." + "description": "Evaluator resource" } } }, - "/insights": { + "/evaluators/{name}/versions/{version}/credentials": { "post": { - "operationId": "Insights_generate", - "description": "Generate Insights", + "operationId": "Evaluators_getCredentials", + "description": "Get the SAS credential to access the storage account associated with an Evaluator version.", "parameters": [ { "name": "Foundry-Features", @@ -6821,27 +6938,25 @@ "schema": { "type": "string", "enum": [ - "Insights=V1Preview" + "Evaluations=V1Preview" ] } }, { - "name": "Repeatability-Request-ID", - "in": "header", - "required": false, - "description": "Unique, client-generated identifier for ensuring request idempotency. Use the same ID for retries to prevent duplicate evaluations.", + "name": "name", + "in": "path", + "required": true, "schema": { "type": "string" } }, { - "name": "Repeatability-First-Sent", - "in": "header", - "required": false, - "description": "Timestamp indicating when this request was first initiated. Used in conjunction with repeatability-request-id for idempotency control.", + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the EvaluatorVersion to operate on.", "schema": { - "type": "string", - "format": "http-date" + "type": "string" } }, { @@ -6856,12 +6971,12 @@ } ], "responses": { - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + "200": { + "description": "The request has succeeded.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Insight" + "$ref": "#/components/schemas/AssetCredentialResponse" } } } @@ -6878,19 +6993,495 @@ } }, "tags": [ - "Insights" + "Evaluators" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Insight" + "$ref": "#/components/schemas/EvaluatorCredentialRequest" } } }, - "description": "Complete evaluation configuration including data source, evaluators, and result settings" - } + "description": "The credential request parameters" + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "/evaluators/{name}/versions/{version}/startPendingUpload": { + "post": { + "operationId": "Evaluators_startPendingUpload", + "description": "Start a new or get an existing pending upload of an evaluator for a specific 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": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the EvaluatorVersion to operate on.", + "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/PendingUploadResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluators" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PendingUploadRequest" + } + } + }, + "description": "The pending upload request parameters" + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "/indexes": { + "get": { + "operationId": "Indexes_listLatest", + "description": "List the latest version of each Index", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedIndex" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ] + } + }, + "/indexes/{name}/versions": { + "get": { + "operationId": "Indexes_listVersions", + "description": "List all versions of the given Index", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedIndex" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ] + } + }, + "/indexes/{name}/versions/{version}": { + "get": { + "operationId": "Indexes_getVersion", + "description": "Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the Index to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Index" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ] + }, + "delete": { + "operationId": "Indexes_deleteVersion", + "description": "Delete the specific version of the Index. The service returns 204 No Content if the Index was deleted successfully or if the Index does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version of the Index to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ] + }, + "patch": { + "operationId": "Indexes_createOrUpdateVersion", + "description": "Create a new or update an existing Index with the given version id", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the Index to create or update.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Index" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Index" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ], + "requestBody": { + "required": true, + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/IndexUpdate" + } + } + }, + "description": "The Index to create or update." + } + } + }, + "/insights": { + "post": { + "operationId": "Insights_generate", + "description": "Generate Insights", + "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": [ + "Insights=V1Preview" + ] + } + }, + { + "name": "Repeatability-Request-ID", + "in": "header", + "required": false, + "description": "Unique, client-generated identifier for ensuring request idempotency. Use the same ID for retries to prevent duplicate evaluations.", + "schema": { + "type": "string" + } + }, + { + "name": "Repeatability-First-Sent", + "in": "header", + "required": false, + "description": "Timestamp indicating when this request was first initiated. Used in conjunction with repeatability-request-id for idempotency control.", + "schema": { + "type": "string", + "format": "http-date" + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Insight" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Insights" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Insight" + } + } + }, + "description": "Complete evaluation configuration including data source, evaluators, and result settings" + } }, "get": { "operationId": "Insights_list", @@ -13330,6 +13921,102 @@ } }, "/skills": { + "post": { + "operationId": "Skills_createSkill", + "description": "Creates a skill.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 63, + "description": "The unique name of the skill." + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of the skill." + }, + "instructions": { + "type": "string", + "maxLength": 102400, + "description": "Instructions that define the behavior of the skill." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + } + }, + "required": [ + "name" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] + } + }, "get": { "operationId": "Skills_listSkills", "description": "Returns the list of all skills.", @@ -13414,7 +14101,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Skill" + "$ref": "#/components/schemas/SkillObject" }, "description": "The requested list of items." }, @@ -13468,7 +14155,7 @@ "required": true, "description": "The unique name of the skill.", "schema": { - "$ref": "#/components/schemas/SkillName" + "type": "string" } }, { @@ -13500,7 +14187,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Skill" + "$ref": "#/components/schemas/SkillObject" } } } @@ -13526,16 +14213,16 @@ } }, "post": { - "operationId": "updateSkill", - "description": "Update a skill.", + "operationId": "Skills_updateSkill", + "description": "Updates an existing skill.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The name of the skill to update.", + "description": "The unique name of the skill.", "schema": { - "$ref": "#/components/schemas/SkillName" + "type": "string" } }, { @@ -13567,7 +14254,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Skill" + "$ref": "#/components/schemas/SkillObject" } } } @@ -13593,14 +14280,25 @@ "schema": { "type": "object", "properties": { - "default_version": { + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of the skill." + }, + "instructions": { "type": "string", - "description": "The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest." + "maxLength": 102400, + "description": "Instructions that define the behavior of the skill." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" } - }, - "required": [ - "default_version" - ] + } } } } @@ -13621,7 +14319,7 @@ "required": true, "description": "The unique name of the skill.", "schema": { - "$ref": "#/components/schemas/SkillName" + "type": "string" } }, { @@ -13679,18 +14377,18 @@ } } }, - "/skills/{name}/content": { + "/skills/{name}:download": { "get": { - "operationId": "getSkillContent", - "description": "Download the zip content for the default version of a skill.", + "operationId": "Skills_downloadSkill", + "description": "Downloads a skill package.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The name of the skill.", + "description": "The unique name of the skill.", "schema": { - "$ref": "#/components/schemas/SkillName" + "type": "string" } }, { @@ -13749,19 +14447,11 @@ } } }, - "/skills/{name}/versions": { + "/skills:import": { "post": { - "operationId": "createSkillVersion_createSkillVersionFromFiles", + "operationId": "Skills_createSkillFromPackage", + "description": "Creates a skill from a zip package.", "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the skill. If the skill does not exist, it will be created.", - "schema": { - "$ref": "#/components/schemas/SkillName" - } - }, { "name": "Foundry-Features", "in": "header", @@ -13785,14 +14475,13 @@ "explode": false } ], - "description": "Creates a new version of a skill. If the skill does not exist, it will be created. Creates a new version of a skill from uploaded files via multipart form data.", "responses": { - "200": { - "description": "The request has succeeded.", + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillVersion" + "$ref": "#/components/schemas/SkillObject" } } } @@ -13808,65 +14497,33 @@ } } }, - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] - }, "tags": [ "Skills" ], "requestBody": { "required": true, "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "inline_content": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillInlineContent" - } - ], - "description": "Inline skill content for simple skills without file uploads. Foundry-specific extension." - }, - "default": { - "type": "boolean", - "description": "Whether to set this version as the default." - } - } - } - }, - "multipart/form-data": { + "application/zip": { "schema": { - "$ref": "#/components/schemas/CreateSkillVersionFromFilesBody" - }, - "encoding": { - "files": { - "contentType": "*/*" - }, - "default": { - "contentType": "text/plain" - } + "type": "string", + "format": "binary" } } - } + }, + "description": "The zip package used to create the skill." + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] } - }, + } + }, + "/toolboxes": { "get": { - "operationId": "listSkillVersions", - "description": "List all versions of a skill.", + "operationId": "listToolboxes", + "description": "List all toolboxes.", "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the skill to list versions for.", - "schema": { - "$ref": "#/components/schemas/SkillName" - } - }, { "name": "limit", "in": "query", @@ -13909,18 +14566,6 @@ }, "explode": false }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, { "name": "api-version", "in": "query", @@ -13947,7 +14592,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SkillVersion" + "$ref": "#/components/schemas/ToolboxObject" }, "description": "The requested list of items." }, @@ -13981,50 +14626,24 @@ } }, "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] - } + "Toolboxes" + ] } }, - "/skills/{name}/versions/{version}": { + "/toolboxes/{name}": { "get": { - "operationId": "getSkillVersion", - "description": "Retrieve a specific version of a skill.", + "operationId": "getToolbox", + "description": "Retrieve a toolbox.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The name of the skill.", - "schema": { - "$ref": "#/components/schemas/SkillName" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version identifier to retrieve.", + "description": "The name of the toolbox to retrieve.", "schema": { "type": "string" } }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, { "name": "api-version", "in": "query", @@ -14042,7 +14661,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillVersion" + "$ref": "#/components/schemas/ToolboxObject" } } } @@ -14059,47 +14678,15 @@ } }, "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] - } + "Toolboxes" + ] }, - "delete": { - "operationId": "deleteSkillVersion", - "description": "Delete a specific version of a skill.", + "patch": { + "operationId": "updateToolbox", + "description": "Update a toolbox to point to a specific version.", "parameters": [ { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the skill.", - "schema": { - "$ref": "#/components/schemas/SkillName" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version identifier to delete.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } + "$ref": "#/components/parameters/UpdateToolboxRequest.name" }, { "name": "api-version", @@ -14118,7 +14705,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSkillVersionResponse" + "$ref": "#/components/schemas/ToolboxObject" } } } @@ -14135,48 +14722,76 @@ } }, "tags": [ - "Skills" + "Toolboxes" ], - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateToolboxRequest" + } + } + } } - } - }, - "/skills/{name}/versions/{version}/content": { - "get": { - "operationId": "getSkillVersionContent", - "description": "Download the zip content for a specific version of a skill.", + }, + "delete": { + "operationId": "deleteToolbox", + "description": "Delete a toolbox and all its versions.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The name of the skill.", + "description": "The name of the toolbox to delete.", "schema": { - "$ref": "#/components/schemas/SkillName" + "type": "string" } }, { - "name": "version", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The version to download content for.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ] + } + }, + "/toolboxes/{name}/versions": { + "post": { + "operationId": "createToolboxVersion", + "description": "Create a new version of a toolbox. If the toolbox does not exist, it will be created.", + "parameters": [ { - "name": "Foundry-Features", - "in": "header", + "name": "name", + "in": "path", "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "description": "The name of the toolbox. If the toolbox does not exist, it will be created.", "schema": { "type": "string", - "enum": [ - "Skills=V1Preview" - ] + "maxLength": 256 } }, { @@ -14192,12 +14807,11 @@ ], "responses": { "200": { - "description": "The response body for downloading a skill package.", + "description": "The request has succeeded.", "content": { - "application/zip": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/ToolboxVersionObject" } } } @@ -14214,389 +14828,64 @@ } }, "tags": [ - "Skills" + "Toolboxes" ], - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the toolbox." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the toolbox." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "The list of tools to include in this version." + }, + "policies": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolboxPolicies" + } + ], + "description": "Policy configuration for this toolbox version." + } + }, + "required": [ + "tools" + ] + } + } + } } - } - }, - "/toolboxes": { + }, "get": { - "operationId": "listToolboxes", - "description": "List all toolboxes.", + "operationId": "listToolboxVersions", + "description": "List all versions of a toolbox.", "parameters": [ - { - "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/ToolboxObject" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ] - } - }, - "/toolboxes/{name}": { - "get": { - "operationId": "getToolbox", - "description": "Retrieve a toolbox.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox to retrieve.", - "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/ToolboxObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ] - }, - "patch": { - "operationId": "updateToolbox", - "description": "Update a toolbox to point to a specific version.", - "parameters": [ - { - "$ref": "#/components/parameters/UpdateToolboxRequest.name" - }, - { - "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/ToolboxObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateToolboxRequest" - } - } - } - } - }, - "delete": { - "operationId": "deleteToolbox", - "description": "Delete a toolbox and all its versions.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox to delete.", - "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": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful. " - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ] - } - }, - "/toolboxes/{name}/versions": { - "post": { - "operationId": "createToolboxVersion", - "description": "Create a new version of a toolbox. If the toolbox does not exist, it will be created.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox. If the toolbox does not exist, it will be created.", - "schema": { - "type": "string", - "maxLength": 256 - } - }, - { - "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/ToolboxVersionObject" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Toolboxes" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolbox." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the toolbox." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools to include in this version." - }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolboxSkill" - }, - "description": "The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used." - }, - "policies": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolboxPolicies" - } - ], - "description": "Policy configuration for this toolbox version." - } - }, - "required": [ - "tools" - ] - } - } - } - } - }, - "get": { - "operationId": "listToolboxVersions", - "description": "List all versions of a toolbox.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the toolbox to list versions for.", - "schema": { - "type": "string" - } - }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox to list versions for.", + "schema": { + "type": "string" + } + }, { "name": "limit", "in": "query", @@ -15542,12 +15831,45 @@ "responses", "a2a", "mcp", - "invocations", - "invocations_ws" + "invocations" ] } ] }, + "AgentEvaluationSuiteJobSource": { + "type": "object", + "required": [ + "type", + "agent_name" + ], + "properties": { + "description": { + "type": "string", + "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." + }, + "type": { + "type": "string", + "enum": [ + "agent" + ], + "description": "The source type for this source, which is Agent." + }, + "agent_name": { + "type": "string", + "description": "The agent name to fetch instructions from." + }, + "agent_version": { + "type": "string", + "description": "The agent version. If not specified, the latest version is used." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteJobSource" + } + ], + "description": "Agent source for evaluation suite generation jobs — references an agent to fetch instructions and metadata from." + }, "AgentEvaluatorGenerationJobSource": { "type": "object", "required": [ @@ -15644,23 +15966,6 @@ ], "description": "A trace source that selects traces by agent reference with time-based filtering." }, - "AgentIdentifier": { - "type": "object", - "required": [ - "agentName" - ], - "properties": { - "agentName": { - "type": "string", - "description": "Registered Foundry agent name (required)." - }, - "agentVersion": { - "type": "string", - "description": "Pinned agent version. Defaults to latest if omitted." - } - }, - "description": "Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig." - }, "AgentIdentity": { "type": "object", "required": [ @@ -15816,8 +16121,7 @@ "activity_protocol", "responses", "mcp", - "invocations", - "invocations_ws" + "invocations" ] } ] @@ -15916,7 +16220,6 @@ "idle", "updating", "failed", - "stopping", "deleting", "deleted", "expired" @@ -18173,126 +18476,21 @@ "skills": { "type": "array", "items": { - "type": "object", - "additionalProperties": {} + "$ref": "#/components/schemas/OptimizationAgentSkill" }, "description": "Optional skill overrides." - }, - "tools": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - }, - "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", - "sizeBytes" - ], - "properties": { - "path": { - "type": "string", - "description": "Relative path of the file." - }, - "type": { - "type": "string", - "description": "File type category (e.g. 'config', 'results')." - }, - "sizeBytes": { - "type": "integer", - "format": "int64", - "description": "File size in bytes." - } - }, - "description": "File entry in a candidate's blob directory." - }, - "CandidateMetadata": { - "type": "object", - "required": [ - "candidateId", - "jobId", - "candidateName", - "status", - "hasResults", - "createdAt", - "updatedAt", - "files" - ], - "properties": { - "candidateId": { - "type": "string", - "description": "Server-assigned candidate identifier." - }, - "jobId": { - "type": "string", - "description": "Owning optimization job id." - }, - "candidateName": { - "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." - }, - "hasResults": { - "type": "boolean", - "description": "Whether detailed results are available for this candidate." - }, - "createdAt": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when the candidate was created, represented in Unix time." - }, - "updatedAt": { - "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": [ - "candidateId", + "candidate_id", "results" ], "properties": { - "candidateId": { + "candidate_id": { "type": "string", "description": "Owning candidate id." }, @@ -19338,26 +19536,6 @@ }, "title": "CreateEvalRunRequest" }, - "CreateSkillVersionFromFilesBody": { - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - }, - "description": "Skill files to upload. Upload a single zip file or multiple individual files with relative paths." - }, - "default": { - "type": "boolean", - "description": "Whether to set this version as the default. Defaults to false." - } - }, - "required": [ - "files" - ] - }, "CredentialType": { "anyOf": [ { @@ -19396,7 +19574,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the cron schedule. Defaults to `UTC`.", + "description": "Time zone for the cron schedule.", "default": "UTC" }, "startTime": { @@ -19762,6 +19940,7 @@ "prompt": "#/components/schemas/PromptDataGenerationJobSource", "agent": "#/components/schemas/AgentDataGenerationJobSource", "traces": "#/components/schemas/TracesDataGenerationJobSource", + "dataset": "#/components/schemas/DatasetDataGenerationJobSource", "file": "#/components/schemas/FileDataGenerationJobSource" } }, @@ -19778,6 +19957,7 @@ "prompt", "agent", "traces", + "dataset", "file" ] } @@ -19914,6 +20094,74 @@ ], "description": "Dataset output for a data generation job." }, + "DatasetDataGenerationJobSource": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "description": { + "type": "string", + "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." + }, + "type": { + "type": "string", + "enum": [ + "dataset" + ], + "description": "The source type for this source, which is Dataset." + }, + "name": { + "type": "string", + "description": "The name of the dataset." + }, + "version": { + "type": "string", + "description": "The version of the dataset. If not specified, the latest version is used." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/DataGenerationJobSource" + } + ], + "description": "Dataset source for data generation jobs — reference to a dataset." + }, + "DatasetEvaluationSuiteJobSource": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "description": { + "type": "string", + "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." + }, + "type": { + "type": "string", + "enum": [ + "dataset" + ], + "description": "The source type for this source, which is Dataset." + }, + "name": { + "type": "string", + "description": "The name of the dataset." + }, + "version": { + "type": "string", + "description": "The version of the dataset. If not specified, the latest version is used." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteJobSource" + } + ], + "description": "Dataset source for evaluation suite generation jobs — reference to a dataset." + }, "DatasetEvaluatorGenerationJobSource": { "type": "object", "required": [ @@ -19948,32 +20196,48 @@ ], "description": "Dataset source for evaluator generation jobs — reference to a dataset." }, - "DatasetInfo": { + "DatasetItem": { "type": "object", "required": [ - "taskCount", - "isInline" + "name", + "query" ], "properties": { "name": { "type": "string", - "description": "Dataset name when using a registered dataset reference. Null for inline datasets." + "description": "Unique-within-the-dataset identifier for this task." }, - "version": { + "query": { "type": "string", - "description": "Dataset version when using a registered dataset reference. Null for inline datasets." + "description": "The user query / input for the task." }, - "taskCount": { - "type": "integer", - "format": "int32", - "description": "Number of tasks/rows in the dataset." + "ground_truth": { + "type": "string", + "description": "Optional ground truth used by reference-based evaluators." }, - "isInline": { - "type": "boolean", - "description": "True when the dataset was provided inline in the request body." + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationCriterion" + }, + "description": "Per-task evaluation criteria. Defaults to the job-level evaluators if unset." + }, + "eval_results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunOutputItemResult" + }, + "description": "Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped." + }, + "response_items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputItem" + }, + "description": "Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run." } }, - "description": "Metadata about the dataset used for optimization, surfaced in the response." + "description": "A single evaluation task with input query, expected output, and evaluation criteria." }, "DatasetRef": { "type": "object", @@ -20334,21 +20598,12 @@ "DeleteSkillResponse": { "type": "object", "required": [ - "id", "name", "deleted" ], "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the deleted skill." - }, "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], + "type": "string", "description": "The unique name of the skill." }, "deleted": { @@ -20356,39 +20611,7 @@ "description": "Whether the skill was successfully deleted." } }, - "description": "A deleted skill." - }, - "DeleteSkillVersionResponse": { - "type": "object", - "required": [ - "id", - "name", - "deleted", - "version" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the deleted skill version." - }, - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], - "description": "The name of the skill." - }, - "deleted": { - "type": "boolean", - "description": "Whether the skill version was successfully deleted." - }, - "version": { - "type": "string", - "description": "The version that was deleted." - } - }, - "description": "A deleted skill version." + "description": "A deleted skill Object" }, "Deployment": { "type": "object", @@ -20457,7 +20680,7 @@ }, "always_applicable": { "type": "boolean", - "description": "When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`.", + "description": "When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions.", "default": false } }, @@ -21354,6 +21577,62 @@ ], "description": "Insights from the evaluation comparison." }, + "EvaluationCriterion": { + "type": "object", + "required": [ + "name", + "instruction" + ], + "properties": { + "name": { + "type": "string", + "description": "Criterion name (referenced in evaluation result rows)." + }, + "instruction": { + "type": "string", + "description": "Natural-language instruction passed to the judge LLM." + } + }, + "description": "LLM-as-judge evaluation criterion applied to a single task." + }, + "EvaluationDataGenerationType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "simple_qna", + "traces", + "tool_use", + "task" + ] + } + ], + "description": "The data generation type." + }, + "EvaluationDatasetReference": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Dataset name." + }, + "version": { + "type": "string", + "description": "Dataset version. If not provided, resolves to the latest version." + }, + "schema_file_name": { + "type": "string", + "description": "Name of the schema file within the dataset's blob folder (e.g., \"a3f2b1c4_schema.json\").\nOptional — if not provided, schema is inferred at runtime from the data.\nOnly applicable for uri_folder datasets." + } + }, + "description": "Reference to a dataset by name and version." + }, "EvaluationLevel": { "anyOf": [ { @@ -21392,243 +21671,869 @@ "description": "Evaluation result for the analysis sample." } }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightSample" - } - ], - "description": "A sample from the evaluation result." + "allOf": [ + { + "$ref": "#/components/schemas/InsightSample" + } + ], + "description": "A sample from the evaluation result." + }, + "EvaluationRule": { + "type": "object", + "required": [ + "id", + "action", + "eventType", + "enabled", + "systemData" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the evaluation rule.", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "Display Name for the evaluation rule." + }, + "description": { + "type": "string", + "description": "Description for the evaluation rule." + }, + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleAction" + } + ], + "description": "Definition of the evaluation rule action.", + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + }, + "filter": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleFilter" + } + ], + "description": "Filter condition of the evaluation rule." + }, + "eventType": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleEventType" + } + ], + "description": "Event type that the evaluation rule applies to." + }, + "enabled": { + "type": "boolean", + "description": "Indicates whether the evaluation rule is enabled. Default is true." + }, + "systemData": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "System metadata for the evaluation rule.", + "readOnly": true + } + }, + "description": "Evaluation rule model." + }, + "EvaluationRuleAction": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleActionType" + } + ], + "description": "Type of the evaluation action." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", + "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" + } + }, + "description": "Evaluation action model." + }, + "EvaluationRuleActionType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "continuousEvaluation", + "humanEvaluationPreview" + ] + } + ], + "description": "Type of the evaluation action." + }, + "EvaluationRuleEventType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "responseCompleted", + "manual" + ] + } + ], + "description": "Type of the evaluation rule event." + }, + "EvaluationRuleFilter": { + "type": "object", + "required": [ + "agentName" + ], + "properties": { + "agentName": { + "type": "string", + "description": "Filter by agent name." + } + }, + "description": "Evaluation filter model." + }, + "EvaluationRunClusterInsightRequest": { + "type": "object", + "required": [ + "type", + "evalId", + "runIds" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationRunClusterInsight" + ], + "description": "The type of insights request." + }, + "evalId": { + "type": "string", + "description": "Evaluation Id for the insights." + }, + "runIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of evaluation run IDs for the insights." + }, + "modelConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightModelConfiguration" + } + ], + "description": "Configuration of the model used in the insight generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightRequest" + } + ], + "description": "Insights on set of Evaluation Results" + }, + "EvaluationRunClusterInsightResult": { + "type": "object", + "required": [ + "type", + "clusterInsight" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationRunClusterInsight" + ], + "description": "The type of insights result." + }, + "clusterInsight": { + "$ref": "#/components/schemas/ClusterInsightResult" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightResult" + } + ], + "description": "Insights from the evaluation run cluster analysis." + }, + "EvaluationScheduleTask": { + "type": "object", + "required": [ + "type", + "evalId", + "evalRun" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Evaluation" + ] + }, + "evalId": { + "type": "string", + "description": "Identifier of the evaluation group." + }, + "evalRun": { + "type": "object", + "description": "The evaluation run payload." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleTask" + } + ], + "description": "Evaluation task for the schedule." + }, + "EvaluationSuiteDataGenerationOptions": { + "type": "object", + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationDataGenerationType" + } + ], + "description": "The data generation type. Defaults to 'simple_qna' if not specified." + }, + "max_samples": { + "type": "integer", + "format": "int32", + "minimum": 15, + "maximum": 1000, + "description": "Maximum number of samples to generate. Valid range: 15-1000." + } + }, + "description": "Options for dataset generation within an evaluation suite generation job." + }, + "EvaluationSuiteGenerationCategory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "quality", + "safety" + ] + } + ], + "description": "The category of evaluator generation." + }, + "EvaluationSuiteGenerationJob": { + "type": "object", + "required": [ + "id", + "status", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "description": "Server-assigned unique identifier.", + "readOnly": true + }, + "inputs": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteGenerationJobInputs" + } + ], + "description": "Caller-supplied inputs." + }, + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteVersion" + } + ], + "description": "Result produced on success.", + "readOnly": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/JobStatus" + } + ], + "description": "Current lifecycle status.", + "readOnly": true + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Error" + } + ], + "description": "Error details — populated only on failure.", + "readOnly": true + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The timestamp when the job was created, represented in Unix time.", + "readOnly": true + }, + "finished_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The timestamp when the job finished, represented in Unix time.", + "readOnly": true + }, + "usage": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteGenerationTokenUsage" + } + ], + "description": "Token consumption summary. Populated on terminal states.", + "readOnly": true + } + }, + "description": "Evaluation suite generation job resource — a long-running job that generates testing criteria and optionally a dataset from source materials. On success, the result is the persisted EvaluationSuiteVersion." + }, + "EvaluationSuiteGenerationJobCreate": { + "type": "object", + "properties": { + "inputs": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteGenerationJobInputs" + } + ], + "description": "Caller-supplied inputs." + } + }, + "description": "Evaluation suite generation job resource — a long-running job that generates testing criteria and optionally a dataset from source materials. On success, the result is the persisted EvaluationSuiteVersion." + }, + "EvaluationSuiteGenerationJobInputs": { + "type": "object", + "required": [ + "evaluation_suite_name", + "sources", + "generation_model" + ], + "properties": { + "evaluation_suite_name": { + "type": "string", + "description": "The evaluation suite name to create." + }, + "sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationSuiteJobSource" + }, + "description": "Source materials for generation — agent context, prompts, traces, or datasets." + }, + "generation_model": { + "type": "string", + "description": "The LLM model to use for rubric and data generation (e.g., 'gpt-4o')." + }, + "category": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteGenerationCategory" + } + ], + "description": "Category determines the generation focus. Default: quality.", + "default": "quality" + }, + "initialization_parameters": { + "type": "object", + "additionalProperties": {}, + "description": "Optional initialization parameters applied to all generated evaluators.\nFor example, deployment_name for LLM judge model, default threshold." + }, + "data_generation_options": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteDataGenerationOptions" + } + ], + "description": "Data generation options. Controls how the evaluation dataset is generated.\nIf omitted, defaults are used (simple_qna, 100 max_samples)." + } + }, + "description": "Caller-supplied inputs for an evaluation suite generation job." + }, + "EvaluationSuiteGenerationTokenUsage": { + "type": "object", + "properties": { + "input_tokens": { + "type": "integer", + "format": "int64", + "description": "Number of input tokens consumed." + }, + "output_tokens": { + "type": "integer", + "format": "int64", + "description": "Number of output tokens consumed." + }, + "total_tokens": { + "type": "integer", + "format": "int64", + "description": "Total tokens consumed." + } + }, + "description": "Token usage summary for an evaluation suite generation job." + }, + "EvaluationSuiteJobSource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteJobSourceType" + } + ], + "description": "The type of source." + }, + "description": { + "type": "string", + "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "prompt": "#/components/schemas/PromptEvaluationSuiteJobSource", + "agent": "#/components/schemas/AgentEvaluationSuiteJobSource", + "traces": "#/components/schemas/TracesEvaluationSuiteJobSource", + "dataset": "#/components/schemas/DatasetEvaluationSuiteJobSource" + } + }, + "description": "The base source model for evaluation suite generation jobs. Polymorphic over `type`." + }, + "EvaluationSuiteJobSourceType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "prompt", + "agent", + "traces", + "dataset" + ] + } + ], + "description": "The supported source types for evaluation suite generation jobs." + }, + "EvaluationSuiteRunRequest": { + "type": "object", + "properties": { + "evaluation_name": { + "type": "string", + "description": "Name for the evaluation. Default: '{suiteName}-runs'." + }, + "evaluation_suite_version": { + "type": "string", + "description": "Evaluation suite version to run. Default: latest." + }, + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "Overrides the suite's default evaluation level. If omitted, uses the level from the suite." + } + }, + "description": "Request body for running an evaluation from a suite." + }, + "EvaluationSuiteRunResponse": { + "type": "object", + "required": [ + "evaluation_suite_name", + "evaluation_suite_version", + "results" + ], + "properties": { + "evaluation_suite_name": { + "type": "string", + "description": "The evaluation suite name used." + }, + "evaluation_suite_version": { + "type": "string", + "description": "The evaluation suite version resolved." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationSuiteRunResult" + }, + "description": "The run results. Currently a single-element array; will support multiple runs in the future." + } + }, + "description": "Response from running an evaluation suite." + }, + "EvaluationSuiteRunResult": { + "type": "object", + "required": [ + "eval_id", + "run_id", + "status", + "created_at" + ], + "properties": { + "eval_id": { + "type": "string", + "description": "The evaluation ID created." + }, + "run_id": { + "type": "string", + "description": "The eval run ID created." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/JobStatus" + } + ], + "description": "Status of the run." + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp when the run was created." + } + }, + "description": "Result of a single evaluation run within a suite execution." + }, + "EvaluationSuiteSubtype": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "default", + "benchmark" + ] + } + ], + "description": "The subtype of an evaluation suite." + }, + "EvaluationSuiteVersion": { + "type": "object", + "required": [ + "testing_criteria", + "name", + "version" + ], + "properties": { + "display_name": { + "type": "string", + "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." + }, + "subtype": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteSubtype" + } + ], + "description": "Subtype of the evaluation suite." + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationDatasetReference" + } + ], + "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." + }, + "testing_criteria": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" + }, + { + "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" + } + ] + }, + "minItems": 1, + "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." + }, + "input_messages": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." + }, + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "Default evaluation level for this suite. Can be overridden at run time." + }, + "name": { + "type": "string", + "description": "The name of the resource.", + "readOnly": true + }, + "version": { + "type": "string", + "description": "The version of the resource.", + "readOnly": true + } + }, + "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." }, - "EvaluationRule": { + "EvaluationSuiteVersionCreate": { "type": "object", "required": [ - "id", - "action", - "eventType", - "enabled", - "systemData" + "testing_criteria" ], "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the evaluation rule.", - "readOnly": true - }, - "displayName": { + "display_name": { "type": "string", - "description": "Display Name for the evaluation rule." + "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." }, - "description": { - "type": "string", - "description": "Description for the evaluation rule." + "subtype": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteSubtype" + } + ], + "description": "Subtype of the evaluation suite." }, - "action": { + "dataset": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleAction" + "$ref": "#/components/schemas/EvaluationDatasetReference" } ], - "description": "Definition of the evaluation rule action.", - "x-ms-foundry-meta": { - "required_previews": [ - "Evaluations=V1Preview" + "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." + }, + "testing_criteria": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" + }, + { + "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" + } ] - } + }, + "minItems": 1, + "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." }, - "filter": { + "target": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleFilter" + "$ref": "#/components/schemas/Target" } ], - "description": "Filter condition of the evaluation rule." + "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." }, - "eventType": { + "input_messages": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." + }, + "evaluation_level": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleEventType" + "$ref": "#/components/schemas/EvaluationLevel" } ], - "description": "Event type that the evaluation rule applies to." + "description": "Default evaluation level for this suite. Can be overridden at run time." }, - "enabled": { - "type": "boolean", - "description": "Indicates whether the evaluation rule is enabled. Default is true." + "description": { + "type": "string", + "description": "The asset description text." }, - "systemData": { + "tags": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "System metadata for the evaluation rule.", - "readOnly": true + "description": "Tag dictionary. Tags can be added, removed, and updated." } }, - "description": "Evaluation rule model." + "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." }, - "EvaluationRuleAction": { + "EvaluationSuiteVersionUpdate": { "type": "object", "required": [ - "type" + "testing_criteria" ], "properties": { - "type": { + "display_name": { + "type": "string", + "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." + }, + "subtype": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleActionType" + "$ref": "#/components/schemas/EvaluationSuiteSubtype" } ], - "description": "Type of the evaluation action." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", - "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" - } - }, - "description": "Evaluation action model." - }, - "EvaluationRuleActionType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "continuousEvaluation", - "humanEvaluationPreview" - ] - } - ], - "description": "Type of the evaluation action." - }, - "EvaluationRuleEventType": { - "anyOf": [ - { - "type": "string" + "description": "Subtype of the evaluation suite." }, - { - "type": "string", - "enum": [ - "responseCompleted", - "manual" - ] - } - ], - "description": "Type of the evaluation rule event." - }, - "EvaluationRuleFilter": { - "type": "object", - "required": [ - "agentName" - ], - "properties": { - "agentName": { - "type": "string", - "description": "Filter by agent name." - } - }, - "description": "Evaluation filter model." - }, - "EvaluationRunClusterInsightRequest": { - "type": "object", - "required": [ - "type", - "evalId", - "runIds" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationRunClusterInsight" + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationDatasetReference" + } ], - "description": "The type of insights request." - }, - "evalId": { - "type": "string", - "description": "Evaluation Id for the insights." + "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." }, - "runIds": { + "testing_criteria": { "type": "array", "items": { - "type": "string" + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" + }, + { + "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" + } + ] }, - "description": "List of evaluation run IDs for the insights." + "minItems": 1, + "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." }, - "modelConfiguration": { + "target": { "allOf": [ { - "$ref": "#/components/schemas/InsightModelConfiguration" + "$ref": "#/components/schemas/Target" } ], - "description": "Configuration of the model used in the insight generation." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightRequest" - } - ], - "description": "Insights on set of Evaluation Results" - }, - "EvaluationRunClusterInsightResult": { - "type": "object", - "required": [ - "type", - "clusterInsight" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationRunClusterInsight" + "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." + }, + "input_messages": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } ], - "description": "The type of insights result." + "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." }, - "clusterInsight": { - "$ref": "#/components/schemas/ClusterInsightResult" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "Insights from the evaluation run cluster analysis." - }, - "EvaluationScheduleTask": { - "type": "object", - "required": [ - "type", - "evalId", - "evalRun" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Evaluation" - ] + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "Default evaluation level for this suite. Can be overridden at run time." }, - "evalId": { + "description": { "type": "string", - "description": "Identifier of the evaluation group." + "description": "The asset description text." }, - "evalRun": { + "tags": { "type": "object", - "description": "The evaluation run payload." + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." } }, - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleTask" - } - ], - "description": "Evaluation task for the schedule." + "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." }, "EvaluationTaxonomy": { "type": "object", @@ -23043,6 +23948,27 @@ }, "description": "An array of tools the hosted agent's model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter." }, + "container_protocol_versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProtocolVersionRecord" + }, + "description": "The protocols that the agent supports for ingress communication of the containers.", + "example": [ + { + "protocol": "responses", + "version": "v0.1.1" + }, + { + "protocol": "invocations", + "version": "v0.0.1" + }, + { + "protocol": "a2a", + "version": "v0.3.0" + } + ] + }, "cpu": { "type": "string", "description": "The CPU configuration for the hosted agent.", @@ -23064,6 +23990,11 @@ "value": "debug" } }, + "image": { + "type": "string", + "description": "The image ID for the agent, applicable to image-based hosted agents.", + "example": "my-registry.azurecr.io/my-hosted-agent:latest" + }, "container_configuration": { "allOf": [ { @@ -24334,18 +25265,18 @@ }, "chat_summary_enabled": { "type": "boolean", - "description": "Whether to enable chat summary extraction and storage. Defaults to `true`.", + "description": "Whether to enable chat summary extraction and storage. Default is true.", "default": true }, "procedural_memory_enabled": { "type": "boolean", - "description": "Whether to enable procedural memory extraction and storage. Defaults to `true`.", + "description": "Whether to enable procedural memory extraction and storage. Default is true.", "default": true }, "default_ttl_seconds": { "type": "integer", "format": "int32", - "description": "The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`.", + "description": "The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire.", "default": 0 } }, @@ -25137,7 +26068,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the one-time trigger. Defaults to `UTC`.", + "description": "Time zone for the one-time trigger.", "default": "UTC" } }, @@ -44946,41 +45877,52 @@ }, "OptimizationAgentDefinition": { "type": "object", + "required": [ + "agent_name" + ], "properties": { - "agentName": { + "agent_name": { "type": "string", - "description": "Agent name." + "description": "Registered Foundry agent name. Required — bare-model mode is not supported." }, - "agentVersion": { + "agent_version": { "type": "string", - "description": "Agent version." + "description": "Pinned agent version. Defaults to latest if omitted." }, "model": { "type": "string", - "description": "Model deployment name." + "description": "Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model." }, - "systemPrompt": { + "system_prompt": { "type": "string", - "description": "System prompt / instructions." + "description": "System prompt / instructions override. When set, used as the baseline instructions for the agent." }, "skills": { "type": "array", "items": { - "type": "object", - "additionalProperties": {} + "$ref": "#/components/schemas/OptimizationAgentSkill" }, - "description": "Agent skills." + "description": "Optional named skills the optimizer may tune. Tool descriptions and parameters." + } + }, + "description": "The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides." + }, + "OptimizationAgentSkill": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Skill name (matches the tool name on the agent)." }, - "tools": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - }, - "description": "Agent tools." + "description": { + "type": "string", + "description": "Free-form description used as the seed when tuning skill descriptions." } }, - "description": "Agent definition returned in response payloads (includes resolved config)." + "description": "A named skill on the agent that the optimizer may tune." }, "OptimizationCandidate": { "type": "object", @@ -44988,16 +45930,17 @@ "name", "config", "mutations", - "avgScore", - "avgTokens", - "passRate", - "taskScores", - "isParetoOptimal" + "rationale", + "avg_score", + "avg_tokens", + "pass_rate", + "task_scores", + "is_pareto_optimal" ], "properties": { - "candidateId": { + "candidate_id": { "type": "string", - "description": "Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints." + "description": "Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints." }, "name": { "type": "string", @@ -45014,49 +45957,67 @@ "mutations": { "type": "object", "additionalProperties": {}, - "description": "What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'})." + "description": "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." + }, + "rationale": { + "type": "string", + "description": "Strategy rationale — why this candidate was generated." }, - "avgScore": { + "avg_score": { "type": "number", "format": "double", "description": "Average composite score across all tasks." }, - "avgTokens": { + "avg_tokens": { "type": "number", "format": "double", "description": "Average token usage across all tasks." }, - "passRate": { + "pass_rate": { "type": "number", "format": "double", "description": "Fraction of tasks that met the pass threshold." }, - "taskScores": { + "task_scores": { "type": "array", "items": { "$ref": "#/components/schemas/OptimizationTaskResult" }, "description": "Individual task-level scores." }, - "isParetoOptimal": { + "is_pareto_optimal": { "type": "boolean", "description": "Whether this candidate is on the Pareto frontier (score vs cost)." }, - "evalId": { - "type": "string", - "description": "Foundry evaluation identifier used to score this candidate." + "sample_avg_score": { + "type": "number", + "format": "double", + "description": "Average score from sampled evaluation (null if full dataset was used)." + }, + "sample_size": { + "type": "integer", + "format": "int32", + "description": "Number of tasks in the sample (null if full dataset was used)." }, - "evalRunId": { + "evaluation_type": { "type": "string", - "description": "Foundry evaluation run identifier for this candidate's scoring run." + "description": "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." }, - "promotion": { + "strategy": { "allOf": [ { - "$ref": "#/components/schemas/PromotionInfo" + "$ref": "#/components/schemas/OptimizationStrategy" } ], - "description": "Promotion metadata. Null if the candidate has not been promoted." + "description": "Identifies the strategy that produced this candidate." + }, + "eval_id": { + "type": "string", + "description": "Foundry evaluation identifier used to score this candidate." + }, + "eval_run_id": { + "type": "string", + "description": "Foundry evaluation run identifier for this candidate's scoring run." } }, "description": "Aggregated evaluation result for a single candidate agent configuration across all tasks." @@ -45066,7 +46027,7 @@ "required": [ "id", "status", - "createdAt" + "created_at" ], "properties": { "id": { @@ -45074,42 +46035,42 @@ "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 }, - "createdAt": { + "created_at": { "allOf": [ { "$ref": "#/components/schemas/FoundryTimestamp" @@ -45118,7 +46079,7 @@ "description": "The timestamp when the job was created, represented in Unix time.", "readOnly": true }, - "updatedAt": { + "updated_at": { "allOf": [ { "$ref": "#/components/schemas/FoundryTimestamp" @@ -45135,43 +46096,40 @@ ], "description": "Progress while in flight. Absent in terminal states.", "readOnly": true - }, - "dataset": { - "allOf": [ - { - "$ref": "#/components/schemas/DatasetInfo" - } - ], - "description": "Metadata about the dataset used for this optimization job.", - "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." + "description": "Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates." }, "OptimizationJobInputs": { "type": "object", "required": [ - "agent", - "trainDatasetReference" + "agent" ], "properties": { "agent": { "allOf": [ { - "$ref": "#/components/schemas/AgentIdentifier" + "$ref": "#/components/schemas/OptimizationAgentDefinition" } ], "description": "The agent (and pinned version) being optimized." }, - "trainDatasetReference": { + "dataset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetItem" + }, + "description": "Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`." + }, + "train_dataset_reference": { "allOf": [ { "$ref": "#/components/schemas/DatasetRef" } ], - "description": "Reference to a registered training dataset (required)." + "description": "Reference to a registered training dataset. Mutually exclusive with `dataset`." }, - "validationDatasetReference": { + "validation_dataset_reference": { "allOf": [ { "$ref": "#/components/schemas/DatasetRef" @@ -45184,7 +46142,14 @@ "items": { "type": "string" }, - "description": "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." + "description": "Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence']." + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationCriterion" + }, + "description": "Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`." }, "options": { "allOf": [ @@ -45200,28 +46165,49 @@ "OptimizationJobProgress": { "type": "object", "required": [ - "currentIteration", - "bestScore", - "elapsedSeconds" + "current_strategy", + "current_iteration", + "tasks_completed", + "tasks_total", + "best_score", + "elapsed_seconds" ], "properties": { - "currentIteration": { + "current_strategy": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationStrategy" + } + ], + "description": "Strategy currently being explored." + }, + "current_iteration": { "type": "integer", "format": "int32", "description": "1-based current iteration index." }, - "bestScore": { + "tasks_completed": { + "type": "integer", + "format": "int32", + "description": "Tasks evaluated so far this iteration." + }, + "tasks_total": { + "type": "integer", + "format": "int32", + "description": "Total tasks scheduled this iteration." + }, + "best_score": { "type": "number", "format": "double", "description": "Best score observed so far across all candidates." }, - "elapsedSeconds": { + "elapsed_seconds": { "type": "number", "format": "double", - "description": "Wall-clock time elapsed in seconds since the job began executing." + "description": "Wall-clock time elapsed since the job began executing." } }, - "description": "In-flight progress; only populated while status is queued or in_progress." + "description": "In-flight progress; only populated while status is `queued` or `in_progress`." }, "OptimizationJobResult": { "type": "object", @@ -45249,6 +46235,21 @@ }, "description": "All evaluated candidates including baseline." }, + "pareto_frontier": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationCandidate" + }, + "description": "Candidates on the Pareto frontier (maximize score, minimize cost)." + }, + "validation_score": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationCandidate" + } + ], + "description": "Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided." + }, "options": { "allOf": [ { @@ -45257,65 +46258,151 @@ ], "description": "The options used for this optimization run." }, + "sample_size": { + "type": "integer", + "format": "int32", + "description": "Number of tasks sampled during optimization iterations (null if sampling was not used)." + }, "warnings": { "type": "array", "items": { "type": "string" }, - "description": "Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped)." + "description": "Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped)." }, - "allTargetAttributesFailed": { + "all_strategies_failed": { "type": "boolean", - "description": "True when all target attributes failed — only the baseline was evaluated." + "description": "True when all optimization strategies failed — only the baseline was evaluated." } }, - "description": "Terminal-state result body. Populated when status is succeeded or failed." + "description": "Terminal-state result body. Populated when `status` is `succeeded` or `failed`." + }, + "OptimizationMode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "optimize" + ] + } + ], + "description": "Run mode for an optimization job." }, "OptimizationOptions": { "type": "object", "properties": { - "maxIterations": { + "strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationStrategy" + }, + "description": "Strategies to apply this run. Default: ['instruction'].", + "default": [ + "instruction" + ] + }, + "budget": { + "type": "integer", + "format": "int32", + "description": "Total candidate generation budget (number of candidates explored). Default: 10.", + "default": 10 + }, + "max_iterations": { "type": "integer", "format": "int32", - "description": "Maximum optimization iterations per strategy. Must be >= 1. Default: 5.", + "description": "Maximum optimization iterations per strategy. Default: 5.", "default": 5 }, - "optimizationConfig": { - "type": "object", - "additionalProperties": {}, - "description": "Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization." + "tasks_per_iteration": { + "type": "integer", + "format": "int32", + "description": "Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed)." }, - "evalModel": { - "type": "string", - "description": "Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o')." + "max_reflection_tasks": { + "type": "integer", + "format": "int32", + "description": "Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.", + "default": 5 }, - "optimizationModel": { - "type": "string", - "description": "Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set." + "min_improvement": { + "type": "number", + "format": "double", + "description": "Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.", + "default": 0.005 + }, + "pass_threshold": { + "type": "number", + "format": "double", + "description": "Composite score threshold for a task to be considered passing. Default: 0.5.", + "default": 0.5 + }, + "improvement_threshold": { + "type": "number", + "format": "double", + "description": "Target average score at which optimization stops early (quality ceiling). Default: 0.95.", + "default": 0.95 }, - "evaluationLevel": { + "mode": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationLevel" + "$ref": "#/components/schemas/OptimizationMode" } ], - "description": "Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for per-conversation multi-turn simulation scoring." + "description": "Run mode." + }, + "eval_model": { + "type": "string", + "description": "Foundry deployment name to use as the LLM-as-judge evaluation model. Required." + }, + "reflection_model": { + "type": "string", + "description": "Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset." + }, + "task_timeout_seconds": { + "type": "integer", + "format": "int32", + "description": "Per-task timeout for agent execution. Default: 300 seconds (5 minutes).", + "default": 300 + }, + "keep_versions": { + "type": "boolean", + "description": "If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.", + "default": false } }, "description": "Tuning knobs and run-mode for an optimization job." }, + "OptimizationStrategy": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "instruction", + "model", + "skill" + ] + } + ], + "description": "Optimization strategy dimension." + }, "OptimizationTaskResult": { "type": "object", "required": [ - "taskName", + "task_name", "scores", - "compositeScore", + "composite_score", "tokens", - "durationSeconds", + "duration_seconds", "passed" ], "properties": { - "taskName": { + "task_name": { "type": "string", "description": "Task name (from the dataset)." }, @@ -45331,7 +46418,7 @@ }, "description": "Per-evaluator scores keyed by evaluator name." }, - "compositeScore": { + "composite_score": { "type": "number", "format": "double", "description": "Composite score combining all evaluator scores." @@ -45341,7 +46428,7 @@ "format": "int32", "description": "Total tokens consumed during the agent run for this task." }, - "durationSeconds": { + "duration_seconds": { "type": "number", "format": "double", "description": "Wall-clock seconds for this task's agent execution." @@ -45350,7 +46437,7 @@ "type": "boolean", "description": "Whether the task met the pass threshold." }, - "errorMessage": { + "error_message": { "type": "string", "description": "Error message if the task failed during execution." }, @@ -45365,7 +46452,7 @@ "type": "string", "description": "Raw agent response text." }, - "runId": { + "run_id": { "type": "string", "description": "Identifier of the agent run that produced this result." } @@ -45505,6 +46592,27 @@ }, "description": "Paged collection of EvaluationRule items" }, + "PagedEvaluationSuiteVersion": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationSuiteVersion" + }, + "description": "The EvaluationSuiteVersion items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of EvaluationSuiteVersion items" + }, "PagedEvaluationTaxonomy": { "type": "object", "required": [ @@ -45783,88 +46891,6 @@ ] } }, - "PromoteCandidateRequest": { - "type": "object", - "required": [ - "agentName", - "agentVersion" - ], - "properties": { - "agentName": { - "type": "string", - "description": "Name of the Foundry agent to promote to." - }, - "agentVersion": { - "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": [ - "candidateId", - "status", - "promotedAt", - "agentName", - "agentVersion" - ], - "properties": { - "candidateId": { - "type": "string", - "description": "The promoted candidate id." - }, - "status": { - "type": "string", - "description": "Status after promotion." - }, - "promotedAt": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when promotion occurred, represented in Unix time." - }, - "agentName": { - "type": "string", - "description": "Name of the Foundry agent promoted to." - }, - "agentVersion": { - "type": "string", - "description": "Version of the Foundry agent promoted to." - } - }, - "description": "Response after successfully promoting a candidate." - }, - "PromotionInfo": { - "type": "object", - "required": [ - "promotedAt", - "agentName", - "agentVersion" - ], - "properties": { - "promotedAt": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when promotion occurred, represented in Unix time." - }, - "agentName": { - "type": "string", - "description": "Name of the Foundry agent this candidate was promoted to." - }, - "agentVersion": { - "type": "string", - "description": "Version of the Foundry agent this candidate was promoted to." - } - }, - "description": "Promotion metadata recorded when a candidate is deployed to a Foundry agent." - }, "PromptAgentDefinition": { "type": "object", "required": [ @@ -45893,7 +46919,7 @@ "nullable": true, "minimum": 0, "maximum": 2, - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both. Defaults to `1`.", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.", "default": 1 }, "top_p": { @@ -45902,7 +46928,7 @@ "nullable": true, "minimum": 0, "maximum": 1, - "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered. We generally recommend altering this or `temperature` but not both.\nDefaults to `1`.", + "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.", "default": 1 }, "reasoning": { @@ -46019,6 +47045,36 @@ ], "description": "Prompt source for data generation jobs — inline text provided by the user." }, + "PromptEvaluationSuiteJobSource": { + "type": "object", + "required": [ + "type", + "prompt" + ], + "properties": { + "description": { + "type": "string", + "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." + }, + "type": { + "type": "string", + "enum": [ + "prompt" + ], + "description": "The source type for this source, which is Prompt." + }, + "prompt": { + "type": "string", + "description": "Inline prompt text (e.g., agent description, policy text, supplementary context)." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteJobSource" + } + ], + "description": "Prompt source for evaluation suite generation jobs — inline text provided by the user." + }, "PromptEvaluatorGenerationJobSource": { "type": "object", "required": [ @@ -46135,7 +47191,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the recurrence schedule. Defaults to `UTC`.", + "description": "Time zone for the recurrence schedule.", "default": "UTC" }, "interval": { @@ -47572,27 +48628,25 @@ ], "description": "The supported question types for SimpleQnA data generation jobs used for fine-tuning scenarios." }, - "Skill": { + "SkillObject": { "type": "object", "required": [ - "id", - "name", - "description", - "created_at", - "default_version", - "latest_version" + "skill_id", + "has_blob", + "name" ], "properties": { - "id": { + "skill_id": { "type": "string", "description": "The unique identifier of the skill." }, + "has_blob": { + "type": "boolean", + "description": "Whether the skill was created from a zip blob package." + }, "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], + "type": "string", + "maxLength": 63, "description": "The unique name of the skill." }, "description": { @@ -47600,119 +48654,16 @@ "maxLength": 1024, "description": "A human-readable description of the skill." }, - "created_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The Unix timestamp (seconds) when the skill was created." - }, - "default_version": { - "type": "string", - "description": "The default version for the skill. Can be changed via updateSkill." - }, - "latest_version": { - "type": "string", - "description": "The latest version for the skill." - } - }, - "description": "A skill resource." - }, - "SkillInlineContent": { - "type": "object", - "required": [ - "description", - "instructions" - ], - "properties": { - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of what the skill does and when to use it." - }, - "instructions": { - "type": "string", - "description": "The skill instructions in markdown format. This is the body content of the SKILL.md file." - }, - "license": { - "type": "string", - "description": "License name or reference to a bundled license file." - }, - "compatibility": { - "type": "string", - "maxLength": 500, - "description": "Environment requirements or compatibility notes for the skill." - }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Arbitrary key-value metadata for additional properties." - }, - "allowed_tools": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of pre-approved tools the skill may use. Experimental." - } - }, - "description": "Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification." - }, - "SkillName": { - "type": "string", - "maxLength": 64, - "pattern": "^[a-z0-9]([a-z0-9\\-]*[a-z0-9])?$", - "description": "A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens." - }, - "SkillVersion": { - "type": "object", - "required": [ - "id", - "skill_id", - "name", - "version", - "description", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the skill version." - }, - "skill_id": { - "type": "string", - "description": "The identifier of the parent skill." - }, - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], - "description": "The name of the skill version." - }, - "version": { - "type": "string", - "description": "The version identifier. Skill versions are immutable." - }, - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill version." - }, - "created_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The Unix timestamp (seconds) when the skill version was created." + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" } }, - "description": "A specific version of a skill." + "description": "A skill object." }, "Sku": { "type": "object", @@ -47765,7 +48716,7 @@ }, "required": { "type": "boolean", - "description": "Whether the input property is required when the agent is invoked. Defaults to `false`.", + "description": "Whether the input property is required when the agent is invoked.", "default": false } }, @@ -48551,59 +49502,6 @@ ], "description": "A tool for searching over the agent's toolbox.\nWhen present, deferred tools are hidden from `tools/list` and only\ndiscoverable via `search_tools` queries at runtime." }, - "ToolboxSkill": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The type of skill source." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "skill_reference": "#/components/schemas/ToolboxSkillReference" - } - }, - "description": "A skill source included in a toolbox." - }, - "ToolboxSkillReference": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "skill_reference" - ], - "description": "The type of skill source." - }, - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], - "description": "The name of the skill." - }, - "version": { - "type": "string", - "description": "The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ToolboxSkill" - } - ], - "description": "A reference to an existing skill to include in a toolbox." - }, "ToolboxVersionObject": { "type": "object", "required": [ @@ -48654,13 +49552,6 @@ }, "description": "The list of tools contained in this toolbox version." }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolboxSkill" - }, - "description": "The list of skill sources included in this toolbox version." - }, "policies": { "allOf": [ { @@ -48817,6 +49708,60 @@ ], "description": "Traces source for data generation jobs — conversation traces from Application Insights." }, + "TracesEvaluationSuiteJobSource": { + "type": "object", + "required": [ + "type", + "start_time" + ], + "properties": { + "description": { + "type": "string", + "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." + }, + "type": { + "type": "string", + "enum": [ + "traces" + ], + "description": "The source type for this source, which is Traces." + }, + "agent_id": { + "type": "string", + "description": "The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required." + }, + "agent_name": { + "type": "string", + "description": "The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required." + }, + "agent_version": { + "type": "string", + "description": "The agent version. If not specified, traces for ALL versions of the agent are included within the time window." + }, + "start_time": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Start of the time window (Unix timestamp in seconds) for fetching traces." + }, + "end_time": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "End of the time window (Unix timestamp in seconds). Defaults to current time." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteJobSource" + } + ], + "description": "Traces source for evaluation suite generation jobs — conversation traces from Application Insights." + }, "TracesEvaluatorGenerationJobSource": { "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 1e7ffd766e91..3e92d60aece0 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 @@ -11,6 +11,7 @@ tags: - name: Deployments - name: Evaluation Taxonomies - name: Evaluation Rules + - name: EvaluationSuiteGenerationJobs - name: Evaluators - name: EvaluatorGenerationJobs - name: Indexes @@ -87,15 +88,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 get: operationId: AgentOptimizationJobs_list summary: Returns a list of agent optimization jobs. - description: List optimization jobs. Supports cursor pagination and optional status / agentName filters. + description: List optimization jobs. Supports cursor pagination and optional `status` / `agent_name` filters. parameters: - name: Foundry-Features in: header @@ -152,7 +153,7 @@ paths: schema: $ref: '#/components/schemas/JobStatus' explode: false - - name: agentName + - name: agent_name in: query required: false description: Filter to jobs targeting this agent name. @@ -207,7 +208,7 @@ paths: get: operationId: AgentOptimizationJobs_get summary: Get info about an agent optimization job. - description: Get an optimization job by id. Returns 202 while in progress, 200 when terminal. + description: Get an optimization job by id. Emits `Retry-After` while the job is non-terminal. parameters: - name: Foundry-Features in: header @@ -236,18 +237,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 @@ -285,13 +275,6 @@ paths: 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 @@ -421,7 +404,7 @@ paths: get: operationId: AgentOptimizationJobs_getCandidate summary: Get a candidate by id. - description: Get a single candidate's metadata, manifest, and promotion info. + description: Get a single candidate manifest and aggregated evaluation summary. parameters: - name: Foundry-Features in: header @@ -456,7 +439,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CandidateMetadata' + $ref: '#/components/schemas/OptimizationCandidate' default: description: An unexpected error response. content: @@ -519,65 +502,6 @@ paths: x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}/files: - get: - operationId: AgentOptimizationJobs_getCandidateFile - summary: Get a candidate file. - description: Stream a specific 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: - type: string - format: binary - default: - description: An unexpected error response. - 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 @@ -629,64 +553,6 @@ paths: x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote: - post: - operationId: AgentOptimizationJobs_promoteCandidate - summary: Promote a candidate. - description: Promotes a candidate, recording 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' - default: - description: An unexpected error response. - 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 @@ -1003,7 +869,7 @@ paths: - name: force in: query required: false - description: For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. + description: For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. schema: type: boolean default: false @@ -1425,12 +1291,6 @@ paths: description: The name of the agent to create a session for. schema: type: string - - name: x-ms-user-isolation-key - in: header - required: false - description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. - schema: - type: string - name: api-version in: query required: true @@ -1480,12 +1340,6 @@ paths: description: The name of the agent. schema: type: string - - name: x-ms-user-isolation-key - in: header - required: false - description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. - schema: - type: string - name: limit in: query required: false @@ -1863,12 +1717,6 @@ paths: description: The session identifier. schema: type: string - - name: x-ms-user-isolation-key - in: header - required: false - description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. - schema: - type: string - name: api-version in: query required: true @@ -1899,60 +1747,6 @@ paths: description: |- Deletes a session synchronously. Returns 204 No Content when the session is deleted or does not exist. - 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: - - AgentEndpoints=V1Preview - - name: agent_name - in: path - required: true - description: The name of the agent. - schema: - type: string - - name: session_id - in: path - required: true - description: The session identifier. - schema: - type: string - - name: x-ms-user-isolation-key - in: header - required: false - description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. - 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: - '204': - description: There is no content to send for this request, but the headers may be useful. - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Agents - x-ms-foundry-meta: - required_previews: - - AgentEndpoints=V1Preview - /agents/{agent_name}/endpoint/sessions/{session_id}:stop: - post: - operationId: Agents_stopSession - description: |- - Stops a session. - Returns 204 No Content when the stop succeeds. parameters: - name: Foundry-Features in: header @@ -2253,7 +2047,7 @@ paths: - name: force in: query required: false - description: For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. + description: For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. schema: type: boolean default: false @@ -2621,6 +2415,22 @@ paths: schema: type: string explode: false + - name: scenario + in: query + required: false + description: Filter data generation jobs by their scenario. + schema: + $ref: '#/components/schemas/DataGenerationJobScenario' + explode: false + - name: type + in: query + required: false + description: Filter data generation jobs by their type. + schema: + type: array + items: + $ref: '#/components/schemas/DataGenerationJobType' + explode: false - name: api-version in: query required: true @@ -3228,6 +3038,581 @@ paths: $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' tags: - Deployments + /evaluation_suite_generation_jobs: + post: + operationId: EvaluationSuiteGenerationJobs_create + summary: Creates an evaluation suite generation job. + description: Create a new job (preview). Includes optional Foundry-Features header and Operation-Id for idempotent retries. + 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: + - Evaluations=V1Preview + - name: Operation-Id + in: header + required: false + description: Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + 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: + '201': + description: The request has succeeded and a new resource has been created as a result. + headers: + Operation-Location: + required: true + description: URL to poll for the job status. + schema: + type: string + Location: + required: true + description: URL of the created job resource. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteGenerationJob' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - EvaluationSuiteGenerationJobs + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteGenerationJobCreate' + description: The job to create. + x-ms-foundry-meta: + conditional_previews: + - Evaluations=V1Preview + get: + operationId: EvaluationSuiteGenerationJobs_list + summary: Returns a list of evaluation suite generation jobs. + description: List jobs with cursor-based pagination (preview). Includes optional Foundry-Features header. + 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: + - Evaluations=V1Preview + - 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/EvaluationSuiteGenerationJob' + 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. + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - EvaluationSuiteGenerationJobs + x-ms-foundry-meta: + conditional_previews: + - Evaluations=V1Preview + /evaluation_suite_generation_jobs/{jobId}: + get: + operationId: EvaluationSuiteGenerationJobs_get + summary: Get info about an evaluation suite generation job. + description: Get a job by ID (preview). Includes optional Foundry-Features header. + 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: + - Evaluations=V1Preview + - name: jobId + in: path + required: true + description: The ID of the job. + 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. + headers: + Retry-After: + required: false + description: Recommended number of seconds to wait before polling again. + schema: + type: integer + format: int32 + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteGenerationJob' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - EvaluationSuiteGenerationJobs + x-ms-foundry-meta: + conditional_previews: + - Evaluations=V1Preview + delete: + operationId: EvaluationSuiteGenerationJobs_delete + summary: Deletes an evaluation suite generation job. + description: Delete a job (preview). Returns 204 No Content. + 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: + - Evaluations=V1Preview + - name: jobId + in: path + required: true + description: The ID of the job to delete. + 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: + '204': + description: There is no content to send for this request, but the headers may be useful. + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - EvaluationSuiteGenerationJobs + x-ms-foundry-meta: + conditional_previews: + - Evaluations=V1Preview + /evaluation_suite_generation_jobs/{jobId}:cancel: + post: + operationId: EvaluationSuiteGenerationJobs_cancel + summary: Cancels an evaluation suite generation job. + description: Cancel a running job (preview). Returns 200 with the updated 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: + - Evaluations=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/EvaluationSuiteGenerationJob' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - EvaluationSuiteGenerationJobs + x-ms-foundry-meta: + conditional_previews: + - Evaluations=V1Preview + /evaluation_suites: + get: + operationId: EvaluationSuites_listLatest + description: List the latest version of each EvaluationSuiteVersion + parameters: + - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' + - name: agent_name + in: query + required: false + description: Filter by associated Foundry agent name (from target). + schema: + type: string + explode: false + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/PagedEvaluationSuiteVersion' + default: + description: An unexpected error response. + headers: + x-ms-error-code: + required: false + description: String error code indicating what went wrong. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' + /evaluation_suites/{name}/versions: + get: + operationId: EvaluationSuites_listVersions + description: List all versions of the given EvaluationSuiteVersion + parameters: + - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' + - name: name + in: path + required: true + description: The name of the resource. + schema: + type: string + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/PagedEvaluationSuiteVersion' + default: + description: An unexpected error response. + headers: + x-ms-error-code: + required: false + description: String error code indicating what went wrong. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' + post: + operationId: EvaluationSuites_createEvaluationSuiteVersion + description: Create a new EvaluationSuiteVersion with auto incremented version id + 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: + - Evaluations=V1Preview + - name: name + in: path + required: true + description: The name of the evaluation suite. + 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: + '201': + description: The request has succeeded and a new resource has been created as a result. + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteVersion' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteVersionCreate' + description: The evaluation suite version to create. + x-ms-foundry-meta: + required_previews: + - Evaluations=V1Preview + /evaluation_suites/{name}/versions/{version}: + get: + operationId: EvaluationSuites_getVersion + description: Get the specific version of the EvaluationSuiteVersion. The service returns 404 Not Found error if the EvaluationSuiteVersion does not exist. + parameters: + - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' + - name: name + in: path + required: true + description: The name of the resource. + schema: + type: string + - name: version + in: path + required: true + description: The specific version id of the EvaluationSuiteVersion to retrieve. + schema: + type: string + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteVersion' + default: + description: An unexpected error response. + headers: + x-ms-error-code: + required: false + description: String error code indicating what went wrong. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' + delete: + operationId: EvaluationSuites_deleteVersion + description: Delete the specific version of the EvaluationSuiteVersion. The service returns 204 No Content if the EvaluationSuiteVersion was deleted successfully or if the EvaluationSuiteVersion does not exist. + parameters: + - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' + - name: name + in: path + required: true + description: The name of the resource. + schema: + type: string + - name: version + in: path + required: true + description: The version of the EvaluationSuiteVersion to delete. + schema: + type: string + responses: + '204': + description: There is no content to send for this request, but the headers may be useful. + default: + description: An unexpected error response. + headers: + x-ms-error-code: + required: false + description: String error code indicating what went wrong. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' + patch: + operationId: EvaluationSuites_createOrUpdateVersion + description: Create a new or update an existing EvaluationSuiteVersion with the given version id + parameters: + - $ref: '#/components/parameters/Azure.Core.Foundations.ApiVersionParameter' + - name: name + in: path + required: true + description: The name of the resource. + schema: + type: string + - name: version + in: path + required: true + description: The specific version id of the EvaluationSuiteVersion to create or update. + schema: + type: string + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteVersion' + '201': + description: The request has succeeded and a new resource has been created as a result. + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteVersion' + default: + description: An unexpected error response. + headers: + x-ms-error-code: + required: false + description: String error code indicating what went wrong. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/Azure.Core.Foundations.ErrorResponse' + requestBody: + required: true + content: + application/merge-patch+json: + schema: + $ref: '#/components/schemas/EvaluationSuiteVersionUpdate' + description: The EvaluationSuiteVersion to create or update. + /evaluation_suites/{name}:run: + post: + operationId: EvaluationSuites_run + description: Run an evaluation using the suite's testing criteria and dataset. + 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: + - Evaluations=V1Preview + - name: name + in: path + required: true + description: The name of the evaluation suite. + 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: + '201': + description: The request has succeeded and a new resource has been created as a result. + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteRunResponse' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/EvaluationSuiteRunRequest' + description: The run request parameters. + x-ms-foundry-meta: + required_previews: + - Evaluations=V1Preview /evaluationrules: get: operationId: EvaluationRules_list @@ -8835,6 +9220,76 @@ paths: tags: - Schedules /skills: + post: + operationId: Skills_createSkill + description: Creates a skill. + parameters: + - name: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - name: api-version + in: query + required: true + description: The API version to use for this operation. + schema: + type: string + explode: false + responses: + '201': + description: The request has succeeded and a new resource has been created as a result. + content: + application/json: + schema: + $ref: '#/components/schemas/SkillObject' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Skills + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + maxLength: 63 + description: The unique name of the skill. + description: + type: string + maxLength: 1024 + description: A human-readable description of the skill. + instructions: + type: string + maxLength: 102400 + description: Instructions that define the behavior of the skill. + metadata: + type: object + additionalProperties: + type: string + description: |- + Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. + x-oaiTypeLabel: map + required: + - name + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview get: operationId: Skills_listSkills description: Returns the list of all skills. @@ -8908,7 +9363,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Skill' + $ref: '#/components/schemas/SkillObject' description: The requested list of items. first_id: type: string @@ -8940,106 +9395,8 @@ paths: in: path required: true description: The unique name of the skill. - schema: - $ref: '#/components/schemas/SkillName' - - name: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - 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/Skill' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Skills - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview - post: - operationId: updateSkill - description: Update a skill. - parameters: - - name: name - in: path - required: true - description: The name of the skill to update. - schema: - $ref: '#/components/schemas/SkillName' - - name: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - 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/Skill' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Skills - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - default_version: - type: string - description: The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest. - required: - - default_version - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview - delete: - operationId: Skills_deleteSkill - description: Deletes a skill. - parameters: - - name: name - in: path - required: true - description: The unique name of the skill. - schema: - $ref: '#/components/schemas/SkillName' - name: Foundry-Features in: header required: true @@ -9061,52 +9418,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeleteSkillResponse' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Skills - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview - /skills/{name}/content: - get: - operationId: getSkillContent - description: Download the zip content for the default version of a skill. - parameters: - - name: name - in: path - required: true - description: The name of the skill. - schema: - $ref: '#/components/schemas/SkillName' - - name: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - 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 response body for downloading a skill package. - content: - application/zip: - schema: - type: string - format: binary + $ref: '#/components/schemas/SkillObject' default: description: An unexpected error response. content: @@ -9118,122 +9430,16 @@ paths: x-ms-foundry-meta: required_previews: - Skills=V1Preview - /skills/{name}/versions: post: - operationId: createSkillVersion_createSkillVersionFromFiles - parameters: - - name: name - in: path - required: true - description: The name of the skill. If the skill does not exist, it will be created. - schema: - $ref: '#/components/schemas/SkillName' - - name: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - name: api-version - in: query - required: true - description: The API version to use for this operation. - schema: - type: string - explode: false - description: Creates a new version of a skill. If the skill does not exist, it will be created. Creates a new version of a skill from uploaded files via multipart form data. - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/SkillVersion' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview - tags: - - Skills - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - inline_content: - allOf: - - $ref: '#/components/schemas/SkillInlineContent' - description: Inline skill content for simple skills without file uploads. Foundry-specific extension. - default: - type: boolean - description: Whether to set this version as the default. - multipart/form-data: - schema: - $ref: '#/components/schemas/CreateSkillVersionFromFilesBody' - encoding: - files: - contentType: '*/*' - default: - contentType: text/plain - get: - operationId: listSkillVersions - description: List all versions of a skill. + operationId: Skills_updateSkill + description: Updates an existing skill. parameters: - name: name in: path required: true - description: The name of the skill to list versions for. - schema: - $ref: '#/components/schemas/SkillName' - - 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. + description: The unique name of the skill. schema: type: string - explode: false - name: Foundry-Features in: header required: true @@ -9255,26 +9461,7 @@ paths: content: application/json: schema: - type: object - required: - - data - - has_more - properties: - data: - type: array - items: - $ref: '#/components/schemas/SkillVersion' - 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/SkillObject' default: description: An unexpected error response. content: @@ -9283,24 +9470,44 @@ paths: $ref: '#/components/schemas/ApiErrorResponse' tags: - Skills + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + description: + type: string + maxLength: 1024 + description: A human-readable description of the skill. + instructions: + type: string + maxLength: 102400 + description: Instructions that define the behavior of the skill. + metadata: + type: object + additionalProperties: + type: string + description: |- + Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. + x-oaiTypeLabel: map x-ms-foundry-meta: required_previews: - Skills=V1Preview - /skills/{name}/versions/{version}: - get: - operationId: getSkillVersion - description: Retrieve a specific version of a skill. + delete: + operationId: Skills_deleteSkill + description: Deletes a skill. parameters: - name: name in: path required: true - description: The name of the skill. - schema: - $ref: '#/components/schemas/SkillName' - - name: version - in: path - required: true - description: The version identifier to retrieve. + description: The unique name of the skill. schema: type: string - name: Foundry-Features @@ -9324,7 +9531,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SkillVersion' + $ref: '#/components/schemas/DeleteSkillResponse' default: description: An unexpected error response. content: @@ -9336,20 +9543,15 @@ paths: x-ms-foundry-meta: required_previews: - Skills=V1Preview - delete: - operationId: deleteSkillVersion - description: Delete a specific version of a skill. + /skills/{name}:download: + get: + operationId: Skills_downloadSkill + description: Downloads a skill package. parameters: - name: name in: path required: true - description: The name of the skill. - schema: - $ref: '#/components/schemas/SkillName' - - name: version - in: path - required: true - description: The version identifier to delete. + description: The unique name of the skill. schema: type: string - name: Foundry-Features @@ -9369,11 +9571,12 @@ paths: explode: false responses: '200': - description: The request has succeeded. + description: The response body for downloading a skill package. content: - application/json: + application/zip: schema: - $ref: '#/components/schemas/DeleteSkillVersionResponse' + type: string + format: binary default: description: An unexpected error response. content: @@ -9385,23 +9588,11 @@ paths: x-ms-foundry-meta: required_previews: - Skills=V1Preview - /skills/{name}/versions/{version}/content: - get: - operationId: getSkillVersionContent - description: Download the zip content for a specific version of a skill. + /skills:import: + post: + operationId: Skills_createSkillFromPackage + description: Creates a skill from a zip package. parameters: - - name: name - in: path - required: true - description: The name of the skill. - schema: - $ref: '#/components/schemas/SkillName' - - name: version - in: path - required: true - description: The version to download content for. - schema: - type: string - name: Foundry-Features in: header required: true @@ -9418,13 +9609,12 @@ paths: type: string explode: false responses: - '200': - description: The response body for downloading a skill package. + '201': + description: The request has succeeded and a new resource has been created as a result. content: - application/zip: + application/json: schema: - type: string - format: binary + $ref: '#/components/schemas/SkillObject' default: description: An unexpected error response. content: @@ -9433,6 +9623,14 @@ paths: $ref: '#/components/schemas/ApiErrorResponse' tags: - Skills + requestBody: + required: true + content: + application/zip: + schema: + type: string + format: binary + description: The zip package used to create the skill. x-ms-foundry-meta: required_previews: - Skills=V1Preview @@ -9671,11 +9869,6 @@ paths: items: $ref: '#/components/schemas/OpenAI.Tool' description: The list of tools to include in this version. - skills: - type: array - items: - $ref: '#/components/schemas/ToolboxSkill' - description: The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used. policies: allOf: - $ref: '#/components/schemas/ToolboxPolicies' @@ -10350,7 +10543,29 @@ components: - a2a - mcp - invocations - - invocations_ws + AgentEvaluationSuiteJobSource: + type: object + required: + - type + - agent_name + properties: + description: + type: string + description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + type: + type: string + enum: + - agent + description: The source type for this source, which is Agent. + agent_name: + type: string + description: The agent name to fetch instructions from. + agent_version: + type: string + description: The agent version. If not specified, the latest version is used. + allOf: + - $ref: '#/components/schemas/EvaluationSuiteJobSource' + description: Agent source for evaluation suite generation jobs — references an agent to fetch instructions and metadata from. AgentEvaluatorGenerationJobSource: type: object required: @@ -10412,18 +10627,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: - - agentName - properties: - agentName: - type: string - description: Registered Foundry agent name (required). - agentVersion: - type: string - description: Pinned agent version. Defaults to latest if omitted. - description: Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig. AgentIdentity: type: object required: @@ -10522,7 +10725,6 @@ components: - responses - mcp - invocations - - invocations_ws AgentReference: type: object required: @@ -10590,7 +10792,6 @@ components: - idle - updating - failed - - stopping - deleting - deleted - expired @@ -12083,90 +12284,16 @@ components: skills: type: array items: - type: object - additionalProperties: {} + $ref: '#/components/schemas/OptimizationAgentSkill' description: Optional skill overrides. - tools: - type: array - items: - type: object - additionalProperties: {} - 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 - - sizeBytes - properties: - path: - type: string - description: Relative path of the file. - type: - type: string - description: File type category (e.g. 'config', 'results'). - sizeBytes: - type: integer - format: int64 - description: File size in bytes. - description: File entry in a candidate's blob directory. - CandidateMetadata: - type: object - required: - - candidateId - - jobId - - candidateName - - status - - hasResults - - createdAt - - updatedAt - - files - properties: - candidateId: - type: string - description: Server-assigned candidate identifier. - jobId: - type: string - description: Owning optimization job id. - candidateName: - 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. - hasResults: - type: boolean - description: Whether detailed results are available for this candidate. - createdAt: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when the candidate was created, represented in Unix time. - updatedAt: - 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: - - candidateId + - candidate_id - results properties: - candidateId: + candidate_id: type: string description: Owning candidate id. results: @@ -12919,20 +13046,6 @@ components: description: The level at which evaluation is performed. Defaults to 'turn' if not specified. default: turn title: CreateEvalRunRequest - CreateSkillVersionFromFilesBody: - type: object - properties: - files: - type: array - items: - type: string - format: binary - description: Skill files to upload. Upload a single zip file or multiple individual files with relative paths. - default: - type: boolean - description: Whether to set this version as the default. Defaults to false. - required: - - files CredentialType: anyOf: - type: string @@ -12960,7 +13073,7 @@ components: description: Cron expression that defines the schedule frequency. timeZone: type: string - description: Time zone for the cron schedule. Defaults to `UTC`. + description: Time zone for the cron schedule. default: UTC startTime: type: string @@ -13192,6 +13305,7 @@ components: prompt: '#/components/schemas/PromptDataGenerationJobSource' agent: '#/components/schemas/AgentDataGenerationJobSource' traces: '#/components/schemas/TracesDataGenerationJobSource' + dataset: '#/components/schemas/DatasetDataGenerationJobSource' file: '#/components/schemas/FileDataGenerationJobSource' description: The base source model for data generation jobs. DataGenerationJobSourceType: @@ -13202,6 +13316,7 @@ components: - prompt - agent - traces + - dataset - file description: The supported source types for data generation jobs. DataGenerationJobType: @@ -13297,6 +13412,52 @@ components: allOf: - $ref: '#/components/schemas/DataGenerationJobOutput' description: Dataset output for a data generation job. + DatasetDataGenerationJobSource: + type: object + required: + - type + - name + properties: + description: + type: string + description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + type: + type: string + enum: + - dataset + description: The source type for this source, which is Dataset. + name: + type: string + description: The name of the dataset. + version: + type: string + description: The version of the dataset. If not specified, the latest version is used. + allOf: + - $ref: '#/components/schemas/DataGenerationJobSource' + description: Dataset source for data generation jobs — reference to a dataset. + DatasetEvaluationSuiteJobSource: + type: object + required: + - type + - name + properties: + description: + type: string + description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + type: + type: string + enum: + - dataset + description: The source type for this source, which is Dataset. + name: + type: string + description: The name of the dataset. + version: + type: string + description: The version of the dataset. If not specified, the latest version is used. + allOf: + - $ref: '#/components/schemas/EvaluationSuiteJobSource' + description: Dataset source for evaluation suite generation jobs — reference to a dataset. DatasetEvaluatorGenerationJobSource: type: object required: @@ -13320,26 +13481,37 @@ components: allOf: - $ref: '#/components/schemas/EvaluatorGenerationJobSource' description: Dataset source for evaluator generation jobs — reference to a dataset. - DatasetInfo: + DatasetItem: type: object required: - - taskCount - - isInline + - name + - query properties: name: type: string - description: Dataset name when using a registered dataset reference. Null for inline datasets. - version: + description: Unique-within-the-dataset identifier for this task. + query: type: string - description: Dataset version when using a registered dataset reference. Null for inline datasets. - taskCount: - type: integer - format: int32 - description: Number of tasks/rows in the dataset. - isInline: - 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. + description: The user query / input for the task. + ground_truth: + type: string + description: Optional ground truth used by reference-based evaluators. + criteria: + type: array + items: + $ref: '#/components/schemas/EvaluationCriterion' + description: Per-task evaluation criteria. Defaults to the job-level evaluators if unset. + eval_results: + type: array + items: + $ref: '#/components/schemas/EvalRunOutputItemResult' + description: Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped. + response_items: + type: array + items: + $ref: '#/components/schemas/OpenAI.OutputItem' + description: Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run. + description: A single evaluation task with input query, expected output, and evaluation criteria. DatasetRef: type: object required: @@ -13594,43 +13766,16 @@ components: DeleteSkillResponse: type: object required: - - id - name - deleted properties: - id: - type: string - description: The unique identifier of the deleted skill. name: - allOf: - - $ref: '#/components/schemas/SkillName' + type: string description: The unique name of the skill. deleted: type: boolean description: Whether the skill was successfully deleted. - description: A deleted skill. - DeleteSkillVersionResponse: - type: object - required: - - id - - name - - deleted - - version - properties: - id: - type: string - description: The unique identifier of the deleted skill version. - name: - allOf: - - $ref: '#/components/schemas/SkillName' - description: The name of the skill. - deleted: - type: boolean - description: Whether the skill version was successfully deleted. - version: - type: string - description: The version that was deleted. - description: A deleted skill version. + description: A deleted skill Object Deployment: type: object required: @@ -13677,7 +13822,7 @@ components: description: Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. always_applicable: type: boolean - description: When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`. + description: When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. default: false description: A single dimension — one independent, measurable quality dimension within a rubric evaluator's scoring blueprint. DispatchRoutineRequest: @@ -14550,6 +14695,47 @@ components: allOf: - $ref: '#/components/schemas/InsightResult' description: Insights from the evaluation comparison. + EvaluationCriterion: + type: object + required: + - name + - instruction + properties: + name: + type: string + description: Criterion name (referenced in evaluation result rows). + instruction: + type: string + description: Natural-language instruction passed to the judge LLM. + description: LLM-as-judge evaluation criterion applied to a single task. + EvaluationDataGenerationType: + anyOf: + - type: string + - type: string + enum: + - simple_qna + - traces + - tool_use + - task + description: The data generation type. + EvaluationDatasetReference: + type: object + required: + - name + properties: + name: + type: string + description: Dataset name. + version: + type: string + description: Dataset version. If not provided, resolves to the latest version. + schema_file_name: + type: string + description: |- + Name of the schema file within the dataset's blob folder (e.g., "a3f2b1c4_schema.json"). + Optional — if not provided, schema is inferred at runtime from the data. + Only applicable for uri_folder datasets. + description: Reference to a dataset by name and version. EvaluationLevel: anyOf: - type: string @@ -14723,6 +14909,437 @@ components: allOf: - $ref: '#/components/schemas/ScheduleTask' description: Evaluation task for the schedule. + EvaluationSuiteDataGenerationOptions: + type: object + properties: + type: + allOf: + - $ref: '#/components/schemas/EvaluationDataGenerationType' + description: The data generation type. Defaults to 'simple_qna' if not specified. + max_samples: + type: integer + format: int32 + minimum: 15 + maximum: 1000 + description: 'Maximum number of samples to generate. Valid range: 15-1000.' + description: Options for dataset generation within an evaluation suite generation job. + EvaluationSuiteGenerationCategory: + anyOf: + - type: string + - type: string + enum: + - quality + - safety + description: The category of evaluator generation. + EvaluationSuiteGenerationJob: + type: object + required: + - id + - status + - created_at + properties: + id: + type: string + description: Server-assigned unique identifier. + readOnly: true + inputs: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteGenerationJobInputs' + description: Caller-supplied inputs. + result: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteVersion' + description: Result produced on success. + readOnly: true + status: + allOf: + - $ref: '#/components/schemas/JobStatus' + description: Current lifecycle status. + readOnly: true + error: + allOf: + - $ref: '#/components/schemas/OpenAI.Error' + description: Error details — populated only on failure. + readOnly: true + created_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The timestamp when the job was created, represented in Unix time. + readOnly: true + finished_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: The timestamp when the job finished, represented in Unix time. + readOnly: true + usage: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteGenerationTokenUsage' + description: Token consumption summary. Populated on terminal states. + readOnly: true + description: Evaluation suite generation job resource — a long-running job that generates testing criteria and optionally a dataset from source materials. On success, the result is the persisted EvaluationSuiteVersion. + EvaluationSuiteGenerationJobCreate: + type: object + properties: + inputs: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteGenerationJobInputs' + description: Caller-supplied inputs. + description: Evaluation suite generation job resource — a long-running job that generates testing criteria and optionally a dataset from source materials. On success, the result is the persisted EvaluationSuiteVersion. + EvaluationSuiteGenerationJobInputs: + type: object + required: + - evaluation_suite_name + - sources + - generation_model + properties: + evaluation_suite_name: + type: string + description: The evaluation suite name to create. + sources: + type: array + items: + $ref: '#/components/schemas/EvaluationSuiteJobSource' + description: Source materials for generation — agent context, prompts, traces, or datasets. + generation_model: + type: string + description: The LLM model to use for rubric and data generation (e.g., 'gpt-4o'). + category: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteGenerationCategory' + description: 'Category determines the generation focus. Default: quality.' + default: quality + initialization_parameters: + type: object + additionalProperties: {} + description: |- + Optional initialization parameters applied to all generated evaluators. + For example, deployment_name for LLM judge model, default threshold. + data_generation_options: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteDataGenerationOptions' + description: |- + Data generation options. Controls how the evaluation dataset is generated. + If omitted, defaults are used (simple_qna, 100 max_samples). + description: Caller-supplied inputs for an evaluation suite generation job. + EvaluationSuiteGenerationTokenUsage: + type: object + properties: + input_tokens: + type: integer + format: int64 + description: Number of input tokens consumed. + output_tokens: + type: integer + format: int64 + description: Number of output tokens consumed. + total_tokens: + type: integer + format: int64 + description: Total tokens consumed. + description: Token usage summary for an evaluation suite generation job. + EvaluationSuiteJobSource: + type: object + required: + - type + properties: + type: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteJobSourceType' + description: The type of source. + description: + type: string + description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + discriminator: + propertyName: type + mapping: + prompt: '#/components/schemas/PromptEvaluationSuiteJobSource' + agent: '#/components/schemas/AgentEvaluationSuiteJobSource' + traces: '#/components/schemas/TracesEvaluationSuiteJobSource' + dataset: '#/components/schemas/DatasetEvaluationSuiteJobSource' + description: The base source model for evaluation suite generation jobs. Polymorphic over `type`. + EvaluationSuiteJobSourceType: + anyOf: + - type: string + - type: string + enum: + - prompt + - agent + - traces + - dataset + description: The supported source types for evaluation suite generation jobs. + EvaluationSuiteRunRequest: + type: object + properties: + evaluation_name: + type: string + description: "Name for the evaluation. Default: '{suiteName}-runs'." + evaluation_suite_version: + type: string + description: 'Evaluation suite version to run. Default: latest.' + evaluation_level: + allOf: + - $ref: '#/components/schemas/EvaluationLevel' + description: Overrides the suite's default evaluation level. If omitted, uses the level from the suite. + description: Request body for running an evaluation from a suite. + EvaluationSuiteRunResponse: + type: object + required: + - evaluation_suite_name + - evaluation_suite_version + - results + properties: + evaluation_suite_name: + type: string + description: The evaluation suite name used. + evaluation_suite_version: + type: string + description: The evaluation suite version resolved. + results: + type: array + items: + $ref: '#/components/schemas/EvaluationSuiteRunResult' + description: The run results. Currently a single-element array; will support multiple runs in the future. + description: Response from running an evaluation suite. + EvaluationSuiteRunResult: + type: object + required: + - eval_id + - run_id + - status + - created_at + properties: + eval_id: + type: string + description: The evaluation ID created. + run_id: + type: string + description: The eval run ID created. + status: + allOf: + - $ref: '#/components/schemas/JobStatus' + description: Status of the run. + created_at: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: Timestamp when the run was created. + description: Result of a single evaluation run within a suite execution. + EvaluationSuiteSubtype: + anyOf: + - type: string + - type: string + enum: + - default + - benchmark + description: The subtype of an evaluation suite. + EvaluationSuiteVersion: + type: object + required: + - testing_criteria + - name + - version + properties: + display_name: + type: string + description: |- + Human-readable display name. + Does not need to be unique. Shown in Foundry portal list views and eval reports. + subtype: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteSubtype' + description: Subtype of the evaluation suite. + dataset: + allOf: + - $ref: '#/components/schemas/EvaluationDatasetReference' + description: |- + Dataset reference for evaluation. + Optional — omit for evaluator-only suites where data comes from + live production traces or is provided at run time. + The referenced dataset must exist in the project's dataset registry. + testing_criteria: + type: array + items: + anyOf: + - $ref: '#/components/schemas/OpenAI.EvalGraderLabelModel' + - $ref: '#/components/schemas/OpenAI.EvalGraderStringCheck' + - $ref: '#/components/schemas/OpenAI.EvalGraderTextSimilarity' + - $ref: '#/components/schemas/OpenAI.EvalGraderPython' + - $ref: '#/components/schemas/OpenAI.EvalGraderScoreModel' + - $ref: '#/components/schemas/TestingCriterionAzureAIEvaluator' + minItems: 1 + description: |- + Testing criteria — the evaluator configurations for this suite. + Supports all grader types: azure_ai_evaluator, string_check, label_model, + score_model, text_similarity, python, etc. + At least one entry is required. + target: + allOf: + - $ref: '#/components/schemas/Target' + description: |- + Target for this evaluation suite. Uses the existing Target discriminated type + from eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. + Optional — allows suites to exist without a target. + input_messages: + anyOf: + - $ref: '#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate' + - $ref: '#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference' + description: |- + How to send dataset rows to the target (agent or model). + Supports template type (prompt with column placeholders) and + item_reference type (column containing pre-built messages). + evaluation_level: + allOf: + - $ref: '#/components/schemas/EvaluationLevel' + description: Default evaluation level for this suite. Can be overridden at run time. + name: + type: string + description: The name of the resource. + readOnly: true + version: + type: string + description: The version of the resource. + readOnly: true + description: |- + An evaluation suite bundles testing criteria — an optional dataset, one or more + evaluator configs with thresholds and init params — into a reusable, named artifact that + can gate agent changes across batch, scheduled, continuous, and CI/CD evals. + EvaluationSuiteVersionCreate: + type: object + required: + - testing_criteria + properties: + display_name: + type: string + description: |- + Human-readable display name. + Does not need to be unique. Shown in Foundry portal list views and eval reports. + subtype: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteSubtype' + description: Subtype of the evaluation suite. + dataset: + allOf: + - $ref: '#/components/schemas/EvaluationDatasetReference' + description: |- + Dataset reference for evaluation. + Optional — omit for evaluator-only suites where data comes from + live production traces or is provided at run time. + The referenced dataset must exist in the project's dataset registry. + testing_criteria: + type: array + items: + anyOf: + - $ref: '#/components/schemas/OpenAI.EvalGraderLabelModel' + - $ref: '#/components/schemas/OpenAI.EvalGraderStringCheck' + - $ref: '#/components/schemas/OpenAI.EvalGraderTextSimilarity' + - $ref: '#/components/schemas/OpenAI.EvalGraderPython' + - $ref: '#/components/schemas/OpenAI.EvalGraderScoreModel' + - $ref: '#/components/schemas/TestingCriterionAzureAIEvaluator' + minItems: 1 + description: |- + Testing criteria — the evaluator configurations for this suite. + Supports all grader types: azure_ai_evaluator, string_check, label_model, + score_model, text_similarity, python, etc. + At least one entry is required. + target: + allOf: + - $ref: '#/components/schemas/Target' + description: |- + Target for this evaluation suite. Uses the existing Target discriminated type + from eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. + Optional — allows suites to exist without a target. + input_messages: + anyOf: + - $ref: '#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate' + - $ref: '#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference' + description: |- + How to send dataset rows to the target (agent or model). + Supports template type (prompt with column placeholders) and + item_reference type (column containing pre-built messages). + evaluation_level: + allOf: + - $ref: '#/components/schemas/EvaluationLevel' + description: Default evaluation level for this suite. Can be overridden at run time. + description: + type: string + description: The asset description text. + tags: + type: object + additionalProperties: + type: string + description: Tag dictionary. Tags can be added, removed, and updated. + description: |- + An evaluation suite bundles testing criteria — an optional dataset, one or more + evaluator configs with thresholds and init params — into a reusable, named artifact that + can gate agent changes across batch, scheduled, continuous, and CI/CD evals. + EvaluationSuiteVersionUpdate: + type: object + required: + - testing_criteria + properties: + display_name: + type: string + description: |- + Human-readable display name. + Does not need to be unique. Shown in Foundry portal list views and eval reports. + subtype: + allOf: + - $ref: '#/components/schemas/EvaluationSuiteSubtype' + description: Subtype of the evaluation suite. + dataset: + allOf: + - $ref: '#/components/schemas/EvaluationDatasetReference' + description: |- + Dataset reference for evaluation. + Optional — omit for evaluator-only suites where data comes from + live production traces or is provided at run time. + The referenced dataset must exist in the project's dataset registry. + testing_criteria: + type: array + items: + anyOf: + - $ref: '#/components/schemas/OpenAI.EvalGraderLabelModel' + - $ref: '#/components/schemas/OpenAI.EvalGraderStringCheck' + - $ref: '#/components/schemas/OpenAI.EvalGraderTextSimilarity' + - $ref: '#/components/schemas/OpenAI.EvalGraderPython' + - $ref: '#/components/schemas/OpenAI.EvalGraderScoreModel' + - $ref: '#/components/schemas/TestingCriterionAzureAIEvaluator' + minItems: 1 + description: |- + Testing criteria — the evaluator configurations for this suite. + Supports all grader types: azure_ai_evaluator, string_check, label_model, + score_model, text_similarity, python, etc. + At least one entry is required. + target: + allOf: + - $ref: '#/components/schemas/Target' + description: |- + Target for this evaluation suite. Uses the existing Target discriminated type + from eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. + Optional — allows suites to exist without a target. + input_messages: + anyOf: + - $ref: '#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate' + - $ref: '#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference' + description: |- + How to send dataset rows to the target (agent or model). + Supports template type (prompt with column placeholders) and + item_reference type (column containing pre-built messages). + evaluation_level: + allOf: + - $ref: '#/components/schemas/EvaluationLevel' + description: Default evaluation level for this suite. Can be overridden at run time. + description: + type: string + description: The asset description text. + tags: + type: object + additionalProperties: + type: string + description: Tag dictionary. Tags can be added, removed, and updated. + description: |- + An evaluation suite bundles testing criteria — an optional dataset, one or more + evaluator configs with thresholds and init params — into a reusable, named artifact that + can gate agent changes across batch, scheduled, continuous, and CI/CD evals. EvaluationTaxonomy: type: object required: @@ -15656,6 +16273,18 @@ components: description: |- An array of tools the hosted agent's model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter. + container_protocol_versions: + type: array + items: + $ref: '#/components/schemas/ProtocolVersionRecord' + description: The protocols that the agent supports for ingress communication of the containers. + example: + - protocol: responses + version: v0.1.1 + - protocol: invocations + version: v0.0.1 + - protocol: a2a + version: v0.3.0 cpu: type: string description: The CPU configuration for the hosted agent. @@ -15672,6 +16301,10 @@ components: example: name: LOG_LEVEL value: debug + image: + type: string + description: The image ID for the agent, applicable to image-based hosted agents. + example: my-registry.azurecr.io/my-hosted-agent:latest container_configuration: allOf: - $ref: '#/components/schemas/ContainerConfiguration' @@ -16499,16 +17132,16 @@ components: description: Specific categories or types of user profile information to extract and store. chat_summary_enabled: type: boolean - description: Whether to enable chat summary extraction and storage. Defaults to `true`. + description: Whether to enable chat summary extraction and storage. Default is true. default: true procedural_memory_enabled: type: boolean - description: Whether to enable procedural memory extraction and storage. Defaults to `true`. + description: Whether to enable procedural memory extraction and storage. Default is true. default: true default_ttl_seconds: type: integer format: int32 - description: The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`. + description: The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire. default: 0 description: Default memory store configurations. x-ms-foundry-meta: @@ -17032,7 +17665,7 @@ components: description: Date and time for the one-time trigger in ISO 8601 format. timeZone: type: string - description: Time zone for the one-time trigger. Defaults to `UTC`. + description: Time zone for the one-time trigger. default: UTC allOf: - $ref: '#/components/schemas/Trigger' @@ -31866,47 +32499,55 @@ components: description: The output of an OpenAPI tool call. OptimizationAgentDefinition: type: object + required: + - agent_name properties: - agentName: + agent_name: type: string - description: Agent name. - agentVersion: + description: Registered Foundry agent name. Required — bare-model mode is not supported. + agent_version: type: string - description: Agent version. + description: Pinned agent version. Defaults to latest if omitted. model: type: string - description: Model deployment name. - systemPrompt: + description: Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model. + system_prompt: type: string - description: System prompt / instructions. + description: System prompt / instructions override. When set, used as the baseline instructions for the agent. skills: type: array items: - type: object - additionalProperties: {} - description: Agent skills. - tools: - type: array - items: - type: object - additionalProperties: {} - description: Agent tools. - description: Agent definition returned in response payloads (includes resolved config). + $ref: '#/components/schemas/OptimizationAgentSkill' + description: Optional named skills the optimizer may tune. Tool descriptions and parameters. + description: The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides. + OptimizationAgentSkill: + type: object + required: + - name + properties: + name: + type: string + description: Skill name (matches the tool name on the agent). + description: + type: string + description: Free-form description used as the seed when tuning skill descriptions. + description: A named skill on the agent that the optimizer may tune. OptimizationCandidate: type: object required: - name - config - mutations - - avgScore - - avgTokens - - passRate - - taskScores - - isParetoOptimal + - rationale + - avg_score + - avg_tokens + - pass_rate + - task_scores + - is_pareto_optimal properties: - candidateId: + candidate_id: type: string - description: Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints. + description: Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints. name: type: string description: Display name of the candidate (e.g., 'baseline', 'instruction-v2'). @@ -31917,49 +32558,72 @@ components: mutations: type: object additionalProperties: {} - description: "What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'})." - avgScore: + description: "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." + rationale: + type: string + description: Strategy rationale — why this candidate was generated. + avg_score: type: number format: double description: Average composite score across all tasks. - avgTokens: + avg_tokens: type: number format: double description: Average token usage across all tasks. - passRate: + pass_rate: type: number format: double description: Fraction of tasks that met the pass threshold. - taskScores: + task_scores: type: array items: $ref: '#/components/schemas/OptimizationTaskResult' description: Individual task-level scores. - isParetoOptimal: + is_pareto_optimal: type: boolean description: Whether this candidate is on the Pareto frontier (score vs cost). - evalId: + sample_avg_score: + type: number + format: double + description: Average score from sampled evaluation (null if full dataset was used). + sample_size: + type: integer + format: int32 + description: Number of tasks in the sample (null if full dataset was used). + evaluation_type: + type: string + description: "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." + strategy: + allOf: + - $ref: '#/components/schemas/OptimizationStrategy' + description: Identifies the strategy that produced this candidate. + eval_id: type: string description: Foundry evaluation identifier used to score this candidate. - evalRunId: + eval_run_id: type: string description: Foundry evaluation run identifier for this candidate's scoring run. - promotion: - allOf: - - $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. OptimizationJob: type: object required: - id - status - - createdAt + - created_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' @@ -31970,21 +32634,12 @@ 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. - createdAt: + created_at: allOf: - $ref: '#/components/schemas/FoundryTimestamp' description: The timestamp when the job was created, represented in Unix time. readOnly: true - updatedAt: + updated_at: allOf: - $ref: '#/components/schemas/FoundryTimestamp' description: The timestamp when the job was last updated, represented in Unix time. @@ -31994,27 +32649,26 @@ components: - $ref: '#/components/schemas/OptimizationJobProgress' description: Progress while in flight. Absent in terminal states. readOnly: true - dataset: - allOf: - - $ref: '#/components/schemas/DatasetInfo' - description: Metadata about the dataset used for this optimization job. - 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. + description: Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates. OptimizationJobInputs: type: object required: - agent - - trainDatasetReference properties: agent: allOf: - - $ref: '#/components/schemas/AgentIdentifier' + - $ref: '#/components/schemas/OptimizationAgentDefinition' description: The agent (and pinned version) being optimized. - trainDatasetReference: + dataset: + type: array + items: + $ref: '#/components/schemas/DatasetItem' + description: Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`. + train_dataset_reference: allOf: - $ref: '#/components/schemas/DatasetRef' - description: Reference to a registered training dataset (required). - validationDatasetReference: + description: Reference to a registered training dataset. Mutually exclusive with `dataset`. + validation_dataset_reference: allOf: - $ref: '#/components/schemas/DatasetRef' description: Optional held-out validation dataset for measuring generalization of the final candidate. @@ -32022,7 +32676,12 @@ components: type: array items: type: string - description: "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." + description: "Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence']." + criteria: + type: array + items: + $ref: '#/components/schemas/EvaluationCriterion' + description: Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`. options: allOf: - $ref: '#/components/schemas/OptimizationOptions' @@ -32031,23 +32690,38 @@ components: OptimizationJobProgress: type: object required: - - currentIteration - - bestScore - - elapsedSeconds + - current_strategy + - current_iteration + - tasks_completed + - tasks_total + - best_score + - elapsed_seconds properties: - currentIteration: + current_strategy: + allOf: + - $ref: '#/components/schemas/OptimizationStrategy' + description: Strategy currently being explored. + current_iteration: type: integer format: int32 description: 1-based current iteration index. - bestScore: + tasks_completed: + type: integer + format: int32 + description: Tasks evaluated so far this iteration. + tasks_total: + type: integer + format: int32 + description: Total tasks scheduled this iteration. + best_score: type: number format: double description: Best score observed so far across all candidates. - elapsedSeconds: + elapsed_seconds: type: number format: double - description: Wall-clock time elapsed in seconds since the job began executing. - description: In-flight progress; only populated while status is queued or in_progress. + description: Wall-clock time elapsed since the job began executing. + description: In-flight progress; only populated while status is `queued` or `in_progress`. OptimizationJobResult: type: object properties: @@ -32064,53 +32738,123 @@ components: items: $ref: '#/components/schemas/OptimizationCandidate' description: All evaluated candidates including baseline. + pareto_frontier: + type: array + items: + $ref: '#/components/schemas/OptimizationCandidate' + description: Candidates on the Pareto frontier (maximize score, minimize cost). + validation_score: + allOf: + - $ref: '#/components/schemas/OptimizationCandidate' + description: Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided. options: allOf: - $ref: '#/components/schemas/OptimizationOptions' description: The options used for this optimization run. + sample_size: + type: integer + format: int32 + description: Number of tasks sampled during optimization iterations (null if sampling was not used). warnings: type: array items: type: string - description: Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped). - allTargetAttributesFailed: + description: Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped). + all_strategies_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. + description: True when all optimization strategies failed — only the baseline was evaluated. + description: Terminal-state result body. Populated when `status` is `succeeded` or `failed`. + OptimizationMode: + anyOf: + - type: string + - type: string + enum: + - optimize + description: Run mode for an optimization job. OptimizationOptions: type: object properties: - maxIterations: + strategies: + type: array + items: + $ref: '#/components/schemas/OptimizationStrategy' + description: "Strategies to apply this run. Default: ['instruction']." + default: + - instruction + budget: type: integer format: int32 - description: 'Maximum optimization iterations per strategy. Must be >= 1. Default: 5.' + description: 'Total candidate generation budget (number of candidates explored). Default: 10.' + default: 10 + max_iterations: + type: integer + format: int32 + description: 'Maximum optimization iterations per strategy. Default: 5.' default: 5 - optimizationConfig: - type: object - additionalProperties: {} - description: Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization. - evalModel: + tasks_per_iteration: + type: integer + format: int32 + description: 'Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed).' + max_reflection_tasks: + type: integer + format: int32 + description: 'Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.' + default: 5 + min_improvement: + type: number + format: double + description: 'Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.' + default: 0.005 + pass_threshold: + type: number + format: double + description: 'Composite score threshold for a task to be considered passing. Default: 0.5.' + default: 0.5 + improvement_threshold: + type: number + format: double + description: 'Target average score at which optimization stops early (quality ceiling). Default: 0.95.' + default: 0.95 + mode: + allOf: + - $ref: '#/components/schemas/OptimizationMode' + description: Run mode. + eval_model: type: string - description: Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o'). - optimizationModel: + description: Foundry deployment name to use as the LLM-as-judge evaluation model. Required. + reflection_model: type: string - description: Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set. - evaluationLevel: - allOf: - - $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: Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset. + task_timeout_seconds: + type: integer + format: int32 + description: 'Per-task timeout for agent execution. Default: 300 seconds (5 minutes).' + default: 300 + keep_versions: + type: boolean + description: 'If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.' + default: false description: Tuning knobs and run-mode for an optimization job. + OptimizationStrategy: + anyOf: + - type: string + - type: string + enum: + - instruction + - model + - skill + description: Optimization strategy dimension. OptimizationTaskResult: type: object required: - - taskName + - task_name - scores - - compositeScore + - composite_score - tokens - - durationSeconds + - duration_seconds - passed properties: - taskName: + task_name: type: string description: Task name (from the dataset). query: @@ -32122,7 +32866,7 @@ components: type: number format: double description: Per-evaluator scores keyed by evaluator name. - compositeScore: + composite_score: type: number format: double description: Composite score combining all evaluator scores. @@ -32130,14 +32874,14 @@ components: type: integer format: int32 description: Total tokens consumed during the agent run for this task. - durationSeconds: + 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. - errorMessage: + error_message: type: string description: Error message if the task failed during execution. rationales: @@ -32148,7 +32892,7 @@ components: response: type: string description: Raw agent response text. - runId: + run_id: type: string description: Identifier of the agent run that produced this result. description: Per-task evaluation result for a single candidate. @@ -32244,6 +32988,21 @@ components: format: uri description: The link to the next page of items description: Paged collection of EvaluationRule items + PagedEvaluationSuiteVersion: + type: object + required: + - value + properties: + value: + type: array + items: + $ref: '#/components/schemas/EvaluationSuiteVersion' + description: The EvaluationSuiteVersion items on this page + nextLink: + type: string + format: uri + description: The link to the next page of items + description: Paged collection of EvaluationSuiteVersion items PagedEvaluationTaxonomy: type: object required: @@ -32434,63 +33193,6 @@ components: x-ms-foundry-meta: required_previews: - MemoryStores=V1Preview - PromoteCandidateRequest: - type: object - required: - - agentName - - agentVersion - properties: - agentName: - type: string - description: Name of the Foundry agent to promote to. - agentVersion: - 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: - - candidateId - - status - - promotedAt - - agentName - - agentVersion - properties: - candidateId: - type: string - description: The promoted candidate id. - status: - type: string - description: Status after promotion. - promotedAt: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when promotion occurred, represented in Unix time. - agentName: - type: string - description: Name of the Foundry agent promoted to. - agentVersion: - type: string - description: Version of the Foundry agent promoted to. - description: Response after successfully promoting a candidate. - PromotionInfo: - type: object - required: - - promotedAt - - agentName - - agentVersion - properties: - promotedAt: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when promotion occurred, represented in Unix time. - agentName: - type: string - description: Name of the Foundry agent this candidate was promoted to. - agentVersion: - type: string - description: Version of the Foundry agent this candidate was promoted to. - description: Promotion metadata recorded when a candidate is deployed to a Foundry agent. PromptAgentDefinition: type: object required: @@ -32516,7 +33218,7 @@ components: maximum: 2 description: |- What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. Defaults to `1`. + We generally recommend altering this or `top_p` but not both. default: 1 top_p: type: number @@ -32528,8 +33230,9 @@ components: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. We generally recommend altering this or `temperature` but not both. - Defaults to `1`. + are considered. + + We generally recommend altering this or `temperature` but not both. default: 1 reasoning: type: object @@ -32604,6 +33307,26 @@ components: allOf: - $ref: '#/components/schemas/DataGenerationJobSource' description: Prompt source for data generation jobs — inline text provided by the user. + PromptEvaluationSuiteJobSource: + type: object + required: + - type + - prompt + properties: + description: + type: string + description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + type: + type: string + enum: + - prompt + description: The source type for this source, which is Prompt. + prompt: + type: string + description: Inline prompt text (e.g., agent description, policy text, supplementary context). + allOf: + - $ref: '#/components/schemas/EvaluationSuiteJobSource' + description: Prompt source for evaluation suite generation jobs — inline text provided by the user. PromptEvaluatorGenerationJobSource: type: object required: @@ -32684,7 +33407,7 @@ components: description: End time for the recurrence schedule in ISO 8601 format. timeZone: type: string - description: Time zone for the recurrence schedule. Defaults to `UTC`. + description: Time zone for the recurrence schedule. default: UTC interval: type: integer @@ -33642,106 +34365,40 @@ components: - short_answer - long_answer description: The supported question types for SimpleQnA data generation jobs used for fine-tuning scenarios. - Skill: + SkillObject: type: object required: - - id + - skill_id + - has_blob - name - - description - - created_at - - default_version - - latest_version properties: - id: + skill_id: type: string description: The unique identifier of the skill. + has_blob: + type: boolean + description: Whether the skill was created from a zip blob package. name: - allOf: - - $ref: '#/components/schemas/SkillName' + type: string + maxLength: 63 description: The unique name of the skill. description: type: string maxLength: 1024 description: A human-readable description of the skill. - created_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: The Unix timestamp (seconds) when the skill was created. - default_version: - type: string - description: The default version for the skill. Can be changed via updateSkill. - latest_version: - type: string - description: The latest version for the skill. - description: A skill resource. - SkillInlineContent: - type: object - required: - - description - - instructions - properties: - description: - type: string - maxLength: 1024 - description: A human-readable description of what the skill does and when to use it. - instructions: - type: string - description: The skill instructions in markdown format. This is the body content of the SKILL.md file. - license: - type: string - description: License name or reference to a bundled license file. - compatibility: - type: string - maxLength: 500 - description: Environment requirements or compatibility notes for the skill. metadata: type: object additionalProperties: type: string - description: Arbitrary key-value metadata for additional properties. - allowed_tools: - type: array - items: - type: string - description: List of pre-approved tools the skill may use. Experimental. - description: Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification. - SkillName: - type: string - maxLength: 64 - pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ - description: 'A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens.' - SkillVersion: - type: object - required: - - id - - skill_id - - name - - version - - description - - created_at - properties: - id: - type: string - description: The unique identifier of the skill version. - skill_id: - type: string - description: The identifier of the parent skill. - name: - allOf: - - $ref: '#/components/schemas/SkillName' - description: The name of the skill version. - version: - type: string - description: The version identifier. Skill versions are immutable. - description: - type: string - maxLength: 1024 - description: A human-readable description of the skill version. - created_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: The Unix timestamp (seconds) when the skill version was created. - description: A specific version of a skill. + description: |- + Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. + x-oaiTypeLabel: map + description: A skill object. Sku: type: object required: @@ -33782,7 +34439,7 @@ components: description: The JSON schema for the structured input (optional). required: type: boolean - description: Whether the input property is required when the agent is invoked. Defaults to `false`. + description: Whether the input property is required when the agent is invoked. default: false description: An structured input that can participate in prompt template substitutions and tool argument binding. StructuredOutputDefinition: @@ -34302,40 +34959,6 @@ components: A tool for searching over the agent's toolbox. When present, deferred tools are hidden from `tools/list` and only discoverable via `search_tools` queries at runtime. - ToolboxSkill: - type: object - required: - - type - properties: - type: - type: string - description: The type of skill source. - discriminator: - propertyName: type - mapping: - skill_reference: '#/components/schemas/ToolboxSkillReference' - description: A skill source included in a toolbox. - ToolboxSkillReference: - type: object - required: - - type - - name - properties: - type: - type: string - enum: - - skill_reference - description: The type of skill source. - name: - allOf: - - $ref: '#/components/schemas/SkillName' - description: The name of the skill. - version: - type: string - description: The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version. - allOf: - - $ref: '#/components/schemas/ToolboxSkill' - description: A reference to an existing skill to include in a toolbox. ToolboxVersionObject: type: object required: @@ -34382,11 +35005,6 @@ components: items: $ref: '#/components/schemas/OpenAI.Tool' description: The list of tools contained in this toolbox version. - skills: - type: array - items: - $ref: '#/components/schemas/ToolboxSkill' - description: The list of skill sources included in this toolbox version. policies: allOf: - $ref: '#/components/schemas/ToolboxPolicies' @@ -34483,6 +35101,40 @@ components: allOf: - $ref: '#/components/schemas/DataGenerationJobSource' description: Traces source for data generation jobs — conversation traces from Application Insights. + TracesEvaluationSuiteJobSource: + type: object + required: + - type + - start_time + properties: + description: + type: string + description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + type: + type: string + enum: + - traces + description: The source type for this source, which is Traces. + agent_id: + type: string + description: The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required. + agent_name: + type: string + description: The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required. + agent_version: + type: string + description: The agent version. If not specified, traces for ALL versions of the agent are included within the time window. + start_time: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: Start of the time window (Unix timestamp in seconds) for fetching traces. + end_time: + allOf: + - $ref: '#/components/schemas/FoundryTimestamp' + description: End of the time window (Unix timestamp in seconds). Defaults to current time. + allOf: + - $ref: '#/components/schemas/EvaluationSuiteJobSource' + description: Traces source for evaluation suite generation jobs — conversation traces from Application Insights. TracesEvaluatorGenerationJobSource: type: object required: diff --git a/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml,json b/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml,json new file mode 100644 index 000000000000..315642e4c46c --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/openapi3/v1/microsoft-foundry-openapi3.yaml,json @@ -0,0 +1,45601 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Microsoft Foundry", + "version": "v1" + }, + "tags": [ + { + "name": "Agents" + }, + { + "name": "Agent Session Files" + }, + { + "name": "Agent Invocations" + }, + { + "name": "Connections" + }, + { + "name": "Datasets" + }, + { + "name": "Deployments" + }, + { + "name": "Evaluation Taxonomies" + }, + { + "name": "Evaluation Rules" + }, + { + "name": "Evaluators" + }, + { + "name": "Indexes" + }, + { + "name": "Insights" + }, + { + "name": "Models" + }, + { + "name": "Memory Stores" + }, + { + "name": "Conversations" + }, + { + "name": "Evals" + }, + { + "name": "Fine-Tuning" + }, + { + "name": "Responses" + }, + { + "name": "Redteams" + }, + { + "name": "Schedules" + }, + { + "name": "Skills" + }, + { + "name": "Toolboxes" + }, + { + "name": "AgentOptimizationJobs" + } + ], + "paths": { + "/agent_optimization_jobs": { + "post": { + "operationId": "AgentOptimizationJobs_create", + "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", + "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": "Operation-Id", + "in": "header", + "required": false, + "description": "Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally.", + "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": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "headers": { + "Operation-Location": { + "required": true, + "description": "URL to poll for the job status.", + "schema": { + "type": "string" + } + }, + "Location": { + "required": true, + "description": "URL of the created job resource.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OptimizationJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "AgentOptimizationJobs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OptimizationJob" + } + } + }, + "description": "The job to create." + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "AgentsOptimization=V1Preview" + ] + } + }, + "get": { + "operationId": "AgentOptimizationJobs_list", + "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", + "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": "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": "status", + "in": "query", + "required": false, + "description": "Filter to jobs in this lifecycle state.", + "schema": { + "$ref": "#/components/schemas/JobStatus" + }, + "explode": false + }, + { + "name": "agent_name", + "in": "query", + "required": false, + "description": "Filter to jobs targeting this agent name.", + "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/OptimizationJob" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "AgentOptimizationJobs" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "AgentsOptimization=V1Preview" + ] + } + } + }, + "/agent_optimization_jobs/{jobId}": { + "get": { + "operationId": "AgentOptimizationJobs_get", + "summary": "Get info about an agent optimization job.", + "description": "Get an optimization job by id. Emits `Retry-After` while the job is non-terminal.", + "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.", + "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.", + "headers": { + "Retry-After": { + "required": false, + "description": "Recommended number of seconds to wait before polling again.", + "schema": { + "type": "integer", + "format": "int32" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OptimizationJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "AgentOptimizationJobs" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "AgentsOptimization=V1Preview" + ] + } + }, + "delete": { + "operationId": "AgentOptimizationJobs_delete", + "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", + "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 delete.", + "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": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "AgentOptimizationJobs" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "AgentsOptimization=V1Preview" + ] + } + } + }, + "/agent_optimization_jobs/{jobId}/candidates": { + "get": { + "operationId": "AgentOptimizationJobs_listCandidates", + "summary": "Returns a list of candidates for an optimization job.", + "description": "List candidates produced by a 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\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/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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "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 a candidate by id.", + "description": "Get a single candidate manifest and aggregated evaluation summary.", + "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/OptimizationCandidate" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "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 candidate deploy config.", + "description": "Get the candidate's deploy config JSON. Used to compose `agents.create_version(...)` from a 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/CandidateDeployConfig" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "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 candidate evaluation results.", + "description": "Get full per-task evaluation results for a 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" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "AgentOptimizationJobs" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "AgentsOptimization=V1Preview" + ] + } + } + }, + "/agent_optimization_jobs/{jobId}:cancel": { + "post": { + "operationId": "AgentOptimizationJobs_cancel", + "summary": "Cancels an agent optimization job.", + "description": "Request cancellation. Idempotent on terminal states.", + "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" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "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 the 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.", + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "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", + "description": "Returns the list of all agents.", + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + } + }, + "/agents/{agent_name}": { + "get": { + "operationId": "Agents_getAgent", + "description": "Retrieves the agent.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to retrieve.", + "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/AgentObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + }, + "post": { + "operationId": "Agents_updateAgent_Agents_updateAgentFromCode", + "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": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to retrieve.", + "schema": { + "type": "string" + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "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": "Updates the agent by adding a new version if there are any changes to the agent definition.\nIf no changes, returns the existing agent version. Updates a code-based agent by uploading new code and creating a new version.\nIf the code and definition are unchanged (matched by x-ms-code-zip-sha256 header), returns the existing version.\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.", + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAgentRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateAgentVersionFromCodeContent" + }, + "encoding": { + "metadata": { + "contentType": "application/json" + } + } + } + } + } + }, + "delete": { + "operationId": "Agents_deleteAgent", + "description": "Deletes an agent.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to delete.", + "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/DeleteAgentResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + }, + "patch": { + "operationId": "Agents_patchAgentObject", + "description": "Updates an agent endpoint.", + "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": [ + "AgentEndpoints=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to retrieve.", + "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/AgentObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/PatchAgentRequest" + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/code:download": { + "get": { + "operationId": "Agents_downloadAgentCode", + "description": "Download the code zip for the latest version of a code-based hosted agent.\nReturns the previously-uploaded zip (`application/zip`).\nThe SHA-256 digest of the returned bytes matches the `content_hash` on the latest version's `code_configuration`.", + "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": [ + "CodeAgents=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent whose latest-version code zip should be downloaded.", + "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": "Response body for downloading a hosted agent's code zip.\nBody is the raw zip bytes; `Content-Type` declares `application/zip` so clients\ncan route to a zip-aware handler. Streaming is preserved (`bytes` body) regardless\nof the content-type label.", + "content": { + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/endpoint/protocols/invocations": { + "post": { + "operationId": "AgentInvocations_createAgentInvocation", + "description": "Creates an invocation for the specified agent version.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_session_id", + "in": "query", + "required": false, + "description": "Optional session ID returned by the session CRUD APIs to reuse an existing sandbox. If not provided, a new session ID will be auto-generated.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "HostedAgents=V1Preview" + ] + } + }, + { + "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.", + "headers": { + "x-agent-invocation-id": { + "required": true, + "description": "Unique identifier for this invocation.", + "schema": { + "type": "string" + } + }, + "x-agent-session-id": { + "required": true, + "description": "Session ID for this invocation. Returns the provided session ID or an auto-generated one if not provided in the request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": {} + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agent Invocations" + ], + "requestBody": { + "required": true, + "content": { + "*/*": { + "schema": {} + } + }, + "description": "The request body." + }, + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/endpoint/protocols/invocations/docs/openapi.json": { + "get": { + "operationId": "AgentInvocations_getAgentInvocationOpenApiSpec", + "description": "Retrieves the OpenAPI specification for an agent version's invocation contract.\nReturns 404 if the agent does not expose an OpenAPI specification.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "HostedAgents=V1Preview" + ] + } + }, + { + "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", + "additionalProperties": {} + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agent Invocations" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/endpoint/protocols/invocations/{invocation_id}": { + "get": { + "operationId": "AgentInvocations_getAgentInvocation", + "description": "Retrieves the invocation with the given ID.\nReturns 404 if the agent does not support this operation or if the invocation ID is not found.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "invocation_id", + "in": "path", + "required": true, + "description": "The unique identifier of the invocation.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "HostedAgents=V1Preview" + ] + } + }, + { + "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.", + "headers": { + "x-agent-session-id": { + "required": true, + "description": "Session ID for this invocation. Returns the session ID associated with the invocation.", + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": {} + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agent Invocations" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/endpoint/protocols/invocations/{invocation_id}/cancel": { + "post": { + "operationId": "AgentInvocations_cancelAgentInvocation", + "description": "Cancels an invocation.\nReturns 404 if the agent does not support this operation or if the invocation ID is not found.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "invocation_id", + "in": "path", + "required": true, + "description": "The unique identifier of the invocation to cancel.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "HostedAgents=V1Preview" + ] + } + }, + { + "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.", + "headers": { + "x-agent-session-id": { + "required": true, + "description": "Session ID for this invocation. Returns the session ID associated with the invocation.", + "schema": { + "type": "string" + } + } + }, + "content": { + "*/*": { + "schema": {} + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agent Invocations" + ], + "requestBody": { + "required": false, + "content": { + "*/*": { + "schema": {} + } + }, + "description": "Optional request body." + }, + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/endpoint/sessions": { + "post": { + "operationId": "Agents_createSession", + "description": "Creates a new session for an agent endpoint.\nThe endpoint resolves the backing agent version from `version_indicator` and\nenforces session ownership using the provided isolation key for session-mutating operations.", + "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": [ + "AgentEndpoints=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to create a session for.", + "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": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentSessionResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentSessionRequest" + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "get": { + "operationId": "Agents_listSessions", + "description": "Returns a list of sessions for the specified agent.", + "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": [ + "AgentEndpoints=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "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", + "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/AgentSessionResource" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/endpoint/sessions/{agent_session_id}/files": { + "get": { + "operationId": "AgentSessionFiles_listSessionFiles", + "description": "List files and directories at a given path in the session sandbox.\nReturns only the immediate children of the specified directory (non-recursive).", + "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": [ + "HostedAgents=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_session_id", + "in": "path", + "required": true, + "description": "The session ID.", + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The directory path to list, relative to the session home directory.", + "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": { + "$ref": "#/components/schemas/SessionDirectoryListResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agent Session Files" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "delete": { + "operationId": "AgentSessionFiles_deleteSessionFile", + "description": "Delete a file or directory from the session sandbox.\nIf `recursive` is false (default) and the target is a non-empty directory, the API returns 409 Conflict.", + "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": [ + "HostedAgents=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_session_id", + "in": "path", + "required": true, + "description": "The session ID.", + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The file or directory path to delete, relative to the session home directory.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "recursive", + "in": "query", + "required": false, + "description": "Whether to recursively delete directory contents. Defaults to false.", + "schema": { + "type": "boolean", + "default": false + }, + "explode": false + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agent Session Files" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/endpoint/sessions/{agent_session_id}/files/content": { + "put": { + "operationId": "AgentSessionFiles_uploadSessionFile", + "description": "Upload a file to the session sandbox via binary stream.\nMaximum file size is 50 MB. Uploads exceeding this limit return 413 Payload Too Large.", + "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": [ + "HostedAgents=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_session_id", + "in": "path", + "required": true, + "description": "The session ID.", + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The destination file path within the sandbox, relative to the session home directory.", + "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": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionFileWriteResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agent Session Files" + ], + "requestBody": { + "required": true, + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "get": { + "operationId": "AgentSessionFiles_downloadSessionFile", + "description": "Download a file from the session sandbox as a binary stream.", + "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": [ + "HostedAgents=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_session_id", + "in": "path", + "required": true, + "description": "The session ID.", + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The file path to download from the sandbox, relative to the session home directory.", + "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": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agent Session Files" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/endpoint/sessions/{session_id}": { + "get": { + "operationId": "Agents_getSession", + "description": "Retrieves a session by ID.", + "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": [ + "AgentEndpoints=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "description": "The session identifier.", + "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/AgentSessionResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "delete": { + "operationId": "Agents_deleteSession", + "description": "Deletes a session synchronously.\nReturns 204 No Content when the session is deleted or does not exist.", + "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": [ + "AgentEndpoints=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "description": "The session identifier.", + "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": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/import": { + "post": { + "operationId": "Agents_updateAgentFromManifest", + "description": "Updates the agent from a manifest by adding a new version if there are any changes to the agent definition.\nIf no changes, returns the existing agent version.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to update.", + "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/AgentObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAgentFromManifestRequest" + } + } + } + } + } + }, + "/agents/{agent_name}/versions": { + "post": { + "operationId": "Agents_createAgentVersion_Agents_createAgentVersionFromCode", + "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": "agent_name", + "in": "path", + "required": true, + "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters.", + "schema": { + "type": "string", + "maxLength": 63 + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "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": "Create a new agent version.", + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentVersionObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentVersionRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateAgentVersionFromCodeContent" + }, + "encoding": { + "metadata": { + "contentType": "application/json" + } + } + } + } + } + }, + "get": { + "operationId": "Agents_listAgentVersions", + "description": "Returns the list of versions of an agent.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to retrieve versions for.", + "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", + "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/AgentVersionObject" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + } + }, + "/agents/{agent_name}/versions/{agent_version}": { + "get": { + "operationId": "Agents_getAgentVersion", + "description": "Retrieves a specific version of an agent.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to retrieve.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_version", + "in": "path", + "required": true, + "description": "The version of the agent to retrieve.", + "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/AgentVersionObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + }, + "delete": { + "operationId": "Agents_deleteAgentVersion", + "description": "Deletes a specific version of an agent.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent to delete.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_version", + "in": "path", + "required": true, + "description": "The version of the agent to delete", + "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/DeleteAgentVersionResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ] + } + }, + "/agents/{agent_name}/versions/{agent_version}/code:download": { + "get": { + "operationId": "Agents_downloadAgentVersionCode", + "description": "Download the code zip for a specific version of a code-based hosted agent.\nReturns the previously-uploaded zip (`application/zip`).\nThe SHA-256 digest of the returned bytes matches the `content_hash` on the agent version's `code_configuration`.", + "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": [ + "CodeAgents=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_version", + "in": "path", + "required": true, + "description": "The version of the agent whose code zip should be downloaded.", + "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": "Response body for downloading a hosted agent's code zip.\nBody is the raw zip bytes; `Content-Type` declares `application/zip` so clients\ncan route to a zip-aware handler. Streaming is preserved (`bytes` body) regardless\nof the content-type label.", + "content": { + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/versions/{agent_version}/sessions/{session_id}:logstream": { + "get": { + "operationId": "Agents_getSessionLogStream", + "description": "Streams console logs (stdout / stderr) for a specific hosted agent session\nas a Server-Sent Events (SSE) stream.\n\nEach SSE frame contains:\n- `event`: always `\"log\"`\n- `data`: a plain-text log line (currently JSON-formatted, but the schema\nis not contractual and may include additional keys or change format\nover time — clients should treat it as an opaque string)\n\nExample SSE frames:\n```\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:33:17.121Z\",\"stream\":\"stdout\",\"message\":\"Starting FoundryCBAgent server on port 8088\"}\n\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:33:17.130Z\",\"stream\":\"stderr\",\"message\":\"INFO: Application startup complete.\"}\n\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:34:52.714Z\",\"stream\":\"status\",\"message\":\"Successfully connected to container\"}\n\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:35:52.714Z\",\"stream\":\"status\",\"message\":\"No logs since last 60 seconds\"}\n```\n\nThe stream remains open until the client disconnects or the server\nterminates the connection. Clients should handle reconnection as needed.", + "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": [ + "HostedAgents=V1Preview" + ] + } + }, + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The name of the hosted agent.", + "schema": { + "type": "string" + } + }, + { + "name": "agent_version", + "in": "path", + "required": true, + "description": "The version of the agent.", + "schema": { + "type": "string" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "description": "The session ID (maps to an ADC sandbox).", + "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": { + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/SessionLogEvent" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + } + }, + "/agents/{agent_name}/versions:import": { + "post": { + "operationId": "Agents_createAgentVersionFromManifest", + "description": "Create a new agent version from a manifest.", + "parameters": [ + { + "name": "agent_name", + "in": "path", + "required": true, + "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters.", + "schema": { + "type": "string", + "maxLength": 63 + } + }, + { + "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/AgentVersionObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentVersionFromManifestRequest" + } + } + } + } + } + }, + "/agents:import": { + "post": { + "operationId": "Agents_createAgentFromManifest", + "description": "Creates an agent from a manifest.", + "parameters": [ + { + "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/AgentObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Agents" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgentFromManifestRequest" + } + } + } + } + } + }, + "/connections": { + "get": { + "operationId": "Connections_list", + "description": "List all connections in the project, without populating connection credentials", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "connectionType", + "in": "query", + "required": false, + "description": "List connections of this specific type", + "schema": { + "$ref": "#/components/schemas/ConnectionType" + }, + "explode": false + }, + { + "name": "defaultConnection", + "in": "query", + "required": false, + "description": "List connections that are default connections", + "schema": { + "type": "boolean" + }, + "explode": false + }, + { + "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-ms-client-request-id": { + "required": false, + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "schema": { + "$ref": "#/components/schemas/Azure.Core.uuid" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedConnection" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Connections" + ] + } + }, + "/connections/{name}": { + "get": { + "operationId": "Connections_get", + "description": "Get a connection by name, without populating connection credentials", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The friendly name of the connection, provided by the user.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-ms-client-request-id": { + "required": false, + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "schema": { + "$ref": "#/components/schemas/Azure.Core.uuid" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Connections" + ] + } + }, + "/connections/{name}/getConnectionWithCredentials": { + "post": { + "operationId": "Connections_getWithCredentials", + "description": "Get a connection by name, with its connection credentials", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The friendly name of the connection, provided by the user.", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-ms-client-request-id": { + "required": false, + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "schema": { + "$ref": "#/components/schemas/Azure.Core.uuid" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Connection" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Connections" + ] + } + }, + "/datasets": { + "get": { + "operationId": "Datasets_listLatest", + "description": "List the latest version of each DatasetVersion", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedDatasetVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + } + }, + "/datasets/{name}/versions": { + "get": { + "operationId": "Datasets_listVersions", + "description": "List all versions of the given DatasetVersion", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedDatasetVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + } + }, + "/datasets/{name}/versions/{version}": { + "get": { + "operationId": "Datasets_getVersion", + "description": "Get the specific version of the DatasetVersion. The service returns 404 Not Found error if the DatasetVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the DatasetVersion to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "delete": { + "operationId": "Datasets_deleteVersion", + "description": "Delete the specific version of the DatasetVersion. The service returns 204 No Content if the DatasetVersion was deleted successfully or if the DatasetVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version of the DatasetVersion to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + }, + "patch": { + "operationId": "Datasets_createOrUpdateVersion", + "description": "Create a new or update an existing DatasetVersion with the given version id", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the DatasetVersion to create or update.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetVersion" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "requestBody": { + "required": true, + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/DatasetVersionUpdate" + } + } + }, + "description": "The DatasetVersion to create or update." + } + } + }, + "/datasets/{name}/versions/{version}/credentials": { + "post": { + "operationId": "Datasets_getCredentials", + "description": "Get the SAS credential to access the storage account associated with a Dataset version.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the DatasetVersion to operate on.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetCredentialResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ] + } + }, + "/datasets/{name}/versions/{version}/startPendingUpload": { + "post": { + "operationId": "Datasets_startPendingUploadVersion", + "description": "Start a new or get an existing pending upload of a dataset for a specific version.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the DatasetVersion to operate on.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PendingUploadResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Datasets" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PendingUploadRequest" + } + } + }, + "description": "The pending upload request parameters" + } + } + }, + "/deployments": { + "get": { + "operationId": "Deployments_list", + "description": "List all deployed models in the project", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "modelPublisher", + "in": "query", + "required": false, + "description": "Model publisher to filter models by", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "modelName", + "in": "query", + "required": false, + "description": "Model name (the publisher specific name) to filter models by", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "deploymentType", + "in": "query", + "required": false, + "description": "Type of deployment to filter list by", + "schema": { + "$ref": "#/components/schemas/DeploymentType" + }, + "explode": false + }, + { + "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-ms-client-request-id": { + "required": false, + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "schema": { + "$ref": "#/components/schemas/Azure.Core.uuid" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedDeployment" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Deployments" + ] + } + }, + "/deployments/{name}": { + "get": { + "operationId": "Deployments_get", + "description": "Get a deployed model.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "Name of the deployment", + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-ms-client-request-id": { + "required": false, + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "schema": { + "$ref": "#/components/schemas/Azure.Core.uuid" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Deployment" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Deployments" + ] + } + }, + "/evaluation_suites": { + "get": { + "operationId": "EvaluationSuites_listLatest", + "description": "List the latest version of each EvaluationSuiteVersion", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "agent_name", + "in": "query", + "required": false, + "description": "Filter by associated Foundry agent name (from target).", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedEvaluationSuiteVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + } + } + }, + "/evaluation_suites/{name}/versions": { + "get": { + "operationId": "EvaluationSuites_listVersions", + "description": "List all versions of the given EvaluationSuiteVersion", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedEvaluationSuiteVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + } + }, + "post": { + "operationId": "EvaluationSuites_createEvaluationSuiteVersion", + "description": "Create a new EvaluationSuiteVersion with auto incremented version id", + "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": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the evaluation suite.", + "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": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteVersionCreate" + } + } + }, + "description": "The evaluation suite version to create." + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "/evaluation_suites/{name}/versions/{version}": { + "get": { + "operationId": "EvaluationSuites_getVersion", + "description": "Get the specific version of the EvaluationSuiteVersion. The service returns 404 Not Found error if the EvaluationSuiteVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource.", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the EvaluationSuiteVersion to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + } + }, + "delete": { + "operationId": "EvaluationSuites_deleteVersion", + "description": "Delete the specific version of the EvaluationSuiteVersion. The service returns 204 No Content if the EvaluationSuiteVersion was deleted successfully or if the EvaluationSuiteVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource.", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version of the EvaluationSuiteVersion to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + } + }, + "patch": { + "operationId": "EvaluationSuites_createOrUpdateVersion", + "description": "Create a new or update an existing EvaluationSuiteVersion with the given version id", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource.", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the EvaluationSuiteVersion to create or update.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteVersion" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteVersionUpdate" + } + } + }, + "description": "The EvaluationSuiteVersion to create or update." + } + } + }, + "/evaluation_suites/{name}:run": { + "post": { + "operationId": "EvaluationSuites_run", + "description": "Run an evaluation using the suite's testing criteria and dataset.", + "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": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the evaluation suite.", + "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": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteRunResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationSuiteRunRequest" + } + } + }, + "description": "The run request parameters." + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "/evaluationrules": { + "get": { + "operationId": "EvaluationRules_list", + "description": "List all evaluation rules.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "actionType", + "in": "query", + "required": false, + "description": "Filter by the type of evaluation rule.", + "schema": { + "$ref": "#/components/schemas/EvaluationRuleActionType" + }, + "explode": false + }, + { + "name": "agentName", + "in": "query", + "required": false, + "description": "Filter by the agent name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "enabled", + "in": "query", + "required": false, + "description": "Filter by the enabled status.", + "schema": { + "type": "boolean" + }, + "explode": false + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedEvaluationRule" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluation Rules" + ] + } + }, + "/evaluationrules/{id}": { + "get": { + "operationId": "EvaluationRules_get", + "description": "Get an evaluation rule.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "Unique identifier for the evaluation rule.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationRule" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluation Rules" + ] + }, + "delete": { + "operationId": "EvaluationRules_delete", + "description": "Delete an evaluation rule.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "Unique identifier for the evaluation rule.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluation Rules" + ] + }, + "put": { + "operationId": "EvaluationRules_createOrUpdate", + "description": "Create or update an evaluation rule.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "Unique identifier for the evaluation rule.", + "schema": { + "type": "string" + } + }, + { + "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": [ + "Evaluations=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationRule" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationRule" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluation Rules" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationRule" + } + } + }, + "description": "Evaluation rule resource" + } + } + }, + "/evaluationtaxonomies": { + "get": { + "operationId": "EvaluationTaxonomies_list", + "description": "List evaluation taxonomies", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "inputName", + "in": "query", + "required": false, + "description": "Filter by the evaluation input name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "inputType", + "in": "query", + "required": false, + "description": "Filter by taxonomy input type.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedEvaluationTaxonomy" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluation Taxonomies" + ] + } + }, + "/evaluationtaxonomies/{name}": { + "get": { + "operationId": "EvaluationTaxonomies_get", + "description": "Get an evaluation run by name.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationTaxonomy" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluation Taxonomies" + ] + }, + "delete": { + "operationId": "EvaluationTaxonomies_delete", + "description": "Delete an evaluation taxonomy by name.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluation Taxonomies" + ] + }, + "put": { + "operationId": "EvaluationTaxonomies_create", + "description": "Create an evaluation taxonomy.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the evaluation taxonomy.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationTaxonomy" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationTaxonomy" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluation Taxonomies" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationTaxonomyCreateOrUpdate" + } + } + }, + "description": "The evaluation taxonomy." + } + }, + "patch": { + "operationId": "EvaluationTaxonomies_update", + "description": "Update an evaluation taxonomy.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the evaluation taxonomy.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationTaxonomy" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluation Taxonomies" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluationTaxonomyUpdate" + } + } + }, + "description": "The evaluation taxonomy." + } + } + }, + "/evaluators": { + "get": { + "operationId": "Evaluators_listLatestVersions", + "description": "List the latest version of each evaluator", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorType" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + }, + "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 default is 20.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + }, + "explode": false + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedEvaluatorVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluators" + ] + } + }, + "/evaluators/{name}/versions": { + "get": { + "operationId": "Evaluators_listVersions", + "description": "List all versions of the given evaluator", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter evaluators by type. Possible values: 'all', 'custom', 'builtin'.", + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EvaluatorType" + }, + { + "type": "string", + "enum": [ + "all" + ] + } + ] + }, + "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 default is 20.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + }, + "explode": false + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedEvaluatorVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluators" + ] + }, + "post": { + "operationId": "Evaluators_createVersion", + "description": "Create a new EvaluatorVersion with auto incremented version id", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluators" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorVersionCreate" + } + } + } + } + } + }, + "/evaluators/{name}/versions/{version}": { + "get": { + "operationId": "Evaluators_getVersion", + "description": "Get the specific version of the EvaluatorVersion. The service returns 404 Not Found error if the EvaluatorVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the EvaluatorVersion to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluators" + ] + }, + "delete": { + "operationId": "Evaluators_deleteVersion", + "description": "Delete the specific version of the EvaluatorVersion. The service returns 204 No Content if the EvaluatorVersion was deleted successfully or if the EvaluatorVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version of the EvaluatorVersion to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluators" + ] + }, + "patch": { + "operationId": "Evaluators_updateVersion", + "description": "Update an existing EvaluatorVersion with the given version id", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Evaluations=V1Preview" + ] + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version of the EvaluatorVersion to update.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Evaluators" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvaluatorVersionUpdate" + } + } + }, + "description": "Evaluator resource" + } + } + }, + "/indexes": { + "get": { + "operationId": "Indexes_listLatest", + "description": "List the latest version of each Index", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedIndex" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ] + } + }, + "/indexes/{name}/versions": { + "get": { + "operationId": "Indexes_listVersions", + "description": "List all versions of the given Index", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedIndex" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ] + } + }, + "/indexes/{name}/versions/{version}": { + "get": { + "operationId": "Indexes_getVersion", + "description": "Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the Index to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Index" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ] + }, + "delete": { + "operationId": "Indexes_deleteVersion", + "description": "Delete the specific version of the Index. The service returns 204 No Content if the Index was deleted successfully or if the Index does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version of the Index to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ] + }, + "patch": { + "operationId": "Indexes_createOrUpdateVersion", + "description": "Create a new or update an existing Index with the given version id", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the Index to create or update.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Index" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Index" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Indexes" + ], + "requestBody": { + "required": true, + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/IndexUpdate" + } + } + }, + "description": "The Index to create or update." + } + } + }, + "/insights": { + "post": { + "operationId": "Insights_generate", + "description": "Generate Insights", + "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": [ + "Insights=V1Preview" + ] + } + }, + { + "name": "Repeatability-Request-ID", + "in": "header", + "required": false, + "description": "Unique, client-generated identifier for ensuring request idempotency. Use the same ID for retries to prevent duplicate evaluations.", + "schema": { + "type": "string" + } + }, + { + "name": "Repeatability-First-Sent", + "in": "header", + "required": false, + "description": "Timestamp indicating when this request was first initiated. Used in conjunction with repeatability-request-id for idempotency control.", + "schema": { + "type": "string", + "format": "http-date" + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Insight" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Insights" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Insight" + } + } + }, + "description": "Complete evaluation configuration including data source, evaluators, and result settings" + } + }, + "get": { + "operationId": "Insights_list", + "description": "List all insights in reverse chronological order (newest first).", + "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": [ + "Insights=V1Preview" + ] + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter by the type of analysis.", + "schema": { + "$ref": "#/components/schemas/InsightType" + }, + "explode": false + }, + { + "name": "evalId", + "in": "query", + "required": false, + "description": "Filter by the evaluation ID.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "runId", + "in": "query", + "required": false, + "description": "Filter by the evaluation run ID.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "agentName", + "in": "query", + "required": false, + "description": "Filter by the agent name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "includeCoordinates", + "in": "query", + "required": false, + "description": "Whether to include coordinates for visualization in the response. Defaults to false.", + "schema": { + "type": "boolean" + }, + "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": { + "$ref": "#/components/schemas/PagedInsight" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Insights" + ] + } + }, + "/insights/{id}": { + "get": { + "operationId": "Insights_get", + "description": "Get a specific insight by Id.", + "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": [ + "Insights=V1Preview" + ] + } + }, + { + "name": "includeCoordinates", + "in": "query", + "required": false, + "description": "Whether to include coordinates for visualization in the response. Defaults to false.", + "schema": { + "type": "boolean" + }, + "explode": false + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "The unique identifier for the insights report.", + "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/Insight" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Insights" + ] + } + }, + "/memory_stores": { + "post": { + "operationId": "createMemoryStore", + "description": "Create a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "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/MemoryStoreObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "description": "The name of the memory store." + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the memory store." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the memory store." + }, + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreDefinition" + } + ], + "description": "The memory store definition." + } + }, + "required": [ + "name", + "definition" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "get": { + "operationId": "listMemoryStores", + "description": "List all memory stores.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "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/MemoryStoreObject" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + } + }, + "/memory_stores/{name}": { + "post": { + "operationId": "updateMemoryStore", + "description": "Update a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store to update.", + "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/MemoryStoreObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the memory store." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the memory store." + } + } + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "get": { + "operationId": "getMemoryStore", + "description": "Retrieve a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store to retrieve.", + "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/MemoryStoreObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "delete": { + "operationId": "deleteMemoryStore", + "description": "Delete a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store to delete.", + "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/DeleteMemoryStoreResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + } + }, + "/memory_stores/{name}/memories": { + "post": { + "operationId": "createMemory", + "description": "Create a memory item in a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store.", + "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/MemoryItem" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "description": "The namespace that logically groups and isolates memories, such as a user ID." + }, + "content": { + "type": "string", + "description": "The content of the memory." + }, + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItemKind" + } + ], + "description": "The kind of the memory item." + } + }, + "required": [ + "scope", + "content", + "kind" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "get": { + "operationId": "listMemories", + "description": "List all memory items in a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store.", + "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", + "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/MemoryItem" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + } + }, + "/memory_stores/{name}/memories/{memory_id}": { + "post": { + "operationId": "updateMemory", + "description": "Update a memory item in a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store.", + "schema": { + "type": "string" + } + }, + { + "name": "memory_id", + "in": "path", + "required": true, + "description": "The ID of the memory item to update.", + "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/MemoryItem" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The updated content of the memory." + } + }, + "required": [ + "content" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "get": { + "operationId": "getMemory", + "description": "Retrieve a memory item from a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store.", + "schema": { + "type": "string" + } + }, + { + "name": "memory_id", + "in": "path", + "required": true, + "description": "The ID of the memory item to retrieve.", + "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/MemoryItem" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "delete": { + "operationId": "deleteMemory", + "description": "Delete a memory item from a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store.", + "schema": { + "type": "string" + } + }, + { + "name": "memory_id", + "in": "path", + "required": true, + "description": "The ID of the memory item to delete.", + "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/DeleteMemoryResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + } + }, + "/memory_stores/{name}/updates/{update_id}": { + "get": { + "operationId": "getUpdateResult", + "description": "Get memory store update result.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store.", + "schema": { + "type": "string" + } + }, + { + "name": "update_id", + "in": "path", + "required": true, + "description": "The ID of the memory update operation.", + "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/MemoryStoreUpdateResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + } + }, + "/memory_stores/{name}:delete_scope": { + "post": { + "operationId": "deleteScopeMemories", + "description": "Delete all memories associated with a specific scope from a memory store.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store.", + "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/MemoryStoreDeleteScopeResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "description": "The namespace that logically groups and isolates memories to delete, such as a user ID." + } + }, + "required": [ + "scope" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + } + }, + "/memory_stores/{name}:search_memories": { + "post": { + "operationId": "searchMemories", + "description": "Search for relevant memories from a memory store based on conversation context.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store to search.", + "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/MemoryStoreSearchResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "description": "The namespace that logically groups and isolates memories, such as a user ID." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + }, + "description": "Items for which to search for relevant memories." + }, + "previous_search_id": { + "type": "string", + "description": "The unique ID of the previous search request, enabling incremental memory search from where the last operation left off." + }, + "options": { + "allOf": [ + { + "$ref": "#/components/schemas/MemorySearchOptions" + } + ], + "description": "Memory search options." + } + }, + "required": [ + "scope" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + } + }, + "/memory_stores/{name}:update_memories": { + "post": { + "operationId": "updateMemories", + "description": "Update memory store with conversation memories.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "MemoryStores=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the memory store to update.", + "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": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "headers": { + "Operation-Location": { + "required": true, + "description": "The location for monitoring the operation state.", + "schema": { + "type": "string", + "format": "uri" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MemoryStoreUpdateResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Memory Stores" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "description": "The namespace that logically groups and isolates memories, such as a user ID." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + }, + "description": "Conversation items to be stored in memory." + }, + "previous_update_id": { + "type": "string", + "description": "The unique ID of the previous update request, enabling incremental memory updates from where the last operation left off." + }, + "update_delay": { + "type": "integer", + "format": "int32", + "description": "Timeout period before processing the memory update in seconds.\nIf a new update request is received during this period, it will cancel the current request and reset the timeout.\nSet to 0 to immediately trigger the update without delay.\nDefaults to 300 (5 minutes).", + "default": 300 + } + }, + "required": [ + "scope" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + } + }, + "/models": { + "get": { + "operationId": "Models_listLatest", + "description": "List the latest version of each ModelVersion", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Models=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedModelVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Models" + ] + } + }, + "/models/{name}/versions": { + "get": { + "operationId": "Models_listVersions", + "description": "List all versions of the given ModelVersion", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Models=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedModelVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Models" + ] + } + }, + "/models/{name}/versions/{version}": { + "get": { + "operationId": "Models_getVersion", + "description": "Get the specific version of the ModelVersion. The service returns 404 Not Found error if the ModelVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Models=V1Preview" + ] + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the ModelVersion to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Models" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Models=V1Preview" + ] + } + }, + "delete": { + "operationId": "Models_deleteVersion", + "description": "Delete the specific version of the ModelVersion. The service returns 200 OK if the ModelVersion was deleted successfully or if the ModelVersion does not exist.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Models=V1Preview" + ] + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version of the ModelVersion to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded." + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Models" + ], + "x-ms-foundry-meta": { + "required_previews": [ + "Models=V1Preview" + ] + } + }, + "patch": { + "operationId": "Models_updateVersion", + "description": "Update an existing ModelVersion with the given version id", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the resource", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The specific version id of the UpdateModelVersionRequest to create or update.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Models=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelVersion" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelVersion" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Models" + ], + "requestBody": { + "required": true, + "content": { + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/UpdateModelVersionRequest" + } + } + }, + "description": "The UpdateModelVersionRequest to create or update." + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Models=V1Preview" + ] + } + } + }, + "/models/{name}/versions/{version}/createAsync": { + "post": { + "operationId": "Models_createAsync", + "description": "Creates a model version asynchronously with blob content validation. Returns 202 Accepted with a Location header for polling.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Models=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "Name of the model.", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "Version of the model.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "202": { + "description": "Accepted response for asynchronous model version creation, with polling location.", + "headers": { + "Location": { + "required": false, + "description": "URL to poll for operation status.", + "schema": { + "type": "string", + "format": "uri" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "location": { + "type": "string", + "format": "uri", + "description": "URL to poll for operation status." + }, + "operationResult": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "URL to the operation result, or null if the operation is still in progress." + } + } + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelVersion" + } + } + }, + "description": "Model version to create." + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Models=V1Preview" + ] + } + } + }, + "/models/{name}/versions/{version}/credentials": { + "post": { + "operationId": "Models_getCredentials", + "description": "Get credentials for a model version asset.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Models=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "Name of the model.", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "Version of the model.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetCredentialResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelCredentialRequest" + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Models=V1Preview" + ] + } + } + }, + "/models/{name}/versions/{version}/startPendingUpload": { + "post": { + "operationId": "Models_startPendingUpload", + "description": "Start or retrieve a pending upload for a model version.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Models=V1Preview" + ] + } + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "Name of the model.", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "Version of the model.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelPendingUploadResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelPendingUploadRequest" + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Models=V1Preview" + ] + } + } + }, + "/openai/v1/conversations": { + "post": { + "operationId": "createConversation", + "description": "Create a conversation.", + "parameters": [], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.ConversationResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Conversations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.CreateConversationBody" + } + } + } + } + }, + "get": { + "operationId": "listConversations", + "description": "Returns the list of all conversations.", + "parameters": [ + { + "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": "agent_name", + "in": "query", + "required": false, + "description": "Filter by agent name. If provided, only items associated with the specified agent will be returned.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "description": "Filter by agent ID in the format `name:version`. If provided, only items associated with the specified agent ID will be returned.", + "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/OpenAI.ConversationResource" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Conversations" + ] + } + }, + "/openai/v1/conversations/{conversation_id}": { + "post": { + "operationId": "updateConversation", + "description": "Update a conversation.", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "description": "The id of the conversation to update.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.ConversationResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Conversations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.UpdateConversationBody" + } + } + } + } + }, + "get": { + "operationId": "getConversation", + "description": "Retrieves a conversation.", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "description": "The id of the conversation to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.ConversationResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Conversations" + ] + }, + "delete": { + "operationId": "deleteConversation", + "description": "Deletes a conversation.", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "description": "The id of the conversation to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.DeletedConversationResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Conversations" + ] + } + }, + "/openai/v1/conversations/{conversation_id}/items": { + "post": { + "operationId": "createConversationItems", + "description": "Create items in a conversation with the given ID.", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "description": "The id of the conversation on which the item needs to be created.", + "schema": { + "type": "string" + } + }, + { + "name": "include", + "in": "query", + "required": false, + "description": "Additional fields to include in the response.\nSee the `include` parameter for listing Conversation items for more information.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.ConversationItemList" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Conversations" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Item" + }, + "maxItems": 20, + "description": "The items to add to the conversation. You may add up to 20 items at a time." + } + }, + "required": [ + "items" + ] + } + } + } + } + }, + "get": { + "operationId": "listConversationItems", + "description": "List all items for a conversation with the given ID.", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "description": "The id of the conversation on which the items needs to be listed.", + "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": "item_type", + "in": "query", + "required": false, + "description": "Filter by item type. If provided, only items of the specified type will be returned.", + "schema": { + "$ref": "#/components/schemas/OpenAI.ItemType" + }, + "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/OpenAI.OutputItem" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Conversations" + ] + } + }, + "/openai/v1/conversations/{conversation_id}/items/{item_id}": { + "get": { + "operationId": "getConversationItem", + "description": "Get a single item from a conversation with the given IDs.", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "description": "The ID of the conversation that contains the item.", + "schema": { + "type": "string" + } + }, + { + "name": "item_id", + "in": "path", + "required": true, + "description": "The id of the conversation item to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Conversations" + ] + }, + "delete": { + "operationId": "deleteConversationItem", + "description": "Delete an item from a conversation with the given IDs.", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "description": "The id of the conversation on which the item needs to be deleted from.", + "schema": { + "type": "string" + } + }, + { + "name": "item_id", + "in": "path", + "required": true, + "description": "The id of the conversation item to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.ConversationResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Conversations" + ] + } + }, + "/openai/v1/evals": { + "get": { + "operationId": "Evals_listEvals", + "summary": "List all evaluations", + "description": "List evaluations for a project.", + "parameters": [ + { + "name": "after", + "in": "query", + "required": false, + "description": "Identifier for the last run from the previous pagination request.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Number of runs to retrieve.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "default": 20 + }, + "explode": false + }, + { + "name": "order", + "in": "query", + "required": false, + "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + }, + "explode": false + }, + { + "name": "order_by", + "in": "query", + "required": false, + "description": "Evals can be ordered by creation time or last updated time.\nUse `created_at` for creation time or `updated_at` for last updated time.", + "schema": { + "type": "string", + "enum": [ + "created_at", + "updated_at" + ], + "default": "created_at" + } + } + ], + "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/Eval" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ] + }, + "post": { + "operationId": "Evals_createEval", + "summary": "Create evaluation", + "description": "Create the structure of an evaluation that can be used to test a model's performance.\nAn evaluation is a set of testing criteria and the config for a data source, which dictates the schema of the data used in the evaluation. After creating an evaluation, you can run it on different models and model parameters. We support several types of graders and datasources.\nFor more information, see the [Evals guide](https://platform.openai.com/docs/guides/evals).", + "parameters": [], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eval" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEvalRequest" + } + } + } + } + } + }, + "/openai/v1/evals/{eval_id}": { + "delete": { + "operationId": "Evals_deleteEval", + "summary": "Delete an evaluation", + "description": "Delete an evaluation.", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEvalResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ] + }, + "get": { + "operationId": "Evals_getEval", + "summary": "Get an evaluation", + "description": "Get an evaluation by ID.", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eval" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ] + }, + "post": { + "operationId": "Evals_updateEval", + "summary": "Update an evaluation", + "description": "Update certain properties of an evaluation.", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to update.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eval" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEvalParametersBody" + } + } + } + } + } + }, + "/openai/v1/evals/{eval_id}/runs": { + "get": { + "operationId": "Evals_listRuns", + "summary": "Get a list of runs for an evaluation", + "description": "Get a list of runs for an evaluation.", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to retrieve runs for.", + "schema": { + "type": "string" + } + }, + { + "name": "after", + "in": "query", + "required": false, + "description": "Identifier for the last run from the previous pagination request.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Number of runs to retrieve.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "default": 20 + }, + "explode": false + }, + { + "name": "order", + "in": "query", + "required": false, + "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + }, + "explode": false + }, + { + "name": "status", + "in": "query", + "required": false, + "description": "Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` | `canceled`.", + "schema": { + "type": "string", + "enum": [ + "queued", + "in_progress", + "completed", + "canceled", + "failed" + ] + }, + "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/EvalRun" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ] + }, + "post": { + "operationId": "Evals_createEvalRun", + "summary": "Create evaluation run", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to create a run for.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEvalRunRequest" + } + } + } + } + } + }, + "/openai/v1/evals/{eval_id}/runs/{run_id}": { + "delete": { + "operationId": "Evals_deleteEvalRun", + "summary": "Delete evaluation run", + "description": "Delete an eval run.", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to delete the run from.", + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "required": true, + "description": "The ID of the run to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEvalRunResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ] + }, + "get": { + "operationId": "Evals_getEvalRun", + "summary": "Get an evaluation run", + "description": "Get an evaluation run by ID.", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to retrieve runs for.", + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "required": true, + "description": "The ID of the run to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ] + }, + "post": { + "operationId": "Evals_cancelEvalRun", + "summary": "Cancel evaluation run", + "description": "Cancel an ongoing evaluation run.", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation whose run you want to cancel.", + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "required": true, + "description": "The ID of the run to cancel.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ] + } + }, + "/openai/v1/evals/{eval_id}/runs/{run_id}/output_items": { + "get": { + "operationId": "Evals_getEvalRunOutputItems", + "summary": "Get evaluation run output items", + "description": "Get a list of output items for an evaluation run.", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "required": true, + "description": "The ID of the run to retrieve output items for.", + "schema": { + "type": "string" + } + }, + { + "name": "after", + "in": "query", + "required": false, + "description": "Identifier for the last run from the previous pagination request.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Number of runs to retrieve.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "default": 20 + }, + "explode": false + }, + { + "name": "order", + "in": "query", + "required": false, + "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" + }, + "explode": false + }, + { + "name": "status", + "in": "query", + "required": false, + "description": "Filter output items by status. Use `failed` to filter by failed output\nitems or `pass` to filter by passed output items.", + "schema": { + "type": "string", + "enum": [ + "fail", + "pass" + ] + } + } + ], + "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/EvalRunOutputItem" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ] + } + }, + "/openai/v1/evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}": { + "get": { + "operationId": "Evals_getEvalRunOutputItem", + "summary": "Get an output item of an evaluation run", + "description": "Get an evaluation run output item by ID.", + "parameters": [ + { + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to retrieve runs for.", + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "required": true, + "description": "The ID of the run to retrieve.", + "schema": { + "type": "string" + } + }, + { + "name": "output_item_id", + "in": "path", + "required": true, + "description": "The ID of the output item to retrieve.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRunOutputItem" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Evals" + ] + } + }, + "/openai/v1/fine_tuning/jobs": { + "post": { + "operationId": "createFineTuningJob", + "description": "Creates a fine-tuning job which begins the process of creating a new model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)", + "parameters": [ + { + "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/OpenAI.FineTuningJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Fine-Tuning" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequest" + } + } + } + } + }, + "get": { + "operationId": "listPaginatedFineTuningJobs", + "description": "List your organization's fine-tuning jobs", + "parameters": [ + { + "name": "after", + "in": "query", + "required": false, + "description": "Identifier for the last job from the previous pagination request.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Number of fine-tuning jobs to retrieve.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + }, + "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": { + "$ref": "#/components/schemas/OpenAI.ListPaginatedFineTuningJobsResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Fine-Tuning" + ] + } + }, + "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}": { + "get": { + "operationId": "retrieveFineTuningJob", + "description": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)", + "parameters": [ + { + "name": "fine_tuning_job_id", + "in": "path", + "required": true, + "description": "The ID of the fine-tuning job.", + "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/OpenAI.FineTuningJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Fine-Tuning" + ] + } + }, + "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel": { + "post": { + "operationId": "cancelFineTuningJob", + "description": "Immediately cancel a fine-tune job.", + "parameters": [ + { + "name": "fine_tuning_job_id", + "in": "path", + "required": true, + "description": "The ID of the fine-tuning 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/OpenAI.FineTuningJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Fine-Tuning" + ] + } + }, + "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints": { + "get": { + "operationId": "listFineTuningJobCheckpoints", + "description": "List checkpoints for a fine-tuning job.", + "parameters": [ + { + "name": "fine_tuning_job_id", + "in": "path", + "required": true, + "description": "The ID of the fine-tuning job to get checkpoints for.", + "schema": { + "type": "string" + } + }, + { + "name": "after", + "in": "query", + "required": false, + "description": "Identifier for the last checkpoint ID from the previous pagination request.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Number of checkpoints to retrieve.", + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + }, + "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": { + "$ref": "#/components/schemas/OpenAI.ListFineTuningJobCheckpointsResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Fine-Tuning" + ] + } + }, + "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/events": { + "get": { + "operationId": "listFineTuningJobEvents", + "description": "Get fine-grained status updates for a fine-tuning job.", + "parameters": [ + { + "name": "fine_tuning_job_id", + "in": "path", + "required": true, + "description": "The ID of the fine-tuning job to get events for.", + "schema": { + "type": "string" + } + }, + { + "name": "after", + "in": "query", + "required": false, + "description": "Identifier for the last event from the previous pagination request.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Number of events to retrieve.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + }, + "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": { + "$ref": "#/components/schemas/OpenAI.ListFineTuningJobEventsResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Fine-Tuning" + ] + } + }, + "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/pause": { + "post": { + "operationId": "pauseFineTuningJob", + "description": "Pause a running fine-tune job.", + "parameters": [ + { + "name": "fine_tuning_job_id", + "in": "path", + "required": true, + "description": "The ID of the fine-tuning job to pause.", + "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/OpenAI.FineTuningJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Fine-Tuning" + ] + } + }, + "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/resume": { + "post": { + "operationId": "resumeFineTuningJob", + "description": "Resume a paused fine-tune job.", + "parameters": [ + { + "name": "fine_tuning_job_id", + "in": "path", + "required": true, + "description": "The ID of the fine-tuning job to resume.", + "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/OpenAI.FineTuningJob" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Fine-Tuning" + ] + } + }, + "/openai/v1/responses": { + "post": { + "operationId": "createResponse_createResponseStream", + "parameters": [], + "description": "Creates a model response. Creates a model response (streaming response).", + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-agent-session-id": { + "required": false, + "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.Response" + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/OpenAI.CreateResponseStreamingResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Responses" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "top_logprobs": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "temperature": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true, + "default": 1 + }, + "top_p": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true, + "default": 1 + }, + "user": { + "type": "string", + "description": "This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\n A stable identifier for your end-users.\n Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).", + "deprecated": true + }, + "safety_identifier": { + "type": "string", + "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\n The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers)." + }, + "prompt_cache_key": { + "type": "string", + "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching)." + }, + "service_tier": { + "$ref": "#/components/schemas/OpenAI.ServiceTier" + }, + "prompt_cache_retention": { + "type": "string", + "enum": [ + "in-memory", + "24h" + ], + "nullable": true + }, + "previous_response_id": { + "type": "string", + "nullable": true + }, + "model": { + "type": "string", + "description": "The model deployment to use for the creation of this response." + }, + "reasoning": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Reasoning" + } + ], + "nullable": true + }, + "background": { + "type": "boolean", + "nullable": true + }, + "max_output_tokens": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "max_tool_calls": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "text": { + "$ref": "#/components/schemas/OpenAI.ResponseTextParam" + }, + "tools": { + "$ref": "#/components/schemas/OpenAI.ToolsArray" + }, + "tool_choice": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceOptions" + }, + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ] + }, + "prompt": { + "$ref": "#/components/schemas/OpenAI.Prompt" + }, + "truncation": { + "type": "string", + "enum": [ + "auto", + "disabled" + ], + "nullable": true, + "default": "disabled" + }, + "input": { + "$ref": "#/components/schemas/OpenAI.InputParam" + }, + "include": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.IncludeEnum" + }, + "nullable": true + }, + "parallel_tool_calls": { + "type": "boolean", + "nullable": true, + "default": true + }, + "store": { + "type": "boolean", + "nullable": true, + "default": true + }, + "instructions": { + "type": "string", + "nullable": true + }, + "stream": { + "type": "boolean", + "nullable": true + }, + "stream_options": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseStreamOptions" + } + ], + "nullable": true + }, + "conversation": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationParam" + } + ], + "nullable": true + }, + "context_management": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ContextManagementParam" + }, + "nullable": true, + "description": "Context management configuration for this request." + }, + "agent_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentReference" + } + ], + "description": "The agent to use for generating the response." + }, + "structured_inputs": { + "type": "object", + "additionalProperties": {}, + "description": "The structured inputs to the response that can participate in prompt template substitution or tool argument bindings." + } + } + }, + { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "top_logprobs": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "temperature": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true, + "default": 1 + }, + "top_p": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true, + "default": 1 + }, + "user": { + "type": "string", + "description": "This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\n A stable identifier for your end-users.\n Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).", + "deprecated": true + }, + "safety_identifier": { + "type": "string", + "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\n The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers)." + }, + "prompt_cache_key": { + "type": "string", + "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching)." + }, + "service_tier": { + "$ref": "#/components/schemas/OpenAI.ServiceTier" + }, + "prompt_cache_retention": { + "type": "string", + "enum": [ + "in-memory", + "24h" + ], + "nullable": true + }, + "previous_response_id": { + "type": "string", + "nullable": true + }, + "model": { + "type": "string", + "description": "The model deployment to use for the creation of this response." + }, + "reasoning": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Reasoning" + } + ], + "nullable": true + }, + "background": { + "type": "boolean", + "nullable": true + }, + "max_output_tokens": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "max_tool_calls": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "text": { + "$ref": "#/components/schemas/OpenAI.ResponseTextParam" + }, + "tools": { + "$ref": "#/components/schemas/OpenAI.ToolsArray" + }, + "tool_choice": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceOptions" + }, + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ] + }, + "prompt": { + "$ref": "#/components/schemas/OpenAI.Prompt" + }, + "truncation": { + "type": "string", + "enum": [ + "auto", + "disabled" + ], + "nullable": true, + "default": "disabled" + }, + "input": { + "$ref": "#/components/schemas/OpenAI.InputParam" + }, + "include": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.IncludeEnum" + }, + "nullable": true + }, + "parallel_tool_calls": { + "type": "boolean", + "nullable": true, + "default": true + }, + "store": { + "type": "boolean", + "nullable": true, + "default": true + }, + "instructions": { + "type": "string", + "nullable": true + }, + "stream": { + "type": "boolean", + "nullable": true + }, + "stream_options": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseStreamOptions" + } + ], + "nullable": true + }, + "conversation": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationParam" + } + ], + "nullable": true + }, + "context_management": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ContextManagementParam" + }, + "nullable": true, + "description": "Context management configuration for this request." + }, + "agent_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentReference" + } + ], + "description": "The agent to use for generating the response." + }, + "structured_inputs": { + "type": "object", + "additionalProperties": {}, + "description": "The structured inputs to the response that can participate in prompt template substitution or tool argument bindings." + } + } + } + ] + } + } + } + } + }, + "get": { + "operationId": "listResponses", + "description": "Returns the list of all responses.", + "parameters": [ + { + "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": "agent_name", + "in": "query", + "required": false, + "description": "Filter by agent name. If provided, only items associated with the specified agent will be returned.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "description": "Filter by agent ID in the format `name:version`. If provided, only items associated with the specified agent ID will be returned.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "conversation_id", + "in": "query", + "required": false, + "description": "Filter by conversation ID. If provided, only responses associated with the specified conversation will be returned.", + "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/OpenAI.Response" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Responses" + ] + } + }, + "/openai/v1/responses/compact": { + "post": { + "operationId": "compactResponseConversation", + "description": "Produces a compaction of a responses conversation.", + "parameters": [], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.CompactResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Responses" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.CompactResponseMethodPublicBody" + } + } + } + } + } + }, + "/openai/v1/responses/{response_id}": { + "get": { + "operationId": "getResponse_getResponseStream", + "parameters": [ + { + "name": "response_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "include[]", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.IncludeEnum" + }, + "default": [] + } + }, + { + "name": "stream", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + }, + "explode": false + }, + { + "name": "starting_after", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + }, + "explode": false + }, + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "enum": [ + "text/event-stream" + ] + } + } + ], + "description": "Retrieves a model response with the given ID. Retrieves a model response with the given ID (streaming response).", + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-agent-session-id": { + "required": false, + "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.Response" + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/OpenAI.CreateResponseStreamingResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Responses" + ] + }, + "delete": { + "operationId": "deleteResponse", + "description": "Deletes a model response.", + "parameters": [ + { + "name": "response_id", + "in": "path", + "required": true, + "description": "The ID of the response to delete.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-agent-session-id": { + "required": false, + "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteResponseResult" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Responses" + ] + } + }, + "/openai/v1/responses/{response_id}/cancel": { + "post": { + "operationId": "cancelResponse", + "description": "Cancels a model response.", + "parameters": [ + { + "name": "response_id", + "in": "path", + "required": true, + "description": "The ID of the response to cancel.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-agent-session-id": { + "required": false, + "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAI.Response" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Responses" + ] + } + }, + "/openai/v1/responses/{response_id}/input_items": { + "get": { + "operationId": "listInputItems", + "description": "Returns a list of input items for a given response.", + "parameters": [ + { + "name": "response_id", + "in": "path", + "required": true, + "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 + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "x-agent-session-id": { + "required": false, + "description": "Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "data", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ItemResource" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Responses" + ] + } + }, + "/redTeams/runs": { + "get": { + "operationId": "RedTeams_list", + "description": "List a redteam by name.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "RedTeams=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedRedTeam" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Redteams" + ] + } + }, + "/redTeams/runs/{name}": { + "get": { + "operationId": "RedTeams_get", + "description": "Get a redteam by name.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "path", + "required": true, + "description": "Identifier of the red team run.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "RedTeams=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedTeam" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Redteams" + ] + } + }, + "/redTeams/runs:run": { + "post": { + "operationId": "RedTeams_create", + "description": "Creates a redteam run.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "RedTeams=V1Preview" + ] + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedTeam" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Redteams" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RedTeam" + } + } + }, + "description": "Redteam to be run" + } + } + }, + "/schedules": { + "get": { + "operationId": "Schedules_list", + "description": "List all schedules.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter by the type of schedule.", + "schema": { + "$ref": "#/components/schemas/ScheduleTaskType" + }, + "explode": false + }, + { + "name": "enabled", + "in": "query", + "required": false, + "description": "Filter by the enabled status.", + "schema": { + "type": "boolean" + }, + "explode": false + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Schedules=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedSchedule" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + } + }, + "/schedules/{id}": { + "delete": { + "operationId": "Schedules_delete", + "description": "Delete a schedule.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "Identifier of the schedule.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Schedules=V1Preview" + ] + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful." + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + }, + "get": { + "operationId": "Schedules_get", + "description": "Get a schedule by id.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "Identifier of the schedule.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Schedules=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Schedule" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + }, + "put": { + "operationId": "Schedules_createOrUpdate", + "description": "Create or update operation template.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "Identifier of the schedule.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Schedules=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Schedule" + } + } + } + }, + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Schedule" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Schedules" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Schedule" + } + } + }, + "description": "The resource instance." + } + } + }, + "/schedules/{id}/runs": { + "get": { + "operationId": "Schedules_listRuns", + "description": "List all schedule runs.", + "parameters": [ + { + "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "Identifier of the schedule.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter by the type of schedule.", + "schema": { + "$ref": "#/components/schemas/ScheduleTaskType" + }, + "explode": false + }, + { + "name": "enabled", + "in": "query", + "required": false, + "description": "Filter by the enabled status.", + "schema": { + "type": "boolean" + }, + "explode": false + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Schedules=V1Preview" + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PagedScheduleRun" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "headers": { + "x-ms-error-code": { + "required": false, + "description": "String error code indicating what went wrong.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Azure.Core.Foundations.ErrorResponse" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + } + }, + "/schedules/{schedule_id}/runs/{run_id}": { + "get": { + "operationId": "Schedules_getRun", + "description": "Get a schedule run by id.", + "parameters": [ + { + "name": "schedule_id", + "in": "path", + "required": true, + "description": "The unique identifier of the schedule.", + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "path", + "required": true, + "description": "The unique identifier of the schedule run.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Schedules=V1Preview" + ] + } + }, + { + "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/ScheduleRun" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + } + }, + "/skills": { + "post": { + "operationId": "Skills_createSkill", + "description": "Creates a skill.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 63, + "description": "The unique name of the skill." + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of the skill." + }, + "instructions": { + "type": "string", + "maxLength": 102400, + "description": "Instructions that define the behavior of the skill." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + } + }, + "required": [ + "name" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + }, + "get": { + "operationId": "Skills_listSkills", + "description": "Returns the list of all skills.", + "parameters": [ + { + "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": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "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/SkillObject" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + } + }, + "/skills/{name}": { + "get": { + "operationId": "Skills_getSkill", + "description": "Retrieves a skill.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The unique name of the skill.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "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/SkillObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + }, + "post": { + "operationId": "Skills_updateSkill", + "description": "Updates an existing skill.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The unique name of the skill.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "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/SkillObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of the skill." + }, + "instructions": { + "type": "string", + "maxLength": 102400, + "description": "Instructions that define the behavior of the skill." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + } + } + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + }, + "delete": { + "operationId": "Skills_deleteSkill", + "description": "Deletes a skill.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The unique name of the skill.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "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/DeleteSkillResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + } + }, + "/skills/{name}:download": { + "get": { + "operationId": "Skills_downloadSkill", + "description": "Downloads a skill package.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The unique name of the skill.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "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 response body for downloading a skill package.", + "content": { + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + } + }, + "/skills:import": { + "post": { + "operationId": "Skills_createSkillFromPackage", + "description": "Creates a skill from a zip package.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "requestBody": { + "required": true, + "content": { + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "description": "The zip package used to create the skill." + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + } + }, + "/toolboxes": { + "get": { + "operationId": "listToolboxes", + "description": "List all toolboxes.", + "parameters": [ + { + "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": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Toolboxes=V1Preview" + ] + } + }, + { + "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/ToolboxObject" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolboxes=V1Preview" + ] + } + } + }, + "/toolboxes/{name}": { + "get": { + "operationId": "getToolbox", + "description": "Retrieve a toolbox.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox to retrieve.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Toolboxes=V1Preview" + ] + } + }, + { + "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/ToolboxObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolboxes=V1Preview" + ] + } + }, + "patch": { + "operationId": "updateToolbox", + "description": "Update a toolbox to point to a specific version.", + "parameters": [ + { + "$ref": "#/components/parameters/UpdateToolboxRequest.name" + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Toolboxes=V1Preview" + ] + } + }, + { + "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/ToolboxObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateToolboxRequest" + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolboxes=V1Preview" + ] + } + }, + "delete": { + "operationId": "deleteToolbox", + "description": "Delete a toolbox and all its versions.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox to delete.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Toolboxes=V1Preview" + ] + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolboxes=V1Preview" + ] + } + } + }, + "/toolboxes/{name}/versions": { + "post": { + "operationId": "createToolboxVersion", + "description": "Create a new version of a toolbox. If the toolbox does not exist, it will be created.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox. If the toolbox does not exist, it will be created.", + "schema": { + "type": "string", + "maxLength": 256 + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Toolboxes=V1Preview" + ] + } + }, + { + "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/ToolboxVersionObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the toolbox." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the toolbox." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "The list of tools to include in this version." + }, + "policies": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolboxPolicies" + } + ], + "description": "Policy configuration for this toolbox version." + } + }, + "required": [ + "tools" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolboxes=V1Preview" + ] + } + }, + "get": { + "operationId": "listToolboxVersions", + "description": "List all versions of a toolbox.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox to list versions for.", + "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": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Toolboxes=V1Preview" + ] + } + }, + { + "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/ToolboxVersionObject" + }, + "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." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolboxes=V1Preview" + ] + } + } + }, + "/toolboxes/{name}/versions/{version}": { + "get": { + "operationId": "getToolboxVersion", + "description": "Retrieve a specific version of a toolbox.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox.", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version identifier to retrieve.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Toolboxes=V1Preview" + ] + } + }, + { + "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/ToolboxVersionObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolboxes=V1Preview" + ] + } + }, + "delete": { + "operationId": "deleteToolboxVersion", + "description": "Delete a specific version of a toolbox.", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox.", + "schema": { + "type": "string" + } + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The version identifier to delete.", + "schema": { + "type": "string" + } + }, + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Toolboxes=V1Preview" + ] + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolboxes" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolboxes=V1Preview" + ] + } + } + } + }, + "security": [ + { + "OAuth2Auth": [ + "https://ai.azure.com/.default" + ] + } + ], + "components": { + "parameters": { + "Azure.Core.ClientRequestIdHeader": { + "name": "x-ms-client-request-id", + "in": "header", + "required": false, + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "schema": { + "$ref": "#/components/schemas/Azure.Core.uuid" + } + }, + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string", + "minLength": 1 + }, + "explode": false + }, + "UpdateToolboxRequest.name": { + "name": "name", + "in": "path", + "required": true, + "description": "The name of the toolbox to update.", + "schema": { + "type": "string" + } + } + }, + "schemas": { + "A2APreviewTool": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "a2a_preview" + ], + "description": "The type of the tool. Always `\"a2a_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." + }, + "base_url": { + "type": "string", + "format": "uri", + "description": "Base URL of the agent." + }, + "agent_card_path": { + "type": "string", + "description": "The path to the agent card relative to the `base_url`.\nIf not provided, defaults to `/.well-known/agent-card.json`" + }, + "project_connection_id": { + "type": "string", + "description": "The connection ID in the project for the A2A server.\nThe connection stores authentication and other connection details needed to connect to the A2A server." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "An agent implementing the A2A protocol." + }, + "A2AToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "arguments", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "a2a_preview_call" + ] + }, + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the A2A agent card being called." + }, + "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": "An A2A (Agent-to-Agent) tool call." + }, + "A2AToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "a2a_preview_call_output" + ] + }, + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the A2A agent card that was called." + }, + "output": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolCallOutputContent" + } + ], + "description": "The output from the A2A 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 an A2A (Agent-to-Agent) tool call." + }, + "AISearchIndexResource": { + "type": "object", + "properties": { + "project_connection_id": { + "type": "string", + "description": "An index connection ID in an IndexResource attached to this agent." + }, + "index_name": { + "type": "string", + "description": "The name of an index in an IndexResource attached to this agent." + }, + "query_type": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureAISearchQueryType" + } + ], + "description": "Type of query in an AIIndexResource attached to this agent." + }, + "top_k": { + "type": "integer", + "format": "int32", + "description": "Number of documents to retrieve from search and present to the model." + }, + "filter": { + "type": "string", + "description": "filter string for search resource. [Learn more here](https://learn.microsoft.com/azure/search/search-filters)." + }, + "index_asset_id": { + "type": "string", + "description": "Index asset id for search resource." + } + }, + "description": "A AI Search Index resource." + }, + "AgentBlueprintReference": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/AgentBlueprintReferenceType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "ManagedAgentIdentityBlueprint": "#/components/schemas/ManagedAgentIdentityBlueprintReference" + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentBlueprintReferenceType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "ManagedAgentIdentityBlueprint" + ] + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentCard": { + "type": "object", + "required": [ + "version", + "skills" + ], + "properties": { + "version": { + "type": "string", + "minLength": 1, + "maxLength": 32, + "description": "The version of the agent card." + }, + "description": { + "type": "string", + "maxLength": 2048, + "description": "The description of the agent card." + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentCardSkill" + }, + "maxItems": 16, + "description": "The set of skills that an agent can perform." + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentCardSkill": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "a unique identifier for the skill" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 128, + "description": "The name of the skill" + }, + "description": { + "type": "string", + "maxLength": 2048, + "description": "A description of the skill" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentCardSkillTag" + }, + "maxItems": 5, + "description": "set of tagwords describing classes of capabilities for the skill" + }, + "examples": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentCardSkillExample" + }, + "maxItems": 5, + "description": "A list of example scenarios that the skill can perform." + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentCardSkillExample": { + "type": "string", + "maxLength": 1024, + "description": "A skill example string with a maximum length of 1024 characters.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentCardSkillTag": { + "type": "string", + "maxLength": 32, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentCardUpdate": { + "type": "object", + "properties": { + "version": { + "type": "string", + "minLength": 1, + "maxLength": 32, + "description": "The version of the agent card." + }, + "description": { + "type": "string", + "maxLength": 2048, + "description": "The description of the agent card." + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentCardSkill" + }, + "maxItems": 16, + "description": "The set of skills that an agent can perform." + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentClusterInsightRequest": { + "type": "object", + "required": [ + "type", + "agentName" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "AgentClusterInsight" + ], + "description": "The type of request." + }, + "agentName": { + "type": "string", + "description": "Identifier for the agent." + }, + "modelConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightModelConfiguration" + } + ], + "description": "Configuration of the model used in the insight generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightRequest" + } + ], + "description": "Insights on set of Agent Evaluation Results" + }, + "AgentClusterInsightResult": { + "type": "object", + "required": [ + "type", + "clusterInsight" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "AgentClusterInsight" + ], + "description": "The type of insights result." + }, + "clusterInsight": { + "$ref": "#/components/schemas/ClusterInsightResult" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightResult" + } + ], + "description": "Insights from the agent cluster analysis." + }, + "AgentDefinition": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "$ref": "#/components/schemas/AgentKind" + }, + "rai_config": { + "allOf": [ + { + "$ref": "#/components/schemas/RaiConfig" + } + ], + "description": "Configuration for Responsible AI (RAI) content filtering and safety features." + } + }, + "discriminator": { + "propertyName": "kind", + "mapping": { + "hosted": "#/components/schemas/HostedAgentDefinition", + "prompt": "#/components/schemas/PromptAgentDefinition", + "workflow": "#/components/schemas/WorkflowAgentDefinition", + "external": "#/components/schemas/ExternalAgentDefinition" + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview", + "CodeAgents=V1Preview", + "ExternalAgents=V1Preview" + ] + } + }, + "AgentDefinitionOptInKeys": { + "type": "string", + "enum": [ + "HostedAgents=V1Preview", + "WorkflowAgents=V1Preview", + "ContainerAgents=V1Preview", + "AgentEndpoints=V1Preview", + "CodeAgents=V1Preview", + "ExternalAgents=V1Preview" + ], + "description": "Feature opt-in keys for agent definition operations supporting hosted or workflow agents." + }, + "AgentEndpointAuthorizationScheme": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/AgentEndpointAuthorizationSchemeType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "Entra": "#/components/schemas/EntraAuthorizationScheme", + "BotService": "#/components/schemas/BotServiceAuthorizationScheme", + "BotServiceRbac": "#/components/schemas/BotServiceRbacAuthorizationScheme" + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentEndpointAuthorizationSchemeType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Entra", + "BotService", + "BotServiceRbac" + ] + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentEndpointConfig": { + "type": "object", + "properties": { + "version_selector": { + "allOf": [ + { + "$ref": "#/components/schemas/VersionSelector" + } + ], + "description": "The version selector of the agent endpoint determines how traffic is routed to different versions of the agent." + }, + "protocols": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentEndpointProtocol" + }, + "description": "The protocols that the agent supports" + }, + "authorization_schemes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + }, + "description": "The authorization schemes supported by the agent endpoint" + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentEndpointConfigUpdate": { + "type": "object", + "properties": { + "version_selector": { + "allOf": [ + { + "$ref": "#/components/schemas/VersionSelectorUpdate" + } + ], + "description": "The version selector of the agent endpoint determines how traffic is routed to different versions of the agent." + }, + "protocols": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentEndpointProtocol" + }, + "description": "The protocols that the agent supports" + }, + "authorization_schemes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + }, + "description": "The authorization schemes supported by the agent endpoint" + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentEndpointProtocol": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "activity", + "responses", + "a2a", + "mcp", + "invocations" + ] + } + ] + }, + "AgentFilterTraceSource": { + "type": "object", + "required": [ + "type", + "agent_reference" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent_filter" + ], + "description": "The type of trace source, always `agent_filter`." + }, + "agent_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalAgentReference" + } + ], + "description": "The agent reference to filter traces by." + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start time for the trace query window, expressed as a Unix timestamp (seconds)." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End time for the trace query window, expressed as a Unix timestamp (seconds)." + }, + "max_traces": { + "type": "integer", + "format": "int32", + "description": "Maximum number of traces to sample. Must be greater than 0." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/TraceSource" + } + ], + "description": "A trace source that selects traces by agent reference with time-based filtering." + }, + "AgentIdentity": { + "type": "object", + "required": [ + "principal_id", + "client_id" + ], + "properties": { + "principal_id": { + "type": "string", + "description": "The principal ID of the agent instance" + }, + "client_id": { + "type": "string", + "description": "The client ID of the agent instance. Also referred to as the instance ID" + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentKind": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "prompt", + "hosted", + "workflow", + "external" + ] + } + ] + }, + "AgentObject": { + "type": "object", + "required": [ + "object", + "id", + "name", + "versions" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "agent" + ], + "description": "The object type, which is always 'agent'." + }, + "id": { + "type": "string", + "description": "The unique identifier of the agent." + }, + "name": { + "type": "string", + "maxLength": 63, + "description": "The name of the agent." + }, + "versions": { + "type": "object", + "properties": { + "latest": { + "$ref": "#/components/schemas/AgentVersionObject" + } + }, + "required": [ + "latest" + ], + "description": "The latest version of the agent." + }, + "agent_endpoint": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointConfig" + } + ], + "description": "The endpoint configuration for the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "instance_identity": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentIdentity" + } + ], + "description": "The instance identity of the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + }, + "readOnly": true + }, + "blueprint": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentIdentity" + } + ], + "description": "The blueprint for the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + }, + "readOnly": true + }, + "blueprint_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentBlueprintReference" + } + ], + "description": "The blueprint for the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + }, + "readOnly": true + }, + "agent_card": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentCard" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + } + } + }, + "AgentProtocol": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "activity_protocol", + "responses", + "mcp", + "invocations" + ] + } + ] + }, + "AgentReference": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent_reference" + ] + }, + "name": { + "type": "string", + "maxLength": 256, + "description": "The name of the agent." + }, + "version": { + "type": "string", + "description": "The version identifier of the agent." + } + } + }, + "AgentSessionResource": { + "type": "object", + "required": [ + "agent_session_id", + "version_indicator", + "status", + "created_at", + "last_accessed_at", + "expires_at" + ], + "properties": { + "agent_session_id": { + "type": "string", + "description": "The session identifier." + }, + "version_indicator": { + "allOf": [ + { + "$ref": "#/components/schemas/VersionIndicator" + } + ], + "description": "The version indicator determining which agent version backs this session." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentSessionStatus" + } + ], + "description": "The current status of the session." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) when the session was created.", + "readOnly": true + }, + "last_accessed_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) when the session was last accessed.", + "readOnly": true + }, + "expires_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) when the session expires (rolling, 30 days from last activity).", + "readOnly": true + } + }, + "description": "An agent session providing a long-lived compute sandbox for hosted agent invocations.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentSessionStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "creating", + "active", + "idle", + "updating", + "failed", + "deleting", + "deleted", + "expired" + ] + } + ], + "description": "The status of an agent session.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "AgentSmartFilterTraceSource": { + "type": "object", + "required": [ + "type", + "agent_reference" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent_smart_filter" + ], + "description": "The type of trace source, always `agent_smart_filter`." + }, + "agent_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalAgentReference" + } + ], + "description": "The agent reference to filter traces by." + }, + "start_time": { + "type": "integer", + "format": "int64", + "description": "Start time for the trace query window, expressed as a Unix timestamp (seconds)." + }, + "end_time": { + "type": "integer", + "format": "int64", + "description": "End time for the trace query window, expressed as a Unix timestamp (seconds)." + }, + "max_traces": { + "type": "integer", + "format": "int32", + "description": "Maximum number of traces to sample. Must be greater than 0." + }, + "model": { + "type": "string", + "description": "If you provide the model, it will be used for filtering." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/TraceSource" + } + ], + "description": "An extended agent filter trace source that also includes model information." + }, + "AgentTaxonomyInput": { + "type": "object", + "required": [ + "type", + "target", + "riskCategories" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent" + ], + "description": "Input type of the evaluation taxonomy." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "Target configuration for the agent." + }, + "riskCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RiskCategory" + }, + "description": "List of risk categories to evaluate against." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationTaxonomyInput" + } + ], + "description": "Input configuration for the evaluation taxonomy when the input type is agent." + }, + "AgentTaxonomyInputUpdate": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "agent" + ], + "description": "Input type of the evaluation taxonomy." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/TargetUpdate" + } + ], + "description": "Target configuration for the agent." + }, + "riskCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RiskCategory" + }, + "description": "List of risk categories to evaluate against." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationTaxonomyInputUpdate" + } + ], + "description": "Input configuration for the evaluation taxonomy when the input type is agent." + }, + "AgentVersionObject": { + "type": "object", + "required": [ + "metadata", + "object", + "id", + "name", + "version", + "created_at", + "definition" + ], + "properties": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "object": { + "type": "string", + "enum": [ + "agent.version" + ], + "description": "The object type, which is always 'agent.version'." + }, + "id": { + "type": "string", + "description": "The unique identifier of the agent version." + }, + "name": { + "type": "string", + "maxLength": 256, + "description": "The name of the agent. Name can be used to retrieve/update/delete the agent." + }, + "version": { + "type": "string", + "description": "The version identifier of the agent. Agents are immutable and every update creates a new version while keeping the name same." + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the agent." + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The Unix timestamp (seconds) when the agent was created." + }, + "definition": { + "$ref": "#/components/schemas/AgentDefinition" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentVersionStatus" + } + ], + "description": "The provisioning status of the agent version. Defaults to 'active' for non-hosted agents. For hosted agents, reflects infrastructure readiness." + }, + "instance_identity": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentIdentity" + } + ], + "description": "The instance identity of the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + }, + "readOnly": true + }, + "blueprint": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentIdentity" + } + ], + "description": "The blueprint for the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + }, + "readOnly": true + }, + "blueprint_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentBlueprintReference" + } + ], + "description": "The blueprint for the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + }, + "readOnly": true + }, + "agent_guid": { + "type": "string", + "description": "The unique GUID identifier of the agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + }, + "readOnly": true + } + } + }, + "AgentVersionStatus": { + "type": "string", + "enum": [ + "creating", + "active", + "failed", + "deleting", + "deleted" + ], + "description": "The provisioning status of an agent version." + }, + "AgenticIdentityPreviewCredentials": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "AgenticIdentityToken_Preview" + ], + "description": "The credential type", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "Agentic identity credential definition" + }, + "ApiErrorResponse": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "$ref": "#/components/schemas/OpenAI.Error" + } + }, + "description": "Error response for API failures." + }, + "ApiKeyCredentials": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "ApiKey" + ], + "description": "The credential type", + "readOnly": true + }, + "key": { + "type": "string", + "description": "API Key", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "API Key Credential definition" + }, + "ArtifactProfile": { + "type": "object", + "required": [ + "category" + ], + "properties": { + "category": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryModelArtifactProfileCategory" + } + ], + "description": "The category of the artifact profile" + }, + "signals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FoundryModelArtifactProfileSignal" + }, + "description": "Signals detected in the model artifact" + } + }, + "description": "Artifact profile of the model" + }, + "AssetCredentialResponse": { + "type": "object", + "required": [ + "blobReference" + ], + "properties": { + "blobReference": { + "allOf": [ + { + "$ref": "#/components/schemas/BlobReference" + } + ], + "description": "Credential info to access the storage account." + } + }, + "description": "Represents a reference to a blob for consumption" + }, + "AssetId": { + "type": "string", + "description": "Identifier of a saved asset." + }, + "AttackStrategy": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "easy", + "moderate", + "difficult", + "ascii_art", + "ascii_smuggler", + "atbash", + "base64", + "binary", + "caesar", + "character_space", + "jailbreak", + "ansi_attack", + "character_swap", + "suffix_append", + "string_join", + "unicode_confusable", + "unicode_substitution", + "diacritic", + "flip", + "leetspeak", + "rot13", + "morse", + "url", + "baseline", + "indirect_jailbreak", + "tense", + "multi_turn", + "crescendo" + ] + } + ], + "description": "Strategies for attacks." + }, + "Azure.Core.Foundations.Error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Azure.Core.Foundations.Error" + }, + "description": "An array of details about specific errors that led to this reported error." + }, + "innererror": { + "allOf": [ + { + "$ref": "#/components/schemas/Azure.Core.Foundations.InnerError" + } + ], + "description": "An object containing more specific information than the current object about the error." + } + }, + "description": "The error object." + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/Azure.Core.Foundations.Error" + } + ], + "description": "The error object." + } + }, + "description": "A response containing error details." + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "allOf": [ + { + "$ref": "#/components/schemas/Azure.Core.Foundations.InnerError" + } + ], + "description": "Inner error." + } + }, + "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors." + }, + "Azure.Core.Foundations.OperationState": { + "anyOf": [ + { + "type": "string", + "enum": [ + "NotStarted", + "Running", + "Succeeded", + "Failed", + "Canceled" + ] + }, + { + "type": "string" + } + ], + "description": "Enum describing allowed operation states." + }, + "Azure.Core.uuid": { + "type": "string", + "format": "uuid", + "description": "Universally Unique Identifier" + }, + "AzureAIAgentTarget": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_agent" + ], + "description": "The type of target, always `azure_ai_agent`." + }, + "name": { + "type": "string", + "description": "The unique identifier of the Azure AI agent." + }, + "version": { + "type": "string", + "description": "The version of the Azure AI agent." + }, + "tool_descriptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolDescription" + }, + "description": "The parameters used to control the sampling behavior of the agent during text generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "Represents a target specifying an Azure AI agent." + }, + "AzureAIAgentTargetUpdate": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_agent" + ], + "description": "The type of target, always `azure_ai_agent`." + }, + "name": { + "type": "string", + "description": "The unique identifier of the Azure AI agent." + }, + "version": { + "type": "string", + "description": "The version of the Azure AI agent." + }, + "tool_descriptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolDescription" + }, + "description": "The parameters used to control the sampling behavior of the agent during text generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/TargetUpdate" + } + ], + "description": "Represents a target specifying an Azure AI agent." + }, + "AzureAIBenchmarkDataSourceConfig": { + "type": "object", + "required": [ + "scenario", + "benchmark_name" + ], + "properties": { + "scenario": { + "type": "string", + "enum": [ + "benchmark_preview" + ], + "description": "Data schema scenario, always `benchmark` for benchmark evaluations." + }, + "benchmark_name": { + "type": "string", + "description": "The name of the benchmark specification." + }, + "benchmark_version": { + "type": "string", + "description": "The version of the benchmark specification (e.g., '0.1'). Latest version if not specified." + }, + "grader_model": { + "type": "string", + "description": "Optional grader model for benchmarks that use model graders, Required when the benchmark's testing_criteria uses a model grader type." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/AzureAIDataSourceConfig" + } + ], + "description": "Data source configuration for benchmark evaluations." + }, + "AzureAIBenchmarkPreviewEvalRunDataSource": { + "type": "object", + "required": [ + "type", + "target" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_benchmark_preview" + ], + "description": "The type of data source, always `azure_ai_benchmark_preview`." + }, + "input_messages": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "Input messages configuration." + }, + "target": { + "anyOf": [ + { + "$ref": "#/components/schemas/AzureAIModelTarget" + }, + { + "$ref": "#/components/schemas/AzureAIAgentTarget" + } + ], + "description": "The target model or agent to evaluate against the benchmark.\nWhen using `azure_ai_model` target, `sampling_params` must not be provided;\ninference parameters are auto-filled from the benchmark specification stored in eval group properties." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Represents a data source for benchmark evaluation runs." + }, + "AzureAIDataSourceConfig": { + "type": "object", + "required": [ + "type", + "scenario" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_source" + ], + "description": "The object type, which is always `azure_ai_source`." + }, + "scenario": { + "type": "string", + "enum": [ + "red_team", + "responses", + "traces_preview", + "synthetic_data_gen_preview", + "benchmark_preview" + ], + "description": "Data schema scenario." + } + }, + "discriminator": { + "propertyName": "scenario", + "mapping": { + "benchmark_preview": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/DataSourceConfig" + } + ], + "description": "Base data source configuration for Azure AI evaluation scenarios." + }, + "AzureAIModelTarget": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_model" + ], + "description": "The type of target, always `azure_ai_model`." + }, + "model": { + "type": "string", + "description": "The unique identifier of the Azure AI model." + }, + "sampling_params": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelSamplingParams" + } + ], + "description": "The parameters used to control the sampling behavior of the model during text generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "Represents a target specifying an Azure AI model for operations requiring model selection." + }, + "AzureAIModelTargetUpdate": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_model" + ], + "description": "The type of target, always `azure_ai_model`." + }, + "model": { + "type": "string", + "description": "The unique identifier of the Azure AI model." + }, + "sampling_params": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelSamplingParams" + } + ], + "description": "The parameters used to control the sampling behavior of the model during text generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/TargetUpdate" + } + ], + "description": "Represents a target specifying an Azure AI model for operations requiring model selection." + }, + "AzureAIResponsesEvalRunDataSource": { + "type": "object", + "required": [ + "type", + "item_generation_params", + "max_runs_hourly", + "event_configuration_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_responses" + ], + "description": "The type of data source, always `azure_ai_responses`." + }, + "item_generation_params": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseRetrievalItemGenerationParams" + } + ], + "description": "The parameters for item generation." + }, + "max_runs_hourly": { + "type": "integer", + "format": "int32", + "description": "Maximum number of evaluation runs allowed per hour." + }, + "event_configuration_id": { + "type": "string", + "description": "The event configuration name associated with this evaluation run." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Represents a data source for evaluation runs that are specific to Continuous Evaluation scenarios." + }, + "AzureAISearchIndex": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "AzureSearch" + ], + "description": "Type of index" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Index" + } + ], + "description": "Azure AI Search Index Definition" + }, + "AzureAISearchIndexUpdate": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "AzureSearch" + ], + "description": "Type of index" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/IndexUpdate" + } + ], + "description": "Azure AI Search Index Definition" + }, + "AzureAISearchQueryType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "simple", + "semantic", + "vector", + "vector_simple_hybrid", + "vector_semantic_hybrid" + ] + } + ], + "description": "Available query types for Azure AI Search tool." + }, + "AzureAISearchTool": { + "type": "object", + "required": [ + "type", + "azure_ai_search" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_search" + ], + "description": "The object type, which is always 'azure_ai_search'." + }, + "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." + }, + "azure_ai_search": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureAISearchToolResource" + } + ], + "description": "The azure ai search index resource." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "The input definition information for an Azure AI search tool as used to configure an agent." + }, + "AzureAISearchToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "arguments", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_search_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": "An Azure AI Search tool call." + }, + "AzureAISearchToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_search_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 Azure AI Search 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 an Azure AI Search tool call." + }, + "AzureAISearchToolResource": { + "type": "object", + "required": [ + "indexes" + ], + "properties": { + "indexes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AISearchIndexResource" + }, + "maxItems": 1, + "description": "The indices attached to this agent. There can be a maximum of 1 index\nresource attached to the agent." + } + }, + "description": "A set of index resources used by the `azure_ai_search` tool." + }, + "AzureAITraceDataSourcePreviewEvalRunDataSource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_trace_data_source_preview" + ], + "description": "The type of data source, always `azure_ai_trace_data_source_preview`." + }, + "trace_source": { + "allOf": [ + { + "$ref": "#/components/schemas/TraceSource" + } + ], + "description": "The trace source that defines how traces are selected for evaluation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "A wrapper data source that contains a polymorphic trace source to specify how traces are selected for evaluation." + }, + "AzureContentFilterBlocklistIdResult": { + "type": "object", + "required": [ + "id", + "filtered" + ], + "properties": { + "id": { + "type": "string", + "description": "The ID of the custom blocklist." + }, + "filtered": { + "type": "boolean", + "description": "Whether the blocklist resulted in filtering." + } + }, + "description": "A content filter blocklist ID result." + }, + "AzureContentFilterBlocklistResult": { + "type": "object", + "required": [ + "filtered" + ], + "properties": { + "filtered": { + "type": "boolean", + "description": "Whether any blocklist resulted in filtering." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AzureContentFilterBlocklistIdResult" + }, + "description": "The pairs of individual blocklist IDs and their filtering results." + } + }, + "description": "A collection of filtering results for configured custom blocklists." + }, + "AzureContentFilterCitation": { + "type": "object", + "properties": { + "license": { + "type": "string", + "description": "The license associated with the detection." + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL associated with the license." + } + }, + "description": "Citation details for protected material detection." + }, + "AzureContentFilterCompletionTextSpan": { + "type": "object", + "required": [ + "completion_start_offset", + "completion_end_offset" + ], + "properties": { + "completion_start_offset": { + "type": "integer", + "format": "int32", + "description": "Offset of the UTF32 code point which begins the span." + }, + "completion_end_offset": { + "type": "integer", + "format": "int32", + "description": "Offset of the first UTF32 code point which is excluded from the span." + } + }, + "description": "A representation of a span of completion text as used by Azure OpenAI content filter results." + }, + "AzureContentFilterCompletionTextSpanDetectionResult": { + "type": "object", + "required": [ + "filtered", + "detected", + "details" + ], + "properties": { + "filtered": { + "type": "boolean", + "description": "Whether the content was filtered." + }, + "detected": { + "type": "boolean", + "description": "Whether the content category was detected." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AzureContentFilterCompletionTextSpan" + }, + "description": "Detailed information about the detected completion text spans." + } + }, + "description": "A content filter detection result with completion text span details." + }, + "AzureContentFilterDetectionResult": { + "type": "object", + "required": [ + "filtered", + "detected" + ], + "properties": { + "filtered": { + "type": "boolean", + "description": "Whether the content was filtered." + }, + "detected": { + "type": "boolean", + "description": "Whether the content category was detected." + } + }, + "description": "A content filter result indicating whether the content was detected and filtered." + }, + "AzureContentFilterDetectionWithCitationResult": { + "type": "object", + "required": [ + "filtered", + "detected" + ], + "properties": { + "filtered": { + "type": "boolean", + "description": "Whether the content was filtered." + }, + "detected": { + "type": "boolean", + "description": "Whether the content category was detected." + }, + "citation": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterCitation" + } + ], + "description": "Citation details describing the associated license and its location." + } + }, + "description": "A content filter detection result that includes citation information for protected material." + }, + "AzureContentFilterDetectionWithReasonResult": { + "type": "object", + "required": [ + "filtered", + "detected" + ], + "properties": { + "filtered": { + "type": "boolean", + "description": "Whether the content was filtered." + }, + "detected": { + "type": "boolean", + "description": "Whether the content category was detected." + }, + "reason": { + "type": "string", + "description": "A human-readable explanation of why the detection result was produced." + } + }, + "description": "A content filter detection result that includes a reason description." + }, + "AzureContentFilterError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "A machine-readable error code." + }, + "message": { + "type": "string", + "description": "A human-readable error message." + } + }, + "description": "Error details from the content filtering system." + }, + "AzureContentFilterPersonallyIdentifiableInformationResult": { + "type": "object", + "required": [ + "filtered", + "detected" + ], + "properties": { + "filtered": { + "type": "boolean", + "description": "Whether the content was filtered." + }, + "detected": { + "type": "boolean", + "description": "Whether PII was detected in the content." + }, + "sub_categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AzureContentFilterPiiSubCategoryResult" + }, + "description": "Detailed results for individual PII subcategories." + } + }, + "description": "A content filter detection result for Personally Identifiable Information." + }, + "AzureContentFilterPiiSubCategoryResult": { + "type": "object", + "required": [ + "sub_category", + "filtered", + "detected" + ], + "properties": { + "sub_category": { + "type": "string", + "description": "The PII subcategory that was evaluated." + }, + "filtered": { + "type": "boolean", + "description": "Whether the content was filtered for this subcategory." + }, + "detected": { + "type": "boolean", + "description": "Whether the subcategory was detected in the content." + } + }, + "description": "Result details for an individual PII subcategory." + }, + "AzureContentFilterResultsForResponses": { + "type": "object", + "properties": { + "sexual": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterSeverityResult" + } + ], + "description": "Severity result for sexual content." + }, + "hate": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterSeverityResult" + } + ], + "description": "Severity result for hate content." + }, + "violence": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterSeverityResult" + } + ], + "description": "Severity result for violence content." + }, + "self_harm": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterSeverityResult" + } + ], + "description": "Severity result for self-harm content." + }, + "profanity": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterDetectionResult" + } + ], + "description": "Detection result for profanity." + }, + "custom_blocklists": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterBlocklistResult" + } + ], + "description": "Results for configured custom blocklists." + }, + "jailbreak": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterDetectionResult" + } + ], + "description": "Detection result for jailbreak attempts." + }, + "task_adherence": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterDetectionWithReasonResult" + } + ], + "description": "Detection result for task adherence evaluation." + }, + "protected_material_text": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterDetectionResult" + } + ], + "description": "Detection result for protected material text." + }, + "protected_material_code": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterDetectionWithCitationResult" + } + ], + "description": "Detection result for protected material code with citation." + }, + "ungrounded_material": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterCompletionTextSpanDetectionResult" + } + ], + "description": "Detection result for ungrounded material with completion text span details." + }, + "personally_identifiable_information": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterPersonallyIdentifiableInformationResult" + } + ], + "description": "Detection result for Personally Identifiable Information." + }, + "indirect_attack": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterDetectionResult" + } + ], + "description": "Detection result for indirect attacks." + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterError" + } + ], + "description": "Error details if content filtering evaluation failed." + } + }, + "description": "Content filter results for the Responses API." + }, + "AzureContentFilterSeverity": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "safe", + "low", + "medium", + "high" + ] + } + ], + "description": "Ratings for the intensity and risk level of harmful content." + }, + "AzureContentFilterSeverityResult": { + "type": "object", + "required": [ + "filtered", + "severity" + ], + "properties": { + "filtered": { + "type": "boolean", + "description": "Whether the content was filtered." + }, + "severity": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterSeverity" + } + ], + "description": "The severity level of the content." + } + }, + "description": "A content filter result indicating severity level and whether content was filtered." + }, + "AzureFunctionBinding": { + "type": "object", + "required": [ + "type", + "storage_queue" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "storage_queue" + ], + "description": "The type of binding, which is always 'storage_queue'." + }, + "storage_queue": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureFunctionStorageQueue" + } + ], + "description": "Storage queue." + } + }, + "description": "The structure for keeping storage queue name and URI." + }, + "AzureFunctionDefinition": { + "type": "object", + "required": [ + "function", + "input_binding", + "output_binding" + ], + "properties": { + "function": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to be called." + }, + "description": { + "type": "string", + "description": "A description of what the function does, used by the model to choose when and how to call the function." + }, + "parameters": { + "type": "object", + "additionalProperties": {}, + "description": "The parameters the functions accepts, described as a JSON Schema object." + } + }, + "required": [ + "name", + "parameters" + ], + "description": "The definition of azure function and its parameters." + }, + "input_binding": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureFunctionBinding" + } + ], + "description": "Input storage queue. The queue storage trigger runs a function as messages are added to it." + }, + "output_binding": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureFunctionBinding" + } + ], + "description": "Output storage queue. The function writes output to this queue when the input items are processed." + } + }, + "description": "The definition of Azure function." + }, + "AzureFunctionStorageQueue": { + "type": "object", + "required": [ + "queue_service_endpoint", + "queue_name" + ], + "properties": { + "queue_service_endpoint": { + "type": "string", + "description": "URI to the Azure Storage Queue service allowing you to manipulate a queue." + }, + "queue_name": { + "type": "string", + "description": "The name of an Azure function storage queue." + } + }, + "description": "The structure for keeping storage queue name and URI." + }, + "AzureFunctionTool": { + "type": "object", + "required": [ + "type", + "azure_function" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_function" + ], + "description": "The object type, which is always 'browser_automation'." + }, + "azure_function": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureFunctionDefinition" + } + ], + "description": "The Azure Function Tool definition." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "The input definition information for an Azure Function Tool, as used to configure an Agent." + }, + "AzureFunctionToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "arguments", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_function_call" + ] + }, + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the Azure Function being called." + }, + "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": "An Azure Function tool call." + }, + "AzureFunctionToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_function_call_output" + ] + }, + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the Azure Function that was called." + }, + "output": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolCallOutputContent" + } + ], + "description": "The output from the Azure Function 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 an Azure Function tool call." + }, + "AzureOpenAIModelConfiguration": { + "type": "object", + "required": [ + "type", + "modelDeploymentName" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "AzureOpenAIModel" + ] + }, + "modelDeploymentName": { + "type": "string", + "description": "Deployment name for AOAI model. Example: gpt-4o if in AIServices or connection based `connection_name/deployment_name` (e.g. `my-aoai-connection/gpt-4o`)." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/RedTeamTargetConfig" + } + ], + "description": "Azure OpenAI model configuration. The API version would be selected by the service for querying the model." + }, + "BaseCredentials": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/CredentialType" + } + ], + "description": "The type of credential used by the connection", + "readOnly": true + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "ApiKey": "#/components/schemas/ApiKeyCredentials", + "AAD": "#/components/schemas/EntraIDCredentials", + "CustomKeys": "#/components/schemas/CustomCredential", + "SAS": "#/components/schemas/SASCredentials", + "None": "#/components/schemas/NoAuthenticationCredentials", + "AgenticIdentityToken_Preview": "#/components/schemas/AgenticIdentityPreviewCredentials" + } + }, + "description": "A base class for connection credentials" + }, + "BingCustomSearchConfiguration": { + "type": "object", + "required": [ + "project_connection_id", + "instance_name" + ], + "properties": { + "project_connection_id": { + "type": "string", + "description": "Project connection id for grounding with bing search" + }, + "instance_name": { + "type": "string", + "description": "Name of the custom configuration instance given to config." + }, + "market": { + "type": "string", + "description": "The market where the results come from." + }, + "set_lang": { + "type": "string", + "description": "The language to use for user interface strings when calling Bing API." + }, + "count": { + "type": "integer", + "format": "int64", + "description": "The number of search results to return in the bing api response" + }, + "freshness": { + "type": "string", + "description": "Filter search results by a specific time range. See [accepted values here](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters)." + } + }, + "description": "A bing custom search configuration." + }, + "BingCustomSearchPreviewTool": { + "type": "object", + "required": [ + "type", + "bing_custom_search_preview" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "bing_custom_search_preview" + ], + "description": "The object type, which is always 'bing_custom_search_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." + }, + "bing_custom_search_preview": { + "allOf": [ + { + "$ref": "#/components/schemas/BingCustomSearchToolParameters" + } + ], + "description": "The bing custom search tool parameters." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "The input definition information for a Bing custom search tool as used to configure an agent." + }, + "BingCustomSearchToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "arguments", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "bing_custom_search_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 Bing custom search tool call." + }, + "BingCustomSearchToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "bing_custom_search_preview_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 custom search 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 custom search tool call." + }, + "BingCustomSearchToolParameters": { + "type": "object", + "required": [ + "search_configurations" + ], + "properties": { + "search_configurations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BingCustomSearchConfiguration" + }, + "maxItems": 1, + "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." + } + }, + "description": "The bing custom search tool parameters." + }, + "BingGroundingSearchConfiguration": { + "type": "object", + "required": [ + "project_connection_id" + ], + "properties": { + "project_connection_id": { + "type": "string", + "description": "Project connection id for grounding with bing search" + }, + "market": { + "type": "string", + "description": "The market where the results come from." + }, + "set_lang": { + "type": "string", + "description": "The language to use for user interface strings when calling Bing API." + }, + "count": { + "type": "integer", + "format": "int64", + "description": "The number of search results to return in the bing api response" + }, + "freshness": { + "type": "string", + "description": "Filter search results by a specific time range. See [accepted values here](https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters)." + } + }, + "description": "Search configuration for Bing Grounding" + }, + "BingGroundingSearchToolParameters": { + "type": "object", + "required": [ + "search_configurations" + ], + "properties": { + "search_configurations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BingGroundingSearchConfiguration" + }, + "maxItems": 1, + "description": "The search configurations attached to this tool. There can be a maximum of 1\nsearch configuration resource attached to the tool." + } + }, + "description": "The bing grounding search tool parameters." + }, + "BingGroundingTool": { + "type": "object", + "required": [ + "type", + "bing_grounding" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "bing_grounding" + ], + "description": "The object type, which is always 'bing_grounding'." + }, + "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." + }, + "bing_grounding": { + "allOf": [ + { + "$ref": "#/components/schemas/BingGroundingSearchToolParameters" + } + ], + "description": "The bing grounding search tool parameters." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "The input definition information for a bing grounding search tool as used to configure an agent." + }, + "BingGroundingToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "arguments", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "bing_grounding_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 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." + }, + "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." + }, + "BrowserAutomationToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "browser_automation_preview_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 browser automation 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 browser automation tool call." + }, + "BrowserAutomationToolConnectionParameters": { + "type": "object", + "required": [ + "project_connection_id" + ], + "properties": { + "project_connection_id": { + "type": "string", + "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": "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": { + "$ref": "#/components/schemas/OptimizationAgentSkill" + }, + "description": "Optional skill overrides." + } + }, + "description": "Deploy-config blob for a candidate. Suitable for setting OPTIMIZATION_CONFIG on a hosted-agent version." + }, + "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": [ + "type", + "outputs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "capture_structured_outputs" + ], + "description": "The type of the tool. Always `capture_structured_outputs`." + }, + "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." + }, + "outputs": { + "allOf": [ + { + "$ref": "#/components/schemas/StructuredOutputDefinition" + } + ], + "description": "The structured outputs to capture from the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool for capturing structured outputs" + }, + "ChartCoordinate": { + "type": "object", + "required": [ + "x", + "y", + "size" + ], + "properties": { + "x": { + "type": "integer", + "format": "int32", + "description": "X-axis coordinate." + }, + "y": { + "type": "integer", + "format": "int32", + "description": "Y-axis coordinate." + }, + "size": { + "type": "integer", + "format": "int32", + "description": "Size of the chart element." + } + }, + "description": "Coordinates for the analysis chart." + }, + "ChatSummaryMemoryItem": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "chat_summary" + ], + "description": "The kind of the memory item." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItem" + } + ], + "description": "A memory item containing a summary extracted from conversations.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "ClusterInsightResult": { + "type": "object", + "required": [ + "summary", + "clusters" + ], + "properties": { + "summary": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightSummary" + } + ], + "description": "Summary of the insights report." + }, + "clusters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InsightCluster" + }, + "description": "List of clusters identified in the insights." + }, + "coordinates": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ChartCoordinate" + }, + "description": " Optional mapping of IDs to 2D coordinates used by the UX for visualization.\n\n The map keys are string identifiers (for example, a cluster id or a sample id)\n and the values are the coordinates and visual size for rendering on a 2D chart.\n\n This property is omitted unless the client requests coordinates (for example,\n by passing `includeCoordinates=true` as a query parameter).\n\n Example:\n ```\n {\n \"cluster-1\": { \"x\": 12, \"y\": 34, \"size\": 8 },\n \"sample-123\": { \"x\": 18, \"y\": 22, \"size\": 4 }\n }\n ```\n\n Coordinates are intended only for client-side visualization and do not\n modify the canonical insights results." + } + }, + "description": "Insights from the cluster analysis." + }, + "ClusterTokenUsage": { + "type": "object", + "required": [ + "inputTokenUsage", + "outputTokenUsage", + "totalTokenUsage" + ], + "properties": { + "inputTokenUsage": { + "type": "integer", + "format": "int32", + "description": "input token usage" + }, + "outputTokenUsage": { + "type": "integer", + "format": "int32", + "description": "output token usage" + }, + "totalTokenUsage": { + "type": "integer", + "format": "int32", + "description": "total token usage" + } + }, + "description": "Token usage for cluster analysis" + }, + "CodeBasedEvaluatorDefinition": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code" + ] + }, + "code_text": { + "type": "string", + "description": "Inline code text for the evaluator" + }, + "entry_point": { + "type": "string", + "description": "The entry point Python file name for the uploaded evaluator code (e.g. 'answer_length_evaluator.py')", + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + }, + "image_tag": { + "type": "string", + "description": "The container image tag to use for evaluator code execution", + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + }, + "blob_uri": { + "type": "string", + "format": "uri", + "description": "The blob URI for the evaluator storage", + "x-ms-foundry-meta": { + "required_previews": [ + "Evaluations=V1Preview" + ] + } + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorDefinition" + } + ], + "description": "Code-based evaluator definition using python code" + }, + "CodeConfiguration": { + "type": "object", + "required": [ + "runtime", + "entry_point", + "dependency_resolution" + ], + "properties": { + "runtime": { + "type": "string", + "description": "The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', 'python_3_13')." + }, + "entry_point": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The entry point command and arguments for the code execution." + }, + "dependency_resolution": { + "allOf": [ + { + "$ref": "#/components/schemas/CodeDependencyResolution" + } + ], + "description": "How package dependencies are resolved at deployment time. Defaults to `bundled`,\nwhere the caller bundles all dependencies into the uploaded zip and the service\nperforms no remote build. `remote_build` instructs the service to build\ndependencies remotely from the manifest included in the uploaded zip.", + "default": "bundled" + }, + "content_hash": { + "type": "string", + "description": "The SHA-256 hex digest of the uploaded code zip. Set by the service from the `x-ms-code-zip-sha256` request header; read-only in responses and never accepted in request payloads.", + "readOnly": true + } + }, + "description": "Code-based deployment configuration for a hosted agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + } + }, + "CodeDependencyResolution": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "bundled", + "remote_build" + ] + } + ], + "description": "How package dependencies are resolved at deployment time for a code-based hosted agent." + }, + "CompletionMessageToolCallChunk": { + "type": "object", + "required": [ + "id", + "type" + ], + "properties": { + "id": { + "type": "string", + "description": "The Id for the tool call." + }, + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of tool call, which is always \"function\"." + }, + "function": { + "allOf": [ + { + "$ref": "#/components/schemas/FunctionToolCall" + } + ], + "description": "Details of the function tool call, if applicable." + } + }, + "description": "Tool call details within a message." + }, + "Connection": { + "type": "object", + "required": [ + "name", + "id", + "type", + "target", + "isDefault", + "credentials", + "metadata" + ], + "properties": { + "name": { + "type": "string", + "description": "The friendly name of the connection, provided by the user.", + "readOnly": true + }, + "id": { + "type": "string", + "description": "A unique identifier for the connection, generated by the service", + "readOnly": true + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ConnectionType" + } + ], + "description": "Category of the connection", + "readOnly": true + }, + "target": { + "type": "string", + "description": "The connection URL to be used for this service", + "readOnly": true + }, + "isDefault": { + "type": "boolean", + "description": "Whether the connection is tagged as the default connection of its type", + "readOnly": true + }, + "credentials": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "The credentials used by the connection", + "readOnly": true + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata of the connection", + "readOnly": true + } + }, + "description": "Response from the list and get connections operations" + }, + "ConnectionType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "AzureOpenAI", + "AzureBlob", + "AzureStorageAccount", + "CognitiveSearch", + "CosmosDB", + "ApiKey", + "AppConfig", + "AppInsights", + "CustomKeys", + "RemoteTool_Preview" + ] + } + ], + "description": "The Type (or category) of the connection" + }, + "ContainerConfiguration": { + "type": "object", + "required": [ + "image" + ], + "properties": { + "image": { + "type": "string", + "description": "The container image for the hosted agent.", + "example": "my-registry.azurecr.io/my-hosted-agent:latest" + } + }, + "description": "Container-based deployment configuration for a hosted agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + } + }, + "ContentFilterResult": { + "type": "object", + "required": [ + "blocked", + "source_type", + "content_filter_results" + ], + "properties": { + "blocked": { + "type": "boolean", + "description": "Whether the content was blocked by the content filter." + }, + "source_type": { + "type": "string", + "description": "The source type of the content filter evaluation (e.g., 'prompt', 'response', 'pre_tool_call', 'post_tool_call')." + }, + "content_filter_results": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureContentFilterResultsForResponses" + } + ], + "description": "The content filter results for this evaluation." + }, + "tool_call_id": { + "type": "string", + "description": "The ID of the tool call associated with this content filter result, if applicable." + } + }, + "description": "A content filter evaluation result for a specific source in the response." + }, + "ContinuousEvaluationRuleAction": { + "type": "object", + "required": [ + "type", + "evalId" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "continuousEvaluation" + ] + }, + "evalId": { + "type": "string", + "description": "Eval Id to add continuous evaluation runs to." + }, + "maxHourlyRuns": { + "type": "integer", + "format": "int32", + "description": "Maximum number of evaluation runs allowed per hour." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleAction" + } + ], + "description": "Evaluation rule action for continuous evaluation." + }, + "ConversationGenPreviewItemGenerationParams": { + "type": "object", + "required": [ + "type", + "source", + "model" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "conversation_gen_preview" + ], + "description": "The type of item generation parameters, always `conversation_gen_preview`." + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + } + ], + "description": "The source of test scenarios, supporting file_id or file_content." + }, + "model": { + "type": "string", + "description": "The model deployment used for simulation, in the format '{connectionName}/modelDeploymentName'." + }, + "max_turns": { + "type": "integer", + "format": "int32", + "description": "Maximum number of turns per simulated conversation. Defaults to 20.", + "default": 20 + }, + "num_conversations": { + "type": "integer", + "format": "int32", + "description": "Number of simulated conversations to generate per test scenario. Defaults to 5.", + "default": 5 + }, + "data_mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Mapping from source fields to response_id field, which is required for retrieving chat history." + }, + "sampling_params": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelSamplingParams" + } + ], + "description": "Sampling parameters for the conversation generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "Represents the parameters for conversation simulation item generation." + }, + "ConversationIdTraceSource": { + "type": "object", + "required": [ + "type", + "conversation_ids" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "conversation_id_source" + ], + "description": "The type of trace source, always `conversation_id_source`." + }, + "conversation_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Collection of conversation identifiers to filter traces by." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/TraceSource" + } + ], + "description": "A trace source that selects traces by conversation IDs." + }, + "ConversationSimulationPreviewEvalRunDataSource": { + "type": "object", + "required": [ + "type", + "item_generation_params", + "target" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_conversation_simulation_preview" + ], + "description": "The type of data source, always `azure_ai_conversation_simulation_preview`." + }, + "item_generation_params": { + "allOf": [ + { + "$ref": "#/components/schemas/ConversationGenPreviewItemGenerationParams" + } + ], + "description": "The parameters for conversation generation." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/AzureAIAgentTarget" + } + ], + "description": "The target agent to simulate conversations against." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Represents a data source for evaluation runs that generate multi-turn conversations via LLM simulation against a target agent." + }, + "CosmosDBIndex": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "CosmosDBNoSqlVectorStore" + ], + "description": "Type of index" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Index" + } + ], + "description": "CosmosDB Vector Store Index Definition" + }, + "CosmosDBIndexUpdate": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "CosmosDBNoSqlVectorStore" + ], + "description": "Type of index" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/IndexUpdate" + } + ], + "description": "CosmosDB Vector Store Index Definition" + }, + "CreateAgentFromCodeContent": { + "type": "object", + "properties": { + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateAgentVersionFromCodeMetadata" + } + ], + "description": "JSON metadata including description and hosted definition." + }, + "code": { + "type": "string", + "format": "binary", + "description": "The code zip file (max 250 MB)." + } + }, + "required": [ + "metadata", + "code" + ] + }, + "CreateAgentFromManifestRequest": { + "type": "object", + "required": [ + "name", + "manifest_id", + "parameter_values" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 63, + "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the agent." + }, + "manifest_id": { + "type": "string", + "description": "The manifest ID to import the agent version from." + }, + "parameter_values": { + "type": "object", + "additionalProperties": {}, + "description": "The inputs to the manifest that will result in a fully materialized Agent." + } + } + }, + "CreateAgentRequest": { + "type": "object", + "required": [ + "name", + "definition" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 63, + "description": "The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the agent." + }, + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentDefinition" + } + ], + "description": "The agent definition. This can be a workflow, hosted agent, or a simple agent definition.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview", + "CodeAgents=V1Preview", + "ExternalAgents=V1Preview" + ] + } + }, + "blueprint_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentBlueprintReference" + } + ], + "description": "The blueprint reference for the agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "agent_endpoint": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointConfig" + } + ], + "description": "An optional endpoint configuration. If not specified, a default endpoint configuration will be set for the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "agent_card": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentCard" + } + ], + "description": "Optional agent card for the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview", + "CodeAgents=V1Preview", + "ExternalAgents=V1Preview" + ] + } + }, + "CreateAgentSessionRequest": { + "type": "object", + "required": [ + "version_indicator" + ], + "properties": { + "agent_session_id": { + "type": "string", + "description": "Optional caller-provided session ID. If specified, it must be unique within the agent endpoint. Auto-generated if omitted." + }, + "version_indicator": { + "allOf": [ + { + "$ref": "#/components/schemas/VersionIndicator" + } + ], + "description": "Determines which agent version backs the session." + } + }, + "description": "Request to create a new agent session.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "CreateAgentVersionFromCodeContent": { + "type": "object", + "properties": { + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateAgentVersionFromCodeMetadata" + } + ], + "description": "JSON metadata including description and hosted definition." + }, + "code": { + "type": "string", + "format": "binary", + "description": "The code zip file (max 250 MB)." + } + }, + "required": [ + "metadata", + "code" + ] + }, + "CreateAgentVersionFromCodeMetadata": { + "type": "object", + "required": [ + "definition" + ], + "properties": { + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the agent." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/HostedAgentDefinition" + } + ], + "description": "The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, and protocol_versions." + } + }, + "description": "JSON metadata for code-based agent operations (create, update, create version).\nThe agent name comes from the URL path parameter or the `x-ms-agent-name` header,\nso it is not included in this model.\nThe content hash (SHA-256 of the zip) is carried in the `x-ms-code-zip-sha256` header.", + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + } + }, + "CreateAgentVersionFromManifestRequest": { + "type": "object", + "required": [ + "manifest_id", + "parameter_values" + ], + "properties": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the agent." + }, + "manifest_id": { + "type": "string", + "description": "The manifest ID to import the agent version from." + }, + "parameter_values": { + "type": "object", + "additionalProperties": {}, + "description": "The inputs to the manifest that will result in a fully materialized Agent." + } + } + }, + "CreateAgentVersionRequest": { + "type": "object", + "required": [ + "definition" + ], + "properties": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the agent." + }, + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentDefinition" + } + ], + "description": "The agent definition. This can be a workflow, hosted agent, or a simple agent definition.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview", + "CodeAgents=V1Preview", + "ExternalAgents=V1Preview" + ] + } + }, + "blueprint_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentBlueprintReference" + } + ], + "description": "The blueprint reference for the agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview", + "CodeAgents=V1Preview", + "ExternalAgents=V1Preview" + ] + } + }, + "CreateEvalRequest": { + "type": "object", + "required": [ + "data_source_config", + "testing_criteria" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the evaluation." + }, + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "data_source_config": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCustomDataSourceConfig" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalLogsDataSourceConfig" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalStoredCompletionsDataSourceConfig" + }, + { + "$ref": "#/components/schemas/AzureAIDataSourceConfig" + }, + { + "$ref": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" + } + ], + "description": "The configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation." + }, + "testing_criteria": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" + }, + { + "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" + } + ] + }, + "description": "A list of graders for all eval runs in this group. Graders can reference variables in the data source using double curly braces notation, like `{{item.variable_name}}`. To reference the model's output, use the `sample` namespace (ie, `{{sample.output_text}}`)." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." + } + }, + "title": "CreateEvalRequest" + }, + "CreateEvalRunRequest": { + "type": "object", + "required": [ + "data_source" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the run." + }, + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "data_source": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalJsonlRunDataSource" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSource" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSource" + }, + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Details about the run's data source." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." + }, + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "The level at which evaluation is performed. Defaults to 'turn' if not specified.", + "default": "turn" + } + }, + "title": "CreateEvalRunRequest" + }, + "CredentialType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "ApiKey", + "AAD", + "SAS", + "CustomKeys", + "None", + "AgenticIdentityToken_Preview" + ] + } + ], + "description": "The credential type used by the connection" + }, + "CronTrigger": { + "type": "object", + "required": [ + "type", + "expression" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Cron" + ] + }, + "expression": { + "type": "string", + "description": "Cron expression that defines the schedule frequency." + }, + "timeZone": { + "type": "string", + "description": "Time zone for the cron schedule.", + "default": "UTC" + }, + "startTime": { + "type": "string", + "description": "Start time for the cron schedule in ISO 8601 format." + }, + "endTime": { + "type": "string", + "description": "End time for the cron schedule in ISO 8601 format." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Trigger" + } + ], + "description": "Cron based trigger." + }, + "CustomCredential": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "CustomKeys" + ], + "description": "The credential type", + "readOnly": true + } + }, + "additionalProperties": { + "type": "string" + }, + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "Custom credential definition" + }, + "DailyRecurrenceSchedule": { + "type": "object", + "required": [ + "type", + "hours" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Daily" + ], + "description": "Daily recurrence type." + }, + "hours": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Hours for the recurrence schedule." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/RecurrenceSchedule" + } + ], + "description": "Daily recurrence schedule." + }, + "DataSourceConfig": { + "type": "object", + "required": [ + "type", + "schema" + ], + "properties": { + "type": { + "type": "string", + "description": "The data source type discriminator." + }, + "schema": { + "type": "object", + "additionalProperties": {}, + "description": "The overall object JSON schema for the run data source items." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": {} + }, + "description": "Base class for run data sources with discriminator support." + }, + "DatasetItem": { + "type": "object", + "required": [ + "name", + "query" + ], + "properties": { + "name": { + "type": "string", + "description": "Unique-within-the-dataset identifier for this task." + }, + "query": { + "type": "string", + "description": "The user query / input for the task." + }, + "ground_truth": { + "type": "string", + "description": "Optional ground truth used by reference-based evaluators." + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationCriterion" + }, + "description": "Per-task evaluation criteria. Defaults to the job-level evaluators if unset." + }, + "eval_results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunOutputItemResult" + }, + "description": "Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped." + }, + "response_items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputItem" + }, + "description": "Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run." + } + }, + "description": "A single evaluation task with input query, expected output, and evaluation criteria." + }, + "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." + }, + "DatasetType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "uri_file", + "uri_folder" + ] + } + ], + "description": "Enum to determine the type of data." + }, + "DatasetVersion": { + "type": "object", + "required": [ + "dataUri", + "type", + "name", + "version" + ], + "properties": { + "dataUri": { + "type": "string", + "minLength": 1, + "pattern": "[a-zA-Z0-9_]", + "description": "URI of the data ([example](https://go.microsoft.com/fwlink/?linkid=2202330))" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/DatasetType" + } + ], + "description": "Dataset type" + }, + "isReference": { + "type": "boolean", + "description": "Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted", + "readOnly": true + }, + "connectionName": { + "type": "string", + "description": "The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset" + }, + "id": { + "type": "string", + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the resource", + "readOnly": true + }, + "version": { + "type": "string", + "description": "The version of the resource", + "readOnly": true + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "uri_file": "#/components/schemas/FileDatasetVersion", + "uri_folder": "#/components/schemas/FolderDatasetVersion" + } + }, + "description": "DatasetVersion Definition" + }, + "DatasetVersionUpdate": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/DatasetType" + } + ], + "description": "Dataset type" + }, + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "uri_file": "#/components/schemas/FileDatasetVersionUpdate", + "uri_folder": "#/components/schemas/FolderDatasetVersionUpdate" + } + }, + "description": "DatasetVersion Definition" + }, + "DayOfWeek": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ] + } + ], + "description": "Days of the week for recurrence schedule." + }, + "DeleteAgentResponse": { + "type": "object", + "required": [ + "object", + "name", + "deleted" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "agent.deleted" + ], + "description": "The object type. Always 'agent.deleted'." + }, + "name": { + "type": "string", + "description": "The name of the agent." + }, + "deleted": { + "type": "boolean", + "description": "Whether the agent was successfully deleted." + } + }, + "description": "A deleted agent Object" + }, + "DeleteAgentVersionResponse": { + "type": "object", + "required": [ + "object", + "name", + "version", + "deleted" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "agent.version.deleted" + ], + "description": "The object type. Always 'agent.version.deleted'." + }, + "name": { + "type": "string", + "description": "The name of the agent." + }, + "version": { + "type": "string", + "description": "The version identifier of the agent." + }, + "deleted": { + "type": "boolean", + "description": "Whether the agent was successfully deleted." + } + }, + "description": "A deleted agent version Object" + }, + "DeleteEvalResponse": { + "type": "object", + "required": [ + "object", + "eval_id", + "deleted" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "eval.deleted" + ], + "description": "The object type. Always 'eval.deleted'." + }, + "eval_id": { + "type": "string", + "description": "id of the eval." + }, + "deleted": { + "type": "boolean", + "description": "Whether the eval was successfully deleted." + } + }, + "description": "A deleted evaluation Object" + }, + "DeleteEvalRunResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "enum": [ + "eval.deleted" + ], + "description": "The object type. Always 'eval.deleted'." + }, + "run_id": { + "type": "string", + "description": "id of the eval." + }, + "deleted": { + "type": "boolean", + "description": "Whether the eval was successfully deleted." + } + }, + "description": "A deleted evaluation run Object." + }, + "DeleteMemoryResponse": { + "type": "object", + "required": [ + "object", + "name", + "memory_id", + "deleted" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "memory.deleted" + ], + "description": "The object type. Always 'memory.deleted'." + }, + "name": { + "type": "string", + "description": "The name of the memory store." + }, + "memory_id": { + "type": "string", + "description": "The unique ID of the deleted memory item." + }, + "deleted": { + "type": "boolean", + "description": "Whether the memory item was successfully deleted." + } + }, + "description": "Response for deleting a memory item from a memory store.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "DeleteMemoryStoreResponse": { + "type": "object", + "required": [ + "object", + "name", + "deleted" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "memory_store.deleted" + ], + "description": "The object type. Always 'memory_store.deleted'." + }, + "name": { + "type": "string", + "description": "The name of the memory store." + }, + "deleted": { + "type": "boolean", + "description": "Whether the memory store was successfully deleted." + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "DeleteResponseResult": { + "type": "object", + "required": [ + "id", + "object", + "deleted" + ], + "properties": { + "id": { + "type": "string", + "description": "The operation ID." + }, + "object": { + "type": "string", + "enum": [ + "response" + ], + "description": "Always return 'response'." + }, + "deleted": { + "type": "boolean", + "enum": [ + true + ], + "description": "Always return true" + } + }, + "description": "The result of a delete response operation." + }, + "DeleteSkillResponse": { + "type": "object", + "required": [ + "name", + "deleted" + ], + "properties": { + "name": { + "type": "string", + "description": "The unique name of the skill." + }, + "deleted": { + "type": "boolean", + "description": "Whether the skill was successfully deleted." + } + }, + "description": "A deleted skill Object" + }, + "Deployment": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/DeploymentType" + } + ], + "description": "The type of the deployment" + }, + "name": { + "type": "string", + "description": "Name of the deployment", + "readOnly": true + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "ModelDeployment": "#/components/schemas/ModelDeployment" + } + }, + "description": "Model Deployment Definition" + }, + "DeploymentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "ModelDeployment" + ] + } + ] + }, + "EntraAuthorizationScheme": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Entra" + ] + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "EntraIDCredentials": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "AAD" + ], + "description": "The credential type", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "Entra ID credential definition" + }, + "Eval": { + "type": "object", + "required": [ + "object", + "id", + "name", + "data_source_config", + "testing_criteria", + "created_at", + "metadata" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "eval" + ], + "description": "The object type.", + "x-stainless-const": true, + "default": "eval" + }, + "id": { + "type": "string", + "description": "Unique identifier for the evaluation." + }, + "name": { + "type": "string", + "description": "The name of the evaluation." + }, + "data_source_config": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCustomDataSourceConfig" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalLogsDataSourceConfig" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalStoredCompletionsDataSourceConfig" + }, + { + "$ref": "#/components/schemas/AzureAIDataSourceConfig" + }, + { + "$ref": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" + } + ], + "description": "Configuration of data sources used in runs of the evaluation." + }, + "testing_criteria": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" + }, + { + "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" + } + ] + }, + "description": "A list of testing criteria." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) for when the eval was created." + }, + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "modified_at": { + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "description": "Unix timestamp (in seconds) when the evaluation run was last modified." + }, + "created_by": { + "type": "string", + "description": "the name of the person who created the run." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." + } + }, + "description": "An Eval object with a data source config and testing criteria.\nAn Eval represents a task to be done for your LLM integration.\nLike:\n- Improve the quality of my chatbot\n- See how well my chatbot handles customer support\n- Check if o4-mini is better at my usecase than gpt-4o", + "title": "Eval", + "x-oaiMeta": { + "name": "The eval object", + "group": "evals", + "example": "{\n \"object\": \"eval\",\n \"id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"data_source_config\": {\n \"type\": \"custom\",\n \"item_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\"type\": \"string\"},\n },\n \"required\": [\"label\"]\n },\n \"include_sample_schema\": true\n },\n \"testing_criteria\": [\n {\n \"name\": \"My string check grader\",\n \"type\": \"string_check\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\",\n }\n ],\n \"name\": \"External Data Eval\",\n \"created_at\": 1739314509,\n \"metadata\": {\n \"test\": \"synthetics\",\n }\n}\n" + } + }, + "EvalAgentIdReference": { + "type": "object", + "required": [ + "type", + "agent_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent_id" + ], + "description": "The type of agent reference, always `agent_id`." + }, + "agent_id": { + "type": "string", + "description": "The unique identifier of the agent." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalAgentReference" + } + ], + "description": "Identifies a 3P (Assistants) agent by its opaque agent ID." + }, + "EvalAgentReference": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalAgentReferenceType" + } + ], + "description": "The discriminator that identifies which kind of agent reference this is." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "agent_id": "#/components/schemas/EvalAgentIdReference", + "agent_reference": "#/components/schemas/EvalFoundryAgentReference" + } + }, + "description": "Base class for polymorphic agent references used in evaluation trace filtering. The user supplies exactly one variant to identify the agent whose traces should be filtered." + }, + "EvalAgentReferenceType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "agent_id", + "agent_reference" + ] + } + ], + "description": "Specifies the type of agent reference used for filtering traces." + }, + "EvalCsvFileIdSource": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_id" + ], + "description": "The type of source, always `file_id`." + }, + "id": { + "type": "string", + "description": "The identifier of the uploaded CSV file." + } + }, + "description": "Represents a reference to an uploaded CSV file used as a source for evaluation data." + }, + "EvalCsvRunDataSource": { + "type": "object", + "required": [ + "type", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "csv" + ], + "description": "The type of data source, always `csv`." + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalCsvFileIdSource" + } + ], + "description": "The source of the CSV data, either inline content or a file reference." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Represents a CSV data source for evaluation runs." + }, + "EvalFoundryAgentReference": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent_reference" + ], + "description": "The type of agent reference, always `agent_reference`." + }, + "name": { + "type": "string", + "description": "The name of the agent." + }, + "version": { + "type": "string", + "description": "The version identifier of the agent. If not specified, will look for any version." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalAgentReference" + } + ], + "description": "Identifies a Foundry agent by its name and optional version." + }, + "EvalResult": { + "type": "object", + "required": [ + "name", + "type", + "score", + "passed" + ], + "properties": { + "name": { + "type": "string", + "description": "name of the check" + }, + "type": { + "type": "string", + "description": "type of the check" + }, + "score": { + "type": "number", + "format": "float", + "description": "score" + }, + "passed": { + "type": "boolean", + "description": "indicates if the check passed or failed" + } + }, + "description": "Result of the evaluation." + }, + "EvalRun": { + "type": "object", + "required": [ + "object", + "id", + "eval_id", + "status", + "model", + "name", + "created_at", + "report_url", + "result_counts", + "per_model_usage", + "per_testing_criteria_results", + "data_source", + "metadata", + "error" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "eval.run" + ], + "description": "The type of the object. Always \"eval.run\".", + "x-stainless-const": true, + "default": "eval.run" + }, + "id": { + "type": "string", + "description": "Unique identifier for the evaluation run." + }, + "eval_id": { + "type": "string", + "description": "The identifier of the associated evaluation." + }, + "status": { + "type": "string", + "description": "The status of the evaluation run." + }, + "model": { + "type": "string", + "description": "The model that is evaluated, if applicable." + }, + "name": { + "type": "string", + "description": "The name of the evaluation run." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "Unix timestamp (in seconds) when the evaluation run was created." + }, + "report_url": { + "type": "string", + "format": "uri", + "description": "The URL to the rendered evaluation run report on the UI dashboard." + }, + "result_counts": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalRunResultCounts" + } + ], + "description": "Counters summarizing the outcomes of the evaluation run." + }, + "per_model_usage": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalRunPerModelUsage" + }, + "description": "Usage statistics for each model during the evaluation run." + }, + "per_testing_criteria_results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalRunPerTestingCriteriaResults" + }, + "description": "Results per testing criteria applied during the evaluation run." + }, + "data_source": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalJsonlRunDataSource" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSource" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSource" + }, + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Information about the run's data source." + }, + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "error": { + "$ref": "#/components/schemas/OpenAI.EvalApiError" + }, + "modified_at": { + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "description": "Unix timestamp (in seconds) when the evaluation run was last modified." + }, + "created_by": { + "type": "string", + "description": "the name of the person who created the run." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." + }, + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "The level at which evaluation is performed. Defaults to 'turn' if not specified.", + "default": "turn" + } + }, + "description": "A schema representing an evaluation run.", + "title": "EvalRun", + "x-oaiMeta": { + "name": "The eval run object", + "group": "evals", + "example": "{\n \"object\": \"eval.run\",\n \"id\": \"evalrun_67e57965b480819094274e3a32235e4c\",\n \"eval_id\": \"eval_67e579652b548190aaa83ada4b125f47\",\n \"report_url\": \"https://platform.openai.com/evaluations/eval_67e579652b548190aaa83ada4b125f47?run_id=evalrun_67e57965b480819094274e3a32235e4c\",\n \"status\": \"queued\",\n \"model\": \"gpt-4o-mini\",\n \"name\": \"gpt-4o-mini\",\n \"created_at\": 1743092069,\n \"result_counts\": {\n \"total\": 0,\n \"errored\": 0,\n \"failed\": 0,\n \"passed\": 0\n },\n \"per_model_usage\": null,\n \"per_testing_criteria_results\": null,\n \"data_source\": {\n \"type\": \"completions\",\n \"source\": {\n \"type\": \"file_content\",\n \"content\": [\n {\n \"item\": {\n \"input\": \"Tech Company Launches Advanced Artificial Intelligence Platform\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Central Bank Increases Interest Rates Amid Inflation Concerns\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Summit Addresses Climate Change Strategies\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Major Retailer Reports Record-Breaking Holiday Sales\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"National Team Qualifies for World Championship Finals\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Stock Markets Rally After Positive Economic Data Released\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Manufacturer Announces Merger with Competitor\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Breakthrough in Renewable Energy Technology Unveiled\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"World Leaders Sign Historic Climate Agreement\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Professional Athlete Sets New Record in Championship Event\",\n \"ground_truth\": \"Sports\"\n }\n },\n {\n \"item\": {\n \"input\": \"Financial Institutions Adapt to New Regulatory Requirements\",\n \"ground_truth\": \"Business\"\n }\n },\n {\n \"item\": {\n \"input\": \"Tech Conference Showcases Advances in Artificial Intelligence\",\n \"ground_truth\": \"Technology\"\n }\n },\n {\n \"item\": {\n \"input\": \"Global Markets Respond to Oil Price Fluctuations\",\n \"ground_truth\": \"Markets\"\n }\n },\n {\n \"item\": {\n \"input\": \"International Cooperation Strengthened Through New Treaty\",\n \"ground_truth\": \"World\"\n }\n },\n {\n \"item\": {\n \"input\": \"Sports League Announces Revised Schedule for Upcoming Season\",\n \"ground_truth\": \"Sports\"\n }\n }\n ]\n },\n \"input_messages\": {\n \"type\": \"template\",\n \"template\": [\n {\n \"type\": \"message\",\n \"role\": \"developer\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Categorize a given news headline into one of the following topics: Technology, Markets, World, Business, or Sports.\n\n# Steps\n\n1. Analyze the content of the news headline to understand its primary focus.\n2. Extract the subject matter, identifying any key indicators or keywords.\n3. Use the identified indicators to determine the most suitable category out of the five options: Technology, Markets, World, Business, or Sports.\n4. Ensure only one category is selected per headline.\n\n# Output Format\n\nRespond with the chosen category as a single word. For instance: \"Technology\", \"Markets\", \"World\", \"Business\", or \"Sports\".\n\n# Examples\n\n**Input**: \"Apple Unveils New iPhone Model, Featuring Advanced AI Features\"\n**Output**: \"Technology\"\n\n**Input**: \"Global Stocks Mixed as Investors Await Central Bank Decisions\"\n**Output**: \"Markets\"\n\n**Input**: \"War in Ukraine: Latest Updates on Negotiation Status\"\n**Output**: \"World\"\n\n**Input**: \"Microsoft in Talks to Acquire Gaming Company for $2 Billion\"\n**Output**: \"Business\"\n\n**Input**: \"Manchester United Secures Win in Premier League Football Match\"\n**Output**: \"Sports\"\n\n# Notes\n\n- If the headline appears to fit into more than one category, choose the most dominant theme.\n- Keywords or phrases such as \"stocks\", \"company acquisition\", \"match\", or technological brands can be good indicators for classification.\n\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"{{item.input}}\"\n }\n }\n ]\n },\n \"model\": \"gpt-4o-mini\",\n \"sampling_params\": {\n \"seed\": 42,\n \"temperature\": 1.0,\n \"top_p\": 1.0,\n \"max_completions_tokens\": 2048\n }\n },\n \"error\": null,\n \"metadata\": {}\n}\n" + } + }, + "EvalRunDataSource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The data source type discriminator." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "azure_ai_traces_preview": "#/components/schemas/TracesPreviewEvalRunDataSource", + "azure_ai_synthetic_data_gen_preview": "#/components/schemas/SyntheticDataGenerationPreviewEvalRunDataSource", + "azure_ai_responses": "#/components/schemas/AzureAIResponsesEvalRunDataSource", + "azure_ai_target_completions": "#/components/schemas/TargetCompletionEvalRunDataSource", + "csv": "#/components/schemas/EvalCsvRunDataSource", + "azure_ai_red_team": "#/components/schemas/RedTeamEvalRunDataSource", + "azure_ai_conversation_simulation_preview": "#/components/schemas/ConversationSimulationPreviewEvalRunDataSource", + "azure_ai_trace_data_source_preview": "#/components/schemas/AzureAITraceDataSourcePreviewEvalRunDataSource", + "azure_ai_benchmark_preview": "#/components/schemas/AzureAIBenchmarkPreviewEvalRunDataSource" + } + }, + "description": "Base class for run data sources with discriminator support." + }, + "EvalRunOutputItem": { + "type": "object", + "required": [ + "object", + "id", + "run_id", + "eval_id", + "created_at", + "status", + "datasource_item_id", + "datasource_item", + "results", + "sample" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "eval.run.output_item" + ], + "description": "The type of the object. Always \"eval.run.output_item\".", + "x-stainless-const": true, + "default": "eval.run.output_item" + }, + "id": { + "type": "string", + "description": "Unique identifier for the evaluation run output item." + }, + "run_id": { + "type": "string", + "description": "The identifier of the evaluation run associated with this output item." + }, + "eval_id": { + "type": "string", + "description": "The identifier of the evaluation group." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "Unix timestamp (in seconds) when the evaluation run was created." + }, + "status": { + "type": "string", + "description": "The status of the evaluation run." + }, + "datasource_item_id": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The identifier for the data source item." + }, + "datasource_item": { + "type": "object", + "additionalProperties": {}, + "description": "Details of the input data source item." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunOutputItemResult" + }, + "description": "A list of grader results for this output item." + }, + "sample": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalRunOutputItemSample" + } + ], + "description": "A sample containing the input and output of the evaluation run." + } + }, + "description": "A schema representing an evaluation run output item.", + "title": "EvalRunOutputItem", + "x-oaiMeta": { + "name": "The eval run output item object", + "group": "evals", + "example": "{\n \"object\": \"eval.run.output_item\",\n \"id\": \"outputitem_67abd55eb6548190bb580745d5644a33\",\n \"run_id\": \"evalrun_67abd54d60ec8190832b46859da808f7\",\n \"eval_id\": \"eval_67abd54d9b0081909a86353f6fb9317a\",\n \"created_at\": 1739314509,\n \"status\": \"pass\",\n \"datasource_item_id\": 137,\n \"datasource_item\": {\n \"teacher\": \"To grade essays, I only check for style, content, and grammar.\",\n \"student\": \"I am a student who is trying to write the best essay.\"\n },\n \"results\": [\n {\n \"name\": \"String Check Grader\",\n \"type\": \"string-check-grader\",\n \"score\": 1.0,\n \"passed\": true,\n }\n ],\n \"sample\": {\n \"input\": [\n {\n \"role\": \"system\",\n \"content\": \"You are an evaluator bot...\"\n },\n {\n \"role\": \"user\",\n \"content\": \"You are assessing...\"\n }\n ],\n \"output\": [\n {\n \"role\": \"assistant\",\n \"content\": \"The rubric is not clear nor concise.\"\n }\n ],\n \"finish_reason\": \"stop\",\n \"model\": \"gpt-4o-2024-08-06\",\n \"usage\": {\n \"total_tokens\": 521,\n \"completion_tokens\": 2,\n \"prompt_tokens\": 519,\n \"cached_tokens\": 0\n },\n \"error\": null,\n \"temperature\": 1.0,\n \"max_completion_tokens\": 2048,\n \"top_p\": 1.0,\n \"seed\": 42\n }\n}\n" + } + }, + "EvalRunOutputItemResult": { + "type": "object", + "required": [ + "name", + "score", + "passed" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the grader." + }, + "type": { + "type": "string", + "description": "The grader type (for example, \"string-check-grader\")." + }, + "score": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The numeric score produced by the grader." + }, + "passed": { + "type": "boolean", + "description": "Whether the grader considered the output a pass." + }, + "sample": { + "type": "object", + "additionalProperties": {}, + "nullable": true, + "description": "Optional sample or intermediate data produced by the grader." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunOutputItemResultStatus" + } + ], + "description": "The evaluation status for this result item. Values: \"completed\", \"errored\", \"skipped\". Null if not provided by evaluator. When status is skipped, passed/score can be ignored." + }, + "metric": { + "type": "string", + "description": "The name of the metric (e.g., \"fluency\", \"f1_score\")." + }, + "label": { + "type": "string", + "description": "The label associated with the test criteria metric (e.g., \"pass\", \"fail\", \"good\", \"bad\")." + }, + "threshold": { + "type": "number", + "format": "float", + "description": "The threshold used to determine pass/fail for this test criteria, if it is numerical." + }, + "reason": { + "type": "string", + "description": "The reason for the test criteria metric." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional details about the test criteria metric." + } + }, + "additionalProperties": {}, + "description": "A single grader result for an evaluation run output item.", + "title": "EvalRunOutputItemResult" + }, + "EvalRunOutputItemResultStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "completed", + "errored", + "skipped" + ] + } + ], + "description": "The evaluation status for an evaluation run output item result." + }, + "EvalRunOutputItemSampleInput": { + "type": "object", + "required": [ + "role", + "content", + "tool_calls" + ], + "properties": { + "role": { + "type": "string" + }, + "content": { + "type": "string" + }, + "tool_calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CompletionMessageToolCallChunk" + }, + "description": "Tool calls made within the message, if any." + } + }, + "description": "A message in the evaluation run." + }, + "EvalRunOutputItemSampleOutput": { + "type": "object", + "required": [ + "tool_calls" + ], + "properties": { + "role": { + "type": "string" + }, + "content": { + "type": "string" + }, + "tool_calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CompletionMessageToolCallChunk" + }, + "description": "Tool calls made within the message, if any." + } + }, + "description": "A message in the evaluation run." + }, + "EvalRunResultCompareItem": { + "type": "object", + "required": [ + "treatmentRunId", + "treatmentRunSummary", + "deltaEstimate", + "pValue", + "treatmentEffect" + ], + "properties": { + "treatmentRunId": { + "type": "string", + "description": "The treatment run ID." + }, + "treatmentRunSummary": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunResultSummary" + } + ], + "description": "Summary statistics of the treatment run." + }, + "deltaEstimate": { + "type": "number", + "format": "float", + "description": "Estimated difference between treatment and baseline." + }, + "pValue": { + "type": "number", + "format": "float", + "description": "P-value for the treatment effect." + }, + "treatmentEffect": { + "allOf": [ + { + "$ref": "#/components/schemas/TreatmentEffectType" + } + ], + "description": "Type of treatment effect." + } + }, + "description": "Metric comparison for a treatment against the baseline." + }, + "EvalRunResultComparison": { + "type": "object", + "required": [ + "testingCriteria", + "metric", + "evaluator", + "baselineRunSummary", + "compareItems" + ], + "properties": { + "testingCriteria": { + "type": "string", + "description": "Name of the testing criteria." + }, + "metric": { + "type": "string", + "description": "Metric being evaluated." + }, + "evaluator": { + "type": "string", + "description": "Name of the evaluator for this testing criteria." + }, + "baselineRunSummary": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunResultSummary" + } + ], + "description": "Summary statistics of the baseline run." + }, + "compareItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunResultCompareItem" + }, + "description": "List of comparison results for each treatment run." + } + }, + "description": "Comparison results for treatment runs against the baseline." + }, + "EvalRunResultSummary": { + "type": "object", + "required": [ + "runId", + "sampleCount", + "average", + "standardDeviation" + ], + "properties": { + "runId": { + "type": "string", + "description": "The evaluation run ID." + }, + "sampleCount": { + "type": "integer", + "format": "int32", + "description": "Number of samples in the evaluation run." + }, + "average": { + "type": "number", + "format": "float", + "description": "Average value of the metric in the evaluation run." + }, + "standardDeviation": { + "type": "number", + "format": "float", + "description": "Standard deviation of the metric in the evaluation run." + } + }, + "description": "Summary statistics of a metric in an evaluation run." + }, + "EvaluationComparisonInsightRequest": { + "type": "object", + "required": [ + "type", + "evalId", + "baselineRunId", + "treatmentRunIds" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationComparison" + ], + "description": "The type of request." + }, + "evalId": { + "type": "string", + "description": "Identifier for the evaluation." + }, + "baselineRunId": { + "type": "string", + "description": "The baseline run ID for comparison." + }, + "treatmentRunIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of treatment run IDs for comparison." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightRequest" + } + ], + "description": "Evaluation Comparison Request" + }, + "EvaluationComparisonInsightResult": { + "type": "object", + "required": [ + "type", + "comparisons", + "method" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationComparison" + ], + "description": "The type of insights result." + }, + "comparisons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunResultComparison" + }, + "description": "Comparison results for each treatment run against the baseline." + }, + "method": { + "type": "string", + "description": "The statistical method used for comparison." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightResult" + } + ], + "description": "Insights from the evaluation comparison." + }, + "EvaluationCriterion": { + "type": "object", + "required": [ + "name", + "instruction" + ], + "properties": { + "name": { + "type": "string", + "description": "Criterion name (referenced in evaluation result rows)." + }, + "instruction": { + "type": "string", + "description": "Natural-language instruction passed to the judge LLM." + } + }, + "description": "LLM-as-judge evaluation criterion applied to a single task." + }, + "EvaluationDatasetReference": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Dataset name." + }, + "version": { + "type": "string", + "description": "Dataset version. If not provided, resolves to the latest version." + }, + "schema_file_name": { + "type": "string", + "description": "Name of the schema file within the dataset's blob folder (e.g., \"a3f2b1c4_schema.json\").\nOptional — if not provided, schema is inferred at runtime from the data.\nOnly applicable for uri_folder datasets." + } + }, + "description": "Reference to a dataset by name and version." + }, + "EvaluationLevel": { + "anyOf": [ + { + "type": "string", + "enum": [ + "turn", + "conversation" + ] + }, + { + "type": "string" + } + ], + "description": "The level at which evaluation is performed." + }, + "EvaluationResultSample": { + "type": "object", + "required": [ + "type", + "evaluationResult" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationResultSample" + ], + "description": "Evaluation Result Sample Type" + }, + "evaluationResult": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalResult" + } + ], + "description": "Evaluation result for the analysis sample." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightSample" + } + ], + "description": "A sample from the evaluation result." + }, + "EvaluationRule": { + "type": "object", + "required": [ + "id", + "action", + "eventType", + "enabled", + "systemData" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the evaluation rule.", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "Display Name for the evaluation rule." + }, + "description": { + "type": "string", + "description": "Description for the evaluation rule." + }, + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleAction" + } + ], + "description": "Definition of the evaluation rule action.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "Evaluations=V1Preview" + ] + } + }, + "filter": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleFilter" + } + ], + "description": "Filter condition of the evaluation rule." + }, + "eventType": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleEventType" + } + ], + "description": "Event type that the evaluation rule applies to." + }, + "enabled": { + "type": "boolean", + "description": "Indicates whether the evaluation rule is enabled. Default is true." + }, + "systemData": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "System metadata for the evaluation rule.", + "readOnly": true + } + }, + "description": "Evaluation rule model." + }, + "EvaluationRuleAction": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleActionType" + } + ], + "description": "Type of the evaluation action." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", + "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" + } + }, + "description": "Evaluation action model." + }, + "EvaluationRuleActionType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "continuousEvaluation", + "humanEvaluationPreview" + ] + } + ], + "description": "Type of the evaluation action." + }, + "EvaluationRuleEventType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "responseCompleted", + "manual" + ] + } + ], + "description": "Type of the evaluation rule event." + }, + "EvaluationRuleFilter": { + "type": "object", + "required": [ + "agentName" + ], + "properties": { + "agentName": { + "type": "string", + "description": "Filter by agent name." + } + }, + "description": "Evaluation filter model." + }, + "EvaluationRunClusterInsightRequest": { + "type": "object", + "required": [ + "type", + "evalId", + "runIds" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationRunClusterInsight" + ], + "description": "The type of insights request." + }, + "evalId": { + "type": "string", + "description": "Evaluation Id for the insights." + }, + "runIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of evaluation run IDs for the insights." + }, + "modelConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightModelConfiguration" + } + ], + "description": "Configuration of the model used in the insight generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightRequest" + } + ], + "description": "Insights on set of Evaluation Results" + }, + "EvaluationRunClusterInsightResult": { + "type": "object", + "required": [ + "type", + "clusterInsight" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationRunClusterInsight" + ], + "description": "The type of insights result." + }, + "clusterInsight": { + "$ref": "#/components/schemas/ClusterInsightResult" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InsightResult" + } + ], + "description": "Insights from the evaluation run cluster analysis." + }, + "EvaluationScheduleTask": { + "type": "object", + "required": [ + "type", + "evalId", + "evalRun" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Evaluation" + ] + }, + "evalId": { + "type": "string", + "description": "Identifier of the evaluation group." + }, + "evalRun": { + "type": "object", + "description": "The evaluation run payload." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleTask" + } + ], + "description": "Evaluation task for the schedule." + }, + "EvaluationSuiteRunRequest": { + "type": "object", + "properties": { + "evaluation_name": { + "type": "string", + "description": "Name for the evaluation. Default: '{suiteName}-runs'." + }, + "evaluation_suite_version": { + "type": "string", + "description": "Evaluation suite version to run. Default: latest." + }, + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "Overrides the suite's default evaluation level. If omitted, uses the level from the suite." + } + }, + "description": "Request body for running an evaluation from a suite." + }, + "EvaluationSuiteRunResponse": { + "type": "object", + "required": [ + "evaluation_suite_name", + "evaluation_suite_version", + "results" + ], + "properties": { + "evaluation_suite_name": { + "type": "string", + "description": "The evaluation suite name used." + }, + "evaluation_suite_version": { + "type": "string", + "description": "The evaluation suite version resolved." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationSuiteRunResult" + }, + "description": "The run results. Currently a single-element array; will support multiple runs in the future." + } + }, + "description": "Response from running an evaluation suite." + }, + "EvaluationSuiteRunResult": { + "type": "object", + "required": [ + "eval_id", + "run_id", + "status", + "created_at" + ], + "properties": { + "eval_id": { + "type": "string", + "description": "The evaluation ID created." + }, + "run_id": { + "type": "string", + "description": "The eval run ID created." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/JobStatus" + } + ], + "description": "Status of the run." + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp when the run was created." + } + }, + "description": "Result of a single evaluation run within a suite execution." + }, + "EvaluationSuiteSubtype": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "default", + "benchmark" + ] + } + ], + "description": "The subtype of an evaluation suite." + }, + "EvaluationSuiteVersion": { + "type": "object", + "required": [ + "testing_criteria", + "name", + "version" + ], + "properties": { + "display_name": { + "type": "string", + "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." + }, + "subtype": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteSubtype" + } + ], + "description": "Subtype of the evaluation suite." + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationDatasetReference" + } + ], + "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." + }, + "testing_criteria": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" + }, + { + "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" + } + ] + }, + "minItems": 1, + "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." + }, + "input_messages": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." + }, + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "Default evaluation level for this suite. Can be overridden at run time." + }, + "name": { + "type": "string", + "description": "The name of the resource.", + "readOnly": true + }, + "version": { + "type": "string", + "description": "The version of the resource.", + "readOnly": true + } + }, + "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." + }, + "EvaluationSuiteVersionCreate": { + "type": "object", + "required": [ + "testing_criteria" + ], + "properties": { + "display_name": { + "type": "string", + "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." + }, + "subtype": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteSubtype" + } + ], + "description": "Subtype of the evaluation suite." + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationDatasetReference" + } + ], + "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." + }, + "testing_criteria": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" + }, + { + "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" + } + ] + }, + "minItems": 1, + "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." + }, + "input_messages": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." + }, + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "Default evaluation level for this suite. Can be overridden at run time." + }, + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + } + }, + "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." + }, + "EvaluationSuiteVersionUpdate": { + "type": "object", + "required": [ + "testing_criteria" + ], + "properties": { + "display_name": { + "type": "string", + "description": "Human-readable display name.\nDoes not need to be unique. Shown in Foundry portal list views and eval reports." + }, + "subtype": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationSuiteSubtype" + } + ], + "description": "Subtype of the evaluation suite." + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationDatasetReference" + } + ], + "description": "Dataset reference for evaluation.\nOptional — omit for evaluator-only suites where data comes from\nlive production traces or is provided at run time.\nThe referenced dataset must exist in the project's dataset registry." + }, + "testing_criteria": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderLabelModel" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModel" + }, + { + "$ref": "#/components/schemas/TestingCriterionAzureAIEvaluator" + } + ] + }, + "minItems": 1, + "description": "Testing criteria — the evaluator configurations for this suite.\nSupports all grader types: azure_ai_evaluator, string_check, label_model,\nscore_model, text_similarity, python, etc.\nAt least one entry is required." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "Target for this evaluation suite. Uses the existing Target discriminated type\nfrom eval runs. Supports azure_ai_agent, azure_ai_model, azure_ai_assistant.\nOptional — allows suites to exist without a target." + }, + "input_messages": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "How to send dataset rows to the target (agent or model).\nSupports template type (prompt with column placeholders) and\nitem_reference type (column containing pre-built messages)." + }, + "evaluation_level": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationLevel" + } + ], + "description": "Default evaluation level for this suite. Can be overridden at run time." + }, + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + } + }, + "description": "An evaluation suite bundles testing criteria — an optional dataset, one or more\nevaluator configs with thresholds and init params — into a reusable, named artifact that\ncan gate agent changes across batch, scheduled, continuous, and CI/CD evals." + }, + "EvaluationTaxonomy": { + "type": "object", + "required": [ + "name", + "version", + "taxonomyInput" + ], + "properties": { + "id": { + "type": "string", + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the resource", + "readOnly": true + }, + "version": { + "type": "string", + "description": "The version of the resource", + "readOnly": true + }, + "taxonomyInput": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationTaxonomyInput" + } + ], + "description": "Input configuration for the evaluation taxonomy." + }, + "taxonomyCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyCategory" + }, + "description": "List of taxonomy categories." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional properties for the evaluation taxonomy." + } + }, + "description": "Evaluation Taxonomy Definition" + }, + "EvaluationTaxonomyCreateOrUpdate": { + "type": "object", + "required": [ + "taxonomyInput" + ], + "properties": { + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + }, + "taxonomyInput": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationTaxonomyInput" + } + ], + "description": "Input configuration for the evaluation taxonomy." + }, + "taxonomyCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyCategory" + }, + "description": "List of taxonomy categories." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional properties for the evaluation taxonomy." + } + }, + "description": "Evaluation Taxonomy Definition" + }, + "EvaluationTaxonomyInput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationTaxonomyInputType" + } + ], + "description": "Input type of the evaluation taxonomy." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "agent": "#/components/schemas/AgentTaxonomyInput" + } + }, + "description": "Input configuration for the evaluation taxonomy." + }, + "EvaluationTaxonomyInputType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "agent", + "policy" + ] + } + ], + "description": "Type of the evaluation taxonomy input." + }, + "EvaluationTaxonomyInputUpdate": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationTaxonomyInputType" + } + ], + "description": "Input type of the evaluation taxonomy." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "agent": "#/components/schemas/AgentTaxonomyInputUpdate" + } + }, + "description": "Input configuration for the evaluation taxonomy." + }, + "EvaluationTaxonomyUpdate": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + }, + "taxonomyInput": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationTaxonomyInputUpdate" + } + ], + "description": "Input configuration for the evaluation taxonomy." + }, + "taxonomyCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomyCategory" + }, + "description": "List of taxonomy categories." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional properties for the evaluation taxonomy." + } + }, + "description": "Evaluation Taxonomy Definition" + }, + "EvaluatorCategory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "quality", + "safety", + "agents" + ] + } + ], + "description": "The category of the evaluator" + }, + "EvaluatorDefinition": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorDefinitionType" + } + ], + "description": "The type of evaluator definition" + }, + "init_parameters": { + "type": "object", + "additionalProperties": {}, + "description": "The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters like type, properties, required." + }, + "data_schema": { + "type": "object", + "additionalProperties": {}, + "description": "The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like type, properties, required." + }, + "metrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EvaluatorMetric" + }, + "description": "List of output metrics produced by this evaluator" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "code": "#/components/schemas/CodeBasedEvaluatorDefinition", + "prompt": "#/components/schemas/PromptBasedEvaluatorDefinition" + } + }, + "description": "Base evaluator configuration with discriminator" + }, + "EvaluatorDefinitionType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "prompt", + "code", + "prompt_and_code", + "service", + "openai_graders" + ] + } + ], + "description": "The type of evaluator definition" + }, + "EvaluatorMetric": { + "type": "object", + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorMetricType" + } + ], + "description": "Type of the metric." + }, + "desirable_direction": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorMetricDirection" + } + ], + "description": "It indicates whether a higher value is better or a lower value is better for this metric." + }, + "min_value": { + "type": "number", + "format": "float", + "description": "Minimum value for the metric" + }, + "max_value": { + "type": "number", + "format": "float", + "description": "Maximum value for the metric. If not specified, it is assumed to be unbounded." + }, + "threshold": { + "type": "number", + "format": "float", + "description": "Default pass/fail threshold for this metric." + }, + "is_primary": { + "type": "boolean", + "description": "Indicates if this metric is primary when there are multiple metrics." + } + }, + "description": "Evaluator Metric" + }, + "EvaluatorMetricDirection": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "increase", + "decrease", + "neutral" + ] + } + ], + "description": "The direction of the metric indicating whether a higher value is better, a lower value is better, or neutral" + }, + "EvaluatorMetricType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "ordinal", + "continuous", + "boolean" + ] + } + ], + "description": "The type of the evaluator" + }, + "EvaluatorType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "builtin", + "custom" + ] + } + ], + "description": "The type of the evaluator" + }, + "EvaluatorVersion": { + "type": "object", + "required": [ + "evaluator_type", + "categories", + "definition", + "created_by", + "created_at", + "modified_at", + "name", + "version" + ], + "properties": { + "display_name": { + "type": "string", + "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata about the evaluator" + }, + "evaluator_type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorType" + } + ], + "description": "The type of the evaluator" + }, + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorCategory" + }, + "description": "The categories of the evaluator" + }, + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorDefinition" + } + ], + "description": "Definition of the evaluator" + }, + "created_by": { + "type": "string", + "description": "Creator of the evaluator", + "readOnly": true + }, + "created_at": { + "type": "string", + "description": "Creation date/time of the evaluator", + "readOnly": true + }, + "modified_at": { + "type": "string", + "description": "Last modified date/time of the evaluator", + "readOnly": true + }, + "id": { + "type": "string", + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the resource", + "readOnly": true + }, + "version": { + "type": "string", + "description": "The version of the resource", + "readOnly": true + } + }, + "description": "Evaluator Definition" + }, + "EvaluatorVersionCreate": { + "type": "object", + "required": [ + "evaluator_type", + "categories", + "definition" + ], + "properties": { + "display_name": { + "type": "string", + "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata about the evaluator" + }, + "evaluator_type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorType" + } + ], + "description": "The type of the evaluator" + }, + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorCategory" + }, + "description": "The categories of the evaluator" + }, + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorDefinition" + } + ], + "description": "Definition of the evaluator" + }, + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + } + }, + "description": "Evaluator Definition" + }, + "EvaluatorVersionUpdate": { + "type": "object", + "properties": { + "display_name": { + "type": "string", + "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata about the evaluator" + }, + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorCategory" + }, + "description": "The categories of the evaluator" + }, + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + } + }, + "description": "Evaluator Definition" + }, + "ExternalAgentDefinition": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "external" + ] + }, + "otel_agent_id": { + "type": "string", + "description": "The OpenTelemetry agent identifier used to attribute customer-emitted spans to this Foundry agent.\nSpans must include the attribute `gen_ai.agent.id = ` to appear under this registration.\nDefaults to the top-level agent name when omitted. Provide an explicit value only for migration scenarios\nwhere the running external agent already emits a stable id that differs from the Foundry agent name.\nThe resolved value is always echoed on read." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/AgentDefinition" + } + ], + "description": "The external agent definition. Represents a third-party agent hosted outside Foundry (for example, on GCP or AWS).\nRegistration is metadata-only: Foundry records the agent definition to light up observability experiences (traces, evaluations)\nover customer-emitted OpenTelemetry data.", + "x-ms-foundry-meta": { + "required_previews": [ + "ExternalAgents=V1Preview" + ] + } + }, + "FabricDataAgentToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "arguments", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "fabric_dataagent_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 Fabric data agent tool call." + }, + "FabricDataAgentToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "fabric_dataagent_preview_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 Fabric data agent 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 Fabric data agent tool call." + }, + "FabricDataAgentToolParameters": { + "type": "object", + "properties": { + "project_connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolProjectConnection" + }, + "maxItems": 1, + "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." + } + }, + "description": "The fabric data agent tool parameters." + }, + "FabricIQPreviewTool": { + "type": "object", + "required": [ + "type", + "project_connection_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "fabric_iq_preview" + ], + "description": "The object type, which is always 'fabric_iq_preview'." + }, + "project_connection_id": { + "type": "string", + "description": "The ID of the FabricIQ project connection." + }, + "server_label": { + "type": "string", + "description": "(Optional) The label of the FabricIQ MCP server to connect to." + }, + "server_url": { + "type": "string", + "format": "uri", + "description": "(Optional) The URL of the FabricIQ MCP server. If not provided, the URL from the project connection will be used." + }, + "require_approval": { + "anyOf": [ + { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolRequireApproval" + } + ], + "nullable": true + }, + { + "type": "string", + "nullable": true + } + ], + "description": "(Optional) Whether the agent requires approval before executing actions. Default is always.", + "default": "always" + }, + "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." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A FabricIQ server-side tool." + }, + "FileDatasetVersion": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "uri_file" + ], + "description": "Dataset type" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/DatasetVersion" + } + ], + "description": "FileDatasetVersion Definition" + }, + "FileDatasetVersionUpdate": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "uri_file" + ], + "description": "Dataset type" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/DatasetVersionUpdate" + } + ], + "description": "FileDatasetVersion Definition" + }, + "FixedRatioVersionSelectionRule": { + "type": "object", + "required": [ + "type", + "traffic_percentage" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "FixedRatio" + ] + }, + "traffic_percentage": { + "type": "integer", + "format": "int32", + "minimum": 0, + "maximum": 100, + "description": "The percentage of traffic to route to the version. Must be between 0 and 100." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/VersionSelectionRule" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "FolderDatasetVersion": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "uri_folder" + ], + "description": "Dataset type" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/DatasetVersion" + } + ], + "description": "FileDatasetVersion Definition" + }, + "FolderDatasetVersionUpdate": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "uri_folder" + ], + "description": "Dataset type" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/DatasetVersionUpdate" + } + ], + "description": "FileDatasetVersion Definition" + }, + "FoundryModelArtifactProfileCategory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "DataOnly", + "RuntimeDependent", + "Unknown" + ] + } + ], + "description": "The artifact profile category." + }, + "FoundryModelArtifactProfileSignal": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "PickleDeserialization", + "CustomPythonCode", + "DynamicOps", + "NativeBinary", + "UnknownFormat" + ] + } + ], + "description": "Signals detected in the model artifact." + }, + "FoundryModelSourceType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "LocalUpload", + "TrainingJob" + ] + } + ], + "description": "The source type of the model." + }, + "FoundryModelWarning": { + "type": "object", + "properties": { + "code": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryModelWarningCode" + } + ], + "description": "The warning code." + }, + "message": { + "type": "string", + "description": "The warning message." + } + }, + "description": "A warning associated with a model." + }, + "FoundryModelWarningCode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "RuntimeDependentArtifact", + "UnclassifiedArtifact" + ] + } + ], + "description": "Warning code for model artifacts." + }, + "FoundryModelWeightType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "FullWeight", + "LoRA", + "DraftModel" + ] + } + ], + "description": "The weight type of the model." + }, + "FoundryTimestamp": { + "type": "integer", + "format": "unixtime" + }, + "FunctionToolCall": { + "type": "object", + "required": [ + "name", + "arguments" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the function to call." + }, + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format." + } + }, + "description": "Details of a function tool call." + }, + "HeaderTelemetryEndpointAuth": { + "type": "object", + "required": [ + "type", + "header_name", + "secret_id", + "secret_key" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "header" + ], + "description": "The authentication type, always 'header' for header-based secret authentication." + }, + "header_name": { + "type": "string", + "description": "The name of the HTTP header to inject the secret value into.", + "example": "X-Otlp-Api-Key" + }, + "secret_id": { + "type": "string", + "description": "The identifier of the secret store or connection.", + "example": "my-secret-store" + }, + "secret_key": { + "type": "string", + "description": "The key within the secret to retrieve the authentication value.", + "example": "OTLP_KEY" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryEndpointAuth" + } + ], + "description": "Header-based secret authentication for a telemetry endpoint. The resolved secret value is injected as an HTTP header.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "HostedAgentDefinition": { + "type": "object", + "required": [ + "kind", + "cpu", + "memory" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "hosted" + ] + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "An array of tools the hosted agent's model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter." + }, + "container_protocol_versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProtocolVersionRecord" + }, + "description": "The protocols that the agent supports for ingress communication of the containers.", + "example": [ + { + "protocol": "responses", + "version": "v0.1.1" + }, + { + "protocol": "invocations", + "version": "v0.0.1" + }, + { + "protocol": "a2a", + "version": "v0.3.0" + } + ] + }, + "cpu": { + "type": "string", + "description": "The CPU configuration for the hosted agent.", + "example": "0.25" + }, + "memory": { + "type": "string", + "description": "The memory configuration for the hosted agent.", + "example": "0.5Gi" + }, + "environment_variables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables to set in the hosted agent container.", + "example": { + "name": "LOG_LEVEL", + "value": "debug" + } + }, + "image": { + "type": "string", + "description": "The image ID for the agent, applicable to image-based hosted agents.", + "example": "my-registry.azurecr.io/my-hosted-agent:latest" + }, + "container_configuration": { + "allOf": [ + { + "$ref": "#/components/schemas/ContainerConfiguration" + } + ], + "description": "Container-based deployment configuration. Provide this for image-based deployments. Mutually exclusive with code_configuration — the service validates that exactly one is set.", + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + } + }, + "protocol_versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProtocolVersionRecord" + }, + "description": "The protocols that the agent supports for ingress communication.", + "example": [ + { + "protocol": "responses", + "version": "v0.1.1" + }, + { + "protocol": "a2a", + "version": "v0.3.0" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + } + }, + "code_configuration": { + "allOf": [ + { + "$ref": "#/components/schemas/CodeConfiguration" + } + ], + "description": "Code-based deployment configuration. Provide this for code-based deployments. Mutually exclusive with container_configuration — the service validates that exactly one is set.", + "x-ms-foundry-meta": { + "required_previews": [ + "CodeAgents=V1Preview" + ] + } + }, + "telemetry_config": { + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryConfig" + } + ], + "description": "Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/AgentDefinition" + } + ], + "description": "The hosted agent definition.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "HourlyRecurrenceSchedule": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Hourly" + ] + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/RecurrenceSchedule" + } + ], + "description": "Hourly recurrence schedule." + }, + "HumanEvaluationPreviewRuleAction": { + "type": "object", + "required": [ + "type", + "templateId" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "humanEvaluationPreview" + ] + }, + "templateId": { + "allOf": [ + { + "$ref": "#/components/schemas/AssetId" + } + ], + "description": "Human evaluation template Id." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleAction" + } + ], + "description": "Evaluation rule action for human evaluation." + }, + "Index": { + "type": "object", + "required": [ + "type", + "name", + "version" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/IndexType" + } + ], + "description": "Type of index" + }, + "id": { + "type": "string", + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the resource", + "readOnly": true + }, + "version": { + "type": "string", + "description": "The version of the resource", + "readOnly": true + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "AzureSearch": "#/components/schemas/AzureAISearchIndex", + "ManagedAzureSearch": "#/components/schemas/ManagedAzureAISearchIndex", + "CosmosDBNoSqlVectorStore": "#/components/schemas/CosmosDBIndex" + } + }, + "description": "Index resource Definition" + }, + "IndexType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "AzureSearch", + "CosmosDBNoSqlVectorStore", + "ManagedAzureSearch" + ] + } + ] + }, + "IndexUpdate": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/IndexType" + } + ], + "description": "Type of index" + }, + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "AzureSearch": "#/components/schemas/AzureAISearchIndexUpdate", + "ManagedAzureSearch": "#/components/schemas/ManagedAzureAISearchIndexUpdate", + "CosmosDBNoSqlVectorStore": "#/components/schemas/CosmosDBIndexUpdate" + } + }, + "description": "Index resource Definition" + }, + "Insight": { + "type": "object", + "required": [ + "id", + "metadata", + "state", + "displayName", + "request" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the insights report.", + "readOnly": true + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightsMetadata" + } + ], + "description": "Metadata about the insights report.", + "readOnly": true + }, + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/Azure.Core.Foundations.OperationState" + } + ], + "description": "The current state of the insights.", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "User friendly display name for the insight." + }, + "request": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightRequest" + } + ], + "description": "Request for the insights analysis." + }, + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightResult" + } + ], + "description": "The result of the insights report.", + "readOnly": true + } + }, + "description": "The response body for cluster insights." + }, + "InsightCluster": { + "type": "object", + "required": [ + "id", + "label", + "suggestion", + "suggestionTitle", + "description", + "weight" + ], + "properties": { + "id": { + "type": "string", + "description": "The id of the analysis cluster." + }, + "label": { + "type": "string", + "description": "Label for the cluster" + }, + "suggestion": { + "type": "string", + "description": "Suggestion for the cluster" + }, + "suggestionTitle": { + "type": "string", + "description": "The title of the suggestion for the cluster" + }, + "description": { + "type": "string", + "description": "Description of the analysis cluster." + }, + "weight": { + "type": "integer", + "format": "int32", + "description": "The weight of the analysis cluster. This indicate number of samples in the cluster." + }, + "subClusters": { + "description": "List of subclusters within this cluster. Empty if no subclusters exist.", + "type": "array", + "items": { + "$ref": "#/components/schemas/InsightCluster" + } + }, + "samples": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InsightSample" + }, + "description": "List of samples that belong to this cluster. Empty if samples are part of subclusters." + } + }, + "description": "A cluster of analysis samples." + }, + "InsightModelConfiguration": { + "type": "object", + "required": [ + "modelDeploymentName" + ], + "properties": { + "modelDeploymentName": { + "type": "string", + "description": "The model deployment to be evaluated. Accepts either the deployment name alone or with the connection name as '{connectionName}/'." + } + }, + "description": "Configuration of the model used in the insight generation." + }, + "InsightRequest": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightType" + } + ], + "description": "The type of request." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightRequest", + "AgentClusterInsight": "#/components/schemas/AgentClusterInsightRequest", + "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightRequest" + } + }, + "description": "The request of the insights report." + }, + "InsightResult": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightType" + } + ], + "description": "The type of insights result." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightResult", + "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightResult", + "AgentClusterInsight": "#/components/schemas/AgentClusterInsightResult" + } + }, + "description": "The result of the insights." + }, + "InsightSample": { + "type": "object", + "required": [ + "id", + "type", + "features", + "correlationInfo" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the analysis sample." + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleType" + } + ], + "description": "Sample type" + }, + "features": { + "type": "object", + "additionalProperties": {}, + "description": "Features to help with additional filtering of data in UX." + }, + "correlationInfo": { + "type": "object", + "additionalProperties": {}, + "description": "Info about the correlation for the analysis sample." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "EvaluationResultSample": "#/components/schemas/EvaluationResultSample" + } + }, + "description": "A sample from the analysis." + }, + "InsightScheduleTask": { + "type": "object", + "required": [ + "type", + "insight" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Insight" + ] + }, + "insight": { + "allOf": [ + { + "$ref": "#/components/schemas/Insight" + } + ], + "description": "The insight payload." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleTask" + } + ], + "description": "Insight task for the schedule." + }, + "InsightSummary": { + "type": "object", + "required": [ + "sampleCount", + "uniqueSubclusterCount", + "uniqueClusterCount", + "method", + "usage" + ], + "properties": { + "sampleCount": { + "type": "integer", + "format": "int32", + "description": "Total number of samples analyzed." + }, + "uniqueSubclusterCount": { + "type": "integer", + "format": "int32", + "description": "Total number of unique subcluster labels." + }, + "uniqueClusterCount": { + "type": "integer", + "format": "int32", + "description": "Total number of unique clusters." + }, + "method": { + "type": "string", + "description": "Method used for clustering." + }, + "usage": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterTokenUsage" + } + ], + "description": "Token usage while performing clustering analysis" + } + }, + "description": "Summary of the error cluster analysis." + }, + "InsightType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "EvaluationRunClusterInsight", + "AgentClusterInsight", + "EvaluationComparison" + ] + } + ], + "description": "The request of the insights." + }, + "InsightsMetadata": { + "type": "object", + "required": [ + "createdAt" + ], + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the insights were created." + }, + "completedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the insights were completed." + } + }, + "description": "Metadata about the insights." + }, + "ItemGenerationParams": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParamsType" + } + ], + "description": "The type of item generation parameters to use." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "red_team": "#/components/schemas/RedTeamItemGenerationParams", + "red_team_seed_prompts": "#/components/schemas/RedTeamSeedPromptsItemGenerationParams", + "red_team_taxonomy": "#/components/schemas/RedTeamTaxonomyItemGenerationParams", + "response_retrieval": "#/components/schemas/ResponseRetrievalItemGenerationParams", + "conversation_gen_preview": "#/components/schemas/ConversationGenPreviewItemGenerationParams" + } + }, + "description": "Represents the set of parameters used to control item generation operations." + }, + "ItemGenerationParamsType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "red_team", + "response_retrieval", + "red_team_seed_prompts", + "red_team_taxonomy", + "synthetic_data_gen_preview", + "conversation_gen_preview" + ] + } + ], + "description": "The types of parameters for red team item generation." + }, + "JobStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "queued", + "in_progress", + "succeeded", + "failed", + "cancelled" + ] + } + ], + "description": "Extensible status values shared by Foundry jobs." + }, + "LoraConfig": { + "type": "object", + "properties": { + "rank": { + "type": "integer", + "format": "int32", + "description": "LoRA rank (r). Positive integer. Common values: 8, 16, 32, 64." + }, + "alpha": { + "type": "integer", + "format": "int32", + "description": "LoRA scaling factor (α). Positive integer; typically 2× the rank." + }, + "targetModules": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Model layers modified by the adapter (e.g., q_proj, v_proj). Auto-detected from adapter_config.json if omitted." + }, + "dropout": { + "type": "number", + "format": "float", + "description": "Dropout rate used during training. Informational — not used at serving time." + } + }, + "description": "Adapter-specific metadata for LoRA models. Drives serving engine configuration at deployment time." + }, + "ManagedAgentIdentityBlueprintReference": { + "type": "object", + "required": [ + "type", + "blueprint_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "ManagedAgentIdentityBlueprint" + ] + }, + "blueprint_id": { + "type": "string", + "description": "The ID of the managed blueprint" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/AgentBlueprintReference" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "ManagedAzureAISearchIndex": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "ManagedAzureSearch" + ], + "description": "Type of index" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Index" + } + ], + "description": "Managed Azure AI Search Index Definition" + }, + "ManagedAzureAISearchIndexUpdate": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "ManagedAzureSearch" + ], + "description": "Type of index" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/IndexUpdate" + } + ], + "description": "Managed Azure AI Search Index Definition" + }, + "MemoryItem": { + "type": "object", + "required": [ + "memory_id", + "updated_at", + "scope", + "content", + "kind" + ], + "properties": { + "memory_id": { + "type": "string", + "description": "The unique ID of the memory item." + }, + "updated_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The last update time of the memory item." + }, + "scope": { + "type": "string", + "description": "The namespace that logically groups and isolates memories, such as a user ID." + }, + "content": { + "type": "string", + "description": "The content of the memory." + }, + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItemKind" + } + ], + "description": "The kind of the memory item." + } + }, + "discriminator": { + "propertyName": "kind", + "mapping": { + "user_profile": "#/components/schemas/UserProfileMemoryItem", + "chat_summary": "#/components/schemas/ChatSummaryMemoryItem" + } + }, + "description": "A single memory item stored in the memory store, containing content and metadata.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryItemKind": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "user_profile", + "chat_summary" + ] + } + ], + "description": "Memory item kind.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryOperation": { + "type": "object", + "required": [ + "kind", + "memory_item" + ], + "properties": { + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryOperationKind" + } + ], + "description": "The type of memory operation being performed." + }, + "memory_item": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItem" + } + ], + "description": "The memory item to create, update, or delete." + } + }, + "description": "Represents a single memory operation (create, update, or delete) performed on a memory item.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryOperationKind": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "create", + "update", + "delete" + ] + } + ], + "description": "Memory operation kind.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemorySearchItem": { + "type": "object", + "required": [ + "memory_item" + ], + "properties": { + "memory_item": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItem" + } + ], + "description": "Retrieved memory item." + } + }, + "description": "A retrieved memory item from memory search.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemorySearchOptions": { + "type": "object", + "properties": { + "max_memories": { + "type": "integer", + "format": "int32", + "description": "Maximum number of memory items to return." + } + }, + "description": "Memory search options.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemorySearchPreviewTool": { + "type": "object", + "required": [ + "type", + "memory_store_name", + "scope" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_search_preview" + ], + "description": "The type of the tool. Always `memory_search_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." + }, + "memory_store_name": { + "type": "string", + "description": "The name of the memory store to use." + }, + "scope": { + "type": "string", + "description": "The namespace used to group and isolate memories, such as a user ID.\nLimits which memories can be retrieved or updated.\nUse special variable `{{$userId}}` to scope memories to the current signed-in user." + }, + "search_options": { + "allOf": [ + { + "$ref": "#/components/schemas/MemorySearchOptions" + } + ], + "description": "Options for searching the memory store." + }, + "update_delay": { + "type": "integer", + "format": "int32", + "description": "Time to wait before updating memories after inactivity (seconds). Default 300.", + "default": 300 + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool for integrating memories into the agent." + }, + "MemorySearchToolCallItemParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_search_call" + ] + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemorySearchItem" + }, + "nullable": true, + "description": "The results returned from the memory search." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ] + }, + "MemorySearchToolCallItemResource": { + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "memory_search_call" + ] + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "incomplete", + "failed" + ], + "description": "The status of the memory search tool call. One of `in_progress`,\n`searching`, `completed`, `incomplete` or `failed`," + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemorySearchItem" + }, + "nullable": true, + "description": "The results returned from the memory search." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ] + }, + "MemoryStoreDefaultDefinition": { + "type": "object", + "required": [ + "kind", + "chat_model", + "embedding_model" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "default" + ], + "description": "The kind of the memory store." + }, + "chat_model": { + "type": "string", + "description": "The name or identifier of the chat completion model deployment used for memory processing." + }, + "embedding_model": { + "type": "string", + "description": "The name or identifier of the embedding model deployment used for memory processing." + }, + "options": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreDefaultOptions" + } + ], + "description": "Default memory store options." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreDefinition" + } + ], + "description": "Default memory store implementation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreDefaultOptions": { + "type": "object", + "required": [ + "user_profile_enabled", + "chat_summary_enabled" + ], + "properties": { + "user_profile_enabled": { + "type": "boolean", + "description": "Whether to enable user profile extraction and storage. Default is true.", + "default": true + }, + "user_profile_details": { + "type": "string", + "description": "Specific categories or types of user profile information to extract and store." + }, + "chat_summary_enabled": { + "type": "boolean", + "description": "Whether to enable chat summary extraction and storage. Default is true.", + "default": true + } + }, + "description": "Default memory store configurations.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreDefinition": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreKind" + } + ], + "description": "The kind of the memory store." + } + }, + "discriminator": { + "propertyName": "kind", + "mapping": { + "default": "#/components/schemas/MemoryStoreDefaultDefinition" + } + }, + "description": "Base definition for memory store configurations.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreDeleteScopeResponse": { + "type": "object", + "required": [ + "object", + "name", + "scope", + "deleted" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "memory_store.scope.deleted" + ], + "description": "The object type. Always 'memory_store.scope.deleted'." + }, + "name": { + "type": "string", + "description": "The name of the memory store." + }, + "scope": { + "type": "string", + "description": "The scope from which memories were deleted." + }, + "deleted": { + "type": "boolean", + "description": "Whether the deletion operation was successful." + } + }, + "description": "Response for deleting memories from a scope.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreKind": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "default" + ] + } + ], + "description": "The type of memory store implementation to use.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreObject": { + "type": "object", + "required": [ + "object", + "id", + "created_at", + "updated_at", + "name", + "definition" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "memory_store" + ], + "description": "The object type, which is always 'memory_store'." + }, + "id": { + "type": "string", + "description": "The unique identifier of the memory store." + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The Unix timestamp (seconds) when the memory store was created." + }, + "updated_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "The Unix timestamp (seconds) when the memory store was last updated." + }, + "name": { + "type": "string", + "maxLength": 256, + "description": "The name of the memory store." + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the memory store." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the memory store." + }, + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreDefinition" + } + ], + "description": "The definition of the memory store." + } + }, + "description": "A memory store that can store and retrieve user memories.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreOperationUsage": { + "type": "object", + "required": [ + "embedding_tokens", + "input_tokens", + "input_tokens_details", + "output_tokens", + "output_tokens_details", + "total_tokens" + ], + "properties": { + "embedding_tokens": { + "type": "integer", + "format": "int32", + "description": "The number of embedding tokens." + }, + "input_tokens": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The number of input tokens." + }, + "input_tokens_details": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" + } + ], + "description": "A detailed breakdown of the input tokens." + }, + "output_tokens": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The number of output tokens." + }, + "output_tokens_details": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" + } + ], + "description": "A detailed breakdown of the output tokens." + }, + "total_tokens": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The total number of tokens used." + } + }, + "description": "Usage statistics of a memory store operation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreSearchResponse": { + "type": "object", + "required": [ + "search_id", + "memories", + "usage" + ], + "properties": { + "search_id": { + "type": "string", + "description": "The unique ID of this search request. Use this value as previous_search_id in subsequent requests to perform incremental searches." + }, + "memories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemorySearchItem" + }, + "description": "Related memory items found during the search operation." + }, + "usage": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreOperationUsage" + } + ], + "description": "Usage statistics associated with the memory search operation." + } + }, + "description": "Memory search response.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreUpdateCompletedResult": { + "type": "object", + "required": [ + "memory_operations", + "usage" + ], + "properties": { + "memory_operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemoryOperation" + }, + "description": "A list of individual memory operations that were performed during the update." + }, + "usage": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreOperationUsage" + } + ], + "description": "Usage statistics associated with the memory update operation." + } + }, + "description": "Memory update result.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreUpdateResponse": { + "type": "object", + "required": [ + "update_id", + "status" + ], + "properties": { + "update_id": { + "type": "string", + "description": "The unique ID of this update request. Use this value as previous_update_id in subsequent requests to perform incremental updates." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreUpdateStatus" + } + ], + "description": "The status of the memory update operation. One of \"queued\", \"in_progress\", \"completed\", \"failed\", or \"superseded\"." + }, + "superseded_by": { + "type": "string", + "description": "The update_id the operation was superseded by when status is \"superseded\"." + }, + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreUpdateCompletedResult" + } + ], + "description": "The result of memory store update operation when status is \"completed\"." + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Error" + } + ], + "description": "Error object that describes the error when status is \"failed\"." + } + }, + "description": "Provides the status of a memory store update operation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreUpdateStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "queued", + "in_progress", + "completed", + "failed", + "superseded" + ] + } + ], + "description": "Status of a memory store update operation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MicrosoftFabricPreviewTool": { + "type": "object", + "required": [ + "type", + "fabric_dataagent_preview" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "fabric_dataagent_preview" + ], + "description": "The object type, which is always 'fabric_dataagent_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." + }, + "fabric_dataagent_preview": { + "allOf": [ + { + "$ref": "#/components/schemas/FabricDataAgentToolParameters" + } + ], + "description": "The fabric data agent tool parameters." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "The input definition information for a Microsoft Fabric tool as used to configure an agent." + }, + "ModelCredentialRequest": { + "type": "object", + "required": [ + "blobUri" + ], + "properties": { + "blobUri": { + "type": "string", + "format": "uri", + "description": "Blob URI of the model asset to fetch credentials for." + } + }, + "description": "Request to fetch credentials for a model asset." + }, + "ModelDeployment": { + "type": "object", + "required": [ + "type", + "modelName", + "modelVersion", + "modelPublisher", + "capabilities", + "sku" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "ModelDeployment" + ], + "description": "The type of the deployment" + }, + "modelName": { + "type": "string", + "description": "Publisher-specific name of the deployed model", + "readOnly": true + }, + "modelVersion": { + "type": "string", + "description": "Publisher-specific version of the deployed model", + "readOnly": true + }, + "modelPublisher": { + "type": "string", + "description": "Name of the deployed model's publisher", + "readOnly": true + }, + "capabilities": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Capabilities of deployed model", + "readOnly": true + }, + "sku": { + "allOf": [ + { + "$ref": "#/components/schemas/Sku" + } + ], + "description": "Sku of the model deployment", + "readOnly": true + }, + "connectionName": { + "type": "string", + "description": "Name of the connection the deployment comes from", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Deployment" + } + ], + "description": "Model Deployment Definition" + }, + "ModelPendingUploadRequest": { + "type": "object", + "required": [ + "pendingUploadType" + ], + "properties": { + "pendingUploadId": { + "type": "string", + "description": "If PendingUploadId is not provided, a random GUID will be used." + }, + "connectionName": { + "type": "string", + "description": "Azure Storage Account connection name to use for generating temporary SAS token" + }, + "pendingUploadType": { + "type": "string", + "enum": [ + "TemporaryBlobReference" + ], + "description": "The type of pending upload. Only TemporaryBlobReference is supported for models." + } + }, + "description": "Represents a request for a pending upload of a model version." + }, + "ModelPendingUploadResponse": { + "type": "object", + "required": [ + "blobReference", + "pendingUploadId", + "pendingUploadType" + ], + "properties": { + "blobReference": { + "allOf": [ + { + "$ref": "#/components/schemas/BlobReference" + } + ], + "description": "Container-level read, write, list SAS." + }, + "pendingUploadId": { + "type": "string", + "description": "ID for this upload request." + }, + "version": { + "type": "string", + "description": "Version of asset to be created if user did not specify version when initially creating upload" + }, + "pendingUploadType": { + "type": "string", + "enum": [ + "TemporaryBlobReference" + ], + "description": "The type of pending upload. Only TemporaryBlobReference is supported for models." + } + }, + "description": "Represents the response for a model pending upload request." + }, + "ModelSamplingParams": { + "type": "object", + "properties": { + "temperature": { + "type": "number", + "format": "float", + "description": "The temperature parameter for sampling. Defaults to 1.0.", + "default": 1 + }, + "top_p": { + "type": "number", + "format": "float", + "description": "The top-p parameter for nucleus sampling. Defaults to 1.0.", + "default": 1 + }, + "seed": { + "type": "integer", + "format": "int32", + "description": "The random seed for reproducibility. Defaults to 42.", + "default": 42 + }, + "max_completion_tokens": { + "type": "integer", + "format": "int32", + "description": "The maximum number of tokens allowed in the completion." + } + }, + "description": "Represents a set of parameters used to control the sampling behavior of a language model during text generation." + }, + "ModelSourceData": { + "type": "object", + "properties": { + "sourceType": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryModelSourceType" + } + ], + "description": "The source type of the model" + }, + "jobId": { + "type": "string", + "description": "The job ID that produced this model" + } + }, + "description": "Source information for the model" + }, + "ModelVersion": { + "type": "object", + "required": [ + "blobUri", + "name", + "version" + ], + "properties": { + "systemData": { + "allOf": [ + { + "$ref": "#/components/schemas/SystemDataV3" + } + ], + "description": "System related metadata", + "readOnly": true + }, + "blobUri": { + "type": "string", + "format": "uri", + "description": "URI of the model artifact in blob storage" + }, + "weightType": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryModelWeightType" + } + ], + "description": "The weight type of the model" + }, + "baseModel": { + "type": "string", + "description": "Base model asset ID" + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelSourceData" + } + ], + "description": "The source of the model" + }, + "loraConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/LoraConfig" + } + ], + "description": "Adapter-specific configuration. Required when weight_type is lora; ignored otherwise. May be auto-populated from adapter_config.json when present in the uploaded files — user-provided values take precedence over auto-detected values." + }, + "artifactProfile": { + "allOf": [ + { + "$ref": "#/components/schemas/ArtifactProfile" + } + ], + "description": "The artifact profile of the model", + "readOnly": true + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FoundryModelWarning" + }, + "description": "Service-computed advisory warnings derived from the artifact profile.", + "readOnly": true + }, + "id": { + "type": "string", + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the resource", + "readOnly": true + }, + "version": { + "type": "string", + "description": "The version of the resource", + "readOnly": true + }, + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + } + }, + "description": "Model Version Definition" + }, + "MonthlyRecurrenceSchedule": { + "type": "object", + "required": [ + "type", + "daysOfMonth" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Monthly" + ], + "description": "Monthly recurrence type." + }, + "daysOfMonth": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Days of the month for the recurrence schedule." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/RecurrenceSchedule" + } + ], + "description": "Monthly recurrence schedule." + }, + "NoAuthenticationCredentials": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "None" + ], + "description": "The credential type ", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "Credentials that do not require authentication" + }, + "OAuthConsentRequestOutputItem": { + "type": "object", + "required": [ + "id", + "type", + "consent_link", + "server_label" + ], + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "oauth_consent_request" + ] + }, + "consent_link": { + "type": "string", + "description": "The link the user can use to perform OAuth consent." + }, + "server_label": { + "type": "string", + "description": "The server label for the OAuth consent request." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "Request from the service for the user to perform OAuth consent." + }, + "OneTimeTrigger": { + "type": "object", + "required": [ + "type", + "triggerAt" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "OneTime" + ] + }, + "triggerAt": { + "type": "string", + "description": "Date and time for the one-time trigger in ISO 8601 format." + }, + "timeZone": { + "type": "string", + "description": "Time zone for the one-time trigger.", + "default": "UTC" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Trigger" + } + ], + "description": "One-time trigger." + }, + "OpenAI.Annotation": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.AnnotationType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "file_citation": "#/components/schemas/OpenAI.FileCitationBody", + "url_citation": "#/components/schemas/OpenAI.UrlCitationBody", + "container_file_citation": "#/components/schemas/OpenAI.ContainerFileCitationBody", + "file_path": "#/components/schemas/OpenAI.FilePath" + } + }, + "description": "An annotation that applies to a span of output text." + }, + "OpenAI.AnnotationType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "file_citation", + "url_citation", + "container_file_citation", + "file_path" + ] + } + ] + }, + "OpenAI.ApplyPatchCallOutputStatus": { + "type": "string", + "enum": [ + "completed", + "failed" + ] + }, + "OpenAI.ApplyPatchCallOutputStatusParam": { + "type": "string", + "enum": [ + "completed", + "failed" + ], + "description": "Outcome values reported for apply_patch tool call outputs.", + "title": "Apply patch call output status" + }, + "OpenAI.ApplyPatchCallStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed" + ] + }, + "OpenAI.ApplyPatchCallStatusParam": { + "type": "string", + "enum": [ + "in_progress", + "completed" + ], + "description": "Status values reported for apply_patch tool calls.", + "title": "Apply patch call status" + }, + "OpenAI.ApplyPatchCreateFileOperation": { + "type": "object", + "required": [ + "type", + "path", + "diff" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "create_file" + ], + "description": "Create a new file with the provided diff.", + "x-stainless-const": true, + "default": "create_file" + }, + "path": { + "type": "string", + "description": "Path of the file to create." + }, + "diff": { + "type": "string", + "description": "Diff to apply." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + } + ], + "description": "Instruction describing how to create a file via the apply_patch tool.", + "title": "Apply patch create file operation" + }, + "OpenAI.ApplyPatchCreateFileOperationParam": { + "type": "object", + "required": [ + "type", + "path", + "diff" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "create_file" + ], + "description": "The operation type. Always `create_file`.", + "x-stainless-const": true, + "default": "create_file" + }, + "path": { + "type": "string", + "minLength": 1, + "description": "Path of the file to create relative to the workspace root." + }, + "diff": { + "type": "string", + "maxLength": 10485760, + "description": "Unified diff content to apply when creating the file." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + } + ], + "description": "Instruction for creating a new file via the apply_patch tool.", + "title": "Apply patch create file operation" + }, + "OpenAI.ApplyPatchDeleteFileOperation": { + "type": "object", + "required": [ + "type", + "path" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "delete_file" + ], + "description": "Delete the specified file.", + "x-stainless-const": true, + "default": "delete_file" + }, + "path": { + "type": "string", + "description": "Path of the file to delete." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + } + ], + "description": "Instruction describing how to delete a file via the apply_patch tool.", + "title": "Apply patch delete file operation" + }, + "OpenAI.ApplyPatchDeleteFileOperationParam": { + "type": "object", + "required": [ + "type", + "path" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "delete_file" + ], + "description": "The operation type. Always `delete_file`.", + "x-stainless-const": true, + "default": "delete_file" + }, + "path": { + "type": "string", + "minLength": 1, + "description": "Path of the file to delete relative to the workspace root." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + } + ], + "description": "Instruction for deleting an existing file via the apply_patch tool.", + "title": "Apply patch delete file operation" + }, + "OpenAI.ApplyPatchFileOperation": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperationType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "create_file": "#/components/schemas/OpenAI.ApplyPatchCreateFileOperation", + "delete_file": "#/components/schemas/OpenAI.ApplyPatchDeleteFileOperation", + "update_file": "#/components/schemas/OpenAI.ApplyPatchUpdateFileOperation" + } + }, + "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", + "title": "Apply patch operation" + }, + "OpenAI.ApplyPatchFileOperationType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "create_file", + "delete_file", + "update_file" + ] + } + ] + }, + "OpenAI.ApplyPatchOperationParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParamType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "create_file": "#/components/schemas/OpenAI.ApplyPatchCreateFileOperationParam", + "delete_file": "#/components/schemas/OpenAI.ApplyPatchDeleteFileOperationParam", + "update_file": "#/components/schemas/OpenAI.ApplyPatchUpdateFileOperationParam" + } + }, + "description": "One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.", + "title": "Apply patch operation" + }, + "OpenAI.ApplyPatchOperationParamType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "create_file", + "delete_file", + "update_file" + ] + } + ] + }, + "OpenAI.ApplyPatchToolParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch" + ], + "description": "The type of the tool. Always `apply_patch`.", + "x-stainless-const": true, + "default": "apply_patch" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "Allows the assistant to create, delete, or update files using unified diffs.", + "title": "Apply patch tool" + }, + "OpenAI.ApplyPatchUpdateFileOperation": { + "type": "object", + "required": [ + "type", + "path", + "diff" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "update_file" + ], + "description": "Update an existing file with the provided diff.", + "x-stainless-const": true, + "default": "update_file" + }, + "path": { + "type": "string", + "description": "Path of the file to update." + }, + "diff": { + "type": "string", + "description": "Diff to apply." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + } + ], + "description": "Instruction describing how to update a file via the apply_patch tool.", + "title": "Apply patch update file operation" + }, + "OpenAI.ApplyPatchUpdateFileOperationParam": { + "type": "object", + "required": [ + "type", + "path", + "diff" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "update_file" + ], + "description": "The operation type. Always `update_file`.", + "x-stainless-const": true, + "default": "update_file" + }, + "path": { + "type": "string", + "minLength": 1, + "description": "Path of the file to update relative to the workspace root." + }, + "diff": { + "type": "string", + "maxLength": 10485760, + "description": "Unified diff content to apply to the existing file." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + } + ], + "description": "Instruction for updating an existing file via the apply_patch tool.", + "title": "Apply patch update file operation" + }, + "OpenAI.ApproximateLocation": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "approximate" + ], + "description": "The type of location approximation. Always `approximate`.", + "x-stainless-const": true, + "default": "approximate" + }, + "country": { + "type": "string", + "nullable": true + }, + "region": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string", + "nullable": true + }, + "timezone": { + "type": "string", + "nullable": true + } + } + }, + "OpenAI.AutoCodeInterpreterToolParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "auto" + ], + "description": "Always `auto`.", + "x-stainless-const": true, + "default": "auto" + }, + "file_ids": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 50, + "description": "An optional list of uploaded files to make available to your code." + }, + "memory_limit": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" + } + ], + "nullable": true + }, + "network_policy": { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" + } + }, + "description": "Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.", + "title": "Automatic Code Interpreter Tool Parameters" + }, + "OpenAI.ChatCompletionTool": { + "type": "object", + "required": [ + "type", + "function" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool. Currently, only `function` is supported.", + "x-stainless-const": true + }, + "function": { + "$ref": "#/components/schemas/OpenAI.FunctionObject" + } + }, + "description": "A function tool that can be used to generate a response.", + "title": "Function tool" + }, + "OpenAI.ChatModel": { + "type": "string", + "enum": [ + "gpt-5.2", + "gpt-5.2-2025-12-11", + "gpt-5.2-chat-latest", + "gpt-5.2-pro", + "gpt-5.2-pro-2025-12-11", + "gpt-5.1", + "gpt-5.1-2025-11-13", + "gpt-5.1-codex", + "gpt-5.1-mini", + "gpt-5.1-chat-latest", + "gpt-5", + "gpt-5-mini", + "gpt-5-nano", + "gpt-5-2025-08-07", + "gpt-5-mini-2025-08-07", + "gpt-5-nano-2025-08-07", + "gpt-5-chat-latest", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", + "gpt-4.1-2025-04-14", + "gpt-4.1-mini-2025-04-14", + "gpt-4.1-nano-2025-04-14", + "o4-mini", + "o4-mini-2025-04-16", + "o3", + "o3-2025-04-16", + "o3-mini", + "o3-mini-2025-01-31", + "o1", + "o1-2024-12-17", + "o1-preview", + "o1-preview-2024-09-12", + "o1-mini", + "o1-mini-2024-09-12", + "gpt-4o", + "gpt-4o-2024-11-20", + "gpt-4o-2024-08-06", + "gpt-4o-2024-05-13", + "gpt-4o-audio-preview", + "gpt-4o-audio-preview-2024-10-01", + "gpt-4o-audio-preview-2024-12-17", + "gpt-4o-audio-preview-2025-06-03", + "gpt-4o-mini-audio-preview", + "gpt-4o-mini-audio-preview-2024-12-17", + "gpt-4o-search-preview", + "gpt-4o-mini-search-preview", + "gpt-4o-search-preview-2025-03-11", + "gpt-4o-mini-search-preview-2025-03-11", + "chatgpt-4o-latest", + "codex-mini-latest", + "gpt-4o-mini", + "gpt-4o-mini-2024-07-18", + "gpt-4-turbo", + "gpt-4-turbo-2024-04-09", + "gpt-4-0125-preview", + "gpt-4-turbo-preview", + "gpt-4-1106-preview", + "gpt-4-vision-preview", + "gpt-4", + "gpt-4-0314", + "gpt-4-0613", + "gpt-4-32k", + "gpt-4-32k-0314", + "gpt-4-32k-0613", + "gpt-3.5-turbo", + "gpt-3.5-turbo-16k", + "gpt-3.5-turbo-0301", + "gpt-3.5-turbo-0613", + "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-0125", + "gpt-3.5-turbo-16k-0613" + ] + }, + "OpenAI.ClickButtonType": { + "type": "string", + "enum": [ + "left", + "right", + "wheel", + "back", + "forward" + ] + }, + "OpenAI.ClickParam": { + "type": "object", + "required": [ + "type", + "button", + "x", + "y" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "click" + ], + "description": "Specifies the event type. For a click action, this property is always `click`.", + "x-stainless-const": true, + "default": "click" + }, + "button": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ClickButtonType" + } + ], + "description": "Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`." + }, + "x": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The x-coordinate where the click occurred." + }, + "y": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The y-coordinate where the click occurred." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A click action.", + "title": "Click" + }, + "OpenAI.CodeInterpreterOutputImage": { + "type": "object", + "required": [ + "type", + "url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image" + ], + "description": "The type of the output. Always `image`.", + "x-stainless-const": true, + "default": "image" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the image output from the code interpreter." + } + }, + "description": "The image output from the code interpreter.", + "title": "Code interpreter output image" + }, + "OpenAI.CodeInterpreterOutputLogs": { + "type": "object", + "required": [ + "type", + "logs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "logs" + ], + "description": "The type of the output. Always `logs`.", + "x-stainless-const": true, + "default": "logs" + }, + "logs": { + "type": "string", + "description": "The logs output from the code interpreter." + } + }, + "description": "The logs output from the code interpreter.", + "title": "Code interpreter output logs" + }, + "OpenAI.CodeInterpreterTool": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_interpreter" + ], + "description": "The type of the code interpreter tool. Always `code_interpreter`.", + "x-stainless-const": true + }, + "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." + }, + "container": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.AutoCodeInterpreterToolParam" + } + ], + "description": "The code interpreter container. Can be a container ID or an object that\nspecifies uploaded file IDs to make available to your code, along with an\noptional `memory_limit` setting.\nIf not provided, the service assumes auto." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool that runs Python code to help generate a response to a prompt.", + "title": "Code interpreter" + }, + "OpenAI.CompactResource": { + "type": "object", + "required": [ + "id", + "object", + "output", + "created_at", + "usage" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the compacted response." + }, + "object": { + "type": "string", + "enum": [ + "response.compaction" + ], + "description": "The object type. Always `response.compaction`.", + "x-stainless-const": true, + "default": "response.compaction" + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ItemField" + }, + "description": "The compacted list of output items." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "Unix timestamp (in seconds) when the compacted conversation was created." + }, + "usage": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseUsage" + } + ], + "description": "Token accounting for the compaction pass, including cached, reasoning, and total tokens." + } + }, + "title": "The compacted response object" + }, + "OpenAI.CompactResponseMethodPublicBody": { + "type": "object", + "required": [ + "model" + ], + "properties": { + "model": { + "$ref": "#/components/schemas/OpenAI.ModelIdsCompaction" + }, + "input": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + } + ], + "nullable": true + }, + "previous_response_id": { + "type": "string", + "nullable": true + }, + "instructions": { + "type": "string", + "nullable": true + } + } + }, + "OpenAI.ComparisonFilter": { + "type": "object", + "required": [ + "type", + "key", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "eq", + "ne", + "gt", + "gte", + "lt", + "lte" + ], + "description": "Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.\n - `eq`: equals\n - `ne`: not equal\n - `gt`: greater than\n - `gte`: greater than or equal\n - `lt`: less than\n - `lte`: less than or equal\n - `in`: in\n - `nin`: not in", + "default": "eq" + }, + "key": { + "type": "string", + "description": "The key to compare against the value." + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ] + } + } + ], + "description": "The value to compare against the attribute key; supports string, number, or boolean types." + } + }, + "description": "A filter used to compare a specified attribute key to a given value using a defined comparison operation.", + "title": "Comparison Filter", + "x-oaiMeta": { + "name": "ComparisonFilter" + } + }, + "OpenAI.CompoundFilter": { + "type": "object", + "required": [ + "type", + "filters" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "and", + "or" + ], + "description": "Type of operation: `and` or `or`." + }, + "filters": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComparisonFilter" + }, + {} + ] + }, + "description": "Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`." + } + }, + "description": "Combine multiple filters using `and` or `or`.", + "title": "Compound Filter", + "x-oaiMeta": { + "name": "CompoundFilter" + } + }, + "OpenAI.ComputerAction": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ComputerActionType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "click": "#/components/schemas/OpenAI.ClickParam", + "double_click": "#/components/schemas/OpenAI.DoubleClickAction", + "drag": "#/components/schemas/OpenAI.DragParam", + "keypress": "#/components/schemas/OpenAI.KeyPressAction", + "move": "#/components/schemas/OpenAI.MoveParam", + "screenshot": "#/components/schemas/OpenAI.ScreenshotParam", + "scroll": "#/components/schemas/OpenAI.ScrollParam", + "type": "#/components/schemas/OpenAI.TypeParam", + "wait": "#/components/schemas/OpenAI.WaitParam" + } + } + }, + "OpenAI.ComputerActionType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "click", + "double_click", + "drag", + "keypress", + "move", + "screenshot", + "scroll", + "type", + "wait" + ] + } + ] + }, + "OpenAI.ComputerCallSafetyCheckParam": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "The ID of the pending safety check." + }, + "code": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + } + }, + "description": "A pending safety check for the computer call." + }, + "OpenAI.ComputerEnvironment": { + "type": "string", + "enum": [ + "windows", + "mac", + "linux", + "ubuntu", + "browser" + ] + }, + "OpenAI.ComputerScreenshotContent": { + "type": "object", + "required": [ + "type", + "image_url", + "file_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_screenshot" + ], + "description": "Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.", + "x-stainless-const": true, + "default": "computer_screenshot" + }, + "image_url": { + "type": "string", + "format": "uri", + "nullable": true + }, + "file_id": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A screenshot of a computer.", + "title": "Computer screenshot" + }, + "OpenAI.ComputerScreenshotImage": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_screenshot" + ], + "description": "Specifies the event type. For a computer screenshot, this property is\n always set to `computer_screenshot`.", + "x-stainless-const": true, + "default": "computer_screenshot" + }, + "image_url": { + "type": "string", + "format": "uri", + "description": "The URL of the screenshot image." + }, + "file_id": { + "type": "string", + "description": "The identifier of an uploaded file that contains the screenshot." + } + }, + "description": "A computer screenshot image used with the computer use tool." + }, + "OpenAI.ComputerUsePreviewTool": { + "type": "object", + "required": [ + "type", + "environment", + "display_width", + "display_height" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_use_preview" + ], + "description": "The type of the computer use tool. Always `computer_use_preview`.", + "x-stainless-const": true, + "default": "computer_use_preview" + }, + "environment": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerEnvironment" + } + ], + "description": "The type of computer environment to control." + }, + "display_width": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The width of the computer display." + }, + "display_height": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The height of the computer display." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).", + "title": "Computer use preview" + }, + "OpenAI.ContainerAutoParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "container_auto" + ], + "description": "Automatically creates a container for this request", + "x-stainless-const": true, + "default": "container_auto" + }, + "file_ids": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 50, + "description": "An optional list of uploaded files to make available to your code." + }, + "memory_limit": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" + } + ], + "nullable": true + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ContainerSkill" + }, + "maxItems": 200, + "description": "An optional list of skills referenced by id or inline data." + }, + "network_policy": { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" + } + ] + }, + "OpenAI.ContainerFileCitationBody": { + "type": "object", + "required": [ + "type", + "container_id", + "file_id", + "start_index", + "end_index", + "filename" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "container_file_citation" + ], + "description": "The type of the container file citation. Always `container_file_citation`.", + "x-stainless-const": true, + "default": "container_file_citation" + }, + "container_id": { + "type": "string", + "description": "The ID of the container file." + }, + "file_id": { + "type": "string", + "description": "The ID of the file." + }, + "start_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the first character of the container file citation in the message." + }, + "end_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the last character of the container file citation in the message." + }, + "filename": { + "type": "string", + "description": "The filename of the container file cited." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Annotation" + } + ], + "description": "A citation for a container file used to generate a model response.", + "title": "Container file citation" + }, + "OpenAI.ContainerMemoryLimit": { + "type": "string", + "enum": [ + "1g", + "4g", + "16g", + "64g" + ] + }, + "OpenAI.ContainerNetworkPolicyAllowlistParam": { + "type": "object", + "required": [ + "type", + "allowed_domains" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "allowlist" + ], + "description": "Allow outbound network access only to specified domains. Always `allowlist`.", + "x-stainless-const": true, + "default": "allowlist" + }, + "allowed_domains": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "A list of allowed domains when type is `allowlist`." + }, + "domain_secrets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyDomainSecretParam" + }, + "minItems": 1, + "description": "Optional domain-scoped secrets for allowlisted domains." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" + } + ] + }, + "OpenAI.ContainerNetworkPolicyDisabledParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "disabled" + ], + "description": "Disable outbound network access. Always `disabled`.", + "x-stainless-const": true, + "default": "disabled" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" + } + ] + }, + "OpenAI.ContainerNetworkPolicyDomainSecretParam": { + "type": "object", + "required": [ + "domain", + "name", + "value" + ], + "properties": { + "domain": { + "type": "string", + "minLength": 1, + "description": "The domain associated with the secret." + }, + "name": { + "type": "string", + "minLength": 1, + "description": "The name of the secret to inject for the domain." + }, + "value": { + "type": "string", + "minLength": 1, + "maxLength": 10485760, + "description": "The secret value to inject for the domain." + } + } + }, + "OpenAI.ContainerNetworkPolicyParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParamType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "disabled": "#/components/schemas/OpenAI.ContainerNetworkPolicyDisabledParam", + "allowlist": "#/components/schemas/OpenAI.ContainerNetworkPolicyAllowlistParam" + } + }, + "description": "Network access policy for the container." + }, + "OpenAI.ContainerNetworkPolicyParamType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "disabled", + "allowlist" + ] + } + ] + }, + "OpenAI.ContainerReferenceResource": { + "type": "object", + "required": [ + "type", + "container_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "container_reference" + ], + "description": "The environment type. Always `container_reference`.", + "x-stainless-const": true, + "default": "container_reference" + }, + "container_id": { + "type": "string" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + } + ], + "description": "Represents a container created with /v1/containers.", + "title": "Container Reference" + }, + "OpenAI.ContainerSkill": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ContainerSkillType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "skill_reference": "#/components/schemas/OpenAI.SkillReferenceParam", + "inline": "#/components/schemas/OpenAI.InlineSkillParam" + } + } + }, + "OpenAI.ContainerSkillType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "skill_reference", + "inline" + ] + } + ] + }, + "OpenAI.ContextManagementParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The context management entry type. Currently only 'compaction' is supported." + }, + "compact_threshold": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + } + } + }, + "OpenAI.ConversationItem": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ConversationItemType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "message": "#/components/schemas/OpenAI.ConversationItemMessage", + "function_call": "#/components/schemas/OpenAI.ConversationItemFunctionToolCallResource", + "function_call_output": "#/components/schemas/OpenAI.ConversationItemFunctionToolCallOutputResource", + "file_search_call": "#/components/schemas/OpenAI.ConversationItemFileSearchToolCall", + "web_search_call": "#/components/schemas/OpenAI.ConversationItemWebSearchToolCall", + "image_generation_call": "#/components/schemas/OpenAI.ConversationItemImageGenToolCall", + "computer_call": "#/components/schemas/OpenAI.ConversationItemComputerToolCall", + "computer_call_output": "#/components/schemas/OpenAI.ConversationItemComputerToolCallOutputResource", + "reasoning": "#/components/schemas/OpenAI.ConversationItemReasoningItem", + "code_interpreter_call": "#/components/schemas/OpenAI.ConversationItemCodeInterpreterToolCall", + "local_shell_call": "#/components/schemas/OpenAI.ConversationItemLocalShellToolCall", + "local_shell_call_output": "#/components/schemas/OpenAI.ConversationItemLocalShellToolCallOutput", + "shell_call": "#/components/schemas/OpenAI.ConversationItemFunctionShellCall", + "shell_call_output": "#/components/schemas/OpenAI.ConversationItemFunctionShellCallOutput", + "apply_patch_call": "#/components/schemas/OpenAI.ConversationItemApplyPatchToolCall", + "apply_patch_call_output": "#/components/schemas/OpenAI.ConversationItemApplyPatchToolCallOutput", + "mcp_list_tools": "#/components/schemas/OpenAI.ConversationItemMcpListTools", + "mcp_approval_request": "#/components/schemas/OpenAI.ConversationItemMcpApprovalRequest", + "mcp_approval_response": "#/components/schemas/OpenAI.ConversationItemMcpApprovalResponseResource", + "mcp_call": "#/components/schemas/OpenAI.ConversationItemMcpToolCall", + "custom_tool_call": "#/components/schemas/OpenAI.ConversationItemCustomToolCall", + "custom_tool_call_output": "#/components/schemas/OpenAI.ConversationItemCustomToolCallOutput" + } + }, + "description": "A single item within a conversation. The set of possible types are the same as the `output` type of a [Response object](/docs/api-reference/responses/object#responses/object-output).", + "title": "Conversation item" + }, + "OpenAI.ConversationItemApplyPatchToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status", + "operation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call" + ], + "description": "The type of the item. Always `apply_patch_call`.", + "x-stainless-const": true, + "default": "apply_patch_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" + } + ], + "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + }, + "operation": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + } + ], + "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", + "title": "Apply patch operation" + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", + "title": "Apply patch tool call" + }, + "OpenAI.ConversationItemApplyPatchToolCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call_output" + ], + "description": "The type of the item. Always `apply_patch_call_output`.", + "x-stainless-const": true, + "default": "apply_patch_call_output" + }, + "id": { + "type": "string", + "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + } + ], + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." + }, + "output": { + "type": "string", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call output." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "The output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" + }, + "OpenAI.ConversationItemCodeInterpreterToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "container_id", + "code", + "outputs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_interpreter_call" + ], + "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", + "x-stainless-const": true, + "default": "code_interpreter_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the code interpreter tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "interpreting", + "failed" + ], + "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." + }, + "container_id": { + "type": "string", + "description": "The ID of the container used to run the code." + }, + "code": { + "type": "string", + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" + }, + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" + } + ] + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A tool call to run code.", + "title": "Code interpreter tool call" + }, + "OpenAI.ConversationItemComputerToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_call" + ], + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the computer call." + }, + "call_id": { + "type": "string", + "description": "An identifier used when responding to the tool call with output." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + }, + "pending_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The pending safety checks for the computer call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", + "title": "Computer tool call" + }, + "OpenAI.ConversationItemComputerToolCallOutputResource": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_call_output" + ], + "description": "The type of the computer tool call output. Always `computer_call_output`.", + "x-stainless-const": true, + "default": "computer_call_output" + }, + "id": { + "type": "string", + "description": "The ID of the computer tool call output." + }, + "call_id": { + "type": "string", + "description": "The ID of the computer tool call that produced the output." + }, + "acknowledged_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The safety checks reported by the API that have been acknowledged by the\n developer." + }, + "output": { + "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ] + }, + "OpenAI.ConversationItemCustomToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "input" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_tool_call" + ], + "description": "The type of the custom tool call. Always `custom_tool_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the custom tool call in the OpenAI platform." + }, + "call_id": { + "type": "string", + "description": "An identifier used to map this custom tool call to a tool call output." + }, + "name": { + "type": "string", + "description": "The name of the custom tool being called." + }, + "input": { + "type": "string", + "description": "The input for the custom tool call generated by the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" + }, + "OpenAI.ConversationItemCustomToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_tool_call_output" + ], + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the custom tool call output in the OpenAI platform." + }, + "call_id": { + "type": "string", + "description": "The call ID, used to map this custom tool call output to a custom tool call." + }, + "output": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + } + ], + "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "The output of a custom tool call from your code, being sent back to the model.", + "title": "Custom tool call output" + }, + "OpenAI.ConversationItemFileSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "queries" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, + "type": { + "type": "string", + "enum": [ + "file_search_call" + ], + "description": "The type of the file search tool call. Always `file_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "incomplete", + "failed" + ], + "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," + }, + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The queries used to search for files." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", + "title": "File search tool call" + }, + "OpenAI.ConversationItemFunctionShellCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status", + "environment" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell_call" + ], + "description": "The type of the item. Always `shell_call`.", + "x-stainless-const": true, + "default": "shell_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the shell tool call. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the shell tool call generated by the model." + }, + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellAction" + } + ], + "description": "The shell commands and limits that describe how to run the tool call." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" + } + ], + "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." + }, + "environment": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + } + ], + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A tool call that executes one or more shell commands in a managed environment.", + "title": "Shell tool call" + }, + "OpenAI.ConversationItemFunctionShellCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status", + "output", + "max_output_length" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell_call_output" + ], + "description": "The type of the shell call output. Always `shell_call_output`.", + "x-stainless-const": true, + "default": "shell_call_output" + }, + "id": { + "type": "string", + "description": "The unique ID of the shell call output. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the shell tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + } + ], + "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" + }, + "description": "An array of shell call output contents" + }, + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The identifier of the actor that created the item." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "The output of a shell tool call that was emitted.", + "title": "Shell call output" + }, + "OpenAI.ConversationItemFunctionToolCallOutputResource": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call output. Populated when this item\n is returned via API." + }, + "type": { + "type": "string", + "enum": [ + "function_call_output" + ], + "description": "The type of the function tool call output. Always `function_call_output`.", + "x-stainless-const": true + }, + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "output": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + } + ], + "description": "The output from the function call generated by your code.\n Can be a string or an list of output content." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ] + }, + "OpenAI.ConversationItemFunctionToolCallResource": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "arguments" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, + "type": { + "type": "string", + "enum": [ + "function_call" + ], + "description": "The type of the function tool call. Always `function_call`.", + "x-stainless-const": true + }, + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the function to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments to pass to the function." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ] + }, + "OpenAI.ConversationItemImageGenToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "result" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation_call" + ], + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the image generation call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "generating", + "failed" + ], + "description": "The status of the image generation call." + }, + "result": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "An image generation request made by the model.", + "title": "Image generation call" + }, + "OpenAI.ConversationItemList": { + "type": "object", + "required": [ + "object", + "data", + "has_more", + "first_id", + "last_id" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "list" + ], + "description": "The type of object returned, must be `list`.", + "x-stainless-const": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + }, + "description": "A list of conversation items.", + "x-ms-list-page-items": true + }, + "has_more": { + "type": "boolean", + "description": "Whether there are more items available." + }, + "first_id": { + "type": "string", + "description": "The ID of the first item in the list." + }, + "last_id": { + "type": "string", + "description": "The ID of the last item in the list.", + "x-ms-list-continuation-token": true + } + }, + "description": "A list of Conversation items.", + "title": "The conversation item list", + "x-oaiMeta": { + "name": "The item list", + "group": "conversations" + } + }, + "OpenAI.ConversationItemLocalShellToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call" + ], + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell call." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" + }, + "OpenAI.ConversationItemLocalShellToolCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call_output" + ], + "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "output": { + "type": "string", + "description": "A JSON string of the output of the local shell tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "The output of a local shell tool call.", + "title": "Local shell call output" + }, + "OpenAI.ConversationItemMcpApprovalRequest": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_request" + ], + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the approval request." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server making the request." + }, + "name": { + "type": "string", + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" + }, + "OpenAI.ConversationItemMcpApprovalResponseResource": { + "type": "object", + "required": [ + "type", + "id", + "approval_request_id", + "approve" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_response" + ], + "description": "The type of the item. Always `mcp_approval_response`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the approval response" + }, + "approval_request_id": { + "type": "string", + "description": "The ID of the approval request being answered." + }, + "approve": { + "type": "boolean", + "description": "Whether the request was approved." + }, + "reason": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A response to an MCP approval request.", + "title": "MCP approval response" + }, + "OpenAI.ConversationItemMcpListTools": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "tools" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_list_tools" + ], + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the list." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + }, + "description": "The tools available on the server." + }, + "error": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" + }, + "OpenAI.ConversationItemMcpToolCall": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_call" + ], + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the tool call." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server running the tool." + }, + "name": { + "type": "string", + "description": "The name of the tool that was run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments passed to the tool." + }, + "output": { + "type": "string", + "nullable": true + }, + "error": { + "type": "object", + "additionalProperties": {} + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + } + ], + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + }, + "approval_request_id": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" + }, + "OpenAI.ConversationItemMessage": { + "type": "object", + "required": [ + "type", + "id", + "status", + "role", + "content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "message" + ], + "description": "The type of the message. Always set to `message`.", + "x-stainless-const": true, + "default": "message" + }, + "id": { + "type": "string", + "description": "The unique ID of the message." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageStatus" + } + ], + "description": "The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API." + }, + "role": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageRole" + } + ], + "description": "The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`." + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MessageContent" + }, + "description": "The content of the message" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A message to or from the model.", + "title": "Message" + }, + "OpenAI.ConversationItemReasoningItem": { + "type": "object", + "required": [ + "type", + "id", + "summary" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique identifier of the reasoning content." + }, + "encrypted_content": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + }, + "description": "Reasoning summary content." + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + }, + "description": "Reasoning text content." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", + "title": "Reasoning" + }, + "OpenAI.ConversationItemType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "message", + "function_call", + "function_call_output", + "file_search_call", + "web_search_call", + "image_generation_call", + "computer_call", + "computer_call_output", + "reasoning", + "code_interpreter_call", + "local_shell_call", + "local_shell_call_output", + "shell_call", + "shell_call_output", + "apply_patch_call", + "apply_patch_call_output", + "mcp_list_tools", + "mcp_approval_request", + "mcp_approval_response", + "mcp_call", + "custom_tool_call", + "custom_tool_call_output" + ] + } + ] + }, + "OpenAI.ConversationItemWebSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "action" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, + "type": { + "type": "string", + "enum": [ + "web_search_call" + ], + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." + }, + "action": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + } + ], + "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", + "title": "Web search tool call" + }, + "OpenAI.ConversationParam": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.ConversationParam-2" + } + ], + "description": "The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request.\nInput items and output items from this response are automatically added to this conversation after this response completes." + }, + "OpenAI.ConversationParam-2": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the conversation." + } + }, + "description": "The conversation that this response belongs to.", + "title": "Conversation object" + }, + "OpenAI.ConversationReference": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the conversation that this response was associated with." + } + }, + "description": "The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.", + "title": "Conversation" + }, + "OpenAI.ConversationResource": { + "type": "object", + "required": [ + "id", + "object", + "metadata", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the conversation." + }, + "object": { + "type": "string", + "enum": [ + "conversation" + ], + "description": "The object type, which is always `conversation`.", + "x-stainless-const": true, + "default": "conversation" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The time at which the conversation was created, measured in seconds since the Unix epoch." + } + } + }, + "OpenAI.CoordParam": { + "type": "object", + "required": [ + "x", + "y" + ], + "properties": { + "x": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The x-coordinate." + }, + "y": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The y-coordinate." + } + }, + "description": "An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.", + "title": "Coordinate" + }, + "OpenAI.CreateChatCompletionRequestResponseFormat": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "text": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatText", + "json_object": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject" + } + }, + "description": "An object specifying the format that the model must output.\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. Learn more in the [Structured Outputs\nguide](/docs/guides/structured-outputs).\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it." + }, + "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "json_object" + ], + "description": "The type of response format being defined. Always `json_object`.", + "x-stainless-const": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" + } + ], + "description": "JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.", + "title": "JSON object" + }, + "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatText": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of response format being defined. Always `text`.", + "x-stainless-const": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" + } + ], + "description": "Default response format. Used to generate text responses.", + "title": "Text" + }, + "OpenAI.CreateChatCompletionRequestResponseFormatType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "text", + "json_schema", + "json_object" + ] + } + ] + }, + "OpenAI.CreateConversationBody": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + }, + "nullable": true + } + } + }, + "OpenAI.CreateEvalCompletionsRunDataSource": { + "type": "object", + "required": [ + "type", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "completions" + ], + "description": "The type of run data source. Always `completions`.", + "default": "completions" + }, + "input_messages": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplate" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace." + }, + "sampling_params": { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams" + }, + "model": { + "type": "string", + "description": "The name of the model to use for generating completions (e.g. \"o3-mini\")." + }, + "source": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalStoredCompletionsSource" + } + ], + "description": "Determines what populates the `item` namespace in this run's data source." + } + }, + "description": "A CompletionsRunDataSource object describing a model sampling configuration.", + "title": "CompletionsRunDataSource", + "x-oaiMeta": { + "name": "The completions data source object used to configure an individual run", + "group": "eval runs", + "example": "{\n \"name\": \"gpt-4o-mini-2024-07-18\",\n \"data_source\": {\n \"type\": \"completions\",\n \"input_messages\": {\n \"type\": \"item_reference\",\n \"item_reference\": \"item.input\"\n },\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"source\": {\n \"type\": \"stored_completions\",\n \"model\": \"gpt-4o-mini-2024-07-18\"\n }\n }\n}\n" + } + }, + "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference": { + "type": "object", + "required": [ + "type", + "item_reference" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "item_reference" + ] + }, + "item_reference": { + "type": "string" + } + } + }, + "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplate": { + "type": "object", + "required": [ + "type", + "template" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "template" + ] + }, + "template": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EasyInputMessage" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalItem" + } + ] + } + } + } + }, + "OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams": { + "type": "object", + "properties": { + "reasoning_effort": { + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" + }, + "temperature": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "default": 1 + }, + "max_completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "top_p": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "default": 1 + }, + "seed": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "default": 42 + }, + "response_format": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseFormatText" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchema" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonObject" + } + ] + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ChatCompletionTool" + } + } + } + }, + "OpenAI.CreateEvalCustomDataSourceConfig": { + "type": "object", + "required": [ + "type", + "item_schema" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ], + "description": "The type of data source. Always `custom`.", + "x-stainless-const": true, + "default": "custom" + }, + "item_schema": { + "type": "object", + "additionalProperties": {}, + "description": "The json schema for each row in the data source." + }, + "include_sample_schema": { + "type": "boolean", + "description": "Whether the eval should expect you to populate the sample namespace (ie, by generating responses off of your data source)" + } + }, + "description": "A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs.\nThis schema is used to define the shape of the data that will be:\n- Used to define your testing criteria and\n- What data is required when creating a run", + "title": "CustomDataSourceConfig", + "x-oaiMeta": { + "name": "The eval file data source config object", + "group": "evals", + "example": "{\n \"type\": \"custom\",\n \"item_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\"type\": \"string\"},\n \"age\": {\"type\": \"integer\"}\n },\n \"required\": [\"name\", \"age\"]\n },\n \"include_sample_schema\": true\n}\n" + } + }, + "OpenAI.CreateEvalJsonlRunDataSource": { + "type": "object", + "required": [ + "type", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "jsonl" + ], + "description": "The type of data source. Always `jsonl`.", + "x-stainless-const": true, + "default": "jsonl" + }, + "source": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + } + ], + "description": "Determines what populates the `item` namespace in the data source." + } + }, + "description": "A JsonlRunDataSource object with that specifies a JSONL file that matches the eval", + "title": "JsonlRunDataSource", + "x-oaiMeta": { + "name": "The file data source object for the eval run configuration", + "group": "evals", + "example": "{\n \"type\": \"jsonl\",\n \"source\": {\n \"type\": \"file_id\",\n \"id\": \"file-9GYS6xbkWgWhmE7VoLUWFg\"\n }\n}\n" + } + }, + "OpenAI.CreateEvalLogsDataSourceConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "logs" + ], + "description": "The type of data source. Always `logs`.", + "x-stainless-const": true, + "default": "logs" + }, + "metadata": { + "type": "object", + "additionalProperties": {}, + "description": "Metadata filters for the logs data source." + } + }, + "description": "A data source config which specifies the metadata property of your logs query.\nThis is usually metadata like `usecase=chatbot` or `prompt-version=v2`, etc.", + "title": "LogsDataSourceConfig", + "x-oaiMeta": { + "name": "The logs data source object for evals", + "group": "evals", + "example": "{\n \"type\": \"logs\",\n \"metadata\": {\n \"use_case\": \"customer_support_agent\"\n }\n}\n" + } + }, + "OpenAI.CreateEvalResponsesRunDataSource": { + "type": "object", + "required": [ + "type", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "responses" + ], + "description": "The type of run data source. Always `responses`.", + "default": "responses" + }, + "input_messages": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + }, + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference" + } + ], + "description": "Used when sampling from a model. Dictates the structure of the messages passed into the model. Can either be a reference to a prebuilt trajectory (ie, `item.input_trajectory`), or a template with variable references to the `item` namespace." + }, + "sampling_params": { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceSamplingParams" + }, + "model": { + "type": "string", + "description": "The name of the model to use for generating completions (e.g. \"o3-mini\")." + }, + "source": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalResponsesSource" + } + ], + "description": "Determines what populates the `item` namespace in this run's data source." + } + }, + "description": "A ResponsesRunDataSource object describing a model sampling configuration.", + "title": "ResponsesRunDataSource", + "x-oaiMeta": { + "name": "The completions data source object used to configure an individual run", + "group": "eval runs", + "example": "{\n \"name\": \"gpt-4o-mini-2024-07-18\",\n \"data_source\": {\n \"type\": \"responses\",\n \"input_messages\": {\n \"type\": \"item_reference\",\n \"item_reference\": \"item.input\"\n },\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"source\": {\n \"type\": \"responses\",\n \"model\": \"gpt-4o-mini-2024-07-18\"\n }\n }\n}\n" + } + }, + "OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference": { + "type": "object", + "required": [ + "type", + "item_reference" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "item_reference" + ] + }, + "item_reference": { + "type": "string" + } + } + }, + "OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate": { + "type": "object", + "required": [ + "type", + "template" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "template" + ] + }, + "template": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "role": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": [ + "role", + "content" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.EvalItem" + } + ] + } + } + } + }, + "OpenAI.CreateEvalResponsesRunDataSourceSamplingParams": { + "type": "object", + "properties": { + "reasoning_effort": { + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" + }, + "temperature": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "default": 1 + }, + "max_completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "top_p": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "default": 1 + }, + "seed": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "default": 42 + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + } + }, + "text": { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText" + } + } + }, + "OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText": { + "type": "object", + "properties": { + "format": { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + } + } + }, + "OpenAI.CreateEvalStoredCompletionsDataSourceConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "stored_completions" + ], + "description": "The type of data source. Always `stored_completions`.", + "x-stainless-const": true, + "default": "stored_completions" + }, + "metadata": { + "type": "object", + "additionalProperties": {}, + "description": "Metadata filters for the stored completions data source." + } + }, + "description": "Deprecated in favor of LogsDataSourceConfig.", + "title": "StoredCompletionsDataSourceConfig", + "deprecated": true, + "x-oaiMeta": { + "name": "The stored completions data source object for evals", + "group": "evals", + "example": "{\n \"type\": \"stored_completions\",\n \"metadata\": {\n \"use_case\": \"customer_support_agent\"\n }\n}\n" + } + }, + "OpenAI.CreateFineTuningJobRequest": { + "type": "object", + "required": [ + "model", + "training_file" + ], + "properties": { + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "babbage-002", + "davinci-002", + "gpt-3.5-turbo", + "gpt-4o-mini" + ] + } + ], + "description": "The name of the model to fine-tune. You can select one of the\n [supported models](/docs/guides/fine-tuning#which-models-can-be-fine-tuned).", + "x-oaiTypeLabel": "string" + }, + "training_file": { + "type": "string", + "description": "The ID of an uploaded file that contains training data.\n See [upload file](/docs/api-reference/files/create) for how to upload a file.\n Your dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n The contents of the file should differ depending on if the model uses the [chat](/docs/api-reference/fine-tuning/chat-input), [completions](/docs/api-reference/fine-tuning/completions-input) format, or if the fine-tuning method uses the [preference](/docs/api-reference/fine-tuning/preference-input) format.\n See the [fine-tuning guide](/docs/guides/model-optimization) for more details." + }, + "hyperparameters": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestHyperparameters" + } + ], + "description": "The hyperparameters used for the fine-tuning job.\n This value is now deprecated in favor of `method`, and should be passed in under the `method` parameter.", + "deprecated": true + }, + "suffix": { + "type": "string", + "nullable": true, + "minLength": 1, + "maxLength": 64, + "description": "A string of up to 64 characters that will be added to your fine-tuned model name.\n For example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`." + }, + "validation_file": { + "type": "string", + "nullable": true, + "description": "The ID of an uploaded file that contains validation data.\n If you provide this file, the data is used to generate validation\n metrics periodically during fine-tuning. These metrics can be viewed in\n the fine-tuning results file.\n The same data should not be present in both train and validation files.\n Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n See the [fine-tuning guide](/docs/guides/model-optimization) for more details." + }, + "integrations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrations" + }, + "nullable": true, + "description": "A list of integrations to enable for your fine-tuning job." + }, + "seed": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true, + "minimum": 0, + "maximum": 2147483647, + "description": "The seed controls the reproducibility of the job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases.\n If a seed is not specified, one will be generated for you." + }, + "method": { + "$ref": "#/components/schemas/OpenAI.FineTuneMethod" + }, + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + } + } + }, + "OpenAI.CreateFineTuningJobRequestHyperparameters": { + "type": "object", + "properties": { + "batch_size": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "default": "auto" + }, + "learning_rate_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "default": "auto" + }, + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "default": "auto" + } + } + }, + "OpenAI.CreateFineTuningJobRequestIntegrations": { + "type": "object", + "required": [ + "type", + "wandb" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "wandb" + ], + "x-stainless-const": true + }, + "wandb": { + "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrationsWandb" + } + } + }, + "OpenAI.CreateFineTuningJobRequestIntegrationsWandb": { + "type": "object", + "required": [ + "project" + ], + "properties": { + "project": { + "type": "string" + }, + "name": { + "type": "string", + "nullable": true + }, + "entity": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "OpenAI.CreateResponseStreamingResponse": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseAudioDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseAudioTranscriptDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallInProgressEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallInterpretingEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseContentPartAddedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCreatedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseErrorEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFileSearchCallInProgressEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFileSearchCallSearchingEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFunctionCallArgumentsDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseInProgressEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFailedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseIncompleteEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseOutputItemAddedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartAddedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryTextDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningTextDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseRefusalDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseTextDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseWebSearchCallInProgressEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseWebSearchCallSearchingEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallGeneratingEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallInProgressEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallPartialImageEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPCallArgumentsDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPCallFailedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPCallInProgressEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsFailedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsInProgressEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseOutputTextAnnotationAddedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseQueuedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCustomToolCallInputDeltaEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseAudioDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseAudioTranscriptDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallCodeDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallCompletedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCompletedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseContentPartDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFileSearchCallCompletedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFunctionCallArgumentsDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseOutputItemDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryTextDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningTextDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseRefusalDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseTextDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseWebSearchCallCompletedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallCompletedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPCallArgumentsDoneEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPCallCompletedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsCompletedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCustomToolCallInputDoneEvent" + } + ] + }, + "OpenAI.CustomGrammarFormatParam": { + "type": "object", + "required": [ + "type", + "syntax", + "definition" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "grammar" + ], + "description": "Grammar format. Always `grammar`.", + "x-stainless-const": true, + "default": "grammar" + }, + "syntax": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.GrammarSyntax1" + } + ], + "description": "The syntax of the grammar definition. One of `lark` or `regex`." + }, + "definition": { + "type": "string", + "description": "The grammar definition." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" + } + ], + "description": "A grammar defined by the user.", + "title": "Grammar format" + }, + "OpenAI.CustomTextFormatParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "Unconstrained text format. Always `text`.", + "x-stainless-const": true, + "default": "text" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" + } + ], + "description": "Unconstrained free-form text.", + "title": "Text format" + }, + "OpenAI.CustomToolParam": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ], + "description": "The type of the custom tool. Always `custom`.", + "x-stainless-const": true, + "default": "custom" + }, + "name": { + "type": "string", + "description": "The name of the custom tool, used to identify it in tool calls." + }, + "description": { + "type": "string", + "description": "Optional description of the custom tool, used to provide more context." + }, + "format": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" + } + ], + "description": "The input format for the custom tool. Default is unconstrained text." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A custom tool that processes input using a specified format. Learn more about [custom tools](/docs/guides/function-calling#custom-tools)", + "title": "Custom tool" + }, + "OpenAI.CustomToolParamFormat": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormatType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "text": "#/components/schemas/OpenAI.CustomTextFormatParam", + "grammar": "#/components/schemas/OpenAI.CustomGrammarFormatParam" + } + }, + "description": "The input format for the custom tool. Default is unconstrained text." + }, + "OpenAI.CustomToolParamFormatType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "text", + "grammar" + ] + } + ] + }, + "OpenAI.DeletedConversationResource": { + "type": "object", + "required": [ + "object", + "deleted", + "id" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "conversation.deleted" + ], + "x-stainless-const": true, + "default": "conversation.deleted" + }, + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + } + } + }, + "OpenAI.DetailEnum": { + "type": "string", + "enum": [ + "low", + "high", + "auto" + ] + }, + "OpenAI.DoubleClickAction": { + "type": "object", + "required": [ + "type", + "x", + "y" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "double_click" + ], + "description": "Specifies the event type. For a double click action, this property is always set to `double_click`.", + "x-stainless-const": true, + "default": "double_click" + }, + "x": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The x-coordinate where the double click occurred." + }, + "y": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The y-coordinate where the double click occurred." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A double click action.", + "title": "DoubleClick" + }, + "OpenAI.DragParam": { + "type": "object", + "required": [ + "type", + "path" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "drag" + ], + "description": "Specifies the event type. For a drag action, this property is always set to `drag`.", + "x-stainless-const": true, + "default": "drag" + }, + "path": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.CoordParam" + }, + "description": "An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg\n ```\n [\n { x: 100, y: 200 },\n { x: 200, y: 300 }\n ]\n ```" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A drag action.", + "title": "Drag" + }, + "OpenAI.EasyInputMessage": { + "type": "object", + "required": [ + "role", + "content", + "type" + ], + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "assistant", + "system", + "developer" + ], + "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n `developer`." + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.InputMessageContentList" + } + ], + "description": "Text, image, or audio input to the model, used to generate a response.\n Can also contain previous assistant responses." + }, + "type": { + "type": "string", + "enum": [ + "message" + ], + "description": "The type of the message input. Always `message`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.", + "title": "Input message" + }, + "OpenAI.Error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string" + }, + "param": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Error" + } + }, + "additionalInfo": { + "type": "object", + "additionalProperties": {} + }, + "debugInfo": { + "type": "object", + "additionalProperties": {} + } + } + }, + "OpenAI.EvalApiError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "description": "The error code." + }, + "message": { + "type": "string", + "description": "The error message." + } + }, + "description": "An object representing an error response from the Eval API.", + "title": "EvalApiError", + "x-oaiMeta": { + "name": "The API error object", + "group": "evals", + "example": "{\n \"code\": \"internal_error\",\n \"message\": \"The eval run failed due to an internal error.\"\n}\n" + } + }, + "OpenAI.EvalGraderLabelModel": { + "type": "object", + "required": [ + "type", + "name", + "model", + "input", + "labels", + "passing_labels" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "label_model" + ], + "description": "The object type, which is always `label_model`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "model": { + "type": "string", + "description": "The model to use for the evaluation. Must support structured outputs." + }, + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalItem" + } + }, + "labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The labels to assign to each item in the evaluation." + }, + "passing_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The labels that indicate a passing result. Must be a subset of labels." + } + }, + "title": "LabelModelGrader" + }, + "OpenAI.EvalGraderPython": { + "type": "object", + "required": [ + "type", + "name", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "python" + ], + "description": "The object type, which is always `python`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "source": { + "type": "string", + "description": "The source code of the python script." + }, + "image_tag": { + "type": "string", + "description": "The image tag to use for the python script." + }, + "pass_threshold": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The threshold for the score." + } + }, + "title": "PythonGrader" + }, + "OpenAI.EvalGraderScoreModel": { + "type": "object", + "required": [ + "type", + "name", + "model", + "input" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "score_model" + ], + "description": "The object type, which is always `score_model`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "model": { + "type": "string", + "description": "The model to use for the evaluation." + }, + "sampling_params": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModelSamplingParams" + } + ], + "description": "The sampling parameters for the model." + }, + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalItem" + }, + "description": "The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings." + }, + "range": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "description": "The range of the score. Defaults to `[0, 1]`." + }, + "pass_threshold": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The threshold for the score." + } + }, + "title": "ScoreModelGrader" + }, + "OpenAI.EvalGraderScoreModelSamplingParams": { + "type": "object", + "properties": { + "seed": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "top_p": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true, + "default": 1 + }, + "temperature": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true + }, + "max_completions_tokens": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "reasoning_effort": { + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" + } + } + }, + "OpenAI.EvalGraderStringCheck": { + "type": "object", + "required": [ + "type", + "name", + "input", + "reference", + "operation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "string_check" + ], + "description": "The object type, which is always `string_check`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "input": { + "type": "string", + "description": "The input text. This may include template strings." + }, + "reference": { + "type": "string", + "description": "The reference text. This may include template strings." + }, + "operation": { + "type": "string", + "enum": [ + "eq", + "ne", + "like", + "ilike" + ], + "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." + } + }, + "title": "StringCheckGrader" + }, + "OpenAI.EvalGraderTextSimilarity": { + "type": "object", + "required": [ + "type", + "name", + "input", + "reference", + "evaluation_metric", + "pass_threshold" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text_similarity" + ], + "description": "The type of grader.", + "x-stainless-const": true, + "default": "text_similarity" + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "input": { + "type": "string", + "description": "The text being graded." + }, + "reference": { + "type": "string", + "description": "The text being graded against." + }, + "evaluation_metric": { + "type": "string", + "enum": [ + "cosine", + "fuzzy_match", + "bleu", + "gleu", + "meteor", + "rouge_1", + "rouge_2", + "rouge_3", + "rouge_4", + "rouge_5", + "rouge_l" + ], + "description": "The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\n or `rouge_l`." + }, + "pass_threshold": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The threshold for the score." + } + }, + "title": "TextSimilarityGrader" + }, + "OpenAI.EvalItem": { + "type": "object", + "required": [ + "role", + "content" + ], + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "assistant", + "system", + "developer" + ], + "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n `developer`." + }, + "content": { + "$ref": "#/components/schemas/OpenAI.EvalItemContent" + }, + "type": { + "type": "string", + "enum": [ + "message" + ], + "description": "The type of the message input. Always `message`.", + "x-stainless-const": true + } + }, + "description": "A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role. Messages with the\n`assistant` role are presumed to have been generated by the model in previous\ninteractions.", + "title": "Eval message object" + }, + "OpenAI.EvalItemContent": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItem" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentArray" + } + ], + "description": "Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.", + "title": "Eval content" + }, + "OpenAI.EvalItemContentArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItem" + }, + "description": "A list of inputs, each of which may be either an input text, output text, input\nimage, or input audio object.", + "title": "An array of Input text, Output text, Input image, and Input audio" + }, + "OpenAI.EvalItemContentItem": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentText" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + } + ], + "description": "A single content item: input text, output text, input image, or input audio.", + "title": "Eval content item" + }, + "OpenAI.EvalItemContentItemObject": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObjectType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "output_text": "#/components/schemas/OpenAI.EvalItemContentOutputText", + "input_image": "#/components/schemas/OpenAI.EvalItemInputImage", + "input_audio": "#/components/schemas/OpenAI.InputAudio", + "input_text": "#/components/schemas/OpenAI.EvalItemContentItemObjectInputTextContent" + } + }, + "description": "A single content item: input text, output text, input image, or input audio.", + "title": "Eval content item" + }, + "OpenAI.EvalItemContentItemObjectInputTextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" + }, + "text": { + "type": "string", + "description": "The text input to the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + } + ], + "description": "A text input to the model.", + "title": "Input text" + }, + "OpenAI.EvalItemContentItemObjectType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "input_text", + "output_text", + "input_image", + "input_audio" + ] + } + ] + }, + "OpenAI.EvalItemContentOutputText": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "output_text" + ], + "description": "The type of the output text. Always `output_text`.", + "x-stainless-const": true + }, + "text": { + "type": "string", + "description": "The text output from the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + } + ], + "description": "A text output from the model.", + "title": "Output text" + }, + "OpenAI.EvalItemContentText": { + "type": "string", + "description": "A text input to the model.", + "title": "Text input" + }, + "OpenAI.EvalItemInputImage": { + "type": "object", + "required": [ + "type", + "image_url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_image" + ], + "description": "The type of the image input. Always `input_image`.", + "x-stainless-const": true + }, + "image_url": { + "type": "string", + "format": "uri", + "description": "The URL of the image input." + }, + "detail": { + "type": "string", + "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + } + ], + "description": "An image input block used within EvalItem content arrays.", + "title": "Input image" + }, + "OpenAI.EvalJsonlFileContentSource": { + "type": "object", + "required": [ + "type", + "content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_content" + ], + "description": "The type of jsonl source. Always `file_content`.", + "x-stainless-const": true, + "default": "file_content" + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSourceContent" + }, + "description": "The content of the jsonl file." + } + }, + "title": "EvalJsonlFileContentSource" + }, + "OpenAI.EvalJsonlFileContentSourceContent": { + "type": "object", + "required": [ + "item" + ], + "properties": { + "item": { + "type": "object", + "additionalProperties": {} + }, + "sample": { + "type": "object", + "additionalProperties": {} + } + } + }, + "OpenAI.EvalJsonlFileIdSource": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_id" + ], + "description": "The type of jsonl source. Always `file_id`.", + "x-stainless-const": true, + "default": "file_id" + }, + "id": { + "type": "string", + "description": "The identifier of the file." + } + }, + "title": "EvalJsonlFileIdSource" + }, + "OpenAI.EvalResponsesSource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "responses" + ], + "description": "The type of run data source. Always `responses`." + }, + "metadata": { + "type": "object", + "additionalProperties": {}, + "nullable": true + }, + "model": { + "type": "string", + "nullable": true + }, + "instructions_search": { + "type": "string", + "nullable": true + }, + "created_after": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "created_before": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "reasoning_effort": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" + } + ], + "nullable": true + }, + "temperature": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true + }, + "top_p": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true + }, + "users": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "tools": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "description": "A EvalResponsesSource object describing a run data source configuration.", + "title": "EvalResponsesSource", + "x-oaiMeta": { + "name": "The run data source object used to configure an individual run", + "group": "eval runs", + "example": "{\n \"type\": \"responses\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"temperature\": 0.7,\n \"top_p\": 1.0,\n \"users\": [\"user1\", \"user2\"],\n \"tools\": [\"tool1\", \"tool2\"],\n \"instructions_search\": \"You are a coding assistant\"\n}\n" + } + }, + "OpenAI.EvalRunOutputItemSample": { + "type": "object", + "required": [ + "input", + "output", + "finish_reason", + "model", + "usage", + "error", + "temperature", + "max_completion_tokens", + "top_p", + "seed" + ], + "properties": { + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunOutputItemSampleInput" + } + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunOutputItemSampleOutput" + } + }, + "finish_reason": { + "type": "string" + }, + "model": { + "type": "string" + }, + "usage": { + "$ref": "#/components/schemas/OpenAI.EvalRunOutputItemSampleUsage" + }, + "error": { + "$ref": "#/components/schemas/OpenAI.EvalApiError" + }, + "temperature": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "max_completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "top_p": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "seed": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "OpenAI.EvalRunOutputItemSampleUsage": { + "type": "object", + "required": [ + "total_tokens", + "completion_tokens", + "prompt_tokens", + "cached_tokens" + ], + "properties": { + "total_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "prompt_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "cached_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "OpenAI.EvalRunPerModelUsage": { + "type": "object", + "required": [ + "model_name", + "invocation_count", + "prompt_tokens", + "completion_tokens", + "total_tokens", + "cached_tokens" + ], + "properties": { + "model_name": { + "type": "string" + }, + "invocation_count": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "prompt_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "total_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "cached_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "OpenAI.EvalRunPerTestingCriteriaResults": { + "type": "object", + "required": [ + "testing_criteria", + "passed", + "failed" + ], + "properties": { + "testing_criteria": { + "type": "string" + }, + "passed": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "failed": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "errored": { + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "description": "Number of tests that errored for this criteria." + }, + "skipped": { + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "description": "Number of tests that were skipped for this criteria." + } + } + }, + "OpenAI.EvalRunResultCounts": { + "type": "object", + "required": [ + "total", + "errored", + "failed", + "passed" + ], + "properties": { + "total": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "errored": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "failed": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "passed": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "skipped": { + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "description": "Number of output items that were skipped during the evaluation." + } + } + }, + "OpenAI.EvalStoredCompletionsSource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "stored_completions" + ], + "description": "The type of source. Always `stored_completions`.", + "x-stainless-const": true, + "default": "stored_completions" + }, + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "model": { + "type": "string", + "nullable": true + }, + "created_after": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "created_before": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "limit": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + } + }, + "description": "A StoredCompletionsRunDataSource configuration describing a set of filters", + "title": "StoredCompletionsRunDataSource", + "x-oaiMeta": { + "name": "The stored completions data source object used to configure an individual run", + "group": "eval runs", + "example": "{\n \"type\": \"stored_completions\",\n \"model\": \"gpt-4o\",\n \"created_after\": 1668124800,\n \"created_before\": 1668124900,\n \"limit\": 100,\n \"metadata\": {}\n}\n" + } + }, + "OpenAI.FileCitationBody": { + "type": "object", + "required": [ + "type", + "file_id", + "index", + "filename" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_citation" + ], + "description": "The type of the file citation. Always `file_citation`.", + "x-stainless-const": true, + "default": "file_citation" + }, + "file_id": { + "type": "string", + "description": "The ID of the file." + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the file in the list of files." + }, + "filename": { + "type": "string", + "description": "The filename of the file cited." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Annotation" + } + ], + "description": "A citation to a file.", + "title": "File citation" + }, + "OpenAI.FilePath": { + "type": "object", + "required": [ + "type", + "file_id", + "index" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_path" + ], + "description": "The type of the file path. Always `file_path`.", + "x-stainless-const": true + }, + "file_id": { + "type": "string", + "description": "The ID of the file." + }, + "index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the file in the list of files." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Annotation" + } + ], + "description": "A path to a file.", + "title": "File path" + }, + "OpenAI.FileSearchTool": { + "type": "object", + "required": [ + "type", + "vector_store_ids" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_search" + ], + "description": "The type of the file search tool. Always `file_search`.", + "x-stainless-const": true, + "default": "file_search" + }, + "vector_store_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The IDs of the vector stores to search." + }, + "max_num_results": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The maximum number of results to return. This number should be between 1 and 50 inclusive." + }, + "ranking_options": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.RankingOptions" + } + ], + "description": "Ranking options for search." + }, + "filters": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Filters" + } + ], + "nullable": true + }, + "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." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).", + "title": "File search" + }, + "OpenAI.FileSearchToolCallResults": { + "type": "object", + "properties": { + "file_id": { + "type": "string" + }, + "text": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "attributes": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.VectorStoreFileAttributes" + } + ], + "nullable": true + }, + "score": { + "type": "number", + "format": "float" + } + } + }, + "OpenAI.Filters": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComparisonFilter" + }, + { + "$ref": "#/components/schemas/OpenAI.CompoundFilter" + } + ] + }, + "OpenAI.FineTuneDPOHyperparameters": { + "type": "object", + "properties": { + "beta": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.", + "default": "auto" + }, + "batch_size": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.", + "default": "auto" + }, + "learning_rate_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", + "default": "auto" + }, + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", + "default": "auto" + } + }, + "description": "The hyperparameters used for the DPO fine-tuning job." + }, + "OpenAI.FineTuneDPOMethod": { + "type": "object", + "properties": { + "hyperparameters": { + "$ref": "#/components/schemas/OpenAI.FineTuneDPOHyperparameters" + } + }, + "description": "Configuration for the DPO fine-tuning method." + }, + "OpenAI.FineTuneMethod": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "supervised", + "dpo", + "reinforcement" + ], + "description": "The type of method. Is either `supervised`, `dpo`, or `reinforcement`." + }, + "supervised": { + "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedMethod" + }, + "dpo": { + "$ref": "#/components/schemas/OpenAI.FineTuneDPOMethod" + }, + "reinforcement": { + "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementMethod" + } + }, + "description": "The method used for fine-tuning." + }, + "OpenAI.FineTuneReinforcementHyperparameters": { + "type": "object", + "properties": { + "batch_size": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.", + "default": "auto" + }, + "learning_rate_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", + "default": "auto" + }, + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", + "default": "auto" + }, + "reasoning_effort": { + "type": "string", + "enum": [ + "default", + "low", + "medium", + "high" + ], + "description": "Level of reasoning effort.", + "default": "default" + }, + "compute_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "Multiplier on amount of compute used for exploring search space during training.", + "default": "auto" + }, + "eval_interval": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The number of training steps between evaluation runs.", + "default": "auto" + }, + "eval_samples": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "Number of evaluation samples to generate per training step.", + "default": "auto" + } + }, + "description": "The hyperparameters used for the reinforcement fine-tuning job." + }, + "OpenAI.FineTuneReinforcementMethod": { + "type": "object", + "required": [ + "grader" + ], + "properties": { + "grader": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.GraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.GraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.GraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.GraderScoreModel" + }, + { + "$ref": "#/components/schemas/OpenAI.GraderMulti" + } + ], + "description": "The grader used for the fine-tuning job." + }, + "hyperparameters": { + "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementHyperparameters" + } + }, + "description": "Configuration for the reinforcement fine-tuning method." + }, + "OpenAI.FineTuneSupervisedHyperparameters": { + "type": "object", + "properties": { + "batch_size": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.", + "default": "auto" + }, + "learning_rate_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", + "default": "auto" + }, + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", + "default": "auto" + } + }, + "description": "The hyperparameters used for the fine-tuning job." + }, + "OpenAI.FineTuneSupervisedMethod": { + "type": "object", + "properties": { + "hyperparameters": { + "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedHyperparameters" + } + }, + "description": "Configuration for the supervised fine-tuning method." + }, + "OpenAI.FineTuningIntegration": { + "type": "object", + "required": [ + "type", + "wandb" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "wandb" + ], + "description": "The type of the integration being enabled for the fine-tuning job", + "x-stainless-const": true + }, + "wandb": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FineTuningIntegrationWandb" + } + ], + "description": "The settings for your integration with Weights and Biases. This payload specifies the project that\n metrics will be sent to. Optionally, you can set an explicit display name for your run, add tags\n to your run, and set a default entity (team, username, etc) to be associated with your run." + } + }, + "title": "Fine-Tuning Job Integration" + }, + "OpenAI.FineTuningIntegrationWandb": { + "type": "object", + "required": [ + "project" + ], + "properties": { + "project": { + "type": "string" + }, + "name": { + "type": "string", + "nullable": true + }, + "entity": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "OpenAI.FineTuningJob": { + "type": "object", + "required": [ + "id", + "created_at", + "error", + "fine_tuned_model", + "finished_at", + "hyperparameters", + "model", + "object", + "organization_id", + "result_files", + "status", + "trained_tokens", + "training_file", + "validation_file", + "seed" + ], + "properties": { + "id": { + "type": "string", + "description": "The object identifier, which can be referenced in the API endpoints." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created." + }, + "error": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FineTuningJobError" + } + ], + "nullable": true + }, + "fine_tuned_model": { + "type": "string", + "nullable": true + }, + "finished_at": { + "type": "integer", + "format": "unixtime", + "nullable": true + }, + "hyperparameters": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FineTuningJobHyperparameters" + } + ], + "description": "The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs." + }, + "model": { + "type": "string", + "description": "The base model that is being fine-tuned." + }, + "object": { + "type": "string", + "enum": [ + "fine_tuning.job" + ], + "description": "The object type, which is always \"fine_tuning.job\".", + "x-stainless-const": true + }, + "organization_id": { + "type": "string", + "description": "The organization that owns the fine-tuning job." + }, + "result_files": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents)." + }, + "status": { + "type": "string", + "enum": [ + "validating_files", + "queued", + "running", + "succeeded", + "failed", + "cancelled" + ], + "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`." + }, + "trained_tokens": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "training_file": { + "type": "string", + "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents)." + }, + "validation_file": { + "type": "string", + "nullable": true + }, + "integrations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FineTuningIntegration" + }, + "nullable": true + }, + "seed": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The seed used for the fine-tuning job." + }, + "estimated_finish": { + "type": "integer", + "format": "unixtime", + "nullable": true + }, + "method": { + "$ref": "#/components/schemas/OpenAI.FineTuneMethod" + }, + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + } + }, + "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", + "title": "FineTuningJob", + "x-oaiMeta": { + "name": "The fine-tuning job object", + "example": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"davinci-002\",\n \"created_at\": 1692661014,\n \"finished_at\": 1692661190,\n \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n \"organization_id\": \"org-123\",\n \"result_files\": [\n \"file-abc123\"\n ],\n \"status\": \"succeeded\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"hyperparameters\": {\n \"n_epochs\": 4,\n \"batch_size\": 1,\n \"learning_rate_multiplier\": 1.0\n },\n \"trained_tokens\": 5768,\n \"integrations\": [],\n \"seed\": 0,\n \"estimated_finish\": 0,\n \"method\": {\n \"type\": \"supervised\",\n \"supervised\": {\n \"hyperparameters\": {\n \"n_epochs\": 4,\n \"batch_size\": 1,\n \"learning_rate_multiplier\": 1.0\n }\n }\n },\n \"metadata\": {\n \"key\": \"value\"\n }\n}\n" + } + }, + "OpenAI.FineTuningJobCheckpoint": { + "type": "object", + "required": [ + "id", + "created_at", + "fine_tuned_model_checkpoint", + "step_number", + "metrics", + "fine_tuning_job_id", + "object" + ], + "properties": { + "id": { + "type": "string", + "description": "The checkpoint identifier, which can be referenced in the API endpoints." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) for when the checkpoint was created." + }, + "fine_tuned_model_checkpoint": { + "type": "string", + "description": "The name of the fine-tuned checkpoint model that is created." + }, + "step_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The step number that the checkpoint was created at." + }, + "metrics": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpointMetrics" + } + ], + "description": "Metrics at the step number during the fine-tuning job." + }, + "fine_tuning_job_id": { + "type": "string", + "description": "The name of the fine-tuning job that this checkpoint was created from." + }, + "object": { + "type": "string", + "enum": [ + "fine_tuning.job.checkpoint" + ], + "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", + "x-stainless-const": true + } + }, + "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", + "title": "FineTuningJobCheckpoint", + "x-oaiMeta": { + "name": "The fine-tuning job checkpoint object", + "example": "{\n \"object\": \"fine_tuning.job.checkpoint\",\n \"id\": \"ftckpt_qtZ5Gyk4BLq1SfLFWp3RtO3P\",\n \"created_at\": 1712211699,\n \"fine_tuned_model_checkpoint\": \"ft:gpt-4o-mini-2024-07-18:my-org:custom_suffix:9ABel2dg:ckpt-step-88\",\n \"fine_tuning_job_id\": \"ftjob-fpbNQ3H1GrMehXRf8cO97xTN\",\n \"metrics\": {\n \"step\": 88,\n \"train_loss\": 0.478,\n \"train_mean_token_accuracy\": 0.924,\n \"valid_loss\": 10.112,\n \"valid_mean_token_accuracy\": 0.145,\n \"full_valid_loss\": 0.567,\n \"full_valid_mean_token_accuracy\": 0.944\n },\n \"step_number\": 88\n}\n" + } + }, + "OpenAI.FineTuningJobCheckpointMetrics": { + "type": "object", + "properties": { + "step": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "train_loss": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "train_mean_token_accuracy": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "valid_loss": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "valid_mean_token_accuracy": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "full_valid_loss": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "full_valid_mean_token_accuracy": { + "$ref": "#/components/schemas/OpenAI.numeric" + } + } + }, + "OpenAI.FineTuningJobError": { + "type": "object", + "required": [ + "code", + "message", + "param" + ], + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "param": { + "type": "string", + "nullable": true + } + } + }, + "OpenAI.FineTuningJobEvent": { + "type": "object", + "required": [ + "object", + "id", + "created_at", + "level", + "message" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "fine_tuning.job.event" + ], + "description": "The object type, which is always \"fine_tuning.job.event\".", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The object identifier." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created." + }, + "level": { + "type": "string", + "enum": [ + "info", + "warn", + "error" + ], + "description": "The log level of the event." + }, + "message": { + "type": "string", + "description": "The message of the event." + }, + "type": { + "type": "string", + "enum": [ + "message", + "metrics" + ], + "description": "The type of event." + }, + "data": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FineTuningJobEventData" + } + ], + "description": "The data associated with the event." + } + }, + "description": "Fine-tuning job event object", + "x-oaiMeta": { + "name": "The fine-tuning job event object", + "example": "{\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ftevent-abc123\"\n \"created_at\": 1677610602,\n \"level\": \"info\",\n \"message\": \"Created fine-tuning job\",\n \"data\": {},\n \"type\": \"message\"\n}\n" + } + }, + "OpenAI.FineTuningJobEventData": { + "type": "object" + }, + "OpenAI.FineTuningJobHyperparameters": { + "type": "object", + "properties": { + "batch_size": { + "anyOf": [ + { + "type": "string", + "enum": [ + "auto" + ], + "nullable": true + }, + { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + } + ], + "default": "auto" + }, + "learning_rate_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "default": "auto" + }, + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "default": "auto" + } + } + }, + "OpenAI.FunctionAndCustomToolCallOutput": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "input_text": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputTextContent", + "input_image": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputImageContent", + "input_file": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputFileContent" + } + } + }, + "OpenAI.FunctionAndCustomToolCallOutputInputFileContent": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_file" + ], + "description": "The type of the input item. Always `input_file`.", + "x-stainless-const": true, + "default": "input_file" + }, + "file_id": { + "type": "string", + "nullable": true + }, + "filename": { + "type": "string", + "description": "The name of the file to be sent to the model." + }, + "file_url": { + "type": "string", + "format": "uri", + "description": "The URL of the file to be sent to the model." + }, + "file_data": { + "type": "string", + "description": "The content of the file to be sent to the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + ], + "description": "A file input to the model.", + "title": "Input file" + }, + "OpenAI.FunctionAndCustomToolCallOutputInputImageContent": { + "type": "object", + "required": [ + "type", + "detail" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_image" + ], + "description": "The type of the input item. Always `input_image`.", + "x-stainless-const": true, + "default": "input_image" + }, + "image_url": { + "type": "string", + "format": "uri", + "nullable": true + }, + "file_id": { + "type": "string", + "nullable": true + }, + "detail": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ImageDetail" + } + ], + "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + ], + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" + }, + "OpenAI.FunctionAndCustomToolCallOutputInputTextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" + }, + "text": { + "type": "string", + "description": "The text input to the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + ], + "description": "A text input to the model.", + "title": "Input text" + }, + "OpenAI.FunctionAndCustomToolCallOutputType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "input_text", + "input_image", + "input_file" + ] + } + ] + }, + "OpenAI.FunctionCallItemStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.FunctionObject": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "description": { + "type": "string", + "description": "A description of what the function does, used by the model to choose when and how to call the function." + }, + "name": { + "type": "string", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64." + }, + "parameters": { + "$ref": "#/components/schemas/OpenAI.FunctionParameters" + }, + "strict": { + "type": "boolean", + "nullable": true + } + } + }, + "OpenAI.FunctionParameters": { + "type": "object", + "additionalProperties": {}, + "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\nOmitting `parameters` defines a function with an empty parameter list." + }, + "OpenAI.FunctionShellAction": { + "type": "object", + "required": [ + "commands", + "timeout_ms", + "max_output_length" + ], + "properties": { + "commands": { + "type": "array", + "items": { + "type": "string" + } + }, + "timeout_ms": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + } + }, + "description": "Execute a shell command.", + "title": "Shell exec action" + }, + "OpenAI.FunctionShellActionParam": { + "type": "object", + "required": [ + "commands" + ], + "properties": { + "commands": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Ordered shell commands for the execution environment to run." + }, + "timeout_ms": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + } + }, + "description": "Commands and limits describing how to run the shell tool call.", + "title": "Shell action" + }, + "OpenAI.FunctionShellCallEnvironment": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironmentType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "local": "#/components/schemas/OpenAI.LocalEnvironmentResource", + "container_reference": "#/components/schemas/OpenAI.ContainerReferenceResource" + } + } + }, + "OpenAI.FunctionShellCallEnvironmentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "local", + "container_reference" + ] + } + ] + }, + "OpenAI.FunctionShellCallItemParamEnvironment": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "local": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam", + "container_reference": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam" + } + }, + "description": "The environment to execute the shell commands in." + }, + "OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam": { + "type": "object", + "required": [ + "type", + "container_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "container_reference" + ], + "description": "References a container created with the /v1/containers endpoint", + "x-stainless-const": true, + "default": "container_reference" + }, + "container_id": { + "type": "string", + "description": "The ID of the referenced container." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + } + ] + }, + "OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local" + ], + "description": "Use a local computer environment.", + "x-stainless-const": true, + "default": "local" + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LocalSkillParam" + }, + "maxItems": 200, + "description": "An optional list of skills." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + } + ] + }, + "OpenAI.FunctionShellCallItemParamEnvironmentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "local", + "container_reference" + ] + } + ] + }, + "OpenAI.FunctionShellCallItemStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "Status values reported for shell tool calls.", + "title": "Shell call status" + }, + "OpenAI.FunctionShellCallOutputContent": { + "type": "object", + "required": [ + "stdout", + "stderr", + "outcome" + ], + "properties": { + "stdout": { + "type": "string", + "description": "The standard output that was captured." + }, + "stderr": { + "type": "string", + "description": "The standard error output that was captured." + }, + "outcome": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" + } + ], + "description": "Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.", + "title": "Shell call outcome" + }, + "created_by": { + "type": "string", + "description": "The identifier of the actor that created the item." + } + }, + "description": "The content of a shell tool call output that was emitted.", + "title": "Shell call output content" + }, + "OpenAI.FunctionShellCallOutputContentParam": { + "type": "object", + "required": [ + "stdout", + "stderr", + "outcome" + ], + "properties": { + "stdout": { + "type": "string", + "maxLength": 10485760, + "description": "Captured stdout output for the shell call." + }, + "stderr": { + "type": "string", + "maxLength": 10485760, + "description": "Captured stderr output for the shell call." + }, + "outcome": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" + } + ], + "description": "The exit or timeout outcome associated with this shell call." + } + }, + "description": "Captured stdout and stderr for a portion of a shell tool call output.", + "title": "Shell output content" + }, + "OpenAI.FunctionShellCallOutputExitOutcome": { + "type": "object", + "required": [ + "type", + "exit_code" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "exit" + ], + "description": "The outcome type. Always `exit`.", + "x-stainless-const": true, + "default": "exit" + }, + "exit_code": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "Exit code from the shell process." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" + } + ], + "description": "Indicates that the shell commands finished and returned an exit code.", + "title": "Shell call exit outcome" + }, + "OpenAI.FunctionShellCallOutputExitOutcomeParam": { + "type": "object", + "required": [ + "type", + "exit_code" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "exit" + ], + "description": "The outcome type. Always `exit`.", + "x-stainless-const": true, + "default": "exit" + }, + "exit_code": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The exit code returned by the shell process." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" + } + ], + "description": "Indicates that the shell commands finished and returned an exit code.", + "title": "Shell call exit outcome" + }, + "OpenAI.FunctionShellCallOutputOutcome": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "timeout": "#/components/schemas/OpenAI.FunctionShellCallOutputTimeoutOutcome", + "exit": "#/components/schemas/OpenAI.FunctionShellCallOutputExitOutcome" + } + }, + "description": "Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.", + "title": "Shell call outcome" + }, + "OpenAI.FunctionShellCallOutputOutcomeParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParamType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "timeout": "#/components/schemas/OpenAI.FunctionShellCallOutputTimeoutOutcomeParam", + "exit": "#/components/schemas/OpenAI.FunctionShellCallOutputExitOutcomeParam" + } + }, + "description": "The exit or timeout outcome associated with this shell call.", + "title": "Shell call outcome" + }, + "OpenAI.FunctionShellCallOutputOutcomeParamType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "timeout", + "exit" + ] + } + ] + }, + "OpenAI.FunctionShellCallOutputOutcomeType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "timeout", + "exit" + ] + } + ] + }, + "OpenAI.FunctionShellCallOutputTimeoutOutcome": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "timeout" + ], + "description": "The outcome type. Always `timeout`.", + "x-stainless-const": true, + "default": "timeout" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" + } + ], + "description": "Indicates that the shell call exceeded its configured time limit.", + "title": "Shell call timeout outcome" + }, + "OpenAI.FunctionShellCallOutputTimeoutOutcomeParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "timeout" + ], + "description": "The outcome type. Always `timeout`.", + "x-stainless-const": true, + "default": "timeout" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" + } + ], + "description": "Indicates that the shell call exceeded its configured time limit.", + "title": "Shell call timeout outcome" + }, + "OpenAI.FunctionShellToolParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell" + ], + "description": "The type of the shell tool. Always `shell`.", + "x-stainless-const": true, + "default": "shell" + }, + "environment": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" + } + ], + "nullable": true + }, + "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." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool that allows the model to execute shell commands.", + "title": "Shell tool" + }, + "OpenAI.FunctionShellToolParamEnvironment": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "local": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam", + "container_reference": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam", + "container_auto": "#/components/schemas/OpenAI.ContainerAutoParam" + } + } + }, + "OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam": { + "type": "object", + "required": [ + "type", + "container_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "container_reference" + ], + "description": "References a container created with the /v1/containers endpoint", + "x-stainless-const": true, + "default": "container_reference" + }, + "container_id": { + "type": "string", + "description": "The ID of the referenced container." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" + } + ] + }, + "OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local" + ], + "description": "Use a local computer environment.", + "x-stainless-const": true, + "default": "local" + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LocalSkillParam" + }, + "maxItems": 200, + "description": "An optional list of skills." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" + } + ] + }, + "OpenAI.FunctionShellToolParamEnvironmentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "container_auto", + "local", + "container_reference" + ] + } + ] + }, + "OpenAI.FunctionTool": { + "type": "object", + "required": [ + "type", + "name", + "parameters", + "strict" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the function tool. Always `function`.", + "x-stainless-const": true, + "default": "function" + }, + "name": { + "type": "string", + "description": "The name of the function to call." + }, + "description": { + "type": "string", + "nullable": true + }, + "parameters": { + "type": "object", + "additionalProperties": {}, + "nullable": true + }, + "strict": { + "type": "boolean", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling).", + "title": "Function" + }, + "OpenAI.FunctionToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call output. Populated when this item\n is returned via API." + }, + "type": { + "type": "string", + "enum": [ + "function_call_output" + ], + "description": "The type of the function tool call output. Always `function_call_output`.", + "x-stainless-const": true + }, + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "output": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + } + ], + "description": "The output from the function call generated by your code.\n Can be a string or an list of output content." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "The output of a function tool call.", + "title": "Function tool call output" + }, + "OpenAI.GraderLabelModel": { + "type": "object", + "required": [ + "type", + "name", + "model", + "input", + "labels", + "passing_labels" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "label_model" + ], + "description": "The object type, which is always `label_model`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "model": { + "type": "string", + "description": "The model to use for the evaluation. Must support structured outputs." + }, + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalItem" + } + }, + "labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The labels to assign to each item in the evaluation." + }, + "passing_labels": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The labels that indicate a passing result. Must be a subset of labels." + } + }, + "description": "A LabelModelGrader object which uses a model to assign labels to each item\nin the evaluation.", + "title": "LabelModelGrader", + "x-oaiMeta": { + "name": "Label Model Grader", + "group": "graders", + "example": "{\n \"name\": \"First label grader\",\n \"type\": \"label_model\",\n \"model\": \"gpt-4o-2024-08-06\",\n \"input\": [\n {\n \"type\": \"message\",\n \"role\": \"system\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Classify the sentiment of the following statement as one of positive, neutral, or negative\"\n }\n },\n {\n \"type\": \"message\",\n \"role\": \"user\",\n \"content\": {\n \"type\": \"input_text\",\n \"text\": \"Statement: {{item.response}}\"\n }\n }\n ],\n \"passing_labels\": [\n \"positive\"\n ],\n \"labels\": [\n \"positive\",\n \"neutral\",\n \"negative\"\n ]\n}\n" + } + }, + "OpenAI.GraderMulti": { + "type": "object", + "required": [ + "type", + "name", + "graders", + "calculate_output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "multi" + ], + "description": "The object type, which is always `multi`.", + "x-stainless-const": true, + "default": "multi" + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "graders": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.GraderStringCheck" + }, + { + "$ref": "#/components/schemas/OpenAI.GraderTextSimilarity" + }, + { + "$ref": "#/components/schemas/OpenAI.GraderPython" + }, + { + "$ref": "#/components/schemas/OpenAI.GraderScoreModel" + }, + { + "$ref": "#/components/schemas/OpenAI.GraderLabelModel" + } + ] + }, + "calculate_output": { + "type": "string", + "description": "A formula to calculate the output based on grader results." + } + }, + "description": "A MultiGrader object combines the output of multiple graders to produce a single score.", + "title": "MultiGrader", + "x-oaiMeta": { + "name": "Multi Grader", + "group": "graders", + "example": "{\n \"type\": \"multi\",\n \"name\": \"example multi grader\",\n \"graders\": [\n {\n \"type\": \"text_similarity\",\n \"name\": \"example text similarity grader\",\n \"input\": \"The graded text\",\n \"reference\": \"The reference text\",\n \"evaluation_metric\": \"fuzzy_match\"\n },\n {\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n }\n ],\n \"calculate_output\": \"0.5 * text_similarity_score + 0.5 * string_check_score)\"\n}\n" + } + }, + "OpenAI.GraderPython": { + "type": "object", + "required": [ + "type", + "name", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "python" + ], + "description": "The object type, which is always `python`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "source": { + "type": "string", + "description": "The source code of the python script." + }, + "image_tag": { + "type": "string", + "description": "The image tag to use for the python script." + } + }, + "description": "A PythonGrader object that runs a python script on the input.", + "title": "PythonGrader", + "x-oaiMeta": { + "name": "Python Grader", + "group": "graders", + "example": "{\n \"type\": \"python\",\n \"name\": \"Example python grader\",\n \"image_tag\": \"2025-05-08\",\n \"source\": \"\"\"\ndef grade(sample: dict, item: dict) -> float:\n \"\"\"\n Returns 1.0 if `output_text` equals `label`, otherwise 0.0.\n \"\"\"\n output = sample.get(\"output_text\")\n label = item.get(\"label\")\n return 1.0 if output == label else 0.0\n\"\"\",\n}\n" + } + }, + "OpenAI.GraderScoreModel": { + "type": "object", + "required": [ + "type", + "name", + "model", + "input" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "score_model" + ], + "description": "The object type, which is always `score_model`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "model": { + "type": "string", + "description": "The model to use for the evaluation." + }, + "sampling_params": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModelSamplingParams" + } + ], + "description": "The sampling parameters for the model." + }, + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalItem" + }, + "description": "The input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings." + }, + "range": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "description": "The range of the score. Defaults to `[0, 1]`." + } + }, + "description": "A ScoreModelGrader object that uses a model to assign a score to the input.", + "title": "ScoreModelGrader", + "x-oaiMeta": { + "name": "Score Model Grader", + "group": "graders", + "example": "{\n \"type\": \"score_model\",\n \"name\": \"Example score model grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"input_text\",\n \"text\": (\n \"Score how close the reference answer is to the model answer. Score 1.0 if they are the same and 0.0 if they are different.\"\n \" Return just a floating point score\n\n\"\n \" Reference answer: {{item.label}}\n\n\"\n \" Model answer: {{sample.output_text}}\"\n )\n },\n {\n \"type\": \"input_image\",\n \"image_url\": \"https://example.com/reference.png\",\n \"file_id\": null,\n \"detail\": \"auto\"\n }\n ],\n }\n ],\n \"model\": \"gpt-5-mini\",\n \"sampling_params\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"seed\": 42,\n \"max_completions_tokens\": 32768,\n \"reasoning_effort\": \"medium\"\n },\n}\n" + } + }, + "OpenAI.GraderStringCheck": { + "type": "object", + "required": [ + "type", + "name", + "input", + "reference", + "operation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "string_check" + ], + "description": "The object type, which is always `string_check`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "input": { + "type": "string", + "description": "The input text. This may include template strings." + }, + "reference": { + "type": "string", + "description": "The reference text. This may include template strings." + }, + "operation": { + "type": "string", + "enum": [ + "eq", + "ne", + "like", + "ilike" + ], + "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." + } + }, + "description": "A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.", + "title": "StringCheckGrader", + "x-oaiMeta": { + "name": "String Check Grader", + "group": "graders", + "example": "{\n \"type\": \"string_check\",\n \"name\": \"Example string check grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"operation\": \"eq\"\n}\n" + } + }, + "OpenAI.GraderTextSimilarity": { + "type": "object", + "required": [ + "type", + "name", + "input", + "reference", + "evaluation_metric" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text_similarity" + ], + "description": "The type of grader.", + "x-stainless-const": true, + "default": "text_similarity" + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "input": { + "type": "string", + "description": "The text being graded." + }, + "reference": { + "type": "string", + "description": "The text being graded against." + }, + "evaluation_metric": { + "type": "string", + "enum": [ + "cosine", + "fuzzy_match", + "bleu", + "gleu", + "meteor", + "rouge_1", + "rouge_2", + "rouge_3", + "rouge_4", + "rouge_5", + "rouge_l" + ], + "description": "The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`,\n `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`,\n or `rouge_l`." + } + }, + "description": "A TextSimilarityGrader object which grades text based on similarity metrics.", + "title": "TextSimilarityGrader", + "x-oaiMeta": { + "name": "Text Similarity Grader", + "group": "graders", + "example": "{\n \"type\": \"text_similarity\",\n \"name\": \"Example text similarity grader\",\n \"input\": \"{{sample.output_text}}\",\n \"reference\": \"{{item.label}}\",\n \"evaluation_metric\": \"fuzzy_match\"\n}\n" + } + }, + "OpenAI.GrammarSyntax1": { + "type": "string", + "enum": [ + "lark", + "regex" + ] + }, + "OpenAI.HybridSearchOptions": { + "type": "object", + "required": [ + "embedding_weight", + "text_weight" + ], + "properties": { + "embedding_weight": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The weight of the embedding in the reciprocal ranking fusion." + }, + "text_weight": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The weight of the text in the reciprocal ranking fusion." + } + } + }, + "OpenAI.ImageDetail": { + "type": "string", + "enum": [ + "low", + "high", + "auto" + ] + }, + "OpenAI.ImageGenActionEnum": { + "type": "string", + "enum": [ + "generate", + "edit", + "auto" + ] + }, + "OpenAI.ImageGenTool": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation" + ], + "description": "The type of the image generation tool. Always `image_generation`.", + "x-stainless-const": true, + "default": "image_generation" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "gpt-image-1", + "gpt-image-1-mini", + "gpt-image-1.5" + ] + } + ], + "default": "gpt-image-1" + }, + "quality": { + "type": "string", + "enum": [ + "low", + "medium", + "high", + "auto" + ], + "description": "The quality of the generated image. One of `low`, `medium`, `high`,\n or `auto`. Default: `auto`.", + "default": "auto" + }, + "size": { + "type": "string", + "enum": [ + "1024x1024", + "1024x1536", + "1536x1024", + "auto" + ], + "description": "The size of the generated image. One of `1024x1024`, `1024x1536`,\n `1536x1024`, or `auto`. Default: `auto`.", + "default": "auto" + }, + "output_format": { + "type": "string", + "enum": [ + "png", + "webp", + "jpeg" + ], + "description": "The output format of the generated image. One of `png`, `webp`, or\n `jpeg`. Default: `png`.", + "default": "png" + }, + "output_compression": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "minimum": 0, + "maximum": 100, + "description": "Compression level for the output image. Default: 100.", + "default": 100 + }, + "moderation": { + "type": "string", + "enum": [ + "auto", + "low" + ], + "description": "Moderation level for the generated image. Default: `auto`.", + "default": "auto" + }, + "background": { + "type": "string", + "enum": [ + "transparent", + "opaque", + "auto" + ], + "description": "Background type for the generated image. One of `transparent`,\n `opaque`, or `auto`. Default: `auto`.", + "default": "auto" + }, + "input_fidelity": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputFidelity" + } + ], + "nullable": true + }, + "input_image_mask": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ImageGenToolInputImageMask" + } + ], + "description": "Optional mask for inpainting. Contains `image_url`\n (string, optional) and `file_id` (string, optional)." + }, + "partial_images": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "minimum": 0, + "maximum": 3, + "description": "Number of partial images to generate in streaming mode, from 0 (default value) to 3." + }, + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ImageGenActionEnum" + } + ], + "description": "Whether to generate a new image or edit an existing image. Default: `auto`." + }, + "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." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool that generates images using the GPT image models.", + "title": "Image generation tool" + }, + "OpenAI.ImageGenToolInputImageMask": { + "type": "object", + "properties": { + "image_url": { + "type": "string", + "format": "uri" + }, + "file_id": { + "type": "string" + } + } + }, + "OpenAI.IncludeEnum": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "file_search_call.results", + "web_search_call.results", + "web_search_call.action.sources", + "message.input_image.image_url", + "computer_call_output.output.image_url", + "code_interpreter_call.outputs", + "reasoning.encrypted_content", + "message.output_text.logprobs", + "memory_search_call.results" + ] + } + ], + "description": "Specify additional output data to include in the model response. Currently supported values are:\n- `web_search_call.action.sources`: Include the sources of the web search tool call.\n- `code_interpreter_call.outputs`: Includes the outputs of python code execution in code interpreter tool call items.\n- `computer_call_output.output.image_url`: Include image urls from the computer call output.\n- `file_search_call.results`: Include the search results of the file search tool call.\n- `message.input_image.image_url`: Include image urls from the input message.\n- `message.output_text.logprobs`: Include logprobs with assistant messages.\n- `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the `store` parameter is set to `false`, or when an organization is enrolled in the zero data retention program)." + }, + "OpenAI.InlineSkillParam": { + "type": "object", + "required": [ + "type", + "name", + "description", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "inline" + ], + "description": "Defines an inline skill for this request.", + "x-stainless-const": true, + "default": "inline" + }, + "name": { + "type": "string", + "description": "The name of the skill." + }, + "description": { + "type": "string", + "description": "The description of the skill." + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InlineSkillSourceParam" + } + ], + "description": "Inline skill payload" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ContainerSkill" + } + ] + }, + "OpenAI.InlineSkillSourceParam": { + "type": "object", + "required": [ + "type", + "media_type", + "data" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "base64" + ], + "description": "The type of the inline skill source. Must be `base64`.", + "x-stainless-const": true, + "default": "base64" + }, + "media_type": { + "type": "string", + "enum": [ + "application/zip" + ], + "description": "The media type of the inline skill payload. Must be `application/zip`.", + "x-stainless-const": true, + "default": "application/zip" + }, + "data": { + "type": "string", + "minLength": 1, + "maxLength": 70254592, + "description": "Base64-encoded skill zip bundle." + } + }, + "description": "Inline skill payload" + }, + "OpenAI.InputAudio": { + "type": "object", + "required": [ + "type", + "input_audio" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_audio" + ], + "description": "The type of the input item. Always `input_audio`.", + "x-stainless-const": true + }, + "input_audio": { + "$ref": "#/components/schemas/OpenAI.InputAudioInputAudio" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + } + ], + "description": "An audio input to the model.", + "title": "Input audio" + }, + "OpenAI.InputAudioInputAudio": { + "type": "object", + "required": [ + "data", + "format" + ], + "properties": { + "data": { + "type": "string" + }, + "format": { + "type": "string", + "enum": [ + "mp3", + "wav" + ] + } + } + }, + "OpenAI.InputContent": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.InputContentType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "input_text": "#/components/schemas/OpenAI.InputContentInputTextContent", + "input_image": "#/components/schemas/OpenAI.InputContentInputImageContent", + "input_file": "#/components/schemas/OpenAI.InputContentInputFileContent" + } + } + }, + "OpenAI.InputContentInputFileContent": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_file" + ], + "description": "The type of the input item. Always `input_file`.", + "x-stainless-const": true, + "default": "input_file" + }, + "file_id": { + "type": "string", + "nullable": true + }, + "filename": { + "type": "string", + "description": "The name of the file to be sent to the model." + }, + "file_url": { + "type": "string", + "format": "uri", + "description": "The URL of the file to be sent to the model." + }, + "file_data": { + "type": "string", + "description": "The content of the file to be sent to the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputContent" + } + ], + "description": "A file input to the model.", + "title": "Input file" + }, + "OpenAI.InputContentInputImageContent": { + "type": "object", + "required": [ + "type", + "detail" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_image" + ], + "description": "The type of the input item. Always `input_image`.", + "x-stainless-const": true, + "default": "input_image" + }, + "image_url": { + "type": "string", + "format": "uri", + "nullable": true + }, + "file_id": { + "type": "string", + "nullable": true + }, + "detail": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ImageDetail" + } + ], + "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputContent" + } + ], + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" + }, + "OpenAI.InputContentInputTextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" + }, + "text": { + "type": "string", + "description": "The text input to the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputContent" + } + ], + "description": "A text input to the model.", + "title": "Input text" + }, + "OpenAI.InputContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "input_text", + "input_image", + "input_file" + ] + } + ] + }, + "OpenAI.InputFidelity": { + "type": "string", + "enum": [ + "high", + "low" + ], + "description": "Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`." + }, + "OpenAI.InputFileContent": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_file" + ], + "description": "The type of the input item. Always `input_file`.", + "x-stainless-const": true, + "default": "input_file" + }, + "file_id": { + "type": "string", + "nullable": true + }, + "filename": { + "type": "string", + "description": "The name of the file to be sent to the model." + }, + "file_url": { + "type": "string", + "format": "uri", + "description": "The URL of the file to be sent to the model." + }, + "file_data": { + "type": "string", + "description": "The content of the file to be sent to the model." + } + }, + "description": "A file input to the model.", + "title": "Input file" + }, + "OpenAI.InputFileContentParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_file" + ], + "description": "The type of the input item. Always `input_file`.", + "x-stainless-const": true, + "default": "input_file" + }, + "file_id": { + "type": "string", + "nullable": true + }, + "filename": { + "type": "string", + "nullable": true + }, + "file_data": { + "type": "string", + "nullable": true + }, + "file_url": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "description": "A file input to the model.", + "title": "Input file" + }, + "OpenAI.InputImageContent": { + "type": "object", + "required": [ + "type", + "detail" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_image" + ], + "description": "The type of the input item. Always `input_image`.", + "x-stainless-const": true, + "default": "input_image" + }, + "image_url": { + "type": "string", + "format": "uri", + "nullable": true + }, + "file_id": { + "type": "string", + "nullable": true + }, + "detail": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ImageDetail" + } + ], + "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + } + }, + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" + }, + "OpenAI.InputImageContentParamAutoParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_image" + ], + "description": "The type of the input item. Always `input_image`.", + "x-stainless-const": true, + "default": "input_image" + }, + "image_url": { + "type": "string", + "format": "uri", + "nullable": true + }, + "file_id": { + "type": "string", + "nullable": true + }, + "detail": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.DetailEnum" + } + ], + "nullable": true + } + }, + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision)", + "title": "Input image" + }, + "OpenAI.InputItem": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.InputItemType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "message": "#/components/schemas/OpenAI.EasyInputMessage", + "item_reference": "#/components/schemas/OpenAI.ItemReferenceParam", + "output_message": "#/components/schemas/OpenAI.InputItemOutputMessage", + "file_search_call": "#/components/schemas/OpenAI.InputItemFileSearchToolCall", + "computer_call": "#/components/schemas/OpenAI.InputItemComputerToolCall", + "computer_call_output": "#/components/schemas/OpenAI.InputItemComputerCallOutputItemParam", + "web_search_call": "#/components/schemas/OpenAI.InputItemWebSearchToolCall", + "function_call": "#/components/schemas/OpenAI.InputItemFunctionToolCall", + "function_call_output": "#/components/schemas/OpenAI.InputItemFunctionCallOutputItemParam", + "reasoning": "#/components/schemas/OpenAI.InputItemReasoningItem", + "compaction": "#/components/schemas/OpenAI.InputItemCompactionSummaryItemParam", + "image_generation_call": "#/components/schemas/OpenAI.InputItemImageGenToolCall", + "code_interpreter_call": "#/components/schemas/OpenAI.InputItemCodeInterpreterToolCall", + "local_shell_call": "#/components/schemas/OpenAI.InputItemLocalShellToolCall", + "local_shell_call_output": "#/components/schemas/OpenAI.InputItemLocalShellToolCallOutput", + "shell_call": "#/components/schemas/OpenAI.InputItemFunctionShellCallItemParam", + "shell_call_output": "#/components/schemas/OpenAI.InputItemFunctionShellCallOutputItemParam", + "apply_patch_call": "#/components/schemas/OpenAI.InputItemApplyPatchToolCallItemParam", + "apply_patch_call_output": "#/components/schemas/OpenAI.InputItemApplyPatchToolCallOutputItemParam", + "mcp_list_tools": "#/components/schemas/OpenAI.InputItemMcpListTools", + "mcp_approval_request": "#/components/schemas/OpenAI.InputItemMcpApprovalRequest", + "mcp_approval_response": "#/components/schemas/OpenAI.InputItemMcpApprovalResponse", + "mcp_call": "#/components/schemas/OpenAI.InputItemMcpToolCall", + "custom_tool_call_output": "#/components/schemas/OpenAI.InputItemCustomToolCallOutput", + "custom_tool_call": "#/components/schemas/OpenAI.InputItemCustomToolCall" + } + }, + "description": "An item representing part of the context for the response to be\ngenerated by the model. Can contain text, images, and audio inputs,\nas well as previous assistant responses and tool call outputs." + }, + "OpenAI.InputItemApplyPatchToolCallItemParam": { + "type": "object", + "required": [ + "type", + "call_id", + "status", + "operation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call" + ], + "description": "The type of the item. Always `apply_patch_call`.", + "x-stainless-const": true, + "default": "apply_patch_call" + }, + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatusParam" + } + ], + "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + }, + "operation": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + } + ], + "description": "The specific create, delete, or update instruction for the apply_patch tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A tool call representing a request to create, delete, or update files using diff patches.", + "title": "Apply patch tool call" + }, + "OpenAI.InputItemApplyPatchToolCallOutputItemParam": { + "type": "object", + "required": [ + "type", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call_output" + ], + "description": "The type of the item. Always `apply_patch_call_output`.", + "x-stainless-const": true, + "default": "apply_patch_call_output" + }, + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatusParam" + } + ], + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." + }, + "output": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The streamed output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" + }, + "OpenAI.InputItemCodeInterpreterToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "container_id", + "code", + "outputs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_interpreter_call" + ], + "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", + "x-stainless-const": true, + "default": "code_interpreter_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the code interpreter tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "interpreting", + "failed" + ], + "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." + }, + "container_id": { + "type": "string", + "description": "The ID of the container used to run the code." + }, + "code": { + "type": "string", + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" + }, + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" + } + ] + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A tool call to run code.", + "title": "Code interpreter tool call" + }, + "OpenAI.InputItemCompactionSummaryItemParam": { + "type": "object", + "required": [ + "type", + "encrypted_content" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "compaction" + ], + "description": "The type of the item. Always `compaction`.", + "x-stainless-const": true, + "default": "compaction" + }, + "encrypted_content": { + "type": "string", + "maxLength": 10485760, + "description": "The encrypted content of the compaction summary." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" + }, + "OpenAI.InputItemComputerCallOutputItemParam": { + "type": "object", + "required": [ + "call_id", + "type", + "output" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The ID of the computer tool call that produced the output." + }, + "type": { + "type": "string", + "enum": [ + "computer_call_output" + ], + "description": "The type of the computer tool call output. Always `computer_call_output`.", + "x-stainless-const": true, + "default": "computer_call_output" + }, + "output": { + "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + }, + "acknowledged_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "nullable": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" + } + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The output of a computer tool call.", + "title": "Computer tool call output" + }, + "OpenAI.InputItemComputerToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_call" + ], + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the computer call." + }, + "call_id": { + "type": "string", + "description": "An identifier used when responding to the tool call with output." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + }, + "pending_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The pending safety checks for the computer call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", + "title": "Computer tool call" + }, + "OpenAI.InputItemCustomToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "input" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_tool_call" + ], + "description": "The type of the custom tool call. Always `custom_tool_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the custom tool call in the OpenAI platform." + }, + "call_id": { + "type": "string", + "description": "An identifier used to map this custom tool call to a tool call output." + }, + "name": { + "type": "string", + "description": "The name of the custom tool being called." + }, + "input": { + "type": "string", + "description": "The input for the custom tool call generated by the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" + }, + "OpenAI.InputItemCustomToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_tool_call_output" + ], + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the custom tool call output in the OpenAI platform." + }, + "call_id": { + "type": "string", + "description": "The call ID, used to map this custom tool call output to a custom tool call." + }, + "output": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + } + ], + "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The output of a custom tool call from your code, being sent back to the model.", + "title": "Custom tool call output" + }, + "OpenAI.InputItemFileSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "queries" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, + "type": { + "type": "string", + "enum": [ + "file_search_call" + ], + "description": "The type of the file search tool call. Always `file_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "incomplete", + "failed" + ], + "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," + }, + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The queries used to search for files." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", + "title": "File search tool call" + }, + "OpenAI.InputItemFunctionCallOutputItemParam": { + "type": "object", + "required": [ + "call_id", + "type", + "output" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the function tool call generated by the model." + }, + "type": { + "type": "string", + "enum": [ + "function_call_output" + ], + "description": "The type of the function tool call output. Always `function_call_output`.", + "x-stainless-const": true, + "default": "function_call_output" + }, + "output": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputTextContentParam" + }, + { + "$ref": "#/components/schemas/OpenAI.InputImageContentParamAutoParam" + }, + { + "$ref": "#/components/schemas/OpenAI.InputFileContentParam" + } + ] + } + } + ], + "description": "Text, image, or file output of the function tool call." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" + } + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The output of a function tool call.", + "title": "Function tool call output" + }, + "OpenAI.InputItemFunctionShellCallItemParam": { + "type": "object", + "required": [ + "call_id", + "type", + "action" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the shell tool call generated by the model." + }, + "type": { + "type": "string", + "enum": [ + "shell_call" + ], + "description": "The type of the item. Always `shell_call`.", + "x-stainless-const": true, + "default": "shell_call" + }, + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellActionParam" + } + ], + "description": "The shell commands and limits that describe how to run the tool call." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + } + ], + "nullable": true + }, + "environment": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + } + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A tool representing a request to execute one or more shell commands.", + "title": "Shell tool call" + }, + "OpenAI.InputItemFunctionShellCallOutputItemParam": { + "type": "object", + "required": [ + "call_id", + "type", + "output" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the shell tool call generated by the model." + }, + "type": { + "type": "string", + "enum": [ + "shell_call_output" + ], + "description": "The type of the item. Always `shell_call_output`.", + "x-stainless-const": true, + "default": "shell_call_output" + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContentParam" + }, + "description": "Captured chunks of stdout and stderr output, along with their associated outcomes." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + } + ], + "nullable": true + }, + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The streamed output items emitted by a shell tool call.", + "title": "Shell tool call output" + }, + "OpenAI.InputItemFunctionToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "arguments" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, + "type": { + "type": "string", + "enum": [ + "function_call" + ], + "description": "The type of the function tool call. Always `function_call`.", + "x-stainless-const": true + }, + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the function to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments to pass to the function." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A tool call to run a function. See the\n[function calling guide](/docs/guides/function-calling) for more information.", + "title": "Function tool call" + }, + "OpenAI.InputItemImageGenToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "result" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation_call" + ], + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the image generation call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "generating", + "failed" + ], + "description": "The status of the image generation call." + }, + "result": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "An image generation request made by the model.", + "title": "Image generation call" + }, + "OpenAI.InputItemLocalShellToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call" + ], + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell call." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" + }, + "OpenAI.InputItemLocalShellToolCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call_output" + ], + "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "output": { + "type": "string", + "description": "A JSON string of the output of the local shell tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The output of a local shell tool call.", + "title": "Local shell call output" + }, + "OpenAI.InputItemMcpApprovalRequest": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_request" + ], + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the approval request." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server making the request." + }, + "name": { + "type": "string", + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" + }, + "OpenAI.InputItemMcpApprovalResponse": { + "type": "object", + "required": [ + "type", + "approval_request_id", + "approve" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_response" + ], + "description": "The type of the item. Always `mcp_approval_response`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "nullable": true + }, + "approval_request_id": { + "type": "string", + "description": "The ID of the approval request being answered." + }, + "approve": { + "type": "boolean", + "description": "Whether the request was approved." + }, + "reason": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A response to an MCP approval request.", + "title": "MCP approval response" + }, + "OpenAI.InputItemMcpListTools": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "tools" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_list_tools" + ], + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the list." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + }, + "description": "The tools available on the server." + }, + "error": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" + }, + "OpenAI.InputItemMcpToolCall": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_call" + ], + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the tool call." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server running the tool." + }, + "name": { + "type": "string", + "description": "The name of the tool that was run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments passed to the tool." + }, + "output": { + "type": "string", + "nullable": true + }, + "error": { + "type": "object", + "additionalProperties": {} + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + } + ], + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + }, + "approval_request_id": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" + }, + "OpenAI.InputItemOutputMessage": { + "type": "object", + "required": [ + "id", + "type", + "role", + "content", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the output message." + }, + "type": { + "type": "string", + "enum": [ + "output_message" + ], + "description": "The type of the output message. Always `message`.", + "x-stainless-const": true + }, + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" + }, + "description": "The content of the output message." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "An output message from the model.", + "title": "Output message" + }, + "OpenAI.InputItemReasoningItem": { + "type": "object", + "required": [ + "type", + "id", + "summary" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique identifier of the reasoning content." + }, + "encrypted_content": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + }, + "description": "Reasoning summary content." + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + }, + "description": "Reasoning text content." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", + "title": "Reasoning" + }, + "OpenAI.InputItemType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "message", + "output_message", + "file_search_call", + "computer_call", + "computer_call_output", + "web_search_call", + "function_call", + "function_call_output", + "reasoning", + "compaction", + "image_generation_call", + "code_interpreter_call", + "local_shell_call", + "local_shell_call_output", + "shell_call", + "shell_call_output", + "apply_patch_call", + "apply_patch_call_output", + "mcp_list_tools", + "mcp_approval_request", + "mcp_approval_response", + "mcp_call", + "custom_tool_call_output", + "custom_tool_call", + "item_reference" + ] + } + ] + }, + "OpenAI.InputItemWebSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "action" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, + "type": { + "type": "string", + "enum": [ + "web_search_call" + ], + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." + }, + "action": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + } + ], + "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", + "title": "Web search tool call" + }, + "OpenAI.InputMessage": { + "type": "object", + "required": [ + "type", + "role", + "content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "message" + ], + "description": "The type of the message input. Always set to `message`.", + "x-stainless-const": true + }, + "role": { + "type": "string", + "enum": [ + "user", + "system", + "developer" + ], + "description": "The role of the message input. One of `user`, `system`, or `developer`." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + }, + "content": { + "$ref": "#/components/schemas/OpenAI.InputMessageContentList" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A message input to the model with a role indicating instruction following\nhierarchy. Instructions given with the `developer` or `system` role take\nprecedence over instructions given with the `user` role.", + "title": "Input message" + }, + "OpenAI.InputMessageContentList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputContent" + }, + "description": "A list of one or many input items to the model, containing different content\ntypes.", + "title": "Input item content list" + }, + "OpenAI.InputMessageResource": { + "type": "object", + "required": [ + "type", + "role", + "content", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "message" + ], + "description": "The type of the message input. Always set to `message`.", + "x-stainless-const": true + }, + "role": { + "type": "string", + "enum": [ + "user", + "system", + "developer" + ], + "description": "The role of the message input. One of `user`, `system`, or `developer`." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + }, + "content": { + "$ref": "#/components/schemas/OpenAI.InputMessageContentList" + }, + "id": { + "type": "string", + "description": "The unique ID of the message input." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ] + }, + "OpenAI.InputParam": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + } + ], + "description": "Text, image, or file inputs to the model, used to generate a response.\nLearn more:\n- [Text inputs and outputs](/docs/guides/text)\n- [Image inputs](/docs/guides/images)\n- [File inputs](/docs/guides/pdf-files)\n- [Conversation state](/docs/guides/conversation-state)\n- [Function calling](/docs/guides/function-calling)" + }, + "OpenAI.InputTextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" + }, + "text": { + "type": "string", + "description": "The text input to the model." + } + }, + "description": "A text input to the model.", + "title": "Input text" + }, + "OpenAI.InputTextContentParam": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" + }, + "text": { + "type": "string", + "maxLength": 10485760, + "description": "The text input to the model." + } + }, + "description": "A text input to the model.", + "title": "Input text" + }, + "OpenAI.Item": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ItemType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "memory_search_call": "#/components/schemas/MemorySearchToolCallItemParam", + "message": "#/components/schemas/OpenAI.InputMessage", + "output_message": "#/components/schemas/OpenAI.ItemOutputMessage", + "file_search_call": "#/components/schemas/OpenAI.ItemFileSearchToolCall", + "computer_call": "#/components/schemas/OpenAI.ItemComputerToolCall", + "computer_call_output": "#/components/schemas/OpenAI.ItemComputerCallOutputItemParam", + "web_search_call": "#/components/schemas/OpenAI.ItemWebSearchToolCall", + "function_call": "#/components/schemas/OpenAI.ItemFunctionToolCall", + "function_call_output": "#/components/schemas/OpenAI.ItemFunctionCallOutputItemParam", + "reasoning": "#/components/schemas/OpenAI.ItemReasoningItem", + "compaction": "#/components/schemas/OpenAI.ItemCompactionSummaryItemParam", + "image_generation_call": "#/components/schemas/OpenAI.ItemImageGenToolCall", + "code_interpreter_call": "#/components/schemas/OpenAI.ItemCodeInterpreterToolCall", + "local_shell_call": "#/components/schemas/OpenAI.ItemLocalShellToolCall", + "local_shell_call_output": "#/components/schemas/OpenAI.ItemLocalShellToolCallOutput", + "shell_call": "#/components/schemas/OpenAI.ItemFunctionShellCallItemParam", + "shell_call_output": "#/components/schemas/OpenAI.ItemFunctionShellCallOutputItemParam", + "apply_patch_call": "#/components/schemas/OpenAI.ItemApplyPatchToolCallItemParam", + "apply_patch_call_output": "#/components/schemas/OpenAI.ItemApplyPatchToolCallOutputItemParam", + "mcp_list_tools": "#/components/schemas/OpenAI.ItemMcpListTools", + "mcp_approval_request": "#/components/schemas/OpenAI.ItemMcpApprovalRequest", + "mcp_approval_response": "#/components/schemas/OpenAI.ItemMcpApprovalResponse", + "mcp_call": "#/components/schemas/OpenAI.ItemMcpToolCall", + "custom_tool_call_output": "#/components/schemas/OpenAI.ItemCustomToolCallOutput", + "custom_tool_call": "#/components/schemas/OpenAI.ItemCustomToolCall" + } + }, + "description": "Content item used to generate a response." + }, + "OpenAI.ItemApplyPatchToolCallItemParam": { + "type": "object", + "required": [ + "type", + "call_id", + "status", + "operation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call" + ], + "description": "The type of the item. Always `apply_patch_call`.", + "x-stainless-const": true, + "default": "apply_patch_call" + }, + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatusParam" + } + ], + "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + }, + "operation": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + } + ], + "description": "The specific create, delete, or update instruction for the apply_patch tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A tool call representing a request to create, delete, or update files using diff patches.", + "title": "Apply patch tool call" + }, + "OpenAI.ItemApplyPatchToolCallOutputItemParam": { + "type": "object", + "required": [ + "type", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call_output" + ], + "description": "The type of the item. Always `apply_patch_call_output`.", + "x-stainless-const": true, + "default": "apply_patch_call_output" + }, + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatusParam" + } + ], + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." + }, + "output": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The streamed output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" + }, + "OpenAI.ItemCodeInterpreterToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "container_id", + "code", + "outputs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_interpreter_call" + ], + "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", + "x-stainless-const": true, + "default": "code_interpreter_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the code interpreter tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "interpreting", + "failed" + ], + "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." + }, + "container_id": { + "type": "string", + "description": "The ID of the container used to run the code." + }, + "code": { + "type": "string", + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" + }, + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" + } + ] + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A tool call to run code.", + "title": "Code interpreter tool call" + }, + "OpenAI.ItemCompactionSummaryItemParam": { + "type": "object", + "required": [ + "type", + "encrypted_content" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "enum": [ + "compaction" + ], + "description": "The type of the item. Always `compaction`.", + "x-stainless-const": true, + "default": "compaction" + }, + "encrypted_content": { + "type": "string", + "maxLength": 10485760, + "description": "The encrypted content of the compaction summary." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" + }, + "OpenAI.ItemComputerCallOutputItemParam": { + "type": "object", + "required": [ + "call_id", + "type", + "output" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The ID of the computer tool call that produced the output." + }, + "type": { + "type": "string", + "enum": [ + "computer_call_output" + ], + "description": "The type of the computer tool call output. Always `computer_call_output`.", + "x-stainless-const": true, + "default": "computer_call_output" + }, + "output": { + "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + }, + "acknowledged_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "nullable": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" + } + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The output of a computer tool call.", + "title": "Computer tool call output" + }, + "OpenAI.ItemComputerToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_call" + ], + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the computer call." + }, + "call_id": { + "type": "string", + "description": "An identifier used when responding to the tool call with output." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + }, + "pending_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The pending safety checks for the computer call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", + "title": "Computer tool call" + }, + "OpenAI.ItemCustomToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "input" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_tool_call" + ], + "description": "The type of the custom tool call. Always `custom_tool_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the custom tool call in the OpenAI platform." + }, + "call_id": { + "type": "string", + "description": "An identifier used to map this custom tool call to a tool call output." + }, + "name": { + "type": "string", + "description": "The name of the custom tool being called." + }, + "input": { + "type": "string", + "description": "The input for the custom tool call generated by the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" + }, + "OpenAI.ItemCustomToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_tool_call_output" + ], + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the custom tool call output in the OpenAI platform." + }, + "call_id": { + "type": "string", + "description": "The call ID, used to map this custom tool call output to a custom tool call." + }, + "output": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + } + ], + "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The output of a custom tool call from your code, being sent back to the model.", + "title": "Custom tool call output" + }, + "OpenAI.ItemField": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ItemFieldType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "function_call_output": "#/components/schemas/OpenAI.FunctionToolCallOutput", + "message": "#/components/schemas/OpenAI.ItemFieldMessage", + "function_call": "#/components/schemas/OpenAI.ItemFieldFunctionToolCall", + "file_search_call": "#/components/schemas/OpenAI.ItemFieldFileSearchToolCall", + "web_search_call": "#/components/schemas/OpenAI.ItemFieldWebSearchToolCall", + "image_generation_call": "#/components/schemas/OpenAI.ItemFieldImageGenToolCall", + "computer_call": "#/components/schemas/OpenAI.ItemFieldComputerToolCall", + "computer_call_output": "#/components/schemas/OpenAI.ItemFieldComputerToolCallOutputResource", + "reasoning": "#/components/schemas/OpenAI.ItemFieldReasoningItem", + "compaction": "#/components/schemas/OpenAI.ItemFieldCompactionBody", + "code_interpreter_call": "#/components/schemas/OpenAI.ItemFieldCodeInterpreterToolCall", + "local_shell_call": "#/components/schemas/OpenAI.ItemFieldLocalShellToolCall", + "local_shell_call_output": "#/components/schemas/OpenAI.ItemFieldLocalShellToolCallOutput", + "shell_call": "#/components/schemas/OpenAI.ItemFieldFunctionShellCall", + "shell_call_output": "#/components/schemas/OpenAI.ItemFieldFunctionShellCallOutput", + "apply_patch_call": "#/components/schemas/OpenAI.ItemFieldApplyPatchToolCall", + "apply_patch_call_output": "#/components/schemas/OpenAI.ItemFieldApplyPatchToolCallOutput", + "mcp_list_tools": "#/components/schemas/OpenAI.ItemFieldMcpListTools", + "mcp_approval_request": "#/components/schemas/OpenAI.ItemFieldMcpApprovalRequest", + "mcp_approval_response": "#/components/schemas/OpenAI.ItemFieldMcpApprovalResponseResource", + "mcp_call": "#/components/schemas/OpenAI.ItemFieldMcpToolCall", + "custom_tool_call": "#/components/schemas/OpenAI.ItemFieldCustomToolCall", + "custom_tool_call_output": "#/components/schemas/OpenAI.ItemFieldCustomToolCallOutput" + } + }, + "description": "An item representing a message, tool call, tool output, reasoning, or other response element." + }, + "OpenAI.ItemFieldApplyPatchToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status", + "operation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call" + ], + "description": "The type of the item. Always `apply_patch_call`.", + "x-stainless-const": true, + "default": "apply_patch_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" + } + ], + "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + }, + "operation": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + } + ], + "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", + "title": "Apply patch operation" + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", + "title": "Apply patch tool call" + }, + "OpenAI.ItemFieldApplyPatchToolCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call_output" + ], + "description": "The type of the item. Always `apply_patch_call_output`.", + "x-stainless-const": true, + "default": "apply_patch_call_output" + }, + "id": { + "type": "string", + "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + } + ], + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." + }, + "output": { + "type": "string", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call output." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "The output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" + }, + "OpenAI.ItemFieldCodeInterpreterToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "container_id", + "code", + "outputs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_interpreter_call" + ], + "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", + "x-stainless-const": true, + "default": "code_interpreter_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the code interpreter tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "interpreting", + "failed" + ], + "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." + }, + "container_id": { + "type": "string", + "description": "The ID of the container used to run the code." + }, + "code": { + "type": "string", + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" + }, + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" + } + ] + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A tool call to run code.", + "title": "Code interpreter tool call" + }, + "OpenAI.ItemFieldCompactionBody": { + "type": "object", + "required": [ + "type", + "id", + "encrypted_content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "compaction" + ], + "description": "The type of the item. Always `compaction`.", + "x-stainless-const": true, + "default": "compaction" + }, + "id": { + "type": "string", + "description": "The unique ID of the compaction item." + }, + "encrypted_content": { + "type": "string", + "description": "The encrypted content that was produced by compaction." + }, + "created_by": { + "type": "string", + "description": "The identifier of the actor that created the item." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" + }, + "OpenAI.ItemFieldComputerToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_call" + ], + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the computer call." + }, + "call_id": { + "type": "string", + "description": "An identifier used when responding to the tool call with output." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + }, + "pending_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The pending safety checks for the computer call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", + "title": "Computer tool call" + }, + "OpenAI.ItemFieldComputerToolCallOutputResource": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_call_output" + ], + "description": "The type of the computer tool call output. Always `computer_call_output`.", + "x-stainless-const": true, + "default": "computer_call_output" + }, + "id": { + "type": "string", + "description": "The ID of the computer tool call output." + }, + "call_id": { + "type": "string", + "description": "The ID of the computer tool call that produced the output." + }, + "acknowledged_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The safety checks reported by the API that have been acknowledged by the\n developer." + }, + "output": { + "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ] + }, + "OpenAI.ItemFieldCustomToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "input" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_tool_call" + ], + "description": "The type of the custom tool call. Always `custom_tool_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the custom tool call in the OpenAI platform." + }, + "call_id": { + "type": "string", + "description": "An identifier used to map this custom tool call to a tool call output." + }, + "name": { + "type": "string", + "description": "The name of the custom tool being called." + }, + "input": { + "type": "string", + "description": "The input for the custom tool call generated by the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" + }, + "OpenAI.ItemFieldCustomToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_tool_call_output" + ], + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the custom tool call output in the OpenAI platform." + }, + "call_id": { + "type": "string", + "description": "The call ID, used to map this custom tool call output to a custom tool call." + }, + "output": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + } + ], + "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "The output of a custom tool call from your code, being sent back to the model.", + "title": "Custom tool call output" + }, + "OpenAI.ItemFieldFileSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "queries" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, + "type": { + "type": "string", + "enum": [ + "file_search_call" + ], + "description": "The type of the file search tool call. Always `file_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "incomplete", + "failed" + ], + "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," + }, + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The queries used to search for files." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", + "title": "File search tool call" + }, + "OpenAI.ItemFieldFunctionShellCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status", + "environment" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell_call" + ], + "description": "The type of the item. Always `shell_call`.", + "x-stainless-const": true, + "default": "shell_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the shell tool call. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the shell tool call generated by the model." + }, + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellAction" + } + ], + "description": "The shell commands and limits that describe how to run the tool call." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" + } + ], + "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." + }, + "environment": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + } + ], + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A tool call that executes one or more shell commands in a managed environment.", + "title": "Shell tool call" + }, + "OpenAI.ItemFieldFunctionShellCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status", + "output", + "max_output_length" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell_call_output" + ], + "description": "The type of the shell call output. Always `shell_call_output`.", + "x-stainless-const": true, + "default": "shell_call_output" + }, + "id": { + "type": "string", + "description": "The unique ID of the shell call output. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the shell tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + } + ], + "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" + }, + "description": "An array of shell call output contents" + }, + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The identifier of the actor that created the item." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "The output of a shell tool call that was emitted.", + "title": "Shell call output" + }, + "OpenAI.ItemFieldFunctionToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "arguments" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, + "type": { + "type": "string", + "enum": [ + "function_call" + ], + "description": "The type of the function tool call. Always `function_call`.", + "x-stainless-const": true + }, + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the function to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments to pass to the function." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A tool call to run a function. See the\n[function calling guide](/docs/guides/function-calling) for more information.", + "title": "Function tool call" + }, + "OpenAI.ItemFieldImageGenToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "result" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation_call" + ], + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the image generation call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "generating", + "failed" + ], + "description": "The status of the image generation call." + }, + "result": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "An image generation request made by the model.", + "title": "Image generation call" + }, + "OpenAI.ItemFieldLocalShellToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call" + ], + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell call." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" + }, + "OpenAI.ItemFieldLocalShellToolCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call_output" + ], + "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "output": { + "type": "string", + "description": "A JSON string of the output of the local shell tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "The output of a local shell tool call.", + "title": "Local shell call output" + }, + "OpenAI.ItemFieldMcpApprovalRequest": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_request" + ], + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the approval request." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server making the request." + }, + "name": { + "type": "string", + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" + }, + "OpenAI.ItemFieldMcpApprovalResponseResource": { + "type": "object", + "required": [ + "type", + "id", + "approval_request_id", + "approve" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_response" + ], + "description": "The type of the item. Always `mcp_approval_response`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the approval response" + }, + "approval_request_id": { + "type": "string", + "description": "The ID of the approval request being answered." + }, + "approve": { + "type": "boolean", + "description": "Whether the request was approved." + }, + "reason": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A response to an MCP approval request.", + "title": "MCP approval response" + }, + "OpenAI.ItemFieldMcpListTools": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "tools" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_list_tools" + ], + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the list." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + }, + "description": "The tools available on the server." + }, + "error": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" + }, + "OpenAI.ItemFieldMcpToolCall": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_call" + ], + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the tool call." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server running the tool." + }, + "name": { + "type": "string", + "description": "The name of the tool that was run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments passed to the tool." + }, + "output": { + "type": "string", + "nullable": true + }, + "error": { + "type": "object", + "additionalProperties": {} + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + } + ], + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + }, + "approval_request_id": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" + }, + "OpenAI.ItemFieldMessage": { + "type": "object", + "required": [ + "type", + "id", + "status", + "role", + "content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "message" + ], + "description": "The type of the message. Always set to `message`.", + "x-stainless-const": true, + "default": "message" + }, + "id": { + "type": "string", + "description": "The unique ID of the message." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageStatus" + } + ], + "description": "The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API." + }, + "role": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageRole" + } + ], + "description": "The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`." + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MessageContent" + }, + "description": "The content of the message" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A message to or from the model.", + "title": "Message" + }, + "OpenAI.ItemFieldReasoningItem": { + "type": "object", + "required": [ + "type", + "id", + "summary" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique identifier of the reasoning content." + }, + "encrypted_content": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + }, + "description": "Reasoning summary content." + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + }, + "description": "Reasoning text content." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", + "title": "Reasoning" + }, + "OpenAI.ItemFieldType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "message", + "function_call", + "function_call_output", + "file_search_call", + "web_search_call", + "image_generation_call", + "computer_call", + "computer_call_output", + "reasoning", + "compaction", + "code_interpreter_call", + "local_shell_call", + "local_shell_call_output", + "shell_call", + "shell_call_output", + "apply_patch_call", + "apply_patch_call_output", + "mcp_list_tools", + "mcp_approval_request", + "mcp_approval_response", + "mcp_call", + "custom_tool_call", + "custom_tool_call_output" + ] + } + ] + }, + "OpenAI.ItemFieldWebSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "action" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, + "type": { + "type": "string", + "enum": [ + "web_search_call" + ], + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." + }, + "action": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + } + ], + "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", + "title": "Web search tool call" + }, + "OpenAI.ItemFileSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "queries" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, + "type": { + "type": "string", + "enum": [ + "file_search_call" + ], + "description": "The type of the file search tool call. Always `file_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "incomplete", + "failed" + ], + "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," + }, + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The queries used to search for files." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", + "title": "File search tool call" + }, + "OpenAI.ItemFunctionCallOutputItemParam": { + "type": "object", + "required": [ + "call_id", + "type", + "output" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the function tool call generated by the model." + }, + "type": { + "type": "string", + "enum": [ + "function_call_output" + ], + "description": "The type of the function tool call output. Always `function_call_output`.", + "x-stainless-const": true, + "default": "function_call_output" + }, + "output": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputTextContentParam" + }, + { + "$ref": "#/components/schemas/OpenAI.InputImageContentParamAutoParam" + }, + { + "$ref": "#/components/schemas/OpenAI.InputFileContentParam" + } + ] + } + } + ], + "description": "Text, image, or file output of the function tool call." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" + } + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The output of a function tool call.", + "title": "Function tool call output" + }, + "OpenAI.ItemFunctionShellCallItemParam": { + "type": "object", + "required": [ + "call_id", + "type", + "action" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the shell tool call generated by the model." + }, + "type": { + "type": "string", + "enum": [ + "shell_call" + ], + "description": "The type of the item. Always `shell_call`.", + "x-stainless-const": true, + "default": "shell_call" + }, + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellActionParam" + } + ], + "description": "The shell commands and limits that describe how to run the tool call." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + } + ], + "nullable": true + }, + "environment": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + } + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A tool representing a request to execute one or more shell commands.", + "title": "Shell tool call" + }, + "OpenAI.ItemFunctionShellCallOutputItemParam": { + "type": "object", + "required": [ + "call_id", + "type", + "output" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "call_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the shell tool call generated by the model." + }, + "type": { + "type": "string", + "enum": [ + "shell_call_output" + ], + "description": "The type of the item. Always `shell_call_output`.", + "x-stainless-const": true, + "default": "shell_call_output" + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContentParam" + }, + "description": "Captured chunks of stdout and stderr output, along with their associated outcomes." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + } + ], + "nullable": true + }, + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The streamed output items emitted by a shell tool call.", + "title": "Shell tool call output" + }, + "OpenAI.ItemFunctionToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "arguments" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, + "type": { + "type": "string", + "enum": [ + "function_call" + ], + "description": "The type of the function tool call. Always `function_call`.", + "x-stainless-const": true + }, + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the function to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments to pass to the function." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A tool call to run a function. See the\n[function calling guide](/docs/guides/function-calling) for more information.", + "title": "Function tool call" + }, + "OpenAI.ItemImageGenToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "result" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation_call" + ], + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the image generation call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "generating", + "failed" + ], + "description": "The status of the image generation call." + }, + "result": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "An image generation request made by the model.", + "title": "Image generation call" + }, + "OpenAI.ItemLocalShellToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call" + ], + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell call." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" + }, + "OpenAI.ItemLocalShellToolCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call_output" + ], + "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "output": { + "type": "string", + "description": "A JSON string of the output of the local shell tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The output of a local shell tool call.", + "title": "Local shell call output" + }, + "OpenAI.ItemMcpApprovalRequest": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_request" + ], + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the approval request." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server making the request." + }, + "name": { + "type": "string", + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" + }, + "OpenAI.ItemMcpApprovalResponse": { + "type": "object", + "required": [ + "type", + "approval_request_id", + "approve" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_response" + ], + "description": "The type of the item. Always `mcp_approval_response`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "nullable": true + }, + "approval_request_id": { + "type": "string", + "description": "The ID of the approval request being answered." + }, + "approve": { + "type": "boolean", + "description": "Whether the request was approved." + }, + "reason": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A response to an MCP approval request.", + "title": "MCP approval response" + }, + "OpenAI.ItemMcpListTools": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "tools" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_list_tools" + ], + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the list." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + }, + "description": "The tools available on the server." + }, + "error": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" + }, + "OpenAI.ItemMcpToolCall": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_call" + ], + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the tool call." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server running the tool." + }, + "name": { + "type": "string", + "description": "The name of the tool that was run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments passed to the tool." + }, + "output": { + "type": "string", + "nullable": true + }, + "error": { + "type": "object", + "additionalProperties": {} + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + } + ], + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + }, + "approval_request_id": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" + }, + "OpenAI.ItemOutputMessage": { + "type": "object", + "required": [ + "id", + "type", + "role", + "content", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the output message." + }, + "type": { + "type": "string", + "enum": [ + "output_message" + ], + "description": "The type of the output message. Always `message`.", + "x-stainless-const": true + }, + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" + }, + "description": "The content of the output message." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "An output message from the model.", + "title": "Output message" + }, + "OpenAI.ItemReasoningItem": { + "type": "object", + "required": [ + "type", + "id", + "summary" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique identifier of the reasoning content." + }, + "encrypted_content": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + }, + "description": "Reasoning summary content." + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + }, + "description": "Reasoning text content." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", + "title": "Reasoning" + }, + "OpenAI.ItemReferenceParam": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "item_reference" + ], + "description": "The type of item to reference. Always `item_reference`.", + "x-stainless-const": true, + "default": "item_reference" + }, + "id": { + "type": "string", + "description": "The ID of the item to reference." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "An internal identifier for an item to reference.", + "title": "Item reference" + }, + "OpenAI.ItemResource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ItemResourceType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "message": "#/components/schemas/OpenAI.InputMessageResource", + "output_message": "#/components/schemas/OpenAI.ItemResourceOutputMessage", + "file_search_call": "#/components/schemas/OpenAI.ItemResourceFileSearchToolCall", + "computer_call": "#/components/schemas/OpenAI.ItemResourceComputerToolCall", + "computer_call_output": "#/components/schemas/OpenAI.ItemResourceComputerToolCallOutputResource", + "web_search_call": "#/components/schemas/OpenAI.ItemResourceWebSearchToolCall", + "function_call": "#/components/schemas/OpenAI.ItemResourceFunctionToolCallResource", + "function_call_output": "#/components/schemas/OpenAI.ItemResourceFunctionToolCallOutputResource", + "image_generation_call": "#/components/schemas/OpenAI.ItemResourceImageGenToolCall", + "code_interpreter_call": "#/components/schemas/OpenAI.ItemResourceCodeInterpreterToolCall", + "local_shell_call": "#/components/schemas/OpenAI.ItemResourceLocalShellToolCall", + "local_shell_call_output": "#/components/schemas/OpenAI.ItemResourceLocalShellToolCallOutput", + "shell_call": "#/components/schemas/OpenAI.ItemResourceFunctionShellCall", + "shell_call_output": "#/components/schemas/OpenAI.ItemResourceFunctionShellCallOutput", + "apply_patch_call": "#/components/schemas/OpenAI.ItemResourceApplyPatchToolCall", + "apply_patch_call_output": "#/components/schemas/OpenAI.ItemResourceApplyPatchToolCallOutput", + "mcp_list_tools": "#/components/schemas/OpenAI.ItemResourceMcpListTools", + "mcp_approval_request": "#/components/schemas/OpenAI.ItemResourceMcpApprovalRequest", + "mcp_approval_response": "#/components/schemas/OpenAI.ItemResourceMcpApprovalResponseResource", + "mcp_call": "#/components/schemas/OpenAI.ItemResourceMcpToolCall" + } + }, + "description": "Content item used to generate a response." + }, + "OpenAI.ItemResourceApplyPatchToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status", + "operation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call" + ], + "description": "The type of the item. Always `apply_patch_call`.", + "x-stainless-const": true, + "default": "apply_patch_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" + } + ], + "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + }, + "operation": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + } + ], + "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", + "title": "Apply patch operation" + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", + "title": "Apply patch tool call" + }, + "OpenAI.ItemResourceApplyPatchToolCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call_output" + ], + "description": "The type of the item. Always `apply_patch_call_output`.", + "x-stainless-const": true, + "default": "apply_patch_call_output" + }, + "id": { + "type": "string", + "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + } + ], + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." + }, + "output": { + "type": "string", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call output." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "The output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" + }, + "OpenAI.ItemResourceCodeInterpreterToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "container_id", + "code", + "outputs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_interpreter_call" + ], + "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", + "x-stainless-const": true, + "default": "code_interpreter_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the code interpreter tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "interpreting", + "failed" + ], + "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." + }, + "container_id": { + "type": "string", + "description": "The ID of the container used to run the code." + }, + "code": { + "type": "string", + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" + }, + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" + } + ] + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "A tool call to run code.", + "title": "Code interpreter tool call" + }, + "OpenAI.ItemResourceComputerToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_call" + ], + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the computer call." + }, + "call_id": { + "type": "string", + "description": "An identifier used when responding to the tool call with output." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + }, + "pending_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The pending safety checks for the computer call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", + "title": "Computer tool call" + }, + "OpenAI.ItemResourceComputerToolCallOutputResource": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_call_output" + ], + "description": "The type of the computer tool call output. Always `computer_call_output`.", + "x-stainless-const": true, + "default": "computer_call_output" + }, + "id": { + "type": "string", + "description": "The ID of the computer tool call output." + }, + "call_id": { + "type": "string", + "description": "The ID of the computer tool call that produced the output." + }, + "acknowledged_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The safety checks reported by the API that have been acknowledged by the\n developer." + }, + "output": { + "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ] + }, + "OpenAI.ItemResourceFileSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "queries" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, + "type": { + "type": "string", + "enum": [ + "file_search_call" + ], + "description": "The type of the file search tool call. Always `file_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "incomplete", + "failed" + ], + "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," + }, + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The queries used to search for files." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", + "title": "File search tool call" + }, + "OpenAI.ItemResourceFunctionShellCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status", + "environment" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell_call" + ], + "description": "The type of the item. Always `shell_call`.", + "x-stainless-const": true, + "default": "shell_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the shell tool call. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the shell tool call generated by the model." + }, + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellAction" + } + ], + "description": "The shell commands and limits that describe how to run the tool call." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" + } + ], + "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." + }, + "environment": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + } + ], + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "A tool call that executes one or more shell commands in a managed environment.", + "title": "Shell tool call" + }, + "OpenAI.ItemResourceFunctionShellCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status", + "output", + "max_output_length" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell_call_output" + ], + "description": "The type of the shell call output. Always `shell_call_output`.", + "x-stainless-const": true, + "default": "shell_call_output" + }, + "id": { + "type": "string", + "description": "The unique ID of the shell call output. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the shell tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + } + ], + "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" + }, + "description": "An array of shell call output contents" + }, + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The identifier of the actor that created the item." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "The output of a shell tool call that was emitted.", + "title": "Shell call output" + }, + "OpenAI.ItemResourceFunctionToolCallOutputResource": { + "type": "object", + "required": [ + "type", + "call_id", + "output" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call output. Populated when this item\n is returned via API." + }, + "type": { + "type": "string", + "enum": [ + "function_call_output" + ], + "description": "The type of the function tool call output. Always `function_call_output`.", + "x-stainless-const": true + }, + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "output": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + } + ], + "description": "The output from the function call generated by your code.\n Can be a string or an list of output content." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ] + }, + "OpenAI.ItemResourceFunctionToolCallResource": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "arguments" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, + "type": { + "type": "string", + "enum": [ + "function_call" + ], + "description": "The type of the function tool call. Always `function_call`.", + "x-stainless-const": true + }, + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the function to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments to pass to the function." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ] + }, + "OpenAI.ItemResourceImageGenToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "result" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation_call" + ], + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the image generation call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "generating", + "failed" + ], + "description": "The status of the image generation call." + }, + "result": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "An image generation request made by the model.", + "title": "Image generation call" + }, + "OpenAI.ItemResourceLocalShellToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call" + ], + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell call." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" + }, + "OpenAI.ItemResourceLocalShellToolCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call_output" + ], + "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "output": { + "type": "string", + "description": "A JSON string of the output of the local shell tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "The output of a local shell tool call.", + "title": "Local shell call output" + }, + "OpenAI.ItemResourceMcpApprovalRequest": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_request" + ], + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the approval request." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server making the request." + }, + "name": { + "type": "string", + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" + }, + "OpenAI.ItemResourceMcpApprovalResponseResource": { + "type": "object", + "required": [ + "type", + "id", + "approval_request_id", + "approve" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_response" + ], + "description": "The type of the item. Always `mcp_approval_response`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the approval response" + }, + "approval_request_id": { + "type": "string", + "description": "The ID of the approval request being answered." + }, + "approve": { + "type": "boolean", + "description": "Whether the request was approved." + }, + "reason": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "A response to an MCP approval request.", + "title": "MCP approval response" + }, + "OpenAI.ItemResourceMcpListTools": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "tools" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_list_tools" + ], + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the list." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + }, + "description": "The tools available on the server." + }, + "error": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" + }, + "OpenAI.ItemResourceMcpToolCall": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_call" + ], + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the tool call." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server running the tool." + }, + "name": { + "type": "string", + "description": "The name of the tool that was run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments passed to the tool." + }, + "output": { + "type": "string", + "nullable": true + }, + "error": { + "type": "object", + "additionalProperties": {} + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + } + ], + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + }, + "approval_request_id": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" + }, + "OpenAI.ItemResourceOutputMessage": { + "type": "object", + "required": [ + "id", + "type", + "role", + "content", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the output message." + }, + "type": { + "type": "string", + "enum": [ + "output_message" + ], + "description": "The type of the output message. Always `message`.", + "x-stainless-const": true + }, + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" + }, + "description": "The content of the output message." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "An output message from the model.", + "title": "Output message" + }, + "OpenAI.ItemResourceType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "message", + "output_message", + "file_search_call", + "computer_call", + "computer_call_output", + "web_search_call", + "function_call", + "function_call_output", + "image_generation_call", + "code_interpreter_call", + "local_shell_call", + "local_shell_call_output", + "shell_call", + "shell_call_output", + "apply_patch_call", + "apply_patch_call_output", + "mcp_list_tools", + "mcp_approval_request", + "mcp_approval_response", + "mcp_call", + "structured_outputs", + "oauth_consent_request", + "memory_search_call", + "workflow_action", + "a2a_preview_call", + "a2a_preview_call_output", + "bing_grounding_call", + "bing_grounding_call_output", + "sharepoint_grounding_preview_call", + "sharepoint_grounding_preview_call_output", + "azure_ai_search_call", + "azure_ai_search_call_output", + "bing_custom_search_preview_call", + "bing_custom_search_preview_call_output", + "openapi_call", + "openapi_call_output", + "browser_automation_preview_call", + "browser_automation_preview_call_output", + "fabric_dataagent_preview_call", + "fabric_dataagent_preview_call_output", + "azure_function_call", + "azure_function_call_output" + ] + } + ] + }, + "OpenAI.ItemResourceWebSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "action" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, + "type": { + "type": "string", + "enum": [ + "web_search_call" + ], + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." + }, + "action": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + } + ], + "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ], + "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", + "title": "Web search tool call" + }, + "OpenAI.ItemType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "message", + "output_message", + "file_search_call", + "computer_call", + "computer_call_output", + "web_search_call", + "function_call", + "function_call_output", + "reasoning", + "compaction", + "image_generation_call", + "code_interpreter_call", + "local_shell_call", + "local_shell_call_output", + "shell_call", + "shell_call_output", + "apply_patch_call", + "apply_patch_call_output", + "mcp_list_tools", + "mcp_approval_request", + "mcp_approval_response", + "mcp_call", + "custom_tool_call_output", + "custom_tool_call", + "structured_outputs", + "oauth_consent_request", + "memory_search_call", + "workflow_action", + "a2a_preview_call", + "a2a_preview_call_output", + "bing_grounding_call", + "bing_grounding_call_output", + "sharepoint_grounding_preview_call", + "sharepoint_grounding_preview_call_output", + "azure_ai_search_call", + "azure_ai_search_call_output", + "bing_custom_search_preview_call", + "bing_custom_search_preview_call_output", + "openapi_call", + "openapi_call_output", + "browser_automation_preview_call", + "browser_automation_preview_call_output", + "fabric_dataagent_preview_call", + "fabric_dataagent_preview_call_output", + "azure_function_call", + "azure_function_call_output" + ] + } + ] + }, + "OpenAI.ItemWebSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "action" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, + "type": { + "type": "string", + "enum": [ + "web_search_call" + ], + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." + }, + "action": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + } + ], + "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", + "title": "Web search tool call" + }, + "OpenAI.KeyPressAction": { + "type": "object", + "required": [ + "type", + "keys" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "keypress" + ], + "description": "Specifies the event type. For a keypress action, this property is always set to `keypress`.", + "x-stainless-const": true, + "default": "keypress" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A collection of keypresses the model would like to perform.", + "title": "KeyPress" + }, + "OpenAI.ListFineTuningJobCheckpointsResponse": { + "type": "object", + "required": [ + "data", + "object", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpoint" + }, + "x-ms-list-page-items": true + }, + "object": { + "type": "string", + "enum": [ + "list" + ], + "x-stainless-const": true + }, + "first_id": { + "type": "string", + "nullable": true + }, + "last_id": { + "type": "string", + "nullable": true, + "x-ms-list-continuation-token": true + }, + "has_more": { + "type": "boolean" + } + } + }, + "OpenAI.ListFineTuningJobEventsResponse": { + "type": "object", + "required": [ + "data", + "object", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FineTuningJobEvent" + }, + "x-ms-list-page-items": true + }, + "object": { + "type": "string", + "enum": [ + "list" + ], + "x-stainless-const": true + }, + "has_more": { + "type": "boolean" + } + } + }, + "OpenAI.ListPaginatedFineTuningJobsResponse": { + "type": "object", + "required": [ + "data", + "has_more", + "object" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FineTuningJob" + }, + "x-ms-list-page-items": true + }, + "has_more": { + "type": "boolean" + }, + "object": { + "type": "string", + "enum": [ + "list" + ], + "x-stainless-const": true + } + } + }, + "OpenAI.LocalEnvironmentResource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local" + ], + "description": "The environment type. Always `local`.", + "x-stainless-const": true, + "default": "local" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + } + ], + "description": "Represents the use of a local environment to perform shell actions.", + "title": "Local Environment" + }, + "OpenAI.LocalShellCallOutputStatusEnum": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.LocalShellCallStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.LocalShellExecAction": { + "type": "object", + "required": [ + "type", + "command", + "env" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "exec" + ], + "description": "The type of the local shell action. Always `exec`.", + "x-stainless-const": true, + "default": "exec" + }, + "command": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The command to run." + }, + "timeout_ms": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "working_directory": { + "type": "string", + "nullable": true + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables to set for the command.", + "x-oaiTypeLabel": "map" + }, + "user": { + "type": "string", + "nullable": true + } + }, + "description": "Execute a shell command on the server.", + "title": "Local shell exec action" + }, + "OpenAI.LocalShellToolParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell" + ], + "description": "The type of the local shell tool. Always `local_shell`.", + "x-stainless-const": true, + "default": "local_shell" + }, + "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." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool that allows the model to execute shell commands in a local environment.", + "title": "Local shell tool" + }, + "OpenAI.LocalSkillParam": { + "type": "object", + "required": [ + "name", + "description", + "path" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the skill." + }, + "description": { + "type": "string", + "description": "The description of the skill." + }, + "path": { + "type": "string", + "description": "The path to the directory containing the skill." + } + } + }, + "OpenAI.LogProb": { + "type": "object", + "required": [ + "token", + "logprob", + "bytes", + "top_logprobs" + ], + "properties": { + "token": { + "type": "string" + }, + "logprob": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "bytes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.integer" + } + }, + "top_logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.TopLogProb" + } + } + }, + "description": "The log probability of a token.", + "title": "Log probability" + }, + "OpenAI.MCPListToolsTool": { + "type": "object", + "required": [ + "name", + "input_schema" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the tool." + }, + "description": { + "type": "string", + "nullable": true + }, + "input_schema": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPListToolsToolInputSchema" + } + ], + "description": "The JSON schema describing the tool's input." + }, + "annotations": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPListToolsToolAnnotations" + } + ], + "nullable": true + } + }, + "description": "A tool available on an MCP server.", + "title": "MCP list tools tool" + }, + "OpenAI.MCPListToolsToolAnnotations": { + "type": "object" + }, + "OpenAI.MCPListToolsToolInputSchema": { + "type": "object" + }, + "OpenAI.MCPTool": { + "type": "object", + "required": [ + "type", + "server_label" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp" + ], + "description": "The type of the MCP tool. Always `mcp`.", + "x-stainless-const": true + }, + "server_label": { + "type": "string", + "description": "A label for this MCP server, used to identify it in tool calls." + }, + "server_url": { + "type": "string", + "format": "uri", + "description": "The URL for the MCP server. One of `server_url` or `connector_id` must be\n provided." + }, + "connector_id": { + "type": "string", + "enum": [ + "connector_dropbox", + "connector_gmail", + "connector_googlecalendar", + "connector_googledrive", + "connector_microsoftteams", + "connector_outlookcalendar", + "connector_outlookemail", + "connector_sharepoint" + ], + "description": "Identifier for service connectors, like those available in ChatGPT. One of\n `server_url` or `connector_id` must be provided. Learn more about service\n connectors [here](/docs/guides/tools-remote-mcp#connectors).\n Currently supported `connector_id` values are:\n - Dropbox: `connector_dropbox`\n - Gmail: `connector_gmail`\n - Google Calendar: `connector_googlecalendar`\n - Google Drive: `connector_googledrive`\n - Microsoft Teams: `connector_microsoftteams`\n - Outlook Calendar: `connector_outlookcalendar`\n - Outlook Email: `connector_outlookemail`\n - SharePoint: `connector_sharepoint`" + }, + "authorization": { + "type": "string", + "description": "An OAuth access token that can be used with a remote MCP server, either\n with a custom MCP server URL or a service connector. Your application\n must handle the OAuth authorization flow and provide the token here." + }, + "server_description": { + "type": "string", + "description": "Optional description of the MCP server, used to provide more context." + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + }, + "allowed_tools": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolFilter" + } + ], + "nullable": true + } + ] + }, + "require_approval": { + "anyOf": [ + { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolRequireApproval" + } + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "always", + "never" + ], + "nullable": true + } + ], + "default": "always" + }, + "project_connection_id": { + "type": "string", + "description": "The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "Give the model access to additional tools via remote Model Context Protocol\n(MCP) servers. [Learn more about MCP](/docs/guides/tools-remote-mcp).", + "title": "MCP tool" + }, + "OpenAI.MCPToolCallStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "calling", + "failed" + ] + }, + "OpenAI.MCPToolFilter": { + "type": "object", + "properties": { + "tool_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of allowed tool names.", + "title": "MCP allowed tools" + }, + "read_only": { + "type": "boolean", + "description": "Indicates whether or not a tool modifies data or is read-only. If an\n MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),\n it will match this filter." + } + }, + "description": "A filter object to specify which tools are allowed.", + "title": "MCP tool filter" + }, + "OpenAI.MCPToolRequireApproval": { + "type": "object", + "properties": { + "always": { + "$ref": "#/components/schemas/OpenAI.MCPToolFilter" + }, + "never": { + "$ref": "#/components/schemas/OpenAI.MCPToolFilter" + } + } + }, + "OpenAI.MessageContent": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.MessageContentType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "text": "#/components/schemas/OpenAI.TextContent", + "computer_screenshot": "#/components/schemas/OpenAI.ComputerScreenshotContent", + "input_text": "#/components/schemas/OpenAI.MessageContentInputTextContent", + "output_text": "#/components/schemas/OpenAI.MessageContentOutputTextContent", + "reasoning_text": "#/components/schemas/OpenAI.MessageContentReasoningTextContent", + "refusal": "#/components/schemas/OpenAI.MessageContentRefusalContent", + "input_image": "#/components/schemas/OpenAI.MessageContentInputImageContent", + "input_file": "#/components/schemas/OpenAI.MessageContentInputFileContent" + } + }, + "description": "A content part that makes up an input or output item." + }, + "OpenAI.MessageContentInputFileContent": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_file" + ], + "description": "The type of the input item. Always `input_file`.", + "x-stainless-const": true, + "default": "input_file" + }, + "file_id": { + "type": "string", + "nullable": true + }, + "filename": { + "type": "string", + "description": "The name of the file to be sent to the model." + }, + "file_url": { + "type": "string", + "format": "uri", + "description": "The URL of the file to be sent to the model." + }, + "file_data": { + "type": "string", + "description": "The content of the file to be sent to the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A file input to the model.", + "title": "Input file" + }, + "OpenAI.MessageContentInputImageContent": { + "type": "object", + "required": [ + "type", + "detail" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_image" + ], + "description": "The type of the input item. Always `input_image`.", + "x-stainless-const": true, + "default": "input_image" + }, + "image_url": { + "type": "string", + "format": "uri", + "nullable": true + }, + "file_id": { + "type": "string", + "nullable": true + }, + "detail": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ImageDetail" + } + ], + "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" + }, + "OpenAI.MessageContentInputTextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" + }, + "text": { + "type": "string", + "description": "The text input to the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A text input to the model.", + "title": "Input text" + }, + "OpenAI.MessageContentOutputTextContent": { + "type": "object", + "required": [ + "type", + "text", + "annotations", + "logprobs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "output_text" + ], + "description": "The type of the output text. Always `output_text`.", + "x-stainless-const": true, + "default": "output_text" + }, + "text": { + "type": "string", + "description": "The text output from the model." + }, + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Annotation" + }, + "description": "The annotations of the text output." + }, + "logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LogProb" + } + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A text output from the model.", + "title": "Output text" + }, + "OpenAI.MessageContentReasoningTextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "reasoning_text" + ], + "description": "The type of the reasoning text. Always `reasoning_text`.", + "x-stainless-const": true, + "default": "reasoning_text" + }, + "text": { + "type": "string", + "description": "The reasoning text from the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "Reasoning text from the model.", + "title": "Reasoning text" + }, + "OpenAI.MessageContentRefusalContent": { + "type": "object", + "required": [ + "type", + "refusal" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "refusal" + ], + "description": "The type of the refusal. Always `refusal`.", + "x-stainless-const": true, + "default": "refusal" + }, + "refusal": { + "type": "string", + "description": "The refusal explanation from the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A refusal from the model.", + "title": "Refusal" + }, + "OpenAI.MessageContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "input_text", + "output_text", + "text", + "summary_text", + "reasoning_text", + "refusal", + "input_image", + "computer_screenshot", + "input_file" + ] + } + ] + }, + "OpenAI.MessageRole": { + "type": "string", + "enum": [ + "unknown", + "user", + "assistant", + "system", + "critic", + "discriminator", + "developer", + "tool" + ] + }, + "OpenAI.MessageStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.Metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "OpenAI.ModelIdsCompaction": { + "anyOf": [ + { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ModelIdsResponses" + } + ], + "description": "Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models.", + "nullable": true + }, + { + "type": "string", + "description": "Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models.", + "nullable": true + } + ], + "description": "Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](/docs/models) to browse and compare available models." + }, + "OpenAI.ModelIdsResponses": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.ModelIdsShared" + }, + { + "type": "string", + "enum": [ + "o1-pro", + "o1-pro-2025-03-19", + "o3-pro", + "o3-pro-2025-06-10", + "o3-deep-research", + "o3-deep-research-2025-06-26", + "o4-mini-deep-research", + "o4-mini-deep-research-2025-06-26", + "computer-use-preview", + "computer-use-preview-2025-03-11", + "gpt-5-codex", + "gpt-5-pro", + "gpt-5-pro-2025-10-06", + "gpt-5.1-codex-max" + ] + } + ] + }, + "OpenAI.ModelIdsShared": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.ChatModel" + } + ] + }, + "OpenAI.MoveParam": { + "type": "object", + "required": [ + "type", + "x", + "y" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "move" + ], + "description": "Specifies the event type. For a move action, this property is always set to `move`.", + "x-stainless-const": true, + "default": "move" + }, + "x": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The x-coordinate to move to." + }, + "y": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The y-coordinate to move to." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A mouse move action.", + "title": "Move" + }, + "OpenAI.OutputContent": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.OutputContentType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "output_text": "#/components/schemas/OpenAI.OutputContentOutputTextContent", + "refusal": "#/components/schemas/OpenAI.OutputContentRefusalContent", + "reasoning_text": "#/components/schemas/OpenAI.OutputContentReasoningTextContent" + } + } + }, + "OpenAI.OutputContentOutputTextContent": { + "type": "object", + "required": [ + "type", + "text", + "annotations", + "logprobs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "output_text" + ], + "description": "The type of the output text. Always `output_text`.", + "x-stainless-const": true, + "default": "output_text" + }, + "text": { + "type": "string", + "description": "The text output from the model." + }, + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Annotation" + }, + "description": "The annotations of the text output." + }, + "logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LogProb" + } + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputContent" + } + ], + "description": "A text output from the model.", + "title": "Output text" + }, + "OpenAI.OutputContentReasoningTextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "reasoning_text" + ], + "description": "The type of the reasoning text. Always `reasoning_text`.", + "x-stainless-const": true, + "default": "reasoning_text" + }, + "text": { + "type": "string", + "description": "The reasoning text from the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputContent" + } + ], + "description": "Reasoning text from the model.", + "title": "Reasoning text" + }, + "OpenAI.OutputContentRefusalContent": { + "type": "object", + "required": [ + "type", + "refusal" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "refusal" + ], + "description": "The type of the refusal. Always `refusal`.", + "x-stainless-const": true, + "default": "refusal" + }, + "refusal": { + "type": "string", + "description": "The refusal explanation from the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputContent" + } + ], + "description": "A refusal from the model.", + "title": "Refusal" + }, + "OpenAI.OutputContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "output_text", + "refusal", + "reasoning_text" + ] + } + ] + }, + "OpenAI.OutputItem": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.OutputItemType" + }, + "agent_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentReference" + } + ], + "description": "The agent that created the item." + }, + "response_id": { + "type": "string", + "description": "The response on which the item is created." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "structured_outputs": "#/components/schemas/StructuredOutputsOutputItem", + "workflow_action": "#/components/schemas/WorkflowActionOutputItem", + "oauth_consent_request": "#/components/schemas/OAuthConsentRequestOutputItem", + "memory_search_call": "#/components/schemas/MemorySearchToolCallItemResource", + "bing_grounding_call": "#/components/schemas/BingGroundingToolCall", + "bing_grounding_call_output": "#/components/schemas/BingGroundingToolCallOutput", + "sharepoint_grounding_preview_call": "#/components/schemas/SharepointGroundingToolCall", + "sharepoint_grounding_preview_call_output": "#/components/schemas/SharepointGroundingToolCallOutput", + "azure_ai_search_call": "#/components/schemas/AzureAISearchToolCall", + "azure_ai_search_call_output": "#/components/schemas/AzureAISearchToolCallOutput", + "bing_custom_search_preview_call": "#/components/schemas/BingCustomSearchToolCall", + "bing_custom_search_preview_call_output": "#/components/schemas/BingCustomSearchToolCallOutput", + "openapi_call": "#/components/schemas/OpenApiToolCall", + "openapi_call_output": "#/components/schemas/OpenApiToolCallOutput", + "browser_automation_preview_call": "#/components/schemas/BrowserAutomationToolCall", + "browser_automation_preview_call_output": "#/components/schemas/BrowserAutomationToolCallOutput", + "fabric_dataagent_preview_call": "#/components/schemas/FabricDataAgentToolCall", + "fabric_dataagent_preview_call_output": "#/components/schemas/FabricDataAgentToolCallOutput", + "azure_function_call": "#/components/schemas/AzureFunctionToolCall", + "azure_function_call_output": "#/components/schemas/AzureFunctionToolCallOutput", + "a2a_preview_call": "#/components/schemas/A2AToolCall", + "a2a_preview_call_output": "#/components/schemas/A2AToolCallOutput", + "output_message": "#/components/schemas/OpenAI.OutputItemOutputMessage", + "file_search_call": "#/components/schemas/OpenAI.OutputItemFileSearchToolCall", + "function_call": "#/components/schemas/OpenAI.OutputItemFunctionToolCall", + "web_search_call": "#/components/schemas/OpenAI.OutputItemWebSearchToolCall", + "computer_call": "#/components/schemas/OpenAI.OutputItemComputerToolCall", + "reasoning": "#/components/schemas/OpenAI.OutputItemReasoningItem", + "compaction": "#/components/schemas/OpenAI.OutputItemCompactionBody", + "image_generation_call": "#/components/schemas/OpenAI.OutputItemImageGenToolCall", + "code_interpreter_call": "#/components/schemas/OpenAI.OutputItemCodeInterpreterToolCall", + "local_shell_call": "#/components/schemas/OpenAI.OutputItemLocalShellToolCall", + "shell_call": "#/components/schemas/OpenAI.OutputItemFunctionShellCall", + "shell_call_output": "#/components/schemas/OpenAI.OutputItemFunctionShellCallOutput", + "apply_patch_call": "#/components/schemas/OpenAI.OutputItemApplyPatchToolCall", + "apply_patch_call_output": "#/components/schemas/OpenAI.OutputItemApplyPatchToolCallOutput", + "mcp_call": "#/components/schemas/OpenAI.OutputItemMcpToolCall", + "mcp_list_tools": "#/components/schemas/OpenAI.OutputItemMcpListTools", + "mcp_approval_request": "#/components/schemas/OpenAI.OutputItemMcpApprovalRequest", + "custom_tool_call": "#/components/schemas/OpenAI.OutputItemCustomToolCall" + } + } + }, + "OpenAI.OutputItemApplyPatchToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status", + "operation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call" + ], + "description": "The type of the item. Always `apply_patch_call`.", + "x-stainless-const": true, + "default": "apply_patch_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" + } + ], + "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + }, + "operation": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + } + ], + "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", + "title": "Apply patch operation" + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", + "title": "Apply patch tool call" + }, + "OpenAI.OutputItemApplyPatchToolCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch_call_output" + ], + "description": "The type of the item. Always `apply_patch_call_output`.", + "x-stainless-const": true, + "default": "apply_patch_call_output" + }, + "id": { + "type": "string", + "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the apply patch tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + } + ], + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." + }, + "output": { + "type": "string", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call output." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" + }, + "OpenAI.OutputItemCodeInterpreterToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "container_id", + "code", + "outputs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_interpreter_call" + ], + "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", + "x-stainless-const": true, + "default": "code_interpreter_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the code interpreter tool call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "interpreting", + "failed" + ], + "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." + }, + "container_id": { + "type": "string", + "description": "The ID of the container used to run the code." + }, + "code": { + "type": "string", + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" + }, + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" + } + ] + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A tool call to run code.", + "title": "Code interpreter tool call" + }, + "OpenAI.OutputItemCompactionBody": { + "type": "object", + "required": [ + "type", + "id", + "encrypted_content" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "compaction" + ], + "description": "The type of the item. Always `compaction`.", + "x-stainless-const": true, + "default": "compaction" + }, + "id": { + "type": "string", + "description": "The unique ID of the compaction item." + }, + "encrypted_content": { + "type": "string", + "description": "The encrypted content that was produced by compaction." + }, + "created_by": { + "type": "string", + "description": "The identifier of the actor that created the item." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" + }, + "OpenAI.OutputItemComputerToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_call" + ], + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the computer call." + }, + "call_id": { + "type": "string", + "description": "An identifier used when responding to the tool call with output." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + }, + "pending_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The pending safety checks for the computer call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A tool call to a computer use tool. See the\n[computer use guide](/docs/guides/tools-computer-use) for more information.", + "title": "Computer tool call" + }, + "OpenAI.OutputItemCustomToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "input" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom_tool_call" + ], + "description": "The type of the custom tool call. Always `custom_tool_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the custom tool call in the OpenAI platform." + }, + "call_id": { + "type": "string", + "description": "An identifier used to map this custom tool call to a tool call output." + }, + "name": { + "type": "string", + "description": "The name of the custom tool being called." + }, + "input": { + "type": "string", + "description": "The input for the custom tool call generated by the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" + }, + "OpenAI.OutputItemFileSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "queries" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, + "type": { + "type": "string", + "enum": [ + "file_search_call" + ], + "description": "The type of the file search tool call. Always `file_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "incomplete", + "failed" + ], + "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," + }, + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The queries used to search for files." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" + }, + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The results of a file search tool call. See the\n[file search guide](/docs/guides/tools-file-search) for more information.", + "title": "File search tool call" + }, + "OpenAI.OutputItemFunctionShellCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status", + "environment" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell_call" + ], + "description": "The type of the item. Always `shell_call`.", + "x-stainless-const": true, + "default": "shell_call" + }, + "id": { + "type": "string", + "description": "The unique ID of the shell tool call. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the shell tool call generated by the model." + }, + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellAction" + } + ], + "description": "The shell commands and limits that describe how to run the tool call." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" + } + ], + "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." + }, + "environment": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + } + ], + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A tool call that executes one or more shell commands in a managed environment.", + "title": "Shell tool call" + }, + "OpenAI.OutputItemFunctionShellCallOutput": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "status", + "output", + "max_output_length" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell_call_output" + ], + "description": "The type of the shell call output. Always `shell_call_output`.", + "x-stainless-const": true, + "default": "shell_call_output" + }, + "id": { + "type": "string", + "description": "The unique ID of the shell call output. Populated when this item is returned via API." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the shell tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + } + ], + "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" + }, + "description": "An array of shell call output contents" + }, + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The identifier of the actor that created the item." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output of a shell tool call that was emitted.", + "title": "Shell call output" + }, + "OpenAI.OutputItemFunctionToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "arguments" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, + "type": { + "type": "string", + "enum": [ + "function_call" + ], + "description": "The type of the function tool call. Always `function_call`.", + "x-stainless-const": true + }, + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the function to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments to pass to the function." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A tool call to run a function. See the\n[function calling guide](/docs/guides/function-calling) for more information.", + "title": "Function tool call" + }, + "OpenAI.OutputItemImageGenToolCall": { + "type": "object", + "required": [ + "type", + "id", + "status", + "result" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation_call" + ], + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the image generation call." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "generating", + "failed" + ], + "description": "The status of the image generation call." + }, + "result": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "An image generation request made by the model.", + "title": "Image generation call" + }, + "OpenAI.OutputItemLocalShellToolCall": { + "type": "object", + "required": [ + "type", + "id", + "call_id", + "action", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "local_shell_call" + ], + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the local shell call." + }, + "call_id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." + }, + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" + }, + "OpenAI.OutputItemMcpApprovalRequest": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_approval_request" + ], + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the approval request." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server making the request." + }, + "name": { + "type": "string", + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" + }, + "OpenAI.OutputItemMcpListTools": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "tools" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_list_tools" + ], + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the list." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + }, + "description": "The tools available on the server." + }, + "error": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" + }, + "OpenAI.OutputItemMcpToolCall": { + "type": "object", + "required": [ + "type", + "id", + "server_label", + "name", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp_call" + ], + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique ID of the tool call." + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server running the tool." + }, + "name": { + "type": "string", + "description": "The name of the tool that was run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of the arguments passed to the tool." + }, + "output": { + "type": "string", + "nullable": true + }, + "error": { + "type": "object", + "additionalProperties": {} + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + } + ], + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + }, + "approval_request_id": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" + }, + "OpenAI.OutputItemOutputMessage": { + "type": "object", + "required": [ + "id", + "type", + "role", + "content", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the output message." + }, + "type": { + "type": "string", + "enum": [ + "output_message" + ], + "description": "The type of the output message. Always `message`.", + "x-stainless-const": true + }, + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" + }, + "description": "The content of the output message." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "An output message from the model.", + "title": "Output message" + }, + "OpenAI.OutputItemReasoningItem": { + "type": "object", + "required": [ + "type", + "id", + "summary" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "reasoning" + ], + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true + }, + "id": { + "type": "string", + "description": "The unique identifier of the reasoning content." + }, + "encrypted_content": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + }, + "description": "Reasoning summary content." + }, + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + }, + "description": "Reasoning text content." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A description of the chain of thought used by a reasoning model while generating\na response. Be sure to include these items in your `input` to the Responses API\nfor subsequent turns of a conversation if you are manually\n[managing context](/docs/guides/conversation-state).", + "title": "Reasoning" + }, + "OpenAI.OutputItemType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "output_message", + "file_search_call", + "function_call", + "web_search_call", + "computer_call", + "reasoning", + "compaction", + "image_generation_call", + "code_interpreter_call", + "local_shell_call", + "shell_call", + "shell_call_output", + "apply_patch_call", + "apply_patch_call_output", + "mcp_call", + "mcp_list_tools", + "mcp_approval_request", + "custom_tool_call", + "structured_outputs", + "oauth_consent_request", + "memory_search_call", + "workflow_action", + "a2a_preview_call", + "a2a_preview_call_output", + "bing_grounding_call", + "bing_grounding_call_output", + "sharepoint_grounding_preview_call", + "sharepoint_grounding_preview_call_output", + "azure_ai_search_call", + "azure_ai_search_call_output", + "bing_custom_search_preview_call", + "bing_custom_search_preview_call_output", + "openapi_call", + "openapi_call_output", + "browser_automation_preview_call", + "browser_automation_preview_call_output", + "fabric_dataagent_preview_call", + "fabric_dataagent_preview_call_output", + "azure_function_call", + "azure_function_call_output" + ] + } + ] + }, + "OpenAI.OutputItemWebSearchToolCall": { + "type": "object", + "required": [ + "id", + "type", + "status", + "action" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, + "type": { + "type": "string", + "enum": [ + "web_search_call" + ], + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." + }, + "action": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + } + ], + "description": "An object describing the specific action taken in this web search call.\n Includes details on how the model used the web (search, open_page, find_in_page)." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The results of a web search tool call. See the\n[web search guide](/docs/guides/tools-web-search) for more information.", + "title": "Web search tool call" + }, + "OpenAI.OutputMessageContent": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.OutputMessageContentType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "output_text": "#/components/schemas/OpenAI.OutputMessageContentOutputTextContent", + "refusal": "#/components/schemas/OpenAI.OutputMessageContentRefusalContent" + } + } + }, + "OpenAI.OutputMessageContentOutputTextContent": { + "type": "object", + "required": [ + "type", + "text", + "annotations", + "logprobs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "output_text" + ], + "description": "The type of the output text. Always `output_text`.", + "x-stainless-const": true, + "default": "output_text" + }, + "text": { + "type": "string", + "description": "The text output from the model." + }, + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Annotation" + }, + "description": "The annotations of the text output." + }, + "logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LogProb" + } + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" + } + ], + "description": "A text output from the model.", + "title": "Output text" + }, + "OpenAI.OutputMessageContentRefusalContent": { + "type": "object", + "required": [ + "type", + "refusal" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "refusal" + ], + "description": "The type of the refusal. Always `refusal`.", + "x-stainless-const": true, + "default": "refusal" + }, + "refusal": { + "type": "string", + "description": "The refusal explanation from the model." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" + } + ], + "description": "A refusal from the model.", + "title": "Refusal" + }, + "OpenAI.OutputMessageContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "output_text", + "refusal" + ] + } + ] + }, + "OpenAI.Prompt": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the prompt template to use." + }, + "version": { + "type": "string", + "nullable": true + }, + "variables": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponsePromptVariables" + } + ], + "nullable": true + } + }, + "description": "Reference to a prompt template and its variables.\n[Learn more](/docs/guides/text?api-mode=responses#reusable-prompts)." + }, + "OpenAI.RankerVersionType": { + "type": "string", + "enum": [ + "auto", + "default-2024-11-15" + ] + }, + "OpenAI.RankingOptions": { + "type": "object", + "properties": { + "ranker": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.RankerVersionType" + } + ], + "description": "The ranker to use for the file search." + }, + "score_threshold": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results." + }, + "hybrid_search": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.HybridSearchOptions" + } + ], + "description": "Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled." + } + } + }, + "OpenAI.Reasoning": { + "type": "object", + "properties": { + "effort": { + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" + }, + "summary": { + "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ], + "nullable": true + }, + "generate_summary": { + "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ], + "nullable": true + } + }, + "description": "**gpt-5 and o-series models only**\nConfiguration options for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).", + "title": "Reasoning" + }, + "OpenAI.ReasoningEffort": { + "type": "string", + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh" + ], + "description": "Constrains effort on reasoning for\n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\nCurrently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing\nreasoning effort can result in faster responses and fewer tokens used\non reasoning in a response.\n- `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.\n- All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.\n- The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.\n- `xhigh` is supported for all models after `gpt-5.1-codex-max`.", + "nullable": true + }, + "OpenAI.ReasoningTextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "reasoning_text" + ], + "description": "The type of the reasoning text. Always `reasoning_text`.", + "x-stainless-const": true, + "default": "reasoning_text" + }, + "text": { + "type": "string", + "description": "The reasoning text from the model." + } + }, + "description": "Reasoning text from the model.", + "title": "Reasoning text" + }, + "OpenAI.Response": { + "type": "object", + "required": [ + "id", + "object", + "created_at", + "error", + "incomplete_details", + "output", + "instructions", + "parallel_tool_calls", + "agent_reference" + ], + "properties": { + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "top_logprobs": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "temperature": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true, + "default": 1 + }, + "top_p": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true, + "default": 1 + }, + "user": { + "type": "string", + "description": "This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations.\n A stable identifier for your end-users.\n Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](/docs/guides/safety-best-practices#safety-identifiers).", + "deprecated": true + }, + "safety_identifier": { + "type": "string", + "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies.\n The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. [Learn more](/docs/guides/safety-best-practices#safety-identifiers)." + }, + "prompt_cache_key": { + "type": "string", + "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](/docs/guides/prompt-caching)." + }, + "service_tier": { + "$ref": "#/components/schemas/OpenAI.ServiceTier" + }, + "prompt_cache_retention": { + "type": "string", + "enum": [ + "in-memory", + "24h" + ], + "nullable": true + }, + "previous_response_id": { + "type": "string", + "nullable": true + }, + "model": { + "type": "string", + "description": "The model deployment to use for the creation of this response." + }, + "reasoning": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Reasoning" + } + ], + "nullable": true + }, + "background": { + "type": "boolean", + "nullable": true + }, + "max_output_tokens": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "max_tool_calls": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + }, + "text": { + "$ref": "#/components/schemas/OpenAI.ResponseTextParam" + }, + "tools": { + "$ref": "#/components/schemas/OpenAI.ToolsArray" + }, + "tool_choice": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceOptions" + }, + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ] + }, + "prompt": { + "$ref": "#/components/schemas/OpenAI.Prompt" + }, + "truncation": { + "type": "string", + "enum": [ + "auto", + "disabled" + ], + "nullable": true, + "default": "disabled" + }, + "id": { + "type": "string", + "description": "Unique identifier for this Response." + }, + "object": { + "type": "string", + "enum": [ + "response" + ], + "description": "The object type of this resource - always set to `response`.", + "x-stainless-const": true + }, + "status": { + "type": "string", + "enum": [ + "completed", + "failed", + "in_progress", + "cancelled", + "queued", + "incomplete" + ], + "description": "The status of the response generation. One of `completed`, `failed`,\n `in_progress`, `cancelled`, `queued`, or `incomplete`." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "Unix timestamp (in seconds) of when this Response was created." + }, + "completed_at": { + "type": "integer", + "format": "unixtime", + "nullable": true + }, + "error": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseError" + } + ], + "nullable": true + }, + "incomplete_details": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseIncompleteDetails" + } + ], + "nullable": true + }, + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputItem" + }, + "description": "An array of content items generated by the model.\n - The length and order of items in the `output` array is dependent\n on the model's response.\n - Rather than accessing the first item in the `output` array and\n assuming it's an `assistant` message with the content generated by\n the model, you might consider using the `output_text` property where\n supported in SDKs." + }, + "instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + } + ], + "nullable": true + }, + "output_text": { + "type": "string", + "nullable": true + }, + "usage": { + "$ref": "#/components/schemas/OpenAI.ResponseUsage" + }, + "parallel_tool_calls": { + "type": "boolean", + "description": "Whether to allow the model to run tool calls in parallel.", + "default": true + }, + "conversation": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationReference" + } + ], + "nullable": true + }, + "agent_reference": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/AgentReference" + } + ], + "nullable": true, + "description": "The agent used for this response" + }, + "content_filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContentFilterResult" + }, + "description": "The content filter evaluation results." + } + }, + "title": "The response object" + }, + "OpenAI.ResponseAudioDeltaEvent": { + "type": "object", + "required": [ + "type", + "sequence_number", + "delta" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.audio.delta" + ], + "description": "The type of the event. Always `response.audio.delta`.", + "x-stainless-const": true + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "A sequence number for this chunk of the stream response." + }, + "delta": { + "type": "string", + "format": "base64", + "description": "A chunk of Base64 encoded response audio bytes." + } + }, + "description": "Emitted when there is a partial audio response.", + "x-oaiMeta": { + "name": "response.audio.delta", + "group": "responses", + "example": "{\n \"type\": \"response.audio.delta\",\n \"response_id\": \"resp_123\",\n \"delta\": \"base64encoded...\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseAudioDoneEvent": { + "type": "object", + "required": [ + "type", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.audio.done" + ], + "description": "The type of the event. Always `response.audio.done`.", + "x-stainless-const": true + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of the delta." + } + }, + "description": "Emitted when the audio response is complete.", + "x-oaiMeta": { + "name": "response.audio.done", + "group": "responses", + "example": "{\n \"type\": \"response.audio.done\",\n \"response_id\": \"resp-123\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseAudioTranscriptDeltaEvent": { + "type": "object", + "required": [ + "type", + "delta", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.audio.transcript.delta" + ], + "description": "The type of the event. Always `response.audio.transcript.delta`.", + "x-stainless-const": true + }, + "delta": { + "type": "string", + "description": "The partial transcript of the audio response." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when there is a partial transcript of audio.", + "x-oaiMeta": { + "name": "response.audio.transcript.delta", + "group": "responses", + "example": "{\n \"type\": \"response.audio.transcript.delta\",\n \"response_id\": \"resp_123\",\n \"delta\": \" ... partial transcript ... \",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseAudioTranscriptDoneEvent": { + "type": "object", + "required": [ + "type", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.audio.transcript.done" + ], + "description": "The type of the event. Always `response.audio.transcript.done`.", + "x-stainless-const": true + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when the full audio transcript is completed.", + "x-oaiMeta": { + "name": "response.audio.transcript.done", + "group": "responses", + "example": "{\n \"type\": \"response.audio.transcript.done\",\n \"response_id\": \"resp_123\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "delta", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.code_interpreter_call_code.delta" + ], + "description": "The type of the event. Always `response.code_interpreter_call_code.delta`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response for which the code is being streamed." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the code interpreter tool call item." + }, + "delta": { + "type": "string", + "description": "The partial code snippet being streamed by the code interpreter." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." + } + }, + "description": "Emitted when a partial code snippet is streamed by the code interpreter.", + "x-oaiMeta": { + "name": "response.code_interpreter_call_code.delta", + "group": "responses", + "example": "{\n \"type\": \"response.code_interpreter_call_code.delta\",\n \"output_index\": 0,\n \"item_id\": \"ci_12345\",\n \"delta\": \"print('Hello, world')\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseCodeInterpreterCallCodeDoneEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "code", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.code_interpreter_call_code.done" + ], + "description": "The type of the event. Always `response.code_interpreter_call_code.done`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response for which the code is finalized." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the code interpreter tool call item." + }, + "code": { + "type": "string", + "description": "The final code snippet output by the code interpreter." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." + } + }, + "description": "Emitted when the code snippet is finalized by the code interpreter.", + "x-oaiMeta": { + "name": "response.code_interpreter_call_code.done", + "group": "responses", + "example": "{\n \"type\": \"response.code_interpreter_call_code.done\",\n \"output_index\": 3,\n \"item_id\": \"ci_12345\",\n \"code\": \"print('done')\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseCodeInterpreterCallCompletedEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.code_interpreter_call.completed" + ], + "description": "The type of the event. Always `response.code_interpreter_call.completed`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response for which the code interpreter call is completed." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the code interpreter tool call item." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." + } + }, + "description": "Emitted when the code interpreter call is completed.", + "x-oaiMeta": { + "name": "response.code_interpreter_call.completed", + "group": "responses", + "example": "{\n \"type\": \"response.code_interpreter_call.completed\",\n \"output_index\": 5,\n \"item_id\": \"ci_12345\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseCodeInterpreterCallInProgressEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.code_interpreter_call.in_progress" + ], + "description": "The type of the event. Always `response.code_interpreter_call.in_progress`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response for which the code interpreter call is in progress." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the code interpreter tool call item." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." + } + }, + "description": "Emitted when a code interpreter call is in progress.", + "x-oaiMeta": { + "name": "response.code_interpreter_call.in_progress", + "group": "responses", + "example": "{\n \"type\": \"response.code_interpreter_call.in_progress\",\n \"output_index\": 0,\n \"item_id\": \"ci_12345\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseCodeInterpreterCallInterpretingEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.code_interpreter_call.interpreting" + ], + "description": "The type of the event. Always `response.code_interpreter_call.interpreting`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response for which the code interpreter is interpreting code." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the code interpreter tool call item." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." + } + }, + "description": "Emitted when the code interpreter is actively interpreting the code snippet.", + "x-oaiMeta": { + "name": "response.code_interpreter_call.interpreting", + "group": "responses", + "example": "{\n \"type\": \"response.code_interpreter_call.interpreting\",\n \"output_index\": 4,\n \"item_id\": \"ci_12345\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseCompletedEvent": { + "type": "object", + "required": [ + "type", + "response", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.completed" + ], + "description": "The type of the event. Always `response.completed`.", + "x-stainless-const": true + }, + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "Properties of the completed response." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number for this event." + } + }, + "description": "Emitted when the model response is complete.", + "x-oaiMeta": { + "name": "response.completed", + "group": "responses", + "example": "{\n \"type\": \"response.completed\",\n \"response\": {\n \"id\": \"resp_123\",\n \"object\": \"response\",\n \"created_at\": 1740855869,\n \"status\": \"completed\",\n \"completed_at\": 1740855870,\n \"error\": null,\n \"incomplete_details\": null,\n \"input\": [],\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"output\": [\n {\n \"id\": \"msg_123\",\n \"type\": \"message\",\n \"role\": \"assistant\",\n \"content\": [\n {\n \"type\": \"output_text\",\n \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n \"annotations\": []\n }\n ]\n }\n ],\n \"previous_response_id\": null,\n \"reasoning_effort\": null,\n \"store\": false,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": {\n \"input_tokens\": 0,\n \"output_tokens\": 0,\n \"output_tokens_details\": {\n \"reasoning_tokens\": 0\n },\n \"total_tokens\": 0\n },\n \"user\": null,\n \"metadata\": {}\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseContentPartAddedEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "content_index", + "part", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.content_part.added" + ], + "description": "The type of the event. Always `response.content_part.added`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the content part was added to." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the content part was added to." + }, + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part that was added." + }, + "part": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputContent" + } + ], + "description": "The content part that was added." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when a new content part is added.", + "x-oaiMeta": { + "name": "response.content_part.added", + "group": "responses", + "example": "{\n \"type\": \"response.content_part.added\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"part\": {\n \"type\": \"output_text\",\n \"text\": \"\",\n \"annotations\": []\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseContentPartDoneEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "content_index", + "sequence_number", + "part" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.content_part.done" + ], + "description": "The type of the event. Always `response.content_part.done`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the content part was added to." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the content part was added to." + }, + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part that is done." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "part": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputContent" + } + ], + "description": "The content part that is done." + } + }, + "description": "Emitted when a content part is done.", + "x-oaiMeta": { + "name": "response.content_part.done", + "group": "responses", + "example": "{\n \"type\": \"response.content_part.done\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"sequence_number\": 1,\n \"part\": {\n \"type\": \"output_text\",\n \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n \"annotations\": []\n }\n}\n" + } + }, + "OpenAI.ResponseCreatedEvent": { + "type": "object", + "required": [ + "type", + "response", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.created" + ], + "description": "The type of the event. Always `response.created`.", + "x-stainless-const": true + }, + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "The response that was created." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number for this event." + } + }, + "description": "An event that is emitted when a response is created.", + "x-oaiMeta": { + "name": "response.created", + "group": "responses", + "example": "{\n \"type\": \"response.created\",\n \"response\": {\n \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n \"object\": \"response\",\n \"created_at\": 1741487325,\n \"status\": \"in_progress\",\n \"completed_at\": null,\n \"error\": null,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-2024-08-06\",\n \"output\": [],\n \"parallel_tool_calls\": true,\n \"previous_response_id\": null,\n \"reasoning\": {\n \"effort\": null,\n \"summary\": null\n },\n \"store\": true,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": null,\n \"user\": null,\n \"metadata\": {}\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseCustomToolCallInputDeltaEvent": { + "type": "object", + "required": [ + "type", + "sequence_number", + "output_index", + "item_id", + "delta" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.custom_tool_call_input.delta" + ], + "description": "The event type identifier.", + "x-stainless-const": true + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output this delta applies to." + }, + "item_id": { + "type": "string", + "description": "Unique identifier for the API item associated with this event." + }, + "delta": { + "type": "string", + "description": "The incremental input data (delta) for the custom tool call." + } + }, + "description": "Event representing a delta (partial update) to the input of a custom tool call.", + "title": "ResponseCustomToolCallInputDelta", + "x-oaiMeta": { + "name": "response.custom_tool_call_input.delta", + "group": "responses", + "example": "{\n \"type\": \"response.custom_tool_call_input.delta\",\n \"output_index\": 0,\n \"item_id\": \"ctc_1234567890abcdef\",\n \"delta\": \"partial input text\"\n}\n" + } + }, + "OpenAI.ResponseCustomToolCallInputDoneEvent": { + "type": "object", + "required": [ + "type", + "sequence_number", + "output_index", + "item_id", + "input" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.custom_tool_call_input.done" + ], + "description": "The event type identifier.", + "x-stainless-const": true + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output this event applies to." + }, + "item_id": { + "type": "string", + "description": "Unique identifier for the API item associated with this event." + }, + "input": { + "type": "string", + "description": "The complete input data for the custom tool call." + } + }, + "description": "Event indicating that input for a custom tool call is complete.", + "title": "ResponseCustomToolCallInputDone", + "x-oaiMeta": { + "name": "response.custom_tool_call_input.done", + "group": "responses", + "example": "{\n \"type\": \"response.custom_tool_call_input.done\",\n \"output_index\": 0,\n \"item_id\": \"ctc_1234567890abcdef\",\n \"input\": \"final complete input text\"\n}\n" + } + }, + "OpenAI.ResponseError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "$ref": "#/components/schemas/OpenAI.ResponseErrorCode" + }, + "message": { + "type": "string", + "description": "A human-readable description of the error." + } + }, + "description": "An error object returned when the model fails to generate a Response." + }, + "OpenAI.ResponseErrorCode": { + "type": "string", + "enum": [ + "server_error", + "rate_limit_exceeded", + "invalid_prompt", + "vector_store_timeout", + "invalid_image", + "invalid_image_format", + "invalid_base64_image", + "invalid_image_url", + "image_too_large", + "image_too_small", + "image_parse_error", + "image_content_policy_violation", + "invalid_image_mode", + "image_file_too_large", + "unsupported_image_media_type", + "empty_image_file", + "failed_to_download_image", + "image_file_not_found" + ], + "description": "The error code for the response." + }, + "OpenAI.ResponseErrorEvent": { + "type": "object", + "required": [ + "type", + "code", + "message", + "param", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "error" + ], + "description": "The type of the event. Always `error`.", + "x-stainless-const": true + }, + "code": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "description": "The error message." + }, + "param": { + "type": "string", + "nullable": true + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when an error occurs.", + "x-oaiMeta": { + "name": "error", + "group": "responses", + "example": "{\n \"type\": \"error\",\n \"code\": \"ERR_SOMETHING\",\n \"message\": \"Something went wrong\",\n \"param\": null,\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseFailedEvent": { + "type": "object", + "required": [ + "type", + "sequence_number", + "response" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.failed" + ], + "description": "The type of the event. Always `response.failed`.", + "x-stainless-const": true + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "The response that failed." + } + }, + "description": "An event that is emitted when a response fails.", + "x-oaiMeta": { + "name": "response.failed", + "group": "responses", + "example": "{\n \"type\": \"response.failed\",\n \"response\": {\n \"id\": \"resp_123\",\n \"object\": \"response\",\n \"created_at\": 1740855869,\n \"status\": \"failed\",\n \"completed_at\": null,\n \"error\": {\n \"code\": \"server_error\",\n \"message\": \"The model failed to generate a response.\"\n },\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"output\": [],\n \"previous_response_id\": null,\n \"reasoning_effort\": null,\n \"store\": false,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": null,\n \"user\": null,\n \"metadata\": {}\n }\n}\n" + } + }, + "OpenAI.ResponseFileSearchCallCompletedEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.file_search_call.completed" + ], + "description": "The type of the event. Always `response.file_search_call.completed`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the file search call is initiated." + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the file search call is initiated." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when a file search call is completed (results found).", + "x-oaiMeta": { + "name": "response.file_search_call.completed", + "group": "responses", + "example": "{\n \"type\": \"response.file_search_call.completed\",\n \"output_index\": 0,\n \"item_id\": \"fs_123\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseFileSearchCallInProgressEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.file_search_call.in_progress" + ], + "description": "The type of the event. Always `response.file_search_call.in_progress`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the file search call is initiated." + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the file search call is initiated." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when a file search call is initiated.", + "x-oaiMeta": { + "name": "response.file_search_call.in_progress", + "group": "responses", + "example": "{\n \"type\": \"response.file_search_call.in_progress\",\n \"output_index\": 0,\n \"item_id\": \"fs_123\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseFileSearchCallSearchingEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.file_search_call.searching" + ], + "description": "The type of the event. Always `response.file_search_call.searching`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the file search call is searching." + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the file search call is initiated." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when a file search is currently searching.", + "x-oaiMeta": { + "name": "response.file_search_call.searching", + "group": "responses", + "example": "{\n \"type\": \"response.file_search_call.searching\",\n \"output_index\": 0,\n \"item_id\": \"fs_123\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseFormatJsonObject": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "json_object" + ], + "description": "The type of response format being defined. Always `json_object`.", + "x-stainless-const": true + } + }, + "description": "JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.", + "title": "JSON object" + }, + "OpenAI.ResponseFormatJsonSchema": { + "type": "object", + "required": [ + "type", + "json_schema" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "json_schema" + ], + "description": "The type of response format being defined. Always `json_schema`.", + "x-stainless-const": true + }, + "json_schema": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaJsonSchema" + } + ], + "description": "Structured Outputs configuration options, including a JSON Schema.", + "title": "JSON schema" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" + } + ], + "description": "JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/docs/guides/structured-outputs).", + "title": "JSON schema" + }, + "OpenAI.ResponseFormatJsonSchemaJsonSchema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "schema": { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaSchema" + }, + "strict": { + "type": "boolean", + "nullable": true + } + } + }, + "OpenAI.ResponseFormatJsonSchemaSchema": { + "type": "object", + "additionalProperties": {}, + "description": "The schema for the response format, described as a JSON Schema object.\nLearn how to build JSON schemas [here](https://json-schema.org/).", + "title": "JSON schema" + }, + "OpenAI.ResponseFormatText": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of response format being defined. Always `text`.", + "x-stainless-const": true + } + }, + "description": "Default response format. Used to generate text responses.", + "title": "Text" + }, + "OpenAI.ResponseFunctionCallArgumentsDeltaEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "sequence_number", + "delta" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.function_call_arguments.delta" + ], + "description": "The type of the event. Always `response.function_call_arguments.delta`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the function-call arguments delta is added to." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the function-call arguments delta is added to." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "delta": { + "type": "string", + "description": "The function-call arguments delta that is added." + } + }, + "description": "Emitted when there is a partial function-call arguments delta.", + "x-oaiMeta": { + "name": "response.function_call_arguments.delta", + "group": "responses", + "example": "{\n \"type\": \"response.function_call_arguments.delta\",\n \"item_id\": \"item-abc\",\n \"output_index\": 0,\n \"delta\": \"{ \"arg\":\"\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseFunctionCallArgumentsDoneEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "name", + "output_index", + "sequence_number", + "arguments" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.function_call_arguments.done" + ], + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the item." + }, + "name": { + "type": "string", + "description": "The name of the function that was called." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "arguments": { + "type": "string", + "description": "The function-call arguments." + } + }, + "description": "Emitted when function-call arguments are finalized.", + "x-oaiMeta": { + "name": "response.function_call_arguments.done", + "group": "responses", + "example": "{\n \"type\": \"response.function_call_arguments.done\",\n \"item_id\": \"item-abc\",\n \"name\": \"get_weather\",\n \"output_index\": 1,\n \"arguments\": \"{ \"arg\": 123 }\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseImageGenCallCompletedEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "sequence_number", + "item_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.image_generation_call.completed" + ], + "description": "The type of the event. Always 'response.image_generation_call.completed'.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response's output array." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the image generation item being processed." + } + }, + "description": "Emitted when an image generation tool call has completed and the final image is available.", + "title": "ResponseImageGenCallCompletedEvent", + "x-oaiMeta": { + "name": "response.image_generation_call.completed", + "group": "responses", + "example": "{\n \"type\": \"response.image_generation_call.completed\",\n \"output_index\": 0,\n \"item_id\": \"item-123\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseImageGenCallGeneratingEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.image_generation_call.generating" + ], + "description": "The type of the event. Always 'response.image_generation_call.generating'.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response's output array." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the image generation item being processed." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of the image generation item being processed." + } + }, + "description": "Emitted when an image generation tool call is actively generating an image (intermediate state).", + "title": "ResponseImageGenCallGeneratingEvent", + "x-oaiMeta": { + "name": "response.image_generation_call.generating", + "group": "responses", + "example": "{\n \"type\": \"response.image_generation_call.generating\",\n \"output_index\": 0,\n \"item_id\": \"item-123\",\n \"sequence_number\": 0\n}\n" + } + }, + "OpenAI.ResponseImageGenCallInProgressEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.image_generation_call.in_progress" + ], + "description": "The type of the event. Always 'response.image_generation_call.in_progress'.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response's output array." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the image generation item being processed." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of the image generation item being processed." + } + }, + "description": "Emitted when an image generation tool call is in progress.", + "title": "ResponseImageGenCallInProgressEvent", + "x-oaiMeta": { + "name": "response.image_generation_call.in_progress", + "group": "responses", + "example": "{\n \"type\": \"response.image_generation_call.in_progress\",\n \"output_index\": 0,\n \"item_id\": \"item-123\",\n \"sequence_number\": 0\n}\n" + } + }, + "OpenAI.ResponseImageGenCallPartialImageEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number", + "partial_image_index", + "partial_image_b64" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.image_generation_call.partial_image" + ], + "description": "The type of the event. Always 'response.image_generation_call.partial_image'.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response's output array." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the image generation item being processed." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of the image generation item being processed." + }, + "partial_image_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "0-based index for the partial image (backend is 1-based, but this is 0-based for the user)." + }, + "partial_image_b64": { + "type": "string", + "description": "Base64-encoded partial image data, suitable for rendering as an image." + } + }, + "description": "Emitted when a partial image is available during image generation streaming.", + "title": "ResponseImageGenCallPartialImageEvent", + "x-oaiMeta": { + "name": "response.image_generation_call.partial_image", + "group": "responses", + "example": "{\n \"type\": \"response.image_generation_call.partial_image\",\n \"output_index\": 0,\n \"item_id\": \"item-123\",\n \"sequence_number\": 0,\n \"partial_image_index\": 0,\n \"partial_image_b64\": \"...\"\n}\n" + } + }, + "OpenAI.ResponseInProgressEvent": { + "type": "object", + "required": [ + "type", + "response", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.in_progress" + ], + "description": "The type of the event. Always `response.in_progress`.", + "x-stainless-const": true + }, + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "The response that is in progress." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when the response is in progress.", + "x-oaiMeta": { + "name": "response.in_progress", + "group": "responses", + "example": "{\n \"type\": \"response.in_progress\",\n \"response\": {\n \"id\": \"resp_67ccfcdd16748190a91872c75d38539e09e4d4aac714747c\",\n \"object\": \"response\",\n \"created_at\": 1741487325,\n \"status\": \"in_progress\",\n \"completed_at\": null,\n \"error\": null,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-2024-08-06\",\n \"output\": [],\n \"parallel_tool_calls\": true,\n \"previous_response_id\": null,\n \"reasoning\": {\n \"effort\": null,\n \"summary\": null\n },\n \"store\": true,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": null,\n \"user\": null,\n \"metadata\": {}\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseIncompleteDetails": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "enum": [ + "max_output_tokens", + "content_filter" + ] + } + } + }, + "OpenAI.ResponseIncompleteEvent": { + "type": "object", + "required": [ + "type", + "response", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.incomplete" + ], + "description": "The type of the event. Always `response.incomplete`.", + "x-stainless-const": true + }, + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "The response that was incomplete." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "An event that is emitted when a response finishes as incomplete.", + "x-oaiMeta": { + "name": "response.incomplete", + "group": "responses", + "example": "{\n \"type\": \"response.incomplete\",\n \"response\": {\n \"id\": \"resp_123\",\n \"object\": \"response\",\n \"created_at\": 1740855869,\n \"status\": \"incomplete\",\n \"completed_at\": null,\n \"error\": null,\n \"incomplete_details\": {\n \"reason\": \"max_tokens\"\n },\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"output\": [],\n \"previous_response_id\": null,\n \"reasoning_effort\": null,\n \"store\": false,\n \"temperature\": 1,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n }\n },\n \"tool_choice\": \"auto\",\n \"tools\": [],\n \"top_p\": 1,\n \"truncation\": \"disabled\",\n \"usage\": null,\n \"user\": null,\n \"metadata\": {}\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseLogProb": { + "type": "object", + "required": [ + "token", + "logprob" + ], + "properties": { + "token": { + "type": "string", + "description": "A possible text token." + }, + "logprob": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The log probability of this token." + }, + "top_logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ResponseLogProbTopLogprobs" + }, + "description": "The log probability of the top 20 most likely tokens." + } + }, + "description": "A logprob is the logarithmic probability that the model assigns to producing\na particular token at a given position in the sequence. Less-negative (higher)\nlogprob values indicate greater model confidence in that token choice." + }, + "OpenAI.ResponseLogProbTopLogprobs": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "logprob": { + "$ref": "#/components/schemas/OpenAI.numeric" + } + } + }, + "OpenAI.ResponseMCPCallArgumentsDeltaEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "delta", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.mcp_call_arguments.delta" + ], + "description": "The type of the event. Always 'response.mcp_call_arguments.delta'.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response's output array." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the MCP tool call item being processed." + }, + "delta": { + "type": "string", + "description": "A JSON string containing the partial update to the arguments for the MCP tool call." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when there is a delta (partial update) to the arguments of an MCP tool call.", + "title": "ResponseMCPCallArgumentsDeltaEvent", + "x-oaiMeta": { + "name": "response.mcp_call_arguments.delta", + "group": "responses", + "example": "{\n \"type\": \"response.mcp_call_arguments.delta\",\n \"output_index\": 0,\n \"item_id\": \"item-abc\",\n \"delta\": \"{\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseMCPCallArgumentsDoneEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "arguments", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.mcp_call_arguments.done" + ], + "description": "The type of the event. Always 'response.mcp_call_arguments.done'.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response's output array." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the MCP tool call item being processed." + }, + "arguments": { + "type": "string", + "description": "A JSON string containing the finalized arguments for the MCP tool call." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when the arguments for an MCP tool call are finalized.", + "title": "ResponseMCPCallArgumentsDoneEvent", + "x-oaiMeta": { + "name": "response.mcp_call_arguments.done", + "group": "responses", + "example": "{\n \"type\": \"response.mcp_call_arguments.done\",\n \"output_index\": 0,\n \"item_id\": \"item-abc\",\n \"arguments\": \"{\"arg1\": \"value1\", \"arg2\": \"value2\"}\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseMCPCallCompletedEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.mcp_call.completed" + ], + "description": "The type of the event. Always 'response.mcp_call.completed'.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the MCP tool call item that completed." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that completed." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when an MCP tool call has completed successfully.", + "title": "ResponseMCPCallCompletedEvent", + "x-oaiMeta": { + "name": "response.mcp_call.completed", + "group": "responses", + "example": "{\n \"type\": \"response.mcp_call.completed\",\n \"sequence_number\": 1,\n \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n \"output_index\": 0\n}\n" + } + }, + "OpenAI.ResponseMCPCallFailedEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.mcp_call.failed" + ], + "description": "The type of the event. Always 'response.mcp_call.failed'.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the MCP tool call item that failed." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that failed." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when an MCP tool call has failed.", + "title": "ResponseMCPCallFailedEvent", + "x-oaiMeta": { + "name": "response.mcp_call.failed", + "group": "responses", + "example": "{\n \"type\": \"response.mcp_call.failed\",\n \"sequence_number\": 1,\n \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n \"output_index\": 0\n}\n" + } + }, + "OpenAI.ResponseMCPCallInProgressEvent": { + "type": "object", + "required": [ + "type", + "sequence_number", + "output_index", + "item_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.mcp_call.in_progress" + ], + "description": "The type of the event. Always 'response.mcp_call.in_progress'.", + "x-stainless-const": true + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response's output array." + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the MCP tool call item being processed." + } + }, + "description": "Emitted when an MCP tool call is in progress.", + "title": "ResponseMCPCallInProgressEvent", + "x-oaiMeta": { + "name": "response.mcp_call.in_progress", + "group": "responses", + "example": "{\n \"type\": \"response.mcp_call.in_progress\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\"\n}\n" + } + }, + "OpenAI.ResponseMCPListToolsCompletedEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.mcp_list_tools.completed" + ], + "description": "The type of the event. Always 'response.mcp_list_tools.completed'.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the MCP tool call item that produced this output." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that was processed." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when the list of available MCP tools has been successfully retrieved.", + "title": "ResponseMCPListToolsCompletedEvent", + "x-oaiMeta": { + "name": "response.mcp_list_tools.completed", + "group": "responses", + "example": "{\n \"type\": \"response.mcp_list_tools.completed\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n" + } + }, + "OpenAI.ResponseMCPListToolsFailedEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.mcp_list_tools.failed" + ], + "description": "The type of the event. Always 'response.mcp_list_tools.failed'.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the MCP tool call item that failed." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that failed." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when the attempt to list available MCP tools has failed.", + "title": "ResponseMCPListToolsFailedEvent", + "x-oaiMeta": { + "name": "response.mcp_list_tools.failed", + "group": "responses", + "example": "{\n \"type\": \"response.mcp_list_tools.failed\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n" + } + }, + "OpenAI.ResponseMCPListToolsInProgressEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.mcp_list_tools.in_progress" + ], + "description": "The type of the event. Always 'response.mcp_list_tools.in_progress'.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the MCP tool call item that is being processed." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that is being processed." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when the system is in the process of retrieving the list of available MCP tools.", + "title": "ResponseMCPListToolsInProgressEvent", + "x-oaiMeta": { + "name": "response.mcp_list_tools.in_progress", + "group": "responses", + "example": "{\n \"type\": \"response.mcp_list_tools.in_progress\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n" + } + }, + "OpenAI.ResponseOutputItemAddedEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "sequence_number", + "item" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.output_item.added" + ], + "description": "The type of the event. Always `response.output_item.added`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that was added." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "item": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output item that was added." + } + }, + "description": "Emitted when a new output item is added.", + "x-oaiMeta": { + "name": "response.output_item.added", + "group": "responses", + "example": "{\n \"type\": \"response.output_item.added\",\n \"output_index\": 0,\n \"item\": {\n \"id\": \"msg_123\",\n \"status\": \"in_progress\",\n \"type\": \"message\",\n \"role\": \"assistant\",\n \"content\": []\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseOutputItemDoneEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "sequence_number", + "item" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.output_item.done" + ], + "description": "The type of the event. Always `response.output_item.done`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that was marked done." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "item": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output item that was marked done." + } + }, + "description": "Emitted when an output item is marked done.", + "x-oaiMeta": { + "name": "response.output_item.done", + "group": "responses", + "example": "{\n \"type\": \"response.output_item.done\",\n \"output_index\": 0,\n \"item\": {\n \"id\": \"msg_123\",\n \"status\": \"completed\",\n \"type\": \"message\",\n \"role\": \"assistant\",\n \"content\": [\n {\n \"type\": \"output_text\",\n \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n \"annotations\": []\n }\n ]\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseOutputTextAnnotationAddedEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "content_index", + "annotation_index", + "sequence_number", + "annotation" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.output_text.annotation.added" + ], + "description": "The type of the event. Always 'response.output_text.annotation.added'.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The unique identifier of the item to which the annotation is being added." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response's output array." + }, + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part within the output item." + }, + "annotation_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the annotation within the content part." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "annotation": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Annotation" + } + ], + "description": "The annotation object being added. (See annotation schema for details.)" + } + }, + "description": "Emitted when an annotation is added to output text content.", + "title": "ResponseOutputTextAnnotationAddedEvent", + "x-oaiMeta": { + "name": "response.output_text.annotation.added", + "group": "responses", + "example": "{\n \"type\": \"response.output_text.annotation.added\",\n \"item_id\": \"item-abc\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"annotation_index\": 0,\n \"annotation\": {\n \"type\": \"text_annotation\",\n \"text\": \"This is a test annotation\",\n \"start\": 0,\n \"end\": 10\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponsePromptVariables": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.InputTextContent" + }, + { + "$ref": "#/components/schemas/OpenAI.InputImageContent" + }, + { + "$ref": "#/components/schemas/OpenAI.InputFileContent" + } + ] + }, + "description": "Optional map of values to substitute in for variables in your\nprompt. The substitution values can either be strings, or other\nResponse input types like images or files.", + "title": "Prompt Variables", + "x-oaiExpandable": true, + "x-oaiTypeLabel": "map" + }, + "OpenAI.ResponseQueuedEvent": { + "type": "object", + "required": [ + "type", + "response", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.queued" + ], + "description": "The type of the event. Always 'response.queued'.", + "x-stainless-const": true + }, + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "The full response object that is queued." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number for this event." + } + }, + "description": "Emitted when a response is queued and waiting to be processed.", + "title": "ResponseQueuedEvent", + "x-oaiMeta": { + "name": "response.queued", + "group": "responses", + "example": "{\n \"type\": \"response.queued\",\n \"response\": {\n \"id\": \"res_123\",\n \"status\": \"queued\",\n \"created_at\": \"2021-01-01T00:00:00Z\",\n \"updated_at\": \"2021-01-01T00:00:00Z\"\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseReasoningSummaryPartAddedEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "summary_index", + "sequence_number", + "part" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.reasoning_summary_part.added" + ], + "description": "The type of the event. Always `response.reasoning_summary_part.added`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the item this summary part is associated with." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item this summary part is associated with." + }, + "summary_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the summary part within the reasoning summary." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "part": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartAddedEventPart" + } + ], + "description": "The summary part that was added." + } + }, + "description": "Emitted when a new reasoning summary part is added.", + "x-oaiMeta": { + "name": "response.reasoning_summary_part.added", + "group": "responses", + "example": "{\n \"type\": \"response.reasoning_summary_part.added\",\n \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n \"output_index\": 0,\n \"summary_index\": 0,\n \"part\": {\n \"type\": \"summary_text\",\n \"text\": \"\"\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseReasoningSummaryPartAddedEventPart": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "summary_text" + ], + "x-stainless-const": true + }, + "text": { + "type": "string" + } + } + }, + "OpenAI.ResponseReasoningSummaryPartDoneEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "summary_index", + "sequence_number", + "part" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.reasoning_summary_part.done" + ], + "description": "The type of the event. Always `response.reasoning_summary_part.done`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the item this summary part is associated with." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item this summary part is associated with." + }, + "summary_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the summary part within the reasoning summary." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + }, + "part": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEventPart" + } + ], + "description": "The completed summary part." + } + }, + "description": "Emitted when a reasoning summary part is completed.", + "x-oaiMeta": { + "name": "response.reasoning_summary_part.done", + "group": "responses", + "example": "{\n \"type\": \"response.reasoning_summary_part.done\",\n \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n \"output_index\": 0,\n \"summary_index\": 0,\n \"part\": {\n \"type\": \"summary_text\",\n \"text\": \"**Responding to a greeting**\n\nThe user just said, \"Hello!\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \"Hello! How can I assist you today?\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\"\n },\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseReasoningSummaryPartDoneEventPart": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "summary_text" + ], + "x-stainless-const": true + }, + "text": { + "type": "string" + } + } + }, + "OpenAI.ResponseReasoningSummaryTextDeltaEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "summary_index", + "delta", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.reasoning_summary_text.delta" + ], + "description": "The type of the event. Always `response.reasoning_summary_text.delta`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the item this summary text delta is associated with." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item this summary text delta is associated with." + }, + "summary_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the summary part within the reasoning summary." + }, + "delta": { + "type": "string", + "description": "The text delta that was added to the summary." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when a delta is added to a reasoning summary text.", + "x-oaiMeta": { + "name": "response.reasoning_summary_text.delta", + "group": "responses", + "example": "{\n \"type\": \"response.reasoning_summary_text.delta\",\n \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n \"output_index\": 0,\n \"summary_index\": 0,\n \"delta\": \"**Responding to a greeting**\n\nThe user just said, \"Hello!\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \"Hello! How can I assist you today?\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseReasoningSummaryTextDoneEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "summary_index", + "text", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.reasoning_summary_text.done" + ], + "description": "The type of the event. Always `response.reasoning_summary_text.done`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the item this summary text is associated with." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item this summary text is associated with." + }, + "summary_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the summary part within the reasoning summary." + }, + "text": { + "type": "string", + "description": "The full text of the completed reasoning summary." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when a reasoning summary text is completed.", + "x-oaiMeta": { + "name": "response.reasoning_summary_text.done", + "group": "responses", + "example": "{\n \"type\": \"response.reasoning_summary_text.done\",\n \"item_id\": \"rs_6806bfca0b2481918a5748308061a2600d3ce51bdffd5476\",\n \"output_index\": 0,\n \"summary_index\": 0,\n \"text\": \"**Responding to a greeting**\n\nThe user just said, \"Hello!\" So, it seems I need to engage. I'll greet them back and offer help since they're looking to chat. I could say something like, \"Hello! How can I assist you today?\" That feels friendly and open. They didn't ask a specific question, so this approach will work well for starting a conversation. Let's see where it goes from there!\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseReasoningTextDeltaEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "content_index", + "delta", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.reasoning_text.delta" + ], + "description": "The type of the event. Always `response.reasoning_text.delta`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the item this reasoning text delta is associated with." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item this reasoning text delta is associated with." + }, + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the reasoning content part this delta is associated with." + }, + "delta": { + "type": "string", + "description": "The text delta that was added to the reasoning content." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when a delta is added to a reasoning text.", + "x-oaiMeta": { + "name": "response.reasoning_text.delta", + "group": "responses", + "example": "{\n \"type\": \"response.reasoning_text.delta\",\n \"item_id\": \"rs_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"delta\": \"The\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseReasoningTextDoneEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "content_index", + "text", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.reasoning_text.done" + ], + "description": "The type of the event. Always `response.reasoning_text.done`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the item this reasoning text is associated with." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item this reasoning text is associated with." + }, + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the reasoning content part." + }, + "text": { + "type": "string", + "description": "The full text of the completed reasoning content." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when a reasoning text is completed.", + "x-oaiMeta": { + "name": "response.reasoning_text.done", + "group": "responses", + "example": "{\n \"type\": \"response.reasoning_text.done\",\n \"item_id\": \"rs_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"text\": \"The user is asking...\",\n \"sequence_number\": 4\n}\n" + } + }, + "OpenAI.ResponseRefusalDeltaEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "content_index", + "delta", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.refusal.delta" + ], + "description": "The type of the event. Always `response.refusal.delta`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the refusal text is added to." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the refusal text is added to." + }, + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part that the refusal text is added to." + }, + "delta": { + "type": "string", + "description": "The refusal text that is added." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when there is a partial refusal text.", + "x-oaiMeta": { + "name": "response.refusal.delta", + "group": "responses", + "example": "{\n \"type\": \"response.refusal.delta\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"delta\": \"refusal text so far\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseRefusalDoneEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "content_index", + "refusal", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.refusal.done" + ], + "description": "The type of the event. Always `response.refusal.done`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the refusal text is finalized." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the refusal text is finalized." + }, + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part that the refusal text is finalized." + }, + "refusal": { + "type": "string", + "description": "The refusal text that is finalized." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." + } + }, + "description": "Emitted when refusal text is finalized.", + "x-oaiMeta": { + "name": "response.refusal.done", + "group": "responses", + "example": "{\n \"type\": \"response.refusal.done\",\n \"item_id\": \"item-abc\",\n \"output_index\": 1,\n \"content_index\": 2,\n \"refusal\": \"final refusal text\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseStreamOptions": { + "type": "object", + "properties": { + "include_obfuscation": { + "type": "boolean", + "description": "When true, stream obfuscation will be enabled. Stream obfuscation adds\n random characters to an `obfuscation` field on streaming delta events to\n normalize payload sizes as a mitigation to certain side-channel attacks.\n These obfuscation fields are included by default, but add a small amount\n of overhead to the data stream. You can set `include_obfuscation` to\n false to optimize for bandwidth if you trust the network links between\n your application and the OpenAI API." + } + }, + "description": "Options for streaming responses. Only set this when you set `stream: true`." + }, + "OpenAI.ResponseTextDeltaEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "content_index", + "delta", + "sequence_number", + "logprobs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.output_text.delta" + ], + "description": "The type of the event. Always `response.output_text.delta`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the text delta was added to." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the text delta was added to." + }, + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part that the text delta was added to." + }, + "delta": { + "type": "string", + "description": "The text delta that was added." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number for this event." + }, + "logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ResponseLogProb" + }, + "description": "The log probabilities of the tokens in the delta." + } + }, + "description": "Emitted when there is an additional text delta.", + "x-oaiMeta": { + "name": "response.output_text.delta", + "group": "responses", + "example": "{\n \"type\": \"response.output_text.delta\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"delta\": \"In\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseTextDoneEvent": { + "type": "object", + "required": [ + "type", + "item_id", + "output_index", + "content_index", + "text", + "sequence_number", + "logprobs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.output_text.done" + ], + "description": "The type of the event. Always `response.output_text.done`.", + "x-stainless-const": true + }, + "item_id": { + "type": "string", + "description": "The ID of the output item that the text content is finalized." + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the text content is finalized." + }, + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part that the text content is finalized." + }, + "text": { + "type": "string", + "description": "The text content that is finalized." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number for this event." + }, + "logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ResponseLogProb" + }, + "description": "The log probabilities of the tokens in the delta." + } + }, + "description": "Emitted when text content is finalized.", + "x-oaiMeta": { + "name": "response.output_text.done", + "group": "responses", + "example": "{\n \"type\": \"response.output_text.done\",\n \"item_id\": \"msg_123\",\n \"output_index\": 0,\n \"content_index\": 0,\n \"text\": \"In a shimmering forest under a sky full of stars, a lonely unicorn named Lila discovered a hidden pond that glowed with moonlight. Every night, she would leave sparkling, magical flowers by the water's edge, hoping to share her beauty with others. One enchanting evening, she woke to find a group of friendly animals gathered around, eager to be friends and share in her magic.\",\n \"sequence_number\": 1\n}\n" + } + }, + "OpenAI.ResponseTextParam": { + "type": "object", + "properties": { + "format": { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + }, + "verbosity": { + "$ref": "#/components/schemas/OpenAI.Verbosity" + } + }, + "description": "Configuration options for a text response from the model. Can be plain\ntext or structured JSON data. Learn more:\n- [Text inputs and outputs](/docs/guides/text)\n- [Structured Outputs](/docs/guides/structured-outputs)" + }, + "OpenAI.ResponseUsage": { + "type": "object", + "required": [ + "input_tokens", + "input_tokens_details", + "output_tokens", + "output_tokens_details", + "total_tokens" + ], + "properties": { + "input_tokens": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The number of input tokens." + }, + "input_tokens_details": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" + } + ], + "description": "A detailed breakdown of the input tokens." + }, + "output_tokens": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The number of output tokens." + }, + "output_tokens_details": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" + } + ], + "description": "A detailed breakdown of the output tokens." + }, + "total_tokens": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The total number of tokens used." + } + }, + "description": "Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used." + }, + "OpenAI.ResponseUsageInputTokensDetails": { + "type": "object", + "required": [ + "cached_tokens" + ], + "properties": { + "cached_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "OpenAI.ResponseUsageOutputTokensDetails": { + "type": "object", + "required": [ + "reasoning_tokens" + ], + "properties": { + "reasoning_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "OpenAI.ResponseWebSearchCallCompletedEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.web_search_call.completed" + ], + "description": "The type of the event. Always `response.web_search_call.completed`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the web search call is associated with." + }, + "item_id": { + "type": "string", + "description": "Unique ID for the output item associated with the web search call." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of the web search call being processed." + } + }, + "description": "Emitted when a web search call is completed.", + "x-oaiMeta": { + "name": "response.web_search_call.completed", + "group": "responses", + "example": "{\n \"type\": \"response.web_search_call.completed\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" + } + }, + "OpenAI.ResponseWebSearchCallInProgressEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.web_search_call.in_progress" + ], + "description": "The type of the event. Always `response.web_search_call.in_progress`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the web search call is associated with." + }, + "item_id": { + "type": "string", + "description": "Unique ID for the output item associated with the web search call." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of the web search call being processed." + } + }, + "description": "Emitted when a web search call is initiated.", + "x-oaiMeta": { + "name": "response.web_search_call.in_progress", + "group": "responses", + "example": "{\n \"type\": \"response.web_search_call.in_progress\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" + } + }, + "OpenAI.ResponseWebSearchCallSearchingEvent": { + "type": "object", + "required": [ + "type", + "output_index", + "item_id", + "sequence_number" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response.web_search_call.searching" + ], + "description": "The type of the event. Always `response.web_search_call.searching`.", + "x-stainless-const": true + }, + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the web search call is associated with." + }, + "item_id": { + "type": "string", + "description": "Unique ID for the output item associated with the web search call." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of the web search call being processed." + } + }, + "description": "Emitted when a web search call is executing.", + "x-oaiMeta": { + "name": "response.web_search_call.searching", + "group": "responses", + "example": "{\n \"type\": \"response.web_search_call.searching\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" + } + }, + "OpenAI.ScreenshotParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "screenshot" + ], + "description": "Specifies the event type. For a screenshot action, this property is always set to `screenshot`.", + "x-stainless-const": true, + "default": "screenshot" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A screenshot action.", + "title": "Screenshot" + }, + "OpenAI.ScrollParam": { + "type": "object", + "required": [ + "type", + "x", + "y", + "scroll_x", + "scroll_y" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "scroll" + ], + "description": "Specifies the event type. For a scroll action, this property is always set to `scroll`.", + "x-stainless-const": true, + "default": "scroll" + }, + "x": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The x-coordinate where the scroll occurred." + }, + "y": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The y-coordinate where the scroll occurred." + }, + "scroll_x": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The horizontal scroll distance." + }, + "scroll_y": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The vertical scroll distance." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A scroll action.", + "title": "Scroll" + }, + "OpenAI.SearchContextSize": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "OpenAI.ServiceTier": { + "type": "string", + "enum": [ + "auto", + "default", + "flex", + "scale", + "priority" + ], + "description": "Specifies the processing type used for serving the request.\n- If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.\n- If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.\n- If set to '[flex](/docs/guides/flex-processing)' or '[priority](https://openai.com/api-priority-processing/)', then the request will be processed with the corresponding service tier.\n- When not set, the default behavior is 'auto'.\nWhen the `service_tier` parameter is set, the response body will include the `service_tier` value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.", + "nullable": true + }, + "OpenAI.SkillReferenceParam": { + "type": "object", + "required": [ + "type", + "skill_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "skill_reference" + ], + "description": "References a skill created with the /v1/skills endpoint.", + "x-stainless-const": true, + "default": "skill_reference" + }, + "skill_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The ID of the referenced skill." + }, + "version": { + "type": "string", + "description": "Optional skill version. Use a positive integer or 'latest'. Omit for default." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ContainerSkill" + } + ] + }, + "OpenAI.SpecificApplyPatchParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apply_patch" + ], + "description": "The tool to call. Always `apply_patch`.", + "x-stainless-const": true, + "default": "apply_patch" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Forces the model to call the apply_patch tool when executing a tool call.", + "title": "Specific apply patch tool choice" + }, + "OpenAI.SpecificFunctionShellParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "shell" + ], + "description": "The tool to call. Always `shell`.", + "x-stainless-const": true, + "default": "shell" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Forces the model to call the shell tool when a tool call is required.", + "title": "Specific shell tool choice" + }, + "OpenAI.SummaryTextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "summary_text" + ], + "description": "The type of the object. Always `summary_text`.", + "x-stainless-const": true, + "default": "summary_text" + }, + "text": { + "type": "string", + "description": "A summary of the reasoning output from the model so far." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A summary text from the model.", + "title": "Summary text" + }, + "OpenAI.TextContent": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "x-stainless-const": true, + "default": "text" + }, + "text": { + "type": "string" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A text content.", + "title": "Text Content" + }, + "OpenAI.TextResponseFormatConfiguration": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfigurationType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "json_schema": "#/components/schemas/OpenAI.TextResponseFormatJsonSchema", + "text": "#/components/schemas/OpenAI.TextResponseFormatConfigurationResponseFormatText", + "json_object": "#/components/schemas/OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject" + } + }, + "description": "An object specifying the format that the model must output.\nConfiguring `{ \"type\": \"json_schema\" }` enables Structured Outputs,\nwhich ensures the model will match your supplied JSON schema. Learn more in the\n[Structured Outputs guide](/docs/guides/structured-outputs).\nThe default format is `{ \"type\": \"text\" }` with no additional options.\n*Not recommended for gpt-4o and newer models:**\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it." + }, + "OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "json_object" + ], + "description": "The type of response format being defined. Always `json_object`.", + "x-stainless-const": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + } + ], + "description": "JSON object response format. An older method of generating JSON responses.\nUsing `json_schema` is recommended for models that support it. Note that the\nmodel will not generate JSON without a system or user message instructing it\nto do so.", + "title": "JSON object" + }, + "OpenAI.TextResponseFormatConfigurationResponseFormatText": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of response format being defined. Always `text`.", + "x-stainless-const": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + } + ], + "description": "Default response format. Used to generate text responses.", + "title": "Text" + }, + "OpenAI.TextResponseFormatConfigurationType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "text", + "json_schema", + "json_object" + ] + } + ] + }, + "OpenAI.TextResponseFormatJsonSchema": { + "type": "object", + "required": [ + "type", + "name", + "schema" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "json_schema" + ], + "description": "The type of response format being defined. Always `json_schema`.", + "x-stainless-const": true + }, + "description": { + "type": "string", + "description": "A description of what the response format is for, used by the model to\n determine how to respond in the format." + }, + "name": { + "type": "string", + "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain\n underscores and dashes, with a maximum length of 64." + }, + "schema": { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaSchema" + }, + "strict": { + "type": "boolean", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + } + ], + "description": "JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/docs/guides/structured-outputs).", + "title": "JSON schema" + }, + "OpenAI.Tool": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ToolType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "bing_grounding": "#/components/schemas/BingGroundingTool", + "fabric_dataagent_preview": "#/components/schemas/MicrosoftFabricPreviewTool", + "sharepoint_grounding_preview": "#/components/schemas/SharepointPreviewTool", + "azure_ai_search": "#/components/schemas/AzureAISearchTool", + "openapi": "#/components/schemas/OpenApiTool", + "bing_custom_search_preview": "#/components/schemas/BingCustomSearchPreviewTool", + "browser_automation_preview": "#/components/schemas/BrowserAutomationPreviewTool", + "azure_function": "#/components/schemas/AzureFunctionTool", + "capture_structured_outputs": "#/components/schemas/CaptureStructuredOutputsTool", + "a2a_preview": "#/components/schemas/A2APreviewTool", + "work_iq_preview": "#/components/schemas/WorkIQPreviewTool", + "fabric_iq_preview": "#/components/schemas/FabricIQPreviewTool", + "memory_search_preview": "#/components/schemas/MemorySearchPreviewTool", + "toolbox_search_preview": "#/components/schemas/ToolboxSearchPreviewTool", + "code_interpreter": "#/components/schemas/OpenAI.CodeInterpreterTool", + "function": "#/components/schemas/OpenAI.FunctionTool", + "file_search": "#/components/schemas/OpenAI.FileSearchTool", + "computer_use_preview": "#/components/schemas/OpenAI.ComputerUsePreviewTool", + "web_search": "#/components/schemas/OpenAI.WebSearchTool", + "mcp": "#/components/schemas/OpenAI.MCPTool", + "image_generation": "#/components/schemas/OpenAI.ImageGenTool", + "local_shell": "#/components/schemas/OpenAI.LocalShellToolParam", + "shell": "#/components/schemas/OpenAI.FunctionShellToolParam", + "custom": "#/components/schemas/OpenAI.CustomToolParam", + "web_search_preview": "#/components/schemas/OpenAI.WebSearchPreviewTool", + "apply_patch": "#/components/schemas/OpenAI.ApplyPatchToolParam" + } + }, + "description": "A tool that can be used to generate a response." + }, + "OpenAI.ToolChoiceAllowed": { + "type": "object", + "required": [ + "type", + "mode", + "tools" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "allowed_tools" + ], + "description": "Allowed tool configuration type. Always `allowed_tools`.", + "x-stainless-const": true + }, + "mode": { + "type": "string", + "enum": [ + "auto", + "required" + ], + "description": "Constrains the tools available to the model to a pre-defined set.\n `auto` allows the model to pick from among the allowed tools and generate a\n message.\n `required` requires the model to call one or more of the allowed tools." + }, + "tools": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "description": "A list of tool definitions that the model should be allowed to call.\n For the Responses API, the list of tool definitions might look like:\n ```json\n [\n { \"type\": \"function\", \"name\": \"get_weather\" },\n { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },\n { \"type\": \"image_generation\" }\n ]\n ```" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Constrains the tools available to the model to a pre-defined set.", + "title": "Allowed tools" + }, + "OpenAI.ToolChoiceCodeInterpreter": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "code_interpreter" + ] + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." + }, + "OpenAI.ToolChoiceComputerUsePreview": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "computer_use_preview" + ] + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." + }, + "OpenAI.ToolChoiceCustom": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ], + "description": "For custom tool calling, the type is always `custom`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the custom tool to call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Use this option to force the model to call a specific custom tool.", + "title": "Custom tool" + }, + "OpenAI.ToolChoiceFileSearch": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "file_search" + ] + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." + }, + "OpenAI.ToolChoiceFunction": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "For function calling, the type is always `function`.", + "x-stainless-const": true + }, + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Use this option to force the model to call a specific function.", + "title": "Function tool" + }, + "OpenAI.ToolChoiceImageGeneration": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation" + ] + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." + }, + "OpenAI.ToolChoiceMCP": { + "type": "object", + "required": [ + "type", + "server_label" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "mcp" + ], + "description": "For MCP tools, the type is always `mcp`.", + "x-stainless-const": true + }, + "server_label": { + "type": "string", + "description": "The label of the MCP server to use." + }, + "name": { + "type": "string", + "nullable": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Use this option to force the model to call a specific tool on a remote MCP server.", + "title": "MCP tool" + }, + "OpenAI.ToolChoiceOptions": { + "type": "string", + "enum": [ + "none", + "auto", + "required" + ], + "description": "Controls which (if any) tool is called by the model.\n`none` means the model will not call any tool and instead generates a message.\n`auto` means the model can pick between generating a message or calling one or\nmore tools.\n`required` means the model must call one or more tools.", + "title": "Tool choice mode" + }, + "OpenAI.ToolChoiceParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParamType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "allowed_tools": "#/components/schemas/OpenAI.ToolChoiceAllowed", + "function": "#/components/schemas/OpenAI.ToolChoiceFunction", + "mcp": "#/components/schemas/OpenAI.ToolChoiceMCP", + "custom": "#/components/schemas/OpenAI.ToolChoiceCustom", + "apply_patch": "#/components/schemas/OpenAI.SpecificApplyPatchParam", + "shell": "#/components/schemas/OpenAI.SpecificFunctionShellParam", + "file_search": "#/components/schemas/OpenAI.ToolChoiceFileSearch", + "web_search_preview": "#/components/schemas/OpenAI.ToolChoiceWebSearchPreview", + "computer_use_preview": "#/components/schemas/OpenAI.ToolChoiceComputerUsePreview", + "web_search_preview_2025_03_11": "#/components/schemas/OpenAI.ToolChoiceWebSearchPreview20250311", + "image_generation": "#/components/schemas/OpenAI.ToolChoiceImageGeneration", + "code_interpreter": "#/components/schemas/OpenAI.ToolChoiceCodeInterpreter" + } + }, + "description": "How the model should select which tool (or tools) to use when generating\na response. See the `tools` parameter to see how to specify which tools\nthe model can call." + }, + "OpenAI.ToolChoiceParamType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "allowed_tools", + "function", + "mcp", + "custom", + "apply_patch", + "shell", + "file_search", + "web_search_preview", + "computer_use_preview", + "web_search_preview_2025_03_11", + "image_generation", + "code_interpreter" + ] + } + ] + }, + "OpenAI.ToolChoiceWebSearchPreview": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "web_search_preview" + ] + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." + }, + "OpenAI.ToolChoiceWebSearchPreview20250311": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "web_search_preview_2025_03_11" + ] + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Indicates that the model should use a built-in tool to generate a response.\n[Learn more about built-in tools](https://platform.openai.com/docs/guides/tools)." + }, + "OpenAI.ToolType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "function", + "file_search", + "computer_use_preview", + "web_search", + "mcp", + "code_interpreter", + "image_generation", + "local_shell", + "shell", + "custom", + "web_search_preview", + "apply_patch", + "a2a_preview", + "bing_custom_search_preview", + "browser_automation_preview", + "fabric_dataagent_preview", + "sharepoint_grounding_preview", + "memory_search_preview", + "work_iq_preview", + "fabric_iq_preview", + "toolbox_search_preview", + "azure_ai_search", + "azure_function", + "bing_grounding", + "capture_structured_outputs", + "openapi" + ] + } + ] + }, + "OpenAI.ToolsArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter.\nWe support the following categories of tools:\n- **Built-in tools**: Tools that are provided by OpenAI that extend the\nmodel's capabilities, like [web search](/docs/guides/tools-web-search)\nor [file search](/docs/guides/tools-file-search). Learn more about\n[built-in tools](/docs/guides/tools).\n- **MCP Tools**: Integrations with third-party systems via custom MCP servers\nor predefined connectors such as Google Drive and SharePoint. Learn more about\n[MCP Tools](/docs/guides/tools-connectors-mcp).\n- **Function calls (custom tools)**: Functions that are defined by you,\nenabling the model to call your own code with strongly typed arguments\nand outputs. Learn more about\n[function calling](/docs/guides/function-calling). You can also use\ncustom tools to call your own code." + }, + "OpenAI.TopLogProb": { + "type": "object", + "required": [ + "token", + "logprob", + "bytes" + ], + "properties": { + "token": { + "type": "string" + }, + "logprob": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "bytes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "description": "The top log probability of a token.", + "title": "Top log probability" + }, + "OpenAI.TypeParam": { + "type": "object", + "required": [ + "type", + "text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "type" + ], + "description": "Specifies the event type. For a type action, this property is always set to `type`.", + "x-stainless-const": true, + "default": "type" + }, + "text": { + "type": "string", + "description": "The text to type." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "An action to type in text.", + "title": "Type" + }, + "OpenAI.UpdateConversationBody": { + "type": "object", + "required": [ + "metadata" + ], + "properties": { + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." + } + } + }, + "OpenAI.UrlCitationBody": { + "type": "object", + "required": [ + "type", + "url", + "start_index", + "end_index", + "title" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "url_citation" + ], + "description": "The type of the URL citation. Always `url_citation`.", + "x-stainless-const": true, + "default": "url_citation" + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the web resource." + }, + "start_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the first character of the URL citation in the message." + }, + "end_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the last character of the URL citation in the message." + }, + "title": { + "type": "string", + "description": "The title of the web resource." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Annotation" + } + ], + "description": "A citation for a web resource used to generate a model response.", + "title": "URL citation" + }, + "OpenAI.VectorStoreFileAttributes": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + { + "type": "boolean" + } + ] + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard. Keys are strings\nwith a maximum length of 64 characters. Values are strings with a maximum\nlength of 512 characters, booleans, or numbers.", + "x-oaiTypeLabel": "map" + }, + "OpenAI.Verbosity": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ], + "description": "Constrains the verbosity of the model's response. Lower values will result in\nmore concise responses, while higher values will result in more verbose responses.\nCurrently supported values are `low`, `medium`, and `high`.", + "nullable": true + }, + "OpenAI.WaitParam": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "wait" + ], + "description": "Specifies the event type. For a wait action, this property is always set to `wait`.", + "x-stainless-const": true, + "default": "wait" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A wait action.", + "title": "Wait" + }, + "OpenAI.WebSearchActionFind": { + "type": "object", + "required": [ + "type", + "url", + "pattern" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "find_in_page" + ], + "description": "The action type.", + "x-stainless-const": true + }, + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the page searched for the pattern." + }, + "pattern": { + "type": "string", + "description": "The pattern or text to search for within the page." + } + }, + "description": "Action type \"find_in_page\": Searches for a pattern within a loaded page.", + "title": "Find action" + }, + "OpenAI.WebSearchActionOpenPage": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "open_page" + ], + "description": "The action type.", + "x-stainless-const": true + }, + "url": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "The URL opened by the model." + } + }, + "description": "Action type \"open_page\" - Opens a specific URL from search results.", + "title": "Open page action" + }, + "OpenAI.WebSearchActionSearch": { + "type": "object", + "required": [ + "type", + "query" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "search" + ], + "description": "The action type.", + "x-stainless-const": true + }, + "query": { + "type": "string", + "description": "[DEPRECATED] The search query.", + "deprecated": true + }, + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The search queries.", + "title": "Search queries" + }, + "sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearchSources" + }, + "description": "The sources used in the search.", + "title": "Web search sources" + } + }, + "description": "Action type \"search\" - Performs a web search query.", + "title": "Search action" + }, + "OpenAI.WebSearchActionSearchSources": { + "type": "object", + "required": [ + "type", + "url" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "url" + ], + "x-stainless-const": true + }, + "url": { + "type": "string" + } + } + }, + "OpenAI.WebSearchApproximateLocation": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "approximate" + ], + "description": "The type of location approximation. Always `approximate`.", + "x-stainless-const": true, + "default": "approximate" + }, + "country": { + "type": "string", + "nullable": true + }, + "region": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string", + "nullable": true + }, + "timezone": { + "type": "string", + "nullable": true + } + }, + "description": "The approximate location of the user.", + "title": "Web search approximate location" + }, + "OpenAI.WebSearchPreviewTool": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "web_search_preview" + ], + "description": "The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.", + "x-stainless-const": true, + "default": "web_search_preview" + }, + "user_location": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApproximateLocation" + } + ], + "nullable": true + }, + "search_context_size": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.SearchContextSize" + } + ], + "description": "High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search).", + "title": "Web search preview" + }, + "OpenAI.WebSearchTool": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "web_search" + ], + "description": "The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.", + "default": "web_search" + }, + "filters": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.WebSearchToolFilters" + } + ], + "nullable": true + }, + "user_location": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.WebSearchApproximateLocation" + } + ], + "nullable": true + }, + "search_context_size": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ], + "description": "High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default.", + "default": "medium" + }, + "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." + }, + "custom_search_configuration": { + "allOf": [ + { + "$ref": "#/components/schemas/WebSearchConfiguration" + } + ], + "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "Search the Internet for sources related to the prompt. Learn more about the\n[web search tool](/docs/guides/tools-web-search).", + "title": "Web search" + }, + "OpenAI.WebSearchToolFilters": { + "type": "object", + "properties": { + "allowed_domains": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + } + }, + "OpenAI.integer": { + "type": "integer", + "format": "int64" + }, + "OpenAI.numeric": { + "type": "number", + "format": "double" + }, + "OpenApiAnonymousAuthDetails": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "anonymous" + ], + "description": "The object type, which is always 'anonymous'." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiAuthDetails" + } + ], + "description": "Security details for OpenApi anonymous authentication" + }, + "OpenApiAuthDetails": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiAuthType" + } + ], + "description": "The type of authentication, must be anonymous/project_connection/managed_identity" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "anonymous": "#/components/schemas/OpenApiAnonymousAuthDetails", + "project_connection": "#/components/schemas/OpenApiProjectConnectionAuthDetails", + "managed_identity": "#/components/schemas/OpenApiManagedAuthDetails" + } + }, + "description": "authentication details for OpenApiFunctionDefinition" + }, + "OpenApiAuthType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "anonymous", + "project_connection", + "managed_identity" + ] + }, + { + "type": "string" + } + ], + "description": "Authentication type for OpenApi endpoint. Allowed types are:\n- Anonymous (no authentication required)\n- Project Connection (requires project_connection_id to endpoint, as setup in AI Foundry)\n- Managed_Identity (requires audience for identity based auth)" + }, + "OpenApiFunctionDefinition": { + "type": "object", + "required": [ + "name", + "spec", + "auth" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the function to be called." + }, + "description": { + "type": "string", + "description": "A description of what the function does, used by the model to choose when and how to call the function." + }, + "spec": { + "type": "object", + "additionalProperties": {}, + "description": "The openapi function shape, described as a JSON Schema object." + }, + "auth": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiAuthDetails" + } + ], + "description": "Open API authentication details" + }, + "default_params": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of OpenAPI spec parameters that will use user-provided defaults" + }, + "functions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to be called." + }, + "description": { + "type": "string", + "description": "A description of what the function does, used by the model to choose when and how to call the function." + }, + "parameters": { + "type": "object", + "additionalProperties": {}, + "description": "The parameters the functions accepts, described as a JSON Schema object." + } + }, + "required": [ + "name", + "parameters" + ] + }, + "description": "List of function definitions used by OpenApi tool", + "readOnly": true + } + }, + "description": "The input definition information for an openapi function." + }, + "OpenApiManagedAuthDetails": { + "type": "object", + "required": [ + "type", + "security_scheme" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "managed_identity" + ], + "description": "The object type, which is always 'managed_identity'." + }, + "security_scheme": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiManagedSecurityScheme" + } + ], + "description": "Connection auth security details" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiAuthDetails" + } + ], + "description": "Security details for OpenApi managed_identity authentication" + }, + "OpenApiManagedSecurityScheme": { + "type": "object", + "required": [ + "audience" + ], + "properties": { + "audience": { + "type": "string", + "description": "Authentication scope for managed_identity auth type" + } + }, + "description": "Security scheme for OpenApi managed_identity authentication" + }, + "OpenApiProjectConnectionAuthDetails": { + "type": "object", + "required": [ + "type", + "security_scheme" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "project_connection" + ], + "description": "The object type, which is always 'project_connection'." + }, + "security_scheme": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiProjectConnectionSecurityScheme" + } + ], + "description": "Project connection auth security details" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiAuthDetails" + } + ], + "description": "Security details for OpenApi project connection authentication" + }, + "OpenApiProjectConnectionSecurityScheme": { + "type": "object", + "required": [ + "project_connection_id" + ], + "properties": { + "project_connection_id": { + "type": "string", + "description": "Project connection id for Project Connection auth type" + } + }, + "description": "Security scheme for OpenApi managed_identity authentication" + }, + "OpenApiTool": { + "type": "object", + "required": [ + "type", + "openapi" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openapi" + ], + "description": "The object type, which is always 'openapi'." + }, + "openapi": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiFunctionDefinition" + } + ], + "description": "The openapi function definition." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "The input definition information for an OpenAPI tool as used to configure an agent." + }, + "OpenApiToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "arguments", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openapi_call" + ] + }, + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the OpenAPI operation being called." + }, + "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": "An OpenAPI tool call." + }, + "OpenApiToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "name", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "openapi_call_output" + ] + }, + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the OpenAPI operation that was called." + }, + "output": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolCallOutputContent" + } + ], + "description": "The output from the OpenAPI 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 an OpenAPI tool call." + }, + "OptimizationAgentDefinition": { + "type": "object", + "required": [ + "agent_name" + ], + "properties": { + "agent_name": { + "type": "string", + "description": "Registered Foundry agent name. Required — bare-model mode is not supported." + }, + "agent_version": { + "type": "string", + "description": "Pinned agent version. Defaults to latest if omitted." + }, + "model": { + "type": "string", + "description": "Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model." + }, + "system_prompt": { + "type": "string", + "description": "System prompt / instructions override. When set, used as the baseline instructions for the agent." + }, + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationAgentSkill" + }, + "description": "Optional named skills the optimizer may tune. Tool descriptions and parameters." + } + }, + "description": "The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides." + }, + "OptimizationAgentSkill": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Skill name (matches the tool name on the agent)." + }, + "description": { + "type": "string", + "description": "Free-form description used as the seed when tuning skill descriptions." + } + }, + "description": "A named skill on the agent that the optimizer may tune." + }, + "OptimizationCandidate": { + "type": "object", + "required": [ + "name", + "config", + "mutations", + "rationale", + "avg_score", + "avg_tokens", + "pass_rate", + "task_scores", + "is_pareto_optimal" + ], + "properties": { + "candidate_id": { + "type": "string", + "description": "Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints." + }, + "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", + "additionalProperties": {}, + "description": "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." + }, + "rationale": { + "type": "string", + "description": "Strategy rationale — why this candidate was generated." + }, + "avg_score": { + "type": "number", + "format": "double", + "description": "Average composite score across all tasks." + }, + "avg_tokens": { + "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)." + }, + "sample_avg_score": { + "type": "number", + "format": "double", + "description": "Average score from sampled evaluation (null if full dataset was used)." + }, + "sample_size": { + "type": "integer", + "format": "int32", + "description": "Number of tasks in the sample (null if full dataset was used)." + }, + "evaluation_type": { + "type": "string", + "description": "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." + }, + "strategy": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationStrategy" + } + ], + "description": "Identifies the strategy that produced this candidate." + }, + "eval_id": { + "type": "string", + "description": "Foundry evaluation identifier used to score this candidate." + }, + "eval_run_id": { + "type": "string", + "description": "Foundry evaluation run identifier for this candidate's scoring run." + } + }, + "description": "Aggregated evaluation result for a single candidate agent configuration across all tasks." + }, + "OptimizationJob": { + "type": "object", + "required": [ + "id", + "status", + "created_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" + } + ], + "description": "Current lifecycle status.", + "readOnly": true + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Error" + } + ], + "description": "Error details — populated only on failure.", + "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 + }, + "progress": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationJobProgress" + } + ], + "description": "Progress while in flight. Absent in terminal states.", + "readOnly": true + } + }, + "description": "Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates." + }, + "OptimizationJobInputs": { + "type": "object", + "required": [ + "agent" + ], + "properties": { + "agent": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationAgentDefinition" + } + ], + "description": "The agent (and pinned version) being optimized." + }, + "dataset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetItem" + }, + "description": "Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`." + }, + "train_dataset_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/DatasetRef" + } + ], + "description": "Reference to a registered training dataset. Mutually exclusive with `dataset`." + }, + "validation_dataset_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/DatasetRef" + } + ], + "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']." + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationCriterion" + }, + "description": "Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`." + }, + "options": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationOptions" + } + ], + "description": "Tuning knobs and run-mode." + } + }, + "description": "Caller-supplied inputs for an optimization job." + }, + "OptimizationJobProgress": { + "type": "object", + "required": [ + "current_strategy", + "current_iteration", + "tasks_completed", + "tasks_total", + "best_score", + "elapsed_seconds" + ], + "properties": { + "current_strategy": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationStrategy" + } + ], + "description": "Strategy currently being explored." + }, + "current_iteration": { + "type": "integer", + "format": "int32", + "description": "1-based current iteration index." + }, + "tasks_completed": { + "type": "integer", + "format": "int32", + "description": "Tasks evaluated so far this iteration." + }, + "tasks_total": { + "type": "integer", + "format": "int32", + "description": "Total tasks scheduled this iteration." + }, + "best_score": { + "type": "number", + "format": "double", + "description": "Best score observed so far across all candidates." + }, + "elapsed_seconds": { + "type": "number", + "format": "double", + "description": "Wall-clock time elapsed since the job began executing." + } + }, + "description": "In-flight progress; only populated while status is `queued` or `in_progress`." + }, + "OptimizationJobResult": { + "type": "object", + "properties": { + "baseline": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationCandidate" + } + ], + "description": "Evaluation scores for the original (un-optimized) agent configuration." + }, + "best": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationCandidate" + } + ], + "description": "The highest-scoring candidate found during optimization." + }, + "candidates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationCandidate" + }, + "description": "All evaluated candidates including baseline." + }, + "pareto_frontier": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationCandidate" + }, + "description": "Candidates on the Pareto frontier (maximize score, minimize cost)." + }, + "validation_score": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationCandidate" + } + ], + "description": "Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided." + }, + "options": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationOptions" + } + ], + "description": "The options used for this optimization run." + }, + "sample_size": { + "type": "integer", + "format": "int32", + "description": "Number of tasks sampled during optimization iterations (null if sampling was not used)." + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped)." + }, + "all_strategies_failed": { + "type": "boolean", + "description": "True when all optimization strategies failed — only the baseline was evaluated." + } + }, + "description": "Terminal-state result body. Populated when `status` is `succeeded` or `failed`." + }, + "OptimizationMode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "optimize" + ] + } + ], + "description": "Run mode for an optimization job." + }, + "OptimizationOptions": { + "type": "object", + "properties": { + "strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationStrategy" + }, + "description": "Strategies to apply this run. Default: ['instruction'].", + "default": [ + "instruction" + ] + }, + "budget": { + "type": "integer", + "format": "int32", + "description": "Total candidate generation budget (number of candidates explored). Default: 10.", + "default": 10 + }, + "max_iterations": { + "type": "integer", + "format": "int32", + "description": "Maximum optimization iterations per strategy. Default: 5.", + "default": 5 + }, + "tasks_per_iteration": { + "type": "integer", + "format": "int32", + "description": "Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed)." + }, + "max_reflection_tasks": { + "type": "integer", + "format": "int32", + "description": "Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.", + "default": 5 + }, + "min_improvement": { + "type": "number", + "format": "double", + "description": "Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.", + "default": 0.005 + }, + "pass_threshold": { + "type": "number", + "format": "double", + "description": "Composite score threshold for a task to be considered passing. Default: 0.5.", + "default": 0.5 + }, + "improvement_threshold": { + "type": "number", + "format": "double", + "description": "Target average score at which optimization stops early (quality ceiling). Default: 0.95.", + "default": 0.95 + }, + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationMode" + } + ], + "description": "Run mode." + }, + "eval_model": { + "type": "string", + "description": "Foundry deployment name to use as the LLM-as-judge evaluation model. Required." + }, + "reflection_model": { + "type": "string", + "description": "Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset." + }, + "task_timeout_seconds": { + "type": "integer", + "format": "int32", + "description": "Per-task timeout for agent execution. Default: 300 seconds (5 minutes).", + "default": 300 + }, + "keep_versions": { + "type": "boolean", + "description": "If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.", + "default": false + } + }, + "description": "Tuning knobs and run-mode for an optimization job." + }, + "OptimizationStrategy": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "instruction", + "model", + "skill" + ] + } + ], + "description": "Optimization strategy dimension." + }, + "OptimizationTaskResult": { + "type": "object", + "required": [ + "task_name", + "scores", + "composite_score", + "tokens", + "duration_seconds", + "passed" + ], + "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", + "additionalProperties": { + "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": "int32", + "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": "string", + "description": "Error message if the task failed during execution." + }, + "rationales": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Per-evaluator reasoning keyed by evaluator name." + }, + "response": { + "type": "string", + "description": "Raw agent response text." + }, + "run_id": { + "type": "string", + "description": "Identifier of the agent run that produced this result." + } + }, + "description": "Per-task evaluation result for a single candidate." + }, + "OtlpTelemetryEndpoint": { + "type": "object", + "required": [ + "kind", + "endpoint", + "protocol" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "OTLP" + ], + "description": "The endpoint kind, always 'OTLP' for OpenTelemetry Protocol endpoints." + }, + "endpoint": { + "type": "string", + "description": "The OTLP collector endpoint URL.", + "example": "https://my-collector.example.com/otlp" + }, + "protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryTransportProtocol" + } + ], + "description": "The transport protocol for the OTLP endpoint.", + "example": "Http" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryEndpoint" + } + ], + "description": "An OTLP (OpenTelemetry Protocol) telemetry export endpoint.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "PageOrder": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "PagedConnection": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection" + }, + "description": "The Connection items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of Connection items" + }, + "PagedDatasetVersion": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetVersion" + }, + "description": "The DatasetVersion items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of DatasetVersion items" + }, + "PagedDeployment": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Deployment" + }, + "description": "The Deployment items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of Deployment items" + }, + "PagedEvaluationRule": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationRule" + }, + "description": "The EvaluationRule items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of EvaluationRule items" + }, + "PagedEvaluationSuiteVersion": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationSuiteVersion" + }, + "description": "The EvaluationSuiteVersion items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of EvaluationSuiteVersion items" + }, + "PagedEvaluationTaxonomy": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationTaxonomy" + }, + "description": "The EvaluationTaxonomy items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of EvaluationTaxonomy items" + }, + "PagedEvaluatorVersion": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorVersion" + }, + "description": "The EvaluatorVersion items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of EvaluatorVersion items" + }, + "PagedIndex": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Index" + }, + "description": "The Index items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of Index items" + }, + "PagedInsight": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Insight" + }, + "description": "The Insight items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of Insight items" + }, + "PagedModelVersion": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ModelVersion" + }, + "description": "The ModelVersion items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of ModelVersion items" + }, + "PagedRedTeam": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RedTeam" + }, + "description": "The RedTeam items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of RedTeam items" + }, + "PagedSchedule": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schedule" + }, + "description": "The Schedule items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of Schedule items" + }, + "PagedScheduleRun": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRun" + }, + "description": "The ScheduleRun items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of ScheduleRun items" + }, + "PatchAgentRequest": { + "type": "object", + "properties": { + "agent_endpoint": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointConfigUpdate" + } + ], + "description": "The endpoint configuration for the agent" + }, + "agent_card": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentCardUpdate" + } + ], + "description": "Optional agent card for the agent" + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "PendingUploadRequest": { + "type": "object", + "required": [ + "pendingUploadType" + ], + "properties": { + "pendingUploadId": { + "type": "string", + "description": "If PendingUploadId is not provided, a random GUID will be used." + }, + "connectionName": { + "type": "string", + "description": "Azure Storage Account connection name to use for generating temporary SAS token" + }, + "pendingUploadType": { + "type": "string", + "enum": [ + "BlobReference" + ], + "description": "The type of pending upload." + } + }, + "description": "Represents a request for a pending upload." + }, + "PendingUploadResponse": { + "type": "object", + "required": [ + "blobReference", + "pendingUploadId", + "pendingUploadType" + ], + "properties": { + "blobReference": { + "allOf": [ + { + "$ref": "#/components/schemas/BlobReference" + } + ], + "description": "Container-level read, write, list SAS." + }, + "pendingUploadId": { + "type": "string", + "description": "ID for this upload request." + }, + "version": { + "type": "string", + "description": "Version of asset to be created if user did not specify version when initially creating upload" + }, + "pendingUploadType": { + "type": "string", + "enum": [ + "BlobReference" + ], + "description": "The type of pending upload." + } + }, + "description": "Represents the response for a pending upload request" + }, + "PromptAgentDefinition": { + "type": "object", + "required": [ + "kind", + "model" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "prompt" + ] + }, + "model": { + "type": "string", + "description": "The model deployment to use for this agent." + }, + "instructions": { + "type": "string", + "nullable": true, + "description": "A system (or developer) message inserted into the model's context." + }, + "temperature": { + "type": "number", + "format": "float", + "nullable": true, + "minimum": 0, + "maximum": 2, + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.", + "default": 1 + }, + "top_p": { + "type": "number", + "format": "float", + "nullable": true, + "minimum": 0, + "maximum": 1, + "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.", + "default": 1 + }, + "reasoning": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Reasoning" + } + ], + "nullable": true + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "An array of tools the model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter." + }, + "tool_choice": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "How the model should select which tool (or tools) to use when generating a response.\nSee the `tools` parameter to see how to specify which tools the model can call." + }, + "text": { + "allOf": [ + { + "$ref": "#/components/schemas/PromptAgentDefinitionTextOptions" + } + ], + "description": "Configuration options for a text response from the model. Can be plain text or structured JSON data." + }, + "structured_inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/StructuredInputDefinition" + }, + "description": "Set of structured inputs that can participate in prompt template substitution or tool argument bindings." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/AgentDefinition" + } + ], + "description": "The prompt agent definition" + }, + "PromptAgentDefinitionTextOptions": { + "type": "object", + "properties": { + "format": { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + } + }, + "description": "Configuration options for a text response from the model. Can be plain text or structured JSON data." + }, + "PromptBasedEvaluatorDefinition": { + "type": "object", + "required": [ + "type", + "prompt_text" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "prompt" + ] + }, + "prompt_text": { + "type": "string", + "description": "The prompt text used for evaluation" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorDefinition" + } + ], + "description": "Prompt-based evaluator" + }, + "ProtocolVersionRecord": { + "type": "object", + "required": [ + "protocol", + "version" + ], + "properties": { + "protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentProtocol" + } + ], + "description": "The protocol type." + }, + "version": { + "type": "string", + "description": "The version string for the protocol, e.g. 'v0.1.1'." + } + }, + "description": "A record mapping for a single protocol and its version." + }, + "RaiConfig": { + "type": "object", + "required": [ + "rai_policy_name" + ], + "properties": { + "rai_policy_name": { + "type": "string", + "description": "The name of the RAI policy to apply." + } + }, + "description": "Configuration for Responsible AI (RAI) content filtering and safety features." + }, + "RecurrenceSchedule": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/RecurrenceType" + } + ], + "description": "Recurrence type for the recurrence schedule." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "Hourly": "#/components/schemas/HourlyRecurrenceSchedule", + "Daily": "#/components/schemas/DailyRecurrenceSchedule", + "Weekly": "#/components/schemas/WeeklyRecurrenceSchedule", + "Monthly": "#/components/schemas/MonthlyRecurrenceSchedule" + } + }, + "description": "Recurrence schedule model." + }, + "RecurrenceTrigger": { + "type": "object", + "required": [ + "type", + "interval", + "schedule" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Recurrence" + ], + "description": "Type of the trigger." + }, + "startTime": { + "type": "string", + "description": "Start time for the recurrence schedule in ISO 8601 format." + }, + "endTime": { + "type": "string", + "description": "End time for the recurrence schedule in ISO 8601 format." + }, + "timeZone": { + "type": "string", + "description": "Time zone for the recurrence schedule.", + "default": "UTC" + }, + "interval": { + "type": "integer", + "format": "int32", + "description": "Interval for the recurrence schedule." + }, + "schedule": { + "allOf": [ + { + "$ref": "#/components/schemas/RecurrenceSchedule" + } + ], + "description": "Recurrence schedule for the recurrence trigger." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Trigger" + } + ], + "description": "Recurrence based trigger." + }, + "RecurrenceType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Hourly", + "Daily", + "Weekly", + "Monthly" + ] + } + ], + "description": "Recurrence type." + }, + "RedTeam": { + "type": "object", + "required": [ + "id", + "target" + ], + "properties": { + "id": { + "type": "string", + "description": "Identifier of the red team run.", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "Name of the red-team run." + }, + "numTurns": { + "type": "integer", + "format": "int32", + "description": "Number of simulation rounds." + }, + "attackStrategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttackStrategy" + }, + "description": "List of attack strategies or nested lists of attack strategies." + }, + "simulationOnly": { + "type": "boolean", + "description": "Simulation-only or Simulation + Evaluation. Default false, if true the scan outputs conversation not evaluation result.", + "default": false + }, + "riskCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RiskCategory" + }, + "description": "List of risk categories to generate attack objectives for." + }, + "applicationScenario": { + "type": "string", + "description": "Application scenario for the red team operation, to generate scenario specific attacks." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Red team's tags. Unlike properties, tags are fully mutable." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Red team's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed." + }, + "status": { + "type": "string", + "description": "Status of the red-team. It is set by service and is read-only.", + "readOnly": true + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/RedTeamTargetConfig" + } + ], + "description": "Target configuration for the red-team run." + } + }, + "description": "Red team details." + }, + "RedTeamEvalRunDataSource": { + "type": "object", + "required": [ + "type", + "item_generation_params", + "target" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_red_team" + ], + "description": "The type of data source. Always `azure_ai_red_team`." + }, + "item_generation_params": { + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "The parameters for item generation." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "The target configuration for the evaluation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Represents a data source for red team evaluation runs." + }, + "RedTeamItemGenerationParams": { + "type": "object", + "required": [ + "type", + "attack_strategies", + "num_turns" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "red_team" + ], + "description": "The type of item generation parameters." + }, + "attack_strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttackStrategy" + }, + "description": "The collection of attack strategies to be used." + }, + "num_turns": { + "type": "integer", + "format": "int32", + "description": "The number of turns allowed in the game.", + "default": 20 + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "Represents the parameters for red team item generation." + }, + "RedTeamSeedPromptsItemGenerationParams": { + "type": "object", + "required": [ + "type", + "attack_strategies", + "num_turns", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "red_team_seed_prompts" + ], + "description": "The type of item generation parameters, always `red_team_seed_prompts`." + }, + "attack_strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttackStrategy" + }, + "description": "The collection of attack strategies to be used." + }, + "num_turns": { + "type": "integer", + "format": "int32", + "description": "The number of turns allowed in the game.", + "default": 20 + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + } + ], + "description": "The source of JSONL content to be processed." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "Represents the parameters for red team seed prompts item generation." + }, + "RedTeamTargetConfig": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the model configuration." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "AzureOpenAIModel": "#/components/schemas/AzureOpenAIModelConfiguration" + } + }, + "description": "Abstract class for target configuration." + }, + "RedTeamTaxonomyItemGenerationParams": { + "type": "object", + "required": [ + "type", + "attack_strategies", + "num_turns", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "red_team_taxonomy" + ], + "description": "The type of item generation parameters, always `red_team_taxonomy`." + }, + "attack_strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttackStrategy" + }, + "description": "The collection of attack strategies to be used." + }, + "num_turns": { + "type": "integer", + "format": "int32", + "description": "The number of turns allowed in the game.", + "default": 20 + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + } + ], + "description": "The source from which JSONL content is read." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "Represents the parameters for red team taxonomy item generation." + }, + "ResponseRetrievalItemGenerationParams": { + "type": "object", + "required": [ + "type", + "max_num_turns", + "data_mapping", + "source" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "response_retrieval" + ], + "description": "The type of item generation parameters, always `response_retrieval`." + }, + "max_num_turns": { + "type": "integer", + "format": "int32", + "description": "The maximum number of turns of chat history to evaluate." + }, + "data_mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Mapping from source fields to response_id field, required for retrieving chat history." + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + } + ], + "description": "The source from which JSONL content is read." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "Represents the parameters for response retrieval item generation." + }, + "RiskCategory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "HateUnfairness", + "Violence", + "Sexual", + "SelfHarm", + "ProtectedMaterial", + "CodeVulnerability", + "UngroundedAttributes", + "ProhibitedActions", + "SensitiveDataLeakage", + "TaskAdherence" + ] + } + ], + "description": "Risk category for the attack objective." + }, + "SASCredentials": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "SAS" + ], + "description": "The credential type", + "readOnly": true + }, + "SAS": { + "type": "string", + "description": "SAS token", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "Shared Access Signature (SAS) credential definition" + }, + "SampleType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "EvaluationResultSample" + ] + }, + { + "type": "string" + } + ], + "description": "The type of sample used in the analysis." + }, + "SasCredential": { + "type": "object", + "required": [ + "sasUri", + "type" + ], + "properties": { + "sasUri": { + "type": "string", + "description": "SAS uri", + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "SAS" + ], + "description": "Type of credential", + "readOnly": true + } + }, + "description": "SAS Credential definition" + }, + "Schedule": { + "type": "object", + "required": [ + "id", + "enabled", + "trigger", + "task", + "systemData" + ], + "properties": { + "id": { + "type": "string", + "description": "Identifier of the schedule.", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "Name of the schedule." + }, + "description": { + "type": "string", + "description": "Description of the schedule." + }, + "enabled": { + "type": "boolean", + "description": "Enabled status of the schedule." + }, + "provisioningStatus": { + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleProvisioningStatus" + } + ], + "description": "Provisioning status of the schedule.", + "readOnly": true + }, + "trigger": { + "allOf": [ + { + "$ref": "#/components/schemas/Trigger" + } + ], + "description": "Trigger for the schedule." + }, + "task": { + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleTask" + } + ], + "description": "Task for the schedule." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Schedule's tags. Unlike properties, tags are fully mutable." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Schedule's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed." + }, + "systemData": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "System metadata for the resource.", + "readOnly": true + } + }, + "description": "Schedule model." + }, + "ScheduleProvisioningStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed" + ] + } + ], + "description": "Schedule provisioning status." + }, + "ScheduleRun": { + "type": "object", + "required": [ + "id", + "scheduleId", + "success", + "properties" + ], + "properties": { + "id": { + "type": "string", + "description": "Identifier of the schedule run.", + "readOnly": true + }, + "scheduleId": { + "type": "string", + "description": "Identifier of the schedule." + }, + "success": { + "type": "boolean", + "description": "Trigger success status of the schedule run.", + "readOnly": true + }, + "triggerTime": { + "type": "string", + "description": "Trigger time of the schedule run." + }, + "error": { + "type": "string", + "description": "Error information for the schedule run.", + "readOnly": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Properties of the schedule run.", + "readOnly": true + } + }, + "description": "Schedule run model." + }, + "ScheduleTask": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleTaskType" + } + ], + "description": "Type of the task." + }, + "configuration": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Configuration for the task." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "Evaluation": "#/components/schemas/EvaluationScheduleTask", + "Insight": "#/components/schemas/InsightScheduleTask" + } + }, + "description": "Schedule task model." + }, + "ScheduleTaskType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Evaluation", + "Insight" + ] + } + ], + "description": "Type of the task." + }, + "SessionDirectoryEntry": { + "type": "object", + "required": [ + "name", + "size", + "is_directory", + "modified_time" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the file or directory." + }, + "size": { + "type": "integer", + "format": "int64", + "description": "The size in bytes (0 for directories)." + }, + "is_directory": { + "type": "boolean", + "description": "Whether this entry is a directory." + }, + "modified_time": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) when the file was last modified." + } + }, + "description": "A single entry in a directory listing." + }, + "SessionDirectoryListResponse": { + "type": "object", + "required": [ + "path", + "entries" + ], + "properties": { + "path": { + "type": "string", + "description": "The path that was listed, relative to the session home directory." + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionDirectoryEntry" + }, + "description": "The directory entries." + } + }, + "description": "Response from listing a directory in a session sandbox." + }, + "SessionFileWriteResponse": { + "type": "object", + "required": [ + "path", + "bytes_written" + ], + "properties": { + "path": { + "type": "string", + "description": "The path where the file was written, relative to the session home directory." + }, + "bytes_written": { + "type": "integer", + "format": "int64", + "description": "Number of bytes written." + } + }, + "description": "Response from uploading a file to a session sandbox." + }, + "SessionLogEvent": { + "type": "object", + "required": [ + "event", + "data" + ], + "properties": { + "event": { + "allOf": [ + { + "$ref": "#/components/schemas/SessionLogEventType" + } + ], + "description": "The SSE event type. Currently `log`, but additional event types may be added in the future. Clients should ignore unrecognized event types.", + "example": "log" + }, + "data": { + "type": "string", + "description": "The event payload as plain text. Currently JSON-formatted but the schema is not contractual and may change.", + "example": "{\"timestamp\":\"2026-03-10T09:33:17.121467567+00:00\",\"stream\":\"stdout\",\"message\":\"Starting server on port 18080\"}" + } + }, + "description": "A single Server-Sent Event frame emitted by the hosted agent session log stream.\n\nEach frame contains an `event` field identifying the event type and a `data`\nfield carrying the payload as plain text. Although the current `data` payload\nis JSON-formatted, its schema is not contractual — additional keys may appear\nand the format may change over time. Clients should treat `data` as an\nopaque string and optionally attempt JSON parsing.\n\nNew event types may be added in the future. Clients should gracefully\nignore unrecognized event types.\n\nWire format:\n```\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:33:17.121Z\",\"stream\":\"stdout\",\"message\":\"Starting server on port 18080\"}\n\nevent: log\ndata: {\"timestamp\":\"2026-03-10T09:34:52.714Z\",\"stream\":\"status\",\"message\":\"Successfully connected to container\"}\n```", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "SessionLogEventType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "log" + ] + } + ], + "description": "Known SSE event types emitted by the hosted agent session log stream.\nAdditional event types may be introduced in future versions.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "SharepointGroundingToolCall": { + "type": "object", + "required": [ + "type", + "call_id", + "arguments", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "sharepoint_grounding_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 SharePoint grounding tool call." + }, + "SharepointGroundingToolCallOutput": { + "type": "object", + "required": [ + "type", + "call_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "sharepoint_grounding_preview_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 SharePoint 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 SharePoint grounding tool call." + }, + "SharepointGroundingToolParameters": { + "type": "object", + "properties": { + "project_connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ToolProjectConnection" + }, + "maxItems": 1, + "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." + } + }, + "description": "The sharepoint grounding tool parameters." + }, + "SharepointPreviewTool": { + "type": "object", + "required": [ + "type", + "sharepoint_grounding_preview" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "sharepoint_grounding_preview" + ], + "description": "The object type, which is always 'sharepoint_grounding_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." + }, + "sharepoint_grounding_preview": { + "allOf": [ + { + "$ref": "#/components/schemas/SharepointGroundingToolParameters" + } + ], + "description": "The sharepoint grounding tool parameters." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "The input definition information for a sharepoint tool as used to configure an agent." + }, + "SkillObject": { + "type": "object", + "required": [ + "skill_id", + "has_blob", + "name" + ], + "properties": { + "skill_id": { + "type": "string", + "description": "The unique identifier of the skill." + }, + "has_blob": { + "type": "boolean", + "description": "Whether the skill was created from a zip blob package." + }, + "name": { + "type": "string", + "maxLength": 63, + "description": "The unique name of the skill." + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of the skill." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + } + }, + "description": "A skill object." + }, + "Sku": { + "type": "object", + "required": [ + "capacity", + "family", + "name", + "size", + "tier" + ], + "properties": { + "capacity": { + "type": "integer", + "format": "int64", + "description": "Sku capacity" + }, + "family": { + "type": "string", + "description": "Sku family" + }, + "name": { + "type": "string", + "description": "Sku name" + }, + "size": { + "type": "string", + "description": "Sku size" + }, + "tier": { + "type": "string", + "description": "Sku tier" + } + }, + "description": "Sku information" + }, + "StructuredInputDefinition": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "A human-readable description of the input." + }, + "default_value": { + "description": "The default value for the input if no run-time value is provided." + }, + "schema": { + "type": "object", + "additionalProperties": {}, + "description": "The JSON schema for the structured input (optional)." + }, + "required": { + "type": "boolean", + "description": "Whether the input property is required when the agent is invoked.", + "default": false + } + }, + "description": "An structured input that can participate in prompt template substitutions and tool argument binding." + }, + "StructuredOutputDefinition": { + "type": "object", + "required": [ + "name", + "description", + "schema", + "strict" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the structured output." + }, + "description": { + "type": "string", + "description": "A description of the output to emit. Used by the model to determine when to emit the output." + }, + "schema": { + "type": "object", + "additionalProperties": {}, + "description": "The JSON schema for the structured output." + }, + "strict": { + "type": "boolean", + "nullable": true, + "description": "Whether to enforce strict validation. Default `true`." + } + }, + "description": "A structured output that can be produced by the agent." + }, + "StructuredOutputsOutputItem": { + "type": "object", + "required": [ + "type", + "output" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "structured_outputs" + ] + }, + "output": { + "description": "The structured output captured during the response." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ] + }, + "SyntheticDataGenerationPreviewEvalRunDataSource": { + "type": "object", + "required": [ + "type", + "item_generation_params", + "target" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_synthetic_data_gen_preview" + ], + "description": "The type of data source, always `azure_ai_synthetic_data_gen_preview`." + }, + "item_generation_params": { + "allOf": [ + { + "$ref": "#/components/schemas/SyntheticDataGenerationPreviewItemGenerationParams" + } + ], + "description": "The parameters for item generation." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "The target configuration for the evaluation." + }, + "input_messages": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + } + ], + "description": "Input messages template configuration applicable only if target is of type 'azure_ai_model'" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Represents a data source for evaluation runs that evaluates based on generated synthetic data for testing purposes." + }, + "SyntheticDataGenerationPreviewItemGenerationParams": { + "type": "object", + "required": [ + "type", + "samples_count", + "model_deployment_name", + "sources" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "synthetic_data_gen_preview" + ], + "description": "The type of item generation parameters." + }, + "samples_count": { + "type": "integer", + "format": "int32", + "description": "The maximum number of data samples to generate." + }, + "prompt": { + "type": "string", + "description": "The prompt used for generating synthetic data. This is option if target is of type 'azure_ai_agent' with instructions configured in agent." + }, + "model_deployment_name": { + "type": "string", + "description": "The name of the model deployment to use for generating synthetic data." + }, + "output_dataset_name": { + "type": "string", + "description": "The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically." + }, + "output_dataset_id": { + "type": "string", + "description": "The identifier of the output dataset where generated synthetic data is stored. The generated data is a jsonl file with columns id, query and test_description.", + "readOnly": true + }, + "sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + }, + "description": "The optional seed data content source files for data generation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "Represents the parameters for synthetic data generation item generation." + }, + "SystemDataV3": { + "type": "object", + "properties": { + "createdAt": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp of resource creation" + }, + "createdBy": { + "type": "string", + "description": "Identity that created the resource" + }, + "createdByType": { + "type": "string", + "description": "Type of identity that created the resource" + }, + "lastModifiedAt": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Timestamp of last resource modification" + } + }, + "description": "System metadata for a resource" + }, + "Target": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of target." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "azure_ai_model": "#/components/schemas/AzureAIModelTarget", + "azure_ai_agent": "#/components/schemas/AzureAIAgentTarget" + } + }, + "description": "Base class for targets with discriminator support." + }, + "TargetCompletionEvalRunDataSource": { + "type": "object", + "required": [ + "type", + "source", + "target" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_target_completions" + ], + "description": "The type of data source, always `azure_ai_target_completions`." + }, + "input_messages": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "Input messages configuration." + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + } + ], + "description": "The source configuration for inline or file data." + }, + "target": { + "allOf": [ + { + "$ref": "#/components/schemas/Target" + } + ], + "description": "The target configuration for the evaluation." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Represents a data source for target-based completion evaluation configuration." + }, + "TargetUpdate": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "The type of target." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "azure_ai_model": "#/components/schemas/AzureAIModelTargetUpdate", + "azure_ai_agent": "#/components/schemas/AzureAIAgentTargetUpdate" + } + }, + "description": "Base class for targets with discriminator support." + }, + "TaxonomyCategory": { + "type": "object", + "required": [ + "id", + "name", + "riskCategory", + "subCategories" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the taxonomy category." + }, + "name": { + "type": "string", + "description": "Name of the taxonomy category." + }, + "description": { + "type": "string", + "description": "Description of the taxonomy category." + }, + "riskCategory": { + "allOf": [ + { + "$ref": "#/components/schemas/RiskCategory" + } + ], + "description": "Risk category associated with this taxonomy category." + }, + "subCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomySubCategory" + }, + "description": "List of taxonomy sub categories." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional properties for the taxonomy category." + } + }, + "description": "Taxonomy category definition." + }, + "TaxonomySubCategory": { + "type": "object", + "required": [ + "id", + "name", + "enabled" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the taxonomy sub-category." + }, + "name": { + "type": "string", + "description": "Name of the taxonomy sub-category." + }, + "description": { + "type": "string", + "description": "Description of the taxonomy sub-category." + }, + "enabled": { + "type": "boolean", + "description": "List of taxonomy items under this sub-category." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional properties for the taxonomy sub-category." + } + }, + "description": "Taxonomy sub-category definition." + }, + "TelemetryConfig": { + "type": "object", + "required": [ + "endpoints" + ], + "properties": { + "endpoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryEndpoint" + }, + "minItems": 1, + "maxItems": 3, + "description": "Customer-supplied telemetry export endpoint configurations." + } + }, + "description": "Customer-supplied telemetry configuration for exporting container logs, traces, and metrics.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "TelemetryDataKind": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "ContainerStdoutStderr", + "ContainerOtel", + "Metrics" + ] + } + ], + "description": "The type of telemetry data to export.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "TelemetryEndpoint": { + "type": "object", + "required": [ + "kind", + "data" + ], + "properties": { + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryEndpointKind" + } + ], + "description": "The telemetry export endpoint kind." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryDataKind" + }, + "description": "Data types to export to this endpoint. Use an empty array to export no data.", + "example": [ + "ContainerStdoutStderr", + "ContainerOtel", + "Metrics" + ] + }, + "auth": { + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryEndpointAuth" + } + ], + "description": "Optional authentication configuration." + } + }, + "discriminator": { + "propertyName": "kind", + "mapping": { + "OTLP": "#/components/schemas/OtlpTelemetryEndpoint" + } + }, + "description": "A telemetry export endpoint configuration.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "TelemetryEndpointAuth": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryEndpointAuthType" + } + ], + "description": "The authentication type." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "header": "#/components/schemas/HeaderTelemetryEndpointAuth" + } + }, + "description": "Authentication configuration for a telemetry endpoint.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "TelemetryEndpointAuthType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "header" + ] + } + ], + "description": "The type of authentication for a telemetry endpoint.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "TelemetryEndpointKind": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "OTLP" + ] + } + ], + "description": "The kind of telemetry export endpoint.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "TelemetryTransportProtocol": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Http", + "Grpc" + ] + } + ], + "description": "The transport protocol for telemetry export.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "TestingCriterionAzureAIEvaluator": { + "type": "object", + "required": [ + "type", + "name", + "evaluator_name" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_evaluator" + ], + "description": "The object type, which is always `azure_ai_evaluator`." + }, + "name": { + "type": "string", + "description": "The name of the grader." + }, + "evaluator_name": { + "type": "string", + "description": "The name of the evaluator." + }, + "evaluator_version": { + "type": "string", + "description": "The version of the evaluator. Latest version if not specified." + }, + "initialization_parameters": { + "type": "object", + "description": "The initialization parameters for the evaluation. Must support structured outputs." + }, + "data_mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The model to use for the evaluation. Must support structured outputs." + } + }, + "description": "An Azure AI Evaluator grader used as testing criterion in evaluations.", + "title": "AzureAIEvaluatorGrader" + }, + "ToolCallOutputContent": { + "anyOf": [ + { + "type": "object", + "additionalProperties": {} + }, + { + "type": "string" + }, + { + "type": "array", + "items": {} + } + ], + "description": "The output content from a tool call, which can be a dictionary, string, or array." + }, + "ToolCallStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "failed" + ], + "description": "The status of a tool call." + }, + "ToolDescription": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the tool." + }, + "description": { + "type": "string", + "description": "A brief description of the tool's purpose." + } + }, + "description": "Description of a tool that can be used by an agent." + }, + "ToolProjectConnection": { + "type": "object", + "required": [ + "project_connection_id" + ], + "properties": { + "project_connection_id": { + "type": "string", + "description": "A project connection in a ToolProjectConnectionList attached to this tool." + } + }, + "description": "A project connection resource." + }, + "ToolboxObject": { + "type": "object", + "required": [ + "id", + "name", + "default_version" + ], + "properties": { + "id": { + "type": "string", + "description": "The unique identifier of the toolbox." + }, + "name": { + "type": "string", + "maxLength": 256, + "description": "The name of the toolbox." + }, + "default_version": { + "type": "string", + "description": "The version identifier that the toolbox currently points to. Defaults to the latest version. Can be changed via updateToolbox." + } + }, + "description": "A toolbox that stores reusable tool definitions for agents." + }, + "ToolboxPolicies": { + "type": "object", + "properties": { + "rai_config": { + "allOf": [ + { + "$ref": "#/components/schemas/RaiConfig" + } + ], + "description": "Responsible AI content filtering configuration." + } + }, + "description": "Policy configuration for a toolbox, including content safety and other governance settings." + }, + "ToolboxSearchPreviewTool": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "toolbox_search_preview" + ], + "description": "The type of the tool. Always `toolbox_search_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." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool for searching over the agent's toolbox.\nWhen present, deferred tools are hidden from `tools/list` and only\ndiscoverable via `search_tools` queries at runtime." + }, + "ToolboxVersionObject": { + "type": "object", + "required": [ + "metadata", + "id", + "name", + "version", + "created_at", + "tools" + ], + "properties": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "id": { + "type": "string", + "description": "The unique identifier of the toolbox version." + }, + "name": { + "type": "string", + "maxLength": 256, + "description": "The name of the toolbox." + }, + "version": { + "type": "string", + "description": "The version identifier of the toolbox. Toolbox versions are immutable and every update creates a new version." + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the toolbox." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (seconds) when the toolbox version was created." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "The list of tools contained in this toolbox version." + }, + "policies": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolboxPolicies" + } + ], + "description": "Policy configuration for the toolbox version." + } + }, + "description": "A specific version of a toolbox." + }, + "TraceIdTraceSource": { + "type": "object", + "required": [ + "type", + "trace_ids" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "trace_id_source" + ], + "description": "The type of trace source, always `trace_id_source`." + }, + "trace_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Collection of trace identifiers to evaluate." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/TraceSource" + } + ], + "description": "A trace source that selects traces by explicit trace IDs." + }, + "TraceSource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/TraceSourceType" + } + ], + "description": "The discriminator that identifies which kind of trace source this is." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "trace_id_source": "#/components/schemas/TraceIdTraceSource", + "conversation_id_source": "#/components/schemas/ConversationIdTraceSource", + "agent_filter": "#/components/schemas/AgentFilterTraceSource", + "agent_smart_filter": "#/components/schemas/AgentSmartFilterTraceSource" + } + }, + "description": "Base class for polymorphic trace sources nested within an AzureAITraceDataSourcePreviewEvalRunDataSource." + }, + "TraceSourceType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "trace_id_source", + "conversation_id_source", + "agent_filter", + "agent_smart_filter" + ] + } + ], + "description": "Specifies the type of trace source used to select traces for evaluation." + }, + "TracesPreviewEvalRunDataSource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "azure_ai_traces_preview" + ], + "description": "The type of data source, always `azure_ai_traces_preview`." + }, + "trace_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Collection of Agent trace identifiers that should be evaluated." + }, + "conversation_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Collection of conversation identifiers to filter traces by conversation." + }, + "agent_id": { + "type": "string", + "description": "The agent ID used to filter traces for evaluation." + }, + "agent_name": { + "type": "string", + "description": "The agent name used to filter traces for evaluation." + }, + "lookback_hours": { + "type": "integer", + "format": "int32", + "description": "Lookback window (in hours) applied when retrieving traces from Application Insights.\n For scheduled evaluations this is inferred from the recurrence interval.", + "default": 168 + }, + "end_time": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Unix timestamp (in seconds) marking the end of the trace query window. Defaults to the current time." + }, + "max_traces": { + "type": "integer", + "format": "int32", + "description": "Sampling limit applied to traces retrieved for evaluation.", + "default": 1000 + }, + "ingestion_delay_seconds": { + "type": "integer", + "format": "int32", + "description": "The delay to apply for ingestion when querying traces.", + "default": 300 + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } + ], + "description": "Represents a data source for evaluation runs that operate over Agent traces stored in Application Insights." + }, + "TreatmentEffectType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "TooFewSamples", + "Inconclusive", + "Changed", + "Improved", + "Degraded" + ] + }, + { + "type": "string" + } + ], + "description": "Treatment Effect Type." + }, + "Trigger": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/TriggerType" + } + ], + "description": "Type of the trigger." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "Cron": "#/components/schemas/CronTrigger", + "Recurrence": "#/components/schemas/RecurrenceTrigger", + "OneTime": "#/components/schemas/OneTimeTrigger" + } + }, + "description": "Base model for Trigger of the schedule." + }, + "TriggerType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Cron", + "Recurrence", + "OneTime" + ] + } + ], + "description": "Type of the trigger." + }, + "UpdateAgentFromManifestRequest": { + "type": "object", + "required": [ + "manifest_id", + "parameter_values" + ], + "properties": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the agent." + }, + "manifest_id": { + "type": "string", + "description": "The manifest ID to import the agent version from." + }, + "parameter_values": { + "type": "object", + "additionalProperties": {}, + "description": "The inputs to the manifest that will result in a fully materialized Agent." + } + } + }, + "UpdateAgentRequest": { + "type": "object", + "required": [ + "definition" + ], + "properties": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the agent." + }, + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentDefinition" + } + ], + "description": "The agent definition. This can be a workflow, hosted agent, or a simple agent definition.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview", + "CodeAgents=V1Preview", + "ExternalAgents=V1Preview" + ] + } + }, + "blueprint_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentBlueprintReference" + } + ], + "description": "The blueprint reference for the agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + } + } + }, + "UpdateEvalParametersBody": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of immutable 16 key-value pairs that can be attached to an object for storing additional information.\n Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters." + } + } + }, + "UpdateModelVersionRequest": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + } + }, + "description": "Request body for updating a model version. Only description and tags can be modified." + }, + "UpdateToolboxRequest": { + "type": "object", + "required": [ + "default_version" + ], + "properties": { + "default_version": { + "type": "string", + "description": "The version identifier that the toolbox should point to. When set, the toolbox's default version will resolve to this version instead of the latest." + } + } + }, + "UserProfileMemoryItem": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "user_profile" + ], + "description": "The kind of the memory item." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItem" + } + ], + "description": "A memory item specifically containing user profile information extracted from conversations, such as preferences, interests, and personal details.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "VersionIndicator": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/VersionIndicatorType" + } + ], + "description": "The type of version indicator." + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "version_ref": "#/components/schemas/VersionRefIndicator" + } + }, + "description": "Version indicator determining which agent version backs the session.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "VersionIndicatorType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "version_ref" + ] + } + ], + "description": "The type of version indicator used to determine the agent version backing a session.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "VersionRefIndicator": { + "type": "object", + "required": [ + "type", + "agent_version" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "version_ref" + ], + "description": "Discriminator value for version_ref." + }, + "agent_version": { + "type": "string", + "description": "The agent version identifier returned by the agent version APIs." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/VersionIndicator" + } + ], + "description": "Version indicator that references a specific agent version by name.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "VersionSelectionRule": { + "type": "object", + "required": [ + "type", + "agent_version" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/VersionSelectorType" + }, + "agent_version": { + "type": "string", + "description": "The agent version to route traffic to" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "FixedRatio": "#/components/schemas/FixedRatioVersionSelectionRule" + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "VersionSelector": { + "type": "object", + "required": [ + "version_selection_rules" + ], + "properties": { + "version_selection_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionSelectionRule" + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "VersionSelectorType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "FixedRatio" + ] + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "VersionSelectorUpdate": { + "type": "object", + "properties": { + "version_selection_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionSelectionRule" + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "WebSearchConfiguration": { + "type": "object", + "required": [ + "project_connection_id", + "instance_name" + ], + "properties": { + "project_connection_id": { + "type": "string", + "description": "Project connection id for grounding with bing custom search" + }, + "instance_name": { + "type": "string", + "description": "Name of the custom configuration instance given to config." + } + }, + "description": "A web search configuration for bing custom search" + }, + "WeeklyRecurrenceSchedule": { + "type": "object", + "required": [ + "type", + "daysOfWeek" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "Weekly" + ], + "description": "Weekly recurrence type." + }, + "daysOfWeek": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DayOfWeek" + }, + "description": "Days of the week for the recurrence schedule." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/RecurrenceSchedule" + } + ], + "description": "Weekly recurrence schedule." + }, + "WorkIQPreviewTool": { + "type": "object", + "required": [ + "type", + "project_connection_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "work_iq_preview" + ], + "description": "The object type, which is always 'work_iq_preview'." + }, + "project_connection_id": { + "type": "string", + "description": "The ID of the WorkIQ project connection." + }, + "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." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A WorkIQ server-side tool." + }, + "WorkflowActionOutputItem": { + "type": "object", + "required": [ + "type", + "kind", + "action_id", + "status" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "workflow_action" + ] + }, + "kind": { + "type": "string", + "description": "The kind of CSDL action (e.g., 'SetVariable', 'InvokeAzureAgent')." + }, + "action_id": { + "type": "string", + "description": "Unique identifier for the action." + }, + "parent_action_id": { + "type": "string", + "description": "ID of the parent action if this is a nested action." + }, + "previous_action_id": { + "type": "string", + "description": "ID of the previous action if this action follows another." + }, + "status": { + "type": "string", + "enum": [ + "completed", + "failed", + "in_progress", + "cancelled" + ], + "description": "Status of the action (e.g., 'in_progress', 'completed', 'failed', 'cancelled')." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ] + }, + "WorkflowAgentDefinition": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "workflow" + ] + }, + "workflow": { + "type": "string", + "description": "The CSDL YAML definition of the workflow." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/AgentDefinition" + } + ], + "description": "The workflow agent definition.", + "x-ms-foundry-meta": { + "required_previews": [ + "WorkflowAgents=V1Preview" + ] + } + }, + "integer": { + "type": "integer", + "format": "int64" + } + }, + "securitySchemes": { + "OAuth2Auth": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", + "scopes": { + "https://ai.azure.com/.default": "" + } + } + } + } + } + }, + "servers": [ + { + "url": "{endpoint}", + "description": "Microsoft Foundry", + "variables": { + "endpoint": { + "default": "", + "description": "Foundry Project endpoint in the form\n\"https://{ai-services-account-name}.services.ai.azure.com/api/projects/{project-name}\".\nIf you only have one Project in your Foundry Hub, or to target the default Project\nin your Hub, use the form\n\"https://{ai-services-account-name}.services.ai.azure.com/api/projects/_project\"" + } + } + } + ] +} 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 ba5175244008..04be9b9492f3 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 @@ -175,11 +175,11 @@ "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": [ @@ -190,7 +190,7 @@ "get": { "operationId": "AgentOptimizationJobs_list", "summary": "Returns a list of agent optimization jobs.", - "description": "List optimization jobs. Supports cursor pagination and optional status / agentName filters.", + "description": "List optimization jobs. Supports cursor pagination and optional `status` / `agent_name` filters.", "parameters": [ { "name": "Foundry-Features", @@ -257,7 +257,7 @@ "explode": false }, { - "name": "agentName", + "name": "agent_name", "in": "query", "required": false, "description": "Filter to jobs targeting this agent name.", @@ -339,7 +339,7 @@ "get": { "operationId": "AgentOptimizationJobs_get", "summary": "Get info about an agent optimization job.", - "description": "Get an optimization job by id. Returns 202 while in progress, 200 when terminal.", + "description": "Get an optimization job by id. Emits `Retry-After` while the job is non-terminal.", "parameters": [ { "name": "Foundry-Features", @@ -379,25 +379,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" @@ -458,16 +440,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", @@ -646,7 +618,7 @@ "get": { "operationId": "AgentOptimizationJobs_getCandidate", "summary": "Get a candidate by id.", - "description": "Get a single candidate's metadata, manifest, and promotion info.", + "description": "Get a single candidate manifest and aggregated evaluation summary.", "parameters": [ { "name": "Foundry-Features", @@ -695,7 +667,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CandidateMetadata" + "$ref": "#/components/schemas/OptimizationCandidate" } } } @@ -800,96 +772,6 @@ } } }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}/files": { - "get": { - "operationId": "AgentOptimizationJobs_getCandidateFile", - "summary": "Get a candidate file.", - "description": "Stream a specific 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": { - "type": "string", - "format": "binary" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "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", @@ -969,96 +851,6 @@ } } }, - "/agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote": { - "post": { - "operationId": "AgentOptimizationJobs_promoteCandidate", - "summary": "Promote a candidate.", - "description": "Promotes a candidate, recording 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" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "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", @@ -1627,7 +1419,7 @@ "name": "force", "in": "query", "required": false, - "description": "For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types.", + "description": "For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false.", "schema": { "type": "boolean", "default": false @@ -2242,15 +2034,6 @@ "type": "string" } }, - { - "name": "x-ms-user-isolation-key", - "in": "header", - "required": false, - "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", - "schema": { - "type": "string" - } - }, { "name": "api-version", "in": "query", @@ -2328,15 +2111,6 @@ "type": "string" } }, - { - "name": "x-ms-user-isolation-key", - "in": "header", - "required": false, - "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", - "schema": { - "type": "string" - } - }, { "name": "limit", "in": "query", @@ -2883,15 +2657,6 @@ "type": "string" } }, - { - "name": "x-ms-user-isolation-key", - "in": "header", - "required": false, - "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", - "schema": { - "type": "string" - } - }, { "name": "api-version", "in": "query", @@ -2937,86 +2702,6 @@ "delete": { "operationId": "Agents_deleteSession", "description": "Deletes a session synchronously.\nReturns 204 No Content when the session is deleted or does not exist.", - "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": [ - "AgentEndpoints=V1Preview" - ] - } - }, - { - "name": "agent_name", - "in": "path", - "required": true, - "description": "The name of the agent.", - "schema": { - "type": "string" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "description": "The session identifier.", - "schema": { - "type": "string" - } - }, - { - "name": "x-ms-user-isolation-key", - "in": "header", - "required": false, - "description": "Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user.", - "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": { - "204": { - "description": "There is no content to send for this request, but the headers may be useful." - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Agents" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - } - }, - "/agents/{agent_name}/endpoint/sessions/{session_id}:stop": { - "post": { - "operationId": "Agents_stopSession", - "description": "Stops a session.\nReturns 204 No Content when the stop succeeds.", "parameters": [ { "name": "Foundry-Features", @@ -3661,7 +3346,7 @@ "name": "force", "in": "query", "required": false, - "description": "For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types.", + "description": "For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false.", "schema": { "type": "boolean", "default": false @@ -4898,6 +4583,29 @@ }, "explode": false }, + { + "name": "scenario", + "in": "query", + "required": false, + "description": "Filter data generation jobs by their scenario.", + "schema": { + "$ref": "#/components/schemas/DataGenerationJobScenario" + }, + "explode": false + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter data generation jobs by their type.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataGenerationJobType" + } + }, + "explode": false + }, { "name": "api-version", "in": "query", @@ -15907,6 +15615,102 @@ } }, "/skills": { + "post": { + "operationId": "Skills_createSkill", + "description": "Creates a skill.", + "parameters": [ + { + "name": "Foundry-Features", + "in": "header", + "required": true, + "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "schema": { + "type": "string", + "enum": [ + "Skills=V1Preview" + ] + } + }, + { + "name": "api-version", + "in": "query", + "required": true, + "description": "The API version to use for this operation.", + "schema": { + "type": "string" + }, + "explode": false + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Skills" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 63, + "description": "The unique name of the skill." + }, + "description": { + "type": "string", + "maxLength": 1024, + "description": "A human-readable description of the skill." + }, + "instructions": { + "type": "string", + "maxLength": 102400, + "description": "Instructions that define the behavior of the skill." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" + } + }, + "required": [ + "name" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "Skills=V1Preview" + ] + } + }, "get": { "operationId": "Skills_listSkills", "description": "Returns the list of all skills.", @@ -15991,7 +15795,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/Skill" + "$ref": "#/components/schemas/SkillObject" }, "description": "The requested list of items." }, @@ -16045,7 +15849,7 @@ "required": true, "description": "The unique name of the skill.", "schema": { - "$ref": "#/components/schemas/SkillName" + "type": "string" } }, { @@ -16077,7 +15881,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Skill" + "$ref": "#/components/schemas/SkillObject" } } } @@ -16103,16 +15907,16 @@ } }, "post": { - "operationId": "updateSkill", - "description": "Update a skill.", + "operationId": "Skills_updateSkill", + "description": "Updates an existing skill.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The name of the skill to update.", + "description": "The unique name of the skill.", "schema": { - "$ref": "#/components/schemas/SkillName" + "type": "string" } }, { @@ -16144,7 +15948,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Skill" + "$ref": "#/components/schemas/SkillObject" } } } @@ -16170,14 +15974,25 @@ "schema": { "type": "object", "properties": { - "default_version": { + "description": { "type": "string", - "description": "The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest." + "maxLength": 1024, + "description": "A human-readable description of the skill." + }, + "instructions": { + "type": "string", + "maxLength": 102400, + "description": "Instructions that define the behavior of the skill." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" } - }, - "required": [ - "default_version" - ] + } } } } @@ -16198,7 +16013,7 @@ "required": true, "description": "The unique name of the skill.", "schema": { - "$ref": "#/components/schemas/SkillName" + "type": "string" } }, { @@ -16256,18 +16071,18 @@ } } }, - "/skills/{name}/content": { + "/skills/{name}:download": { "get": { - "operationId": "getSkillContent", - "description": "Download the zip content for the default version of a skill.", + "operationId": "Skills_downloadSkill", + "description": "Downloads a skill package.", "parameters": [ { "name": "name", "in": "path", "required": true, - "description": "The name of the skill.", + "description": "The unique name of the skill.", "schema": { - "$ref": "#/components/schemas/SkillName" + "type": "string" } }, { @@ -16326,346 +16141,11 @@ } } }, - "/skills/{name}/versions": { - "post": { - "operationId": "createSkillVersion_createSkillVersionFromFiles", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the skill. If the skill does not exist, it will be created.", - "schema": { - "$ref": "#/components/schemas/SkillName" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false - } - ], - "description": "Creates a new version of a skill. If the skill does not exist, it will be created. Creates a new version of a skill from uploaded files via multipart form data.", - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SkillVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] - }, - "tags": [ - "Skills" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "inline_content": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillInlineContent" - } - ], - "description": "Inline skill content for simple skills without file uploads. Foundry-specific extension." - }, - "default": { - "type": "boolean", - "description": "Whether to set this version as the default." - } - } - } - }, - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/CreateSkillVersionFromFilesBody" - }, - "encoding": { - "files": { - "contentType": "*/*" - }, - "default": { - "contentType": "text/plain" - } - } - } - } - } - }, - "get": { - "operationId": "listSkillVersions", - "description": "List all versions of a skill.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the skill to list versions for.", - "schema": { - "$ref": "#/components/schemas/SkillName" - } - }, - { - "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": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "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/SkillVersion" - }, - "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." - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/skills/{name}/versions/{version}": { - "get": { - "operationId": "getSkillVersion", - "description": "Retrieve a specific version of a skill.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the skill.", - "schema": { - "$ref": "#/components/schemas/SkillName" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version identifier to retrieve.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "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/SkillVersion" - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } - }, - "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] - } - }, - "delete": { - "operationId": "deleteSkillVersion", - "description": "Delete a specific version of a skill.", + "/skills:import": { + "post": { + "operationId": "Skills_createSkillFromPackage", + "description": "Creates a skill from a zip package.", "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the skill.", - "schema": { - "$ref": "#/components/schemas/SkillName" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version identifier to delete.", - "schema": { - "type": "string" - } - }, { "name": "Foundry-Features", "in": "header", @@ -16690,12 +16170,12 @@ } ], "responses": { - "200": { - "description": "The request has succeeded.", + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSkillVersionResponse" + "$ref": "#/components/schemas/SkillObject" } } } @@ -16714,85 +16194,18 @@ "tags": [ "Skills" ], - "x-ms-foundry-meta": { - "required_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/skills/{name}/versions/{version}/content": { - "get": { - "operationId": "getSkillVersionContent", - "description": "Download the zip content for a specific version of a skill.", - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "The name of the skill.", - "schema": { - "$ref": "#/components/schemas/SkillName" - } - }, - { - "name": "version", - "in": "path", - "required": true, - "description": "The version to download content for.", - "schema": { - "type": "string" - } - }, - { - "name": "Foundry-Features", - "in": "header", - "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", - "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } - }, - { - "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 response body for downloading a skill package.", - "content": { - "application/zip": { - "schema": { - "type": "string", - "format": "binary" - } + "requestBody": { + "required": true, + "content": { + "application/zip": { + "schema": { + "type": "string", + "format": "binary" } } }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } - } - } - } + "description": "The zip package used to create the skill." }, - "tags": [ - "Skills" - ], "x-ms-foundry-meta": { "required_previews": [ "Skills=V1Preview" @@ -17137,13 +16550,6 @@ }, "description": "The list of tools to include in this version." }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolboxSkill" - }, - "description": "The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used." - }, "policies": { "allOf": [ { @@ -18648,23 +18054,6 @@ } } }, - "AgentIdentifier": { - "type": "object", - "required": [ - "agentName" - ], - "properties": { - "agentName": { - "type": "string", - "description": "Registered Foundry agent name (required)." - }, - "agentVersion": { - "type": "string", - "description": "Pinned agent version. Defaults to latest if omitted." - } - }, - "description": "Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig." - }, "AgentIdentity": { "type": "object", "required": [ @@ -18821,8 +18210,7 @@ "activity_protocol", "responses", "mcp", - "invocations", - "invocations_ws" + "invocations" ] } ] @@ -18921,7 +18309,6 @@ "idle", "updating", "failed", - "stopping", "deleting", "deleted", "expired" @@ -21212,126 +20599,21 @@ "skills": { "type": "array", "items": { - "type": "object", - "additionalProperties": {} + "$ref": "#/components/schemas/OptimizationAgentSkill" }, "description": "Optional skill overrides." - }, - "tools": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - }, - "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", - "sizeBytes" - ], - "properties": { - "path": { - "type": "string", - "description": "Relative path of the file." - }, - "type": { - "type": "string", - "description": "File type category (e.g. 'config', 'results')." - }, - "sizeBytes": { - "type": "integer", - "format": "int64", - "description": "File size in bytes." - } - }, - "description": "File entry in a candidate's blob directory." - }, - "CandidateMetadata": { - "type": "object", - "required": [ - "candidateId", - "jobId", - "candidateName", - "status", - "hasResults", - "createdAt", - "updatedAt", - "files" - ], - "properties": { - "candidateId": { - "type": "string", - "description": "Server-assigned candidate identifier." - }, - "jobId": { - "type": "string", - "description": "Owning optimization job id." - }, - "candidateName": { - "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." - }, - "hasResults": { - "type": "boolean", - "description": "Whether detailed results are available for this candidate." - }, - "createdAt": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when the candidate was created, represented in Unix time." - }, - "updatedAt": { - "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": [ - "candidateId", + "candidate_id", "results" ], "properties": { - "candidateId": { + "candidate_id": { "type": "string", "description": "Owning candidate id." }, @@ -22536,26 +21818,6 @@ ] } }, - "CreateSkillVersionFromFilesBody": { - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - }, - "description": "Skill files to upload. Upload a single zip file or multiple individual files with relative paths." - }, - "default": { - "type": "boolean", - "description": "Whether to set this version as the default. Defaults to false." - } - }, - "required": [ - "files" - ] - }, "CreatedBy": { "type": "object", "properties": { @@ -22611,7 +21873,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the cron schedule. Defaults to `UTC`.", + "description": "Time zone for the cron schedule.", "default": "UTC" }, "startTime": { @@ -22977,6 +22239,7 @@ "prompt": "#/components/schemas/PromptDataGenerationJobSource", "agent": "#/components/schemas/AgentDataGenerationJobSource", "traces": "#/components/schemas/TracesDataGenerationJobSource", + "dataset": "#/components/schemas/DatasetDataGenerationJobSource", "file": "#/components/schemas/FileDataGenerationJobSource" } }, @@ -22993,6 +22256,7 @@ "prompt", "agent", "traces", + "dataset", "file" ] } @@ -23129,6 +22393,40 @@ ], "description": "Dataset output for a data generation job." }, + "DatasetDataGenerationJobSource": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "description": { + "type": "string", + "description": "Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities')." + }, + "type": { + "type": "string", + "enum": [ + "dataset" + ], + "description": "The source type for this source, which is Dataset." + }, + "name": { + "type": "string", + "description": "The name of the dataset." + }, + "version": { + "type": "string", + "description": "The version of the dataset. If not specified, the latest version is used." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/DataGenerationJobSource" + } + ], + "description": "Dataset source for data generation jobs — reference to a dataset." + }, "DatasetEvaluationSuiteJobSource": { "type": "object", "required": [ @@ -23197,32 +22495,48 @@ ], "description": "Dataset source for evaluator generation jobs — reference to a dataset." }, - "DatasetInfo": { + "DatasetItem": { "type": "object", "required": [ - "taskCount", - "isInline" + "name", + "query" ], "properties": { "name": { "type": "string", - "description": "Dataset name when using a registered dataset reference. Null for inline datasets." + "description": "Unique-within-the-dataset identifier for this task." }, - "version": { + "query": { "type": "string", - "description": "Dataset version when using a registered dataset reference. Null for inline datasets." + "description": "The user query / input for the task." }, - "taskCount": { - "type": "integer", - "format": "int32", - "description": "Number of tasks/rows in the dataset." + "ground_truth": { + "type": "string", + "description": "Optional ground truth used by reference-based evaluators." }, - "isInline": { - "type": "boolean", - "description": "True when the dataset was provided inline in the request body." + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationCriterion" + }, + "description": "Per-task evaluation criteria. Defaults to the job-level evaluators if unset." + }, + "eval_results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunOutputItemResult" + }, + "description": "Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped." + }, + "response_items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputItem" + }, + "description": "Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run." } }, - "description": "Metadata about the dataset used for optimization, surfaced in the response." + "description": "A single evaluation task with input query, expected output, and evaluation criteria." }, "DatasetRef": { "type": "object", @@ -23583,21 +22897,12 @@ "DeleteSkillResponse": { "type": "object", "required": [ - "id", "name", "deleted" ], "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the deleted skill." - }, "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], + "type": "string", "description": "The unique name of the skill." }, "deleted": { @@ -23605,39 +22910,7 @@ "description": "Whether the skill was successfully deleted." } }, - "description": "A deleted skill." - }, - "DeleteSkillVersionResponse": { - "type": "object", - "required": [ - "id", - "name", - "deleted", - "version" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the deleted skill version." - }, - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], - "description": "The name of the skill." - }, - "deleted": { - "type": "boolean", - "description": "Whether the skill version was successfully deleted." - }, - "version": { - "type": "string", - "description": "The version that was deleted." - } - }, - "description": "A deleted skill version." + "description": "A deleted skill Object" }, "Deployment": { "type": "object", @@ -23732,7 +23005,7 @@ }, "always_applicable": { "type": "boolean", - "description": "When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`.", + "description": "When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions.", "default": false } }, @@ -24695,6 +23968,24 @@ ], "description": "Insights from the evaluation comparison." }, + "EvaluationCriterion": { + "type": "object", + "required": [ + "name", + "instruction" + ], + "properties": { + "name": { + "type": "string", + "description": "Criterion name (referenced in evaluation result rows)." + }, + "instruction": { + "type": "string", + "description": "Natural-language instruction passed to the judge LLM." + } + }, + "description": "LLM-as-judge evaluation criterion applied to a single task." + }, "EvaluationDataGenerationType": { "anyOf": [ { @@ -25183,33 +24474,6 @@ } ], "description": "Data generation options. Controls how the evaluation dataset is generated.\nIf omitted, defaults are used (simple_qna, 100 max_samples)." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Target for the generated suite. Stored on the suite so it can be run\nimmediately after generation completes.\nSupports azure_ai_agent, azure_ai_model, azure_ai_assistant." - }, - "input_messages": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" - } - ], - "description": "How to send dataset rows to the target.\nIf omitted and target is provided, defaults to a template using item.query." - }, - "evaluation_level": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationLevel" - } - ], - "description": "Evaluation level for the generated suite.\nDefault: turn (single-turn evaluation).\nUse conversation for multi-turn evaluation." } }, "description": "Caller-supplied inputs for an evaluation suite generation job." @@ -27139,6 +26403,27 @@ }, "description": "An array of tools the hosted agent's model may call while generating a response. You\ncan specify which tool to use by setting the `tool_choice` parameter." }, + "container_protocol_versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProtocolVersionRecord" + }, + "description": "The protocols that the agent supports for ingress communication of the containers.", + "example": [ + { + "protocol": "responses", + "version": "v0.1.1" + }, + { + "protocol": "invocations", + "version": "v0.0.1" + }, + { + "protocol": "a2a", + "version": "v0.3.0" + } + ] + }, "cpu": { "type": "string", "description": "The CPU configuration for the hosted agent.", @@ -27160,6 +26445,11 @@ "value": "debug" } }, + "image": { + "type": "string", + "description": "The image ID for the agent, applicable to image-based hosted agents.", + "example": "my-registry.azurecr.io/my-hosted-agent:latest" + }, "container_configuration": { "allOf": [ { @@ -28575,18 +27865,18 @@ }, "chat_summary_enabled": { "type": "boolean", - "description": "Whether to enable chat summary extraction and storage. Defaults to `true`.", + "description": "Whether to enable chat summary extraction and storage. Default is true.", "default": true }, "procedural_memory_enabled": { "type": "boolean", - "description": "Whether to enable procedural memory extraction and storage. Defaults to `true`.", + "description": "Whether to enable procedural memory extraction and storage. Default is true.", "default": true }, "default_ttl_seconds": { "type": "integer", "format": "int32", - "description": "The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`.", + "description": "The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire.", "default": 0 } }, @@ -29413,7 +28703,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the one-time trigger. Defaults to `UTC`.", + "description": "Time zone for the one-time trigger.", "default": "UTC" } }, @@ -49247,41 +48537,52 @@ }, "OptimizationAgentDefinition": { "type": "object", + "required": [ + "agent_name" + ], "properties": { - "agentName": { + "agent_name": { "type": "string", - "description": "Agent name." + "description": "Registered Foundry agent name. Required — bare-model mode is not supported." }, - "agentVersion": { + "agent_version": { "type": "string", - "description": "Agent version." + "description": "Pinned agent version. Defaults to latest if omitted." }, "model": { "type": "string", - "description": "Model deployment name." + "description": "Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model." }, - "systemPrompt": { + "system_prompt": { "type": "string", - "description": "System prompt / instructions." + "description": "System prompt / instructions override. When set, used as the baseline instructions for the agent." }, "skills": { "type": "array", "items": { - "type": "object", - "additionalProperties": {} + "$ref": "#/components/schemas/OptimizationAgentSkill" }, - "description": "Agent skills." + "description": "Optional named skills the optimizer may tune. Tool descriptions and parameters." + } + }, + "description": "The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides." + }, + "OptimizationAgentSkill": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Skill name (matches the tool name on the agent)." }, - "tools": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - }, - "description": "Agent tools." + "description": { + "type": "string", + "description": "Free-form description used as the seed when tuning skill descriptions." } }, - "description": "Agent definition returned in response payloads (includes resolved config)." + "description": "A named skill on the agent that the optimizer may tune." }, "OptimizationCandidate": { "type": "object", @@ -49289,16 +48590,17 @@ "name", "config", "mutations", - "avgScore", - "avgTokens", - "passRate", - "taskScores", - "isParetoOptimal" + "rationale", + "avg_score", + "avg_tokens", + "pass_rate", + "task_scores", + "is_pareto_optimal" ], "properties": { - "candidateId": { + "candidate_id": { "type": "string", - "description": "Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints." + "description": "Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints." }, "name": { "type": "string", @@ -49315,49 +48617,67 @@ "mutations": { "type": "object", "additionalProperties": {}, - "description": "What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'})." + "description": "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." + }, + "rationale": { + "type": "string", + "description": "Strategy rationale — why this candidate was generated." }, - "avgScore": { + "avg_score": { "type": "number", "format": "double", "description": "Average composite score across all tasks." }, - "avgTokens": { + "avg_tokens": { "type": "number", "format": "double", "description": "Average token usage across all tasks." }, - "passRate": { + "pass_rate": { "type": "number", "format": "double", "description": "Fraction of tasks that met the pass threshold." }, - "taskScores": { + "task_scores": { "type": "array", "items": { "$ref": "#/components/schemas/OptimizationTaskResult" }, "description": "Individual task-level scores." }, - "isParetoOptimal": { + "is_pareto_optimal": { "type": "boolean", "description": "Whether this candidate is on the Pareto frontier (score vs cost)." }, - "evalId": { - "type": "string", - "description": "Foundry evaluation identifier used to score this candidate." + "sample_avg_score": { + "type": "number", + "format": "double", + "description": "Average score from sampled evaluation (null if full dataset was used)." }, - "evalRunId": { + "sample_size": { + "type": "integer", + "format": "int32", + "description": "Number of tasks in the sample (null if full dataset was used)." + }, + "evaluation_type": { "type": "string", - "description": "Foundry evaluation run identifier for this candidate's scoring run." + "description": "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." }, - "promotion": { + "strategy": { "allOf": [ { - "$ref": "#/components/schemas/PromotionInfo" + "$ref": "#/components/schemas/OptimizationStrategy" } ], - "description": "Promotion metadata. Null if the candidate has not been promoted." + "description": "Identifies the strategy that produced this candidate." + }, + "eval_id": { + "type": "string", + "description": "Foundry evaluation identifier used to score this candidate." + }, + "eval_run_id": { + "type": "string", + "description": "Foundry evaluation run identifier for this candidate's scoring run." } }, "description": "Aggregated evaluation result for a single candidate agent configuration across all tasks." @@ -49367,7 +48687,7 @@ "required": [ "id", "status", - "createdAt" + "created_at" ], "properties": { "id": { @@ -49375,42 +48695,42 @@ "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 }, - "createdAt": { + "created_at": { "allOf": [ { "$ref": "#/components/schemas/FoundryTimestamp" @@ -49419,7 +48739,7 @@ "description": "The timestamp when the job was created, represented in Unix time.", "readOnly": true }, - "updatedAt": { + "updated_at": { "allOf": [ { "$ref": "#/components/schemas/FoundryTimestamp" @@ -49436,43 +48756,40 @@ ], "description": "Progress while in flight. Absent in terminal states.", "readOnly": true - }, - "dataset": { - "allOf": [ - { - "$ref": "#/components/schemas/DatasetInfo" - } - ], - "description": "Metadata about the dataset used for this optimization job.", - "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." + "description": "Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates." }, "OptimizationJobInputs": { "type": "object", "required": [ - "agent", - "trainDatasetReference" + "agent" ], "properties": { "agent": { "allOf": [ { - "$ref": "#/components/schemas/AgentIdentifier" + "$ref": "#/components/schemas/OptimizationAgentDefinition" } ], "description": "The agent (and pinned version) being optimized." }, - "trainDatasetReference": { + "dataset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetItem" + }, + "description": "Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`." + }, + "train_dataset_reference": { "allOf": [ { "$ref": "#/components/schemas/DatasetRef" } ], - "description": "Reference to a registered training dataset (required)." + "description": "Reference to a registered training dataset. Mutually exclusive with `dataset`." }, - "validationDatasetReference": { + "validation_dataset_reference": { "allOf": [ { "$ref": "#/components/schemas/DatasetRef" @@ -49485,7 +48802,14 @@ "items": { "type": "string" }, - "description": "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." + "description": "Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence']." + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationCriterion" + }, + "description": "Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`." }, "options": { "allOf": [ @@ -49501,28 +48825,49 @@ "OptimizationJobProgress": { "type": "object", "required": [ - "currentIteration", - "bestScore", - "elapsedSeconds" + "current_strategy", + "current_iteration", + "tasks_completed", + "tasks_total", + "best_score", + "elapsed_seconds" ], "properties": { - "currentIteration": { + "current_strategy": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationStrategy" + } + ], + "description": "Strategy currently being explored." + }, + "current_iteration": { "type": "integer", "format": "int32", "description": "1-based current iteration index." }, - "bestScore": { + "tasks_completed": { + "type": "integer", + "format": "int32", + "description": "Tasks evaluated so far this iteration." + }, + "tasks_total": { + "type": "integer", + "format": "int32", + "description": "Total tasks scheduled this iteration." + }, + "best_score": { "type": "number", "format": "double", "description": "Best score observed so far across all candidates." }, - "elapsedSeconds": { + "elapsed_seconds": { "type": "number", "format": "double", - "description": "Wall-clock time elapsed in seconds since the job began executing." + "description": "Wall-clock time elapsed since the job began executing." } }, - "description": "In-flight progress; only populated while status is queued or in_progress." + "description": "In-flight progress; only populated while status is `queued` or `in_progress`." }, "OptimizationJobResult": { "type": "object", @@ -49550,6 +48895,21 @@ }, "description": "All evaluated candidates including baseline." }, + "pareto_frontier": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationCandidate" + }, + "description": "Candidates on the Pareto frontier (maximize score, minimize cost)." + }, + "validation_score": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimizationCandidate" + } + ], + "description": "Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided." + }, "options": { "allOf": [ { @@ -49558,65 +48918,151 @@ ], "description": "The options used for this optimization run." }, + "sample_size": { + "type": "integer", + "format": "int32", + "description": "Number of tasks sampled during optimization iterations (null if sampling was not used)." + }, "warnings": { "type": "array", "items": { "type": "string" }, - "description": "Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped)." + "description": "Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped)." }, - "allTargetAttributesFailed": { + "all_strategies_failed": { "type": "boolean", - "description": "True when all target attributes failed — only the baseline was evaluated." + "description": "True when all optimization strategies failed — only the baseline was evaluated." } }, - "description": "Terminal-state result body. Populated when status is succeeded or failed." + "description": "Terminal-state result body. Populated when `status` is `succeeded` or `failed`." + }, + "OptimizationMode": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "optimize" + ] + } + ], + "description": "Run mode for an optimization job." }, "OptimizationOptions": { "type": "object", "properties": { - "maxIterations": { + "strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OptimizationStrategy" + }, + "description": "Strategies to apply this run. Default: ['instruction'].", + "default": [ + "instruction" + ] + }, + "budget": { + "type": "integer", + "format": "int32", + "description": "Total candidate generation budget (number of candidates explored). Default: 10.", + "default": 10 + }, + "max_iterations": { "type": "integer", "format": "int32", - "description": "Maximum optimization iterations per strategy. Must be >= 1. Default: 5.", + "description": "Maximum optimization iterations per strategy. Default: 5.", "default": 5 }, - "optimizationConfig": { - "type": "object", - "additionalProperties": {}, - "description": "Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization." + "tasks_per_iteration": { + "type": "integer", + "format": "int32", + "description": "Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed)." }, - "evalModel": { - "type": "string", - "description": "Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o')." + "max_reflection_tasks": { + "type": "integer", + "format": "int32", + "description": "Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.", + "default": 5 }, - "optimizationModel": { - "type": "string", - "description": "Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set." + "min_improvement": { + "type": "number", + "format": "double", + "description": "Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.", + "default": 0.005 + }, + "pass_threshold": { + "type": "number", + "format": "double", + "description": "Composite score threshold for a task to be considered passing. Default: 0.5.", + "default": 0.5 + }, + "improvement_threshold": { + "type": "number", + "format": "double", + "description": "Target average score at which optimization stops early (quality ceiling). Default: 0.95.", + "default": 0.95 }, - "evaluationLevel": { + "mode": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationLevel" + "$ref": "#/components/schemas/OptimizationMode" } ], - "description": "Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for per-conversation multi-turn simulation scoring." + "description": "Run mode." + }, + "eval_model": { + "type": "string", + "description": "Foundry deployment name to use as the LLM-as-judge evaluation model. Required." + }, + "reflection_model": { + "type": "string", + "description": "Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset." + }, + "task_timeout_seconds": { + "type": "integer", + "format": "int32", + "description": "Per-task timeout for agent execution. Default: 300 seconds (5 minutes).", + "default": 300 + }, + "keep_versions": { + "type": "boolean", + "description": "If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.", + "default": false } }, "description": "Tuning knobs and run-mode for an optimization job." }, + "OptimizationStrategy": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "instruction", + "model", + "skill" + ] + } + ], + "description": "Optimization strategy dimension." + }, "OptimizationTaskResult": { "type": "object", "required": [ - "taskName", + "task_name", "scores", - "compositeScore", + "composite_score", "tokens", - "durationSeconds", + "duration_seconds", "passed" ], "properties": { - "taskName": { + "task_name": { "type": "string", "description": "Task name (from the dataset)." }, @@ -49632,7 +49078,7 @@ }, "description": "Per-evaluator scores keyed by evaluator name." }, - "compositeScore": { + "composite_score": { "type": "number", "format": "double", "description": "Composite score combining all evaluator scores." @@ -49642,7 +49088,7 @@ "format": "int32", "description": "Total tokens consumed during the agent run for this task." }, - "durationSeconds": { + "duration_seconds": { "type": "number", "format": "double", "description": "Wall-clock seconds for this task's agent execution." @@ -49651,7 +49097,7 @@ "type": "boolean", "description": "Whether the task met the pass threshold." }, - "errorMessage": { + "error_message": { "type": "string", "description": "Error message if the task failed during execution." }, @@ -49666,7 +49112,7 @@ "type": "string", "description": "Raw agent response text." }, - "runId": { + "run_id": { "type": "string", "description": "Identifier of the agent run that produced this result." } @@ -50147,88 +49593,6 @@ ] } }, - "PromoteCandidateRequest": { - "type": "object", - "required": [ - "agentName", - "agentVersion" - ], - "properties": { - "agentName": { - "type": "string", - "description": "Name of the Foundry agent to promote to." - }, - "agentVersion": { - "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": [ - "candidateId", - "status", - "promotedAt", - "agentName", - "agentVersion" - ], - "properties": { - "candidateId": { - "type": "string", - "description": "The promoted candidate id." - }, - "status": { - "type": "string", - "description": "Status after promotion." - }, - "promotedAt": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when promotion occurred, represented in Unix time." - }, - "agentName": { - "type": "string", - "description": "Name of the Foundry agent promoted to." - }, - "agentVersion": { - "type": "string", - "description": "Version of the Foundry agent promoted to." - } - }, - "description": "Response after successfully promoting a candidate." - }, - "PromotionInfo": { - "type": "object", - "required": [ - "promotedAt", - "agentName", - "agentVersion" - ], - "properties": { - "promotedAt": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "Timestamp when promotion occurred, represented in Unix time." - }, - "agentName": { - "type": "string", - "description": "Name of the Foundry agent this candidate was promoted to." - }, - "agentVersion": { - "type": "string", - "description": "Version of the Foundry agent this candidate was promoted to." - } - }, - "description": "Promotion metadata recorded when a candidate is deployed to a Foundry agent." - }, "PromptAgentDefinition": { "type": "object", "required": [ @@ -50257,7 +49621,7 @@ "nullable": true, "minimum": 0, "maximum": 2, - "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both. Defaults to `1`.", + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.", "default": 1 }, "top_p": { @@ -50266,7 +49630,7 @@ "nullable": true, "minimum": 0, "maximum": 1, - "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered. We generally recommend altering this or `temperature` but not both.\nDefaults to `1`.", + "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.", "default": 1 }, "reasoning": { @@ -50529,7 +49893,7 @@ }, "timeZone": { "type": "string", - "description": "Time zone for the recurrence schedule. Defaults to `UTC`.", + "description": "Time zone for the recurrence schedule.", "default": "UTC" }, "interval": { @@ -51966,27 +51330,25 @@ ], "description": "The supported question types for SimpleQnA data generation jobs used for fine-tuning scenarios." }, - "Skill": { + "SkillObject": { "type": "object", "required": [ - "id", - "name", - "description", - "created_at", - "default_version", - "latest_version" + "skill_id", + "has_blob", + "name" ], "properties": { - "id": { + "skill_id": { "type": "string", "description": "The unique identifier of the skill." }, + "has_blob": { + "type": "boolean", + "description": "Whether the skill was created from a zip blob package." + }, "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], + "type": "string", + "maxLength": 63, "description": "The unique name of the skill." }, "description": { @@ -51994,119 +51356,16 @@ "maxLength": 1024, "description": "A human-readable description of the skill." }, - "created_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The Unix timestamp (seconds) when the skill was created." - }, - "default_version": { - "type": "string", - "description": "The default version for the skill. Can be changed via updateSkill." - }, - "latest_version": { - "type": "string", - "description": "The latest version for the skill." - } - }, - "description": "A skill resource." - }, - "SkillInlineContent": { - "type": "object", - "required": [ - "description", - "instructions" - ], - "properties": { - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of what the skill does and when to use it." - }, - "instructions": { - "type": "string", - "description": "The skill instructions in markdown format. This is the body content of the SKILL.md file." - }, - "license": { - "type": "string", - "description": "License name or reference to a bundled license file." - }, - "compatibility": { - "type": "string", - "maxLength": 500, - "description": "Environment requirements or compatibility notes for the skill." - }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Arbitrary key-value metadata for additional properties." - }, - "allowed_tools": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of pre-approved tools the skill may use. Experimental." - } - }, - "description": "Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification." - }, - "SkillName": { - "type": "string", - "maxLength": 64, - "pattern": "^[a-z0-9]([a-z0-9\\-]*[a-z0-9])?$", - "description": "A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens." - }, - "SkillVersion": { - "type": "object", - "required": [ - "id", - "skill_id", - "name", - "version", - "description", - "created_at" - ], - "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the skill version." - }, - "skill_id": { - "type": "string", - "description": "The identifier of the parent skill." - }, - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], - "description": "The name of the skill version." - }, - "version": { - "type": "string", - "description": "The version identifier. Skill versions are immutable." - }, - "description": { - "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill version." - }, - "created_at": { - "allOf": [ - { - "$ref": "#/components/schemas/FoundryTimestamp" - } - ], - "description": "The Unix timestamp (seconds) when the skill version was created." + "description": "Set of 16 key-value pairs that can be attached to an object. This can be\nuseful for storing additional information about the object in a structured\nformat, and querying for objects via API or the dashboard.\n\nKeys are strings with a maximum length of 64 characters. Values are strings\nwith a maximum length of 512 characters.", + "x-oaiTypeLabel": "map" } }, - "description": "A specific version of a skill." + "description": "A skill object." }, "Sku": { "type": "object", @@ -52159,7 +51418,7 @@ }, "required": { "type": "boolean", - "description": "Whether the input property is required when the agent is invoked. Defaults to `false`.", + "description": "Whether the input property is required when the agent is invoked.", "default": false } }, @@ -52971,59 +52230,6 @@ ], "description": "A tool for searching over the agent's toolbox.\nWhen present, deferred tools are hidden from `tools/list` and only\ndiscoverable via `search_tools` queries at runtime." }, - "ToolboxSkill": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "description": "The type of skill source." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "skill_reference": "#/components/schemas/ToolboxSkillReference" - } - }, - "description": "A skill source included in a toolbox." - }, - "ToolboxSkillReference": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "skill_reference" - ], - "description": "The type of skill source." - }, - "name": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillName" - } - ], - "description": "The name of the skill." - }, - "version": { - "type": "string", - "description": "The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/ToolboxSkill" - } - ], - "description": "A reference to an existing skill to include in a toolbox." - }, "ToolboxVersionObject": { "type": "object", "required": [ @@ -53074,13 +52280,6 @@ }, "description": "The list of tools contained in this toolbox version." }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolboxSkill" - }, - "description": "The list of skill sources included in this toolbox version." - }, "policies": { "allOf": [ { 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 b567cc0e3b74..af922eee4513 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 @@ -90,15 +90,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 get: operationId: AgentOptimizationJobs_list summary: Returns a list of agent optimization jobs. - description: List optimization jobs. Supports cursor pagination and optional status / agentName filters. + description: List optimization jobs. Supports cursor pagination and optional `status` / `agent_name` filters. parameters: - name: Foundry-Features in: header @@ -155,7 +155,7 @@ paths: schema: $ref: '#/components/schemas/JobStatus' explode: false - - name: agentName + - name: agent_name in: query required: false description: Filter to jobs targeting this agent name. @@ -210,7 +210,7 @@ paths: get: operationId: AgentOptimizationJobs_get summary: Get info about an agent optimization job. - description: Get an optimization job by id. Returns 202 while in progress, 200 when terminal. + description: Get an optimization job by id. Emits `Retry-After` while the job is non-terminal. parameters: - name: Foundry-Features in: header @@ -239,18 +239,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 @@ -288,13 +277,6 @@ paths: 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 @@ -424,7 +406,7 @@ paths: get: operationId: AgentOptimizationJobs_getCandidate summary: Get a candidate by id. - description: Get a single candidate's metadata, manifest, and promotion info. + description: Get a single candidate manifest and aggregated evaluation summary. parameters: - name: Foundry-Features in: header @@ -459,7 +441,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CandidateMetadata' + $ref: '#/components/schemas/OptimizationCandidate' default: description: An unexpected error response. content: @@ -522,65 +504,6 @@ paths: x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}/files: - get: - operationId: AgentOptimizationJobs_getCandidateFile - summary: Get a candidate file. - description: Stream a specific 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: - type: string - format: binary - default: - description: An unexpected error response. - 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 @@ -632,64 +555,6 @@ paths: x-ms-foundry-meta: conditional_previews: - AgentsOptimization=V1Preview - /agent_optimization_jobs/{jobId}/candidates/{candidateId}:promote: - post: - operationId: AgentOptimizationJobs_promoteCandidate - summary: Promote a candidate. - description: Promotes a candidate, recording 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' - default: - description: An unexpected error response. - 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 @@ -1093,7 +958,7 @@ paths: - name: force in: query required: false - description: For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. + description: For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. schema: type: boolean default: false @@ -1515,12 +1380,6 @@ paths: description: The name of the agent to create a session for. schema: type: string - - name: x-ms-user-isolation-key - in: header - required: false - description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. - schema: - type: string - name: api-version in: query required: true @@ -1570,12 +1429,6 @@ paths: description: The name of the agent. schema: type: string - - name: x-ms-user-isolation-key - in: header - required: false - description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. - schema: - type: string - name: limit in: query required: false @@ -1953,12 +1806,6 @@ paths: description: The session identifier. schema: type: string - - name: x-ms-user-isolation-key - in: header - required: false - description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. - schema: - type: string - name: api-version in: query required: true @@ -1989,60 +1836,6 @@ paths: description: |- Deletes a session synchronously. Returns 204 No Content when the session is deleted or does not exist. - 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: - - AgentEndpoints=V1Preview - - name: agent_name - in: path - required: true - description: The name of the agent. - schema: - type: string - - name: session_id - in: path - required: true - description: The session identifier. - schema: - type: string - - name: x-ms-user-isolation-key - in: header - required: false - description: Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. - 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: - '204': - description: There is no content to send for this request, but the headers may be useful. - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Agents - x-ms-foundry-meta: - required_previews: - - AgentEndpoints=V1Preview - /agents/{agent_name}/endpoint/sessions/{session_id}:stop: - post: - operationId: Agents_stopSession - description: |- - Stops a session. - Returns 204 No Content when the stop succeeds. parameters: - name: Foundry-Features in: header @@ -2496,7 +2289,7 @@ paths: - name: force in: query required: false - description: For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. + description: For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. schema: type: boolean default: false @@ -3375,6 +3168,22 @@ paths: schema: type: string explode: false + - name: scenario + in: query + required: false + description: Filter data generation jobs by their scenario. + schema: + $ref: '#/components/schemas/DataGenerationJobScenario' + explode: false + - name: type + in: query + required: false + description: Filter data generation jobs by their type. + schema: + type: array + items: + $ref: '#/components/schemas/DataGenerationJobType' + explode: false - name: api-version in: query required: true @@ -10569,6 +10378,76 @@ paths: tags: - Schedules /skills: + post: + operationId: Skills_createSkill + description: Creates a skill. + parameters: + - name: Foundry-Features + in: header + required: true + description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. + schema: + type: string + enum: + - Skills=V1Preview + - name: api-version + in: query + required: true + description: The API version to use for this operation. + schema: + type: string + explode: false + responses: + '201': + description: The request has succeeded and a new resource has been created as a result. + content: + application/json: + schema: + $ref: '#/components/schemas/SkillObject' + default: + description: An unexpected error response. + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorResponse' + tags: + - Skills + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + maxLength: 63 + description: The unique name of the skill. + description: + type: string + maxLength: 1024 + description: A human-readable description of the skill. + instructions: + type: string + maxLength: 102400 + description: Instructions that define the behavior of the skill. + metadata: + type: object + additionalProperties: + type: string + description: |- + Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. + x-oaiTypeLabel: map + required: + - name + x-ms-foundry-meta: + required_previews: + - Skills=V1Preview get: operationId: Skills_listSkills description: Returns the list of all skills. @@ -10642,7 +10521,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Skill' + $ref: '#/components/schemas/SkillObject' description: The requested list of items. first_id: type: string @@ -10675,7 +10554,7 @@ paths: required: true description: The unique name of the skill. schema: - $ref: '#/components/schemas/SkillName' + type: string - name: Foundry-Features in: header required: true @@ -10697,7 +10576,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Skill' + $ref: '#/components/schemas/SkillObject' default: description: An unexpected error response. content: @@ -10710,15 +10589,15 @@ paths: required_previews: - Skills=V1Preview post: - operationId: updateSkill - description: Update a skill. + operationId: Skills_updateSkill + description: Updates an existing skill. parameters: - name: name in: path required: true - description: The name of the skill to update. + description: The unique name of the skill. schema: - $ref: '#/components/schemas/SkillName' + type: string - name: Foundry-Features in: header required: true @@ -10740,7 +10619,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Skill' + $ref: '#/components/schemas/SkillObject' default: description: An unexpected error response. content: @@ -10756,11 +10635,26 @@ paths: schema: type: object properties: - default_version: + description: type: string - description: The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest. - required: - - default_version + maxLength: 1024 + description: A human-readable description of the skill. + instructions: + type: string + maxLength: 102400 + description: Instructions that define the behavior of the skill. + metadata: + type: object + additionalProperties: + type: string + description: |- + Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. + x-oaiTypeLabel: map x-ms-foundry-meta: required_previews: - Skills=V1Preview @@ -10773,7 +10667,7 @@ paths: required: true description: The unique name of the skill. schema: - $ref: '#/components/schemas/SkillName' + type: string - name: Foundry-Features in: header required: true @@ -10807,17 +10701,17 @@ paths: x-ms-foundry-meta: required_previews: - Skills=V1Preview - /skills/{name}/content: + /skills/{name}:download: get: - operationId: getSkillContent - description: Download the zip content for the default version of a skill. + operationId: Skills_downloadSkill + description: Downloads a skill package. parameters: - name: name in: path required: true - description: The name of the skill. + description: The unique name of the skill. schema: - $ref: '#/components/schemas/SkillName' + type: string - name: Foundry-Features in: header required: true @@ -10852,16 +10746,11 @@ paths: x-ms-foundry-meta: required_previews: - Skills=V1Preview - /skills/{name}/versions: + /skills:import: post: - operationId: createSkillVersion_createSkillVersionFromFiles + operationId: Skills_createSkillFromPackage + description: Creates a skill from a zip package. parameters: - - name: name - in: path - required: true - description: The name of the skill. If the skill does not exist, it will be created. - schema: - $ref: '#/components/schemas/SkillName' - name: Foundry-Features in: header required: true @@ -10877,296 +10766,29 @@ paths: schema: type: string explode: false - description: Creates a new version of a skill. If the skill does not exist, it will be created. Creates a new version of a skill from uploaded files via multipart form data. responses: - '200': - description: The request has succeeded. + '201': + description: The request has succeeded and a new resource has been created as a result. content: application/json: schema: - $ref: '#/components/schemas/SkillVersion' + $ref: '#/components/schemas/SkillObject' default: description: An unexpected error response. content: application/json: schema: $ref: '#/components/schemas/ApiErrorResponse' - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview tags: - Skills requestBody: required: true content: - application/json: + application/zip: schema: - type: object - properties: - inline_content: - allOf: - - $ref: '#/components/schemas/SkillInlineContent' - description: Inline skill content for simple skills without file uploads. Foundry-specific extension. - default: - type: boolean - description: Whether to set this version as the default. - multipart/form-data: - schema: - $ref: '#/components/schemas/CreateSkillVersionFromFilesBody' - encoding: - files: - contentType: '*/*' - default: - contentType: text/plain - get: - operationId: listSkillVersions - description: List all versions of a skill. - parameters: - - name: name - in: path - required: true - description: The name of the skill to list versions for. - schema: - $ref: '#/components/schemas/SkillName' - - 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: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - 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/SkillVersion' - 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. - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Skills - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview - /skills/{name}/versions/{version}: - get: - operationId: getSkillVersion - description: Retrieve a specific version of a skill. - parameters: - - name: name - in: path - required: true - description: The name of the skill. - schema: - $ref: '#/components/schemas/SkillName' - - name: version - in: path - required: true - description: The version identifier to retrieve. - schema: - type: string - - name: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - 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/SkillVersion' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Skills - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview - delete: - operationId: deleteSkillVersion - description: Delete a specific version of a skill. - parameters: - - name: name - in: path - required: true - description: The name of the skill. - schema: - $ref: '#/components/schemas/SkillName' - - name: version - in: path - required: true - description: The version identifier to delete. - schema: - type: string - - name: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - 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/DeleteSkillVersionResponse' - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Skills - x-ms-foundry-meta: - required_previews: - - Skills=V1Preview - /skills/{name}/versions/{version}/content: - get: - operationId: getSkillVersionContent - description: Download the zip content for a specific version of a skill. - parameters: - - name: name - in: path - required: true - description: The name of the skill. - schema: - $ref: '#/components/schemas/SkillName' - - name: version - in: path - required: true - description: The version to download content for. - schema: - type: string - - name: Foundry-Features - in: header - required: true - description: A feature flag opt-in required when using preview operations or modifying persisted preview resources. - schema: - type: string - enum: - - Skills=V1Preview - - 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 response body for downloading a skill package. - content: - application/zip: - schema: - type: string - format: binary - default: - description: An unexpected error response. - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorResponse' - tags: - - Skills + type: string + format: binary + description: The zip package used to create the skill. x-ms-foundry-meta: required_previews: - Skills=V1Preview @@ -11405,11 +11027,6 @@ paths: items: $ref: '#/components/schemas/OpenAI.Tool' description: The list of tools to include in this version. - skills: - type: array - items: - $ref: '#/components/schemas/ToolboxSkill' - description: The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used. policies: allOf: - $ref: '#/components/schemas/ToolboxPolicies' @@ -12446,18 +12063,6 @@ components: version: type: string description: The version identifier of the agent. - AgentIdentifier: - type: object - required: - - agentName - properties: - agentName: - type: string - description: Registered Foundry agent name (required). - agentVersion: - type: string - description: Pinned agent version. Defaults to latest if omitted. - description: Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig. AgentIdentity: type: object required: @@ -12557,7 +12162,6 @@ components: - responses - mcp - invocations - - invocations_ws AgentReference: type: object required: @@ -12625,7 +12229,6 @@ components: - idle - updating - failed - - stopping - deleting - deleted - expired @@ -14139,90 +13742,16 @@ components: skills: type: array items: - type: object - additionalProperties: {} + $ref: '#/components/schemas/OptimizationAgentSkill' description: Optional skill overrides. - tools: - type: array - items: - type: object - additionalProperties: {} - 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 - - sizeBytes - properties: - path: - type: string - description: Relative path of the file. - type: - type: string - description: File type category (e.g. 'config', 'results'). - sizeBytes: - type: integer - format: int64 - description: File size in bytes. - description: File entry in a candidate's blob directory. - CandidateMetadata: - type: object - required: - - candidateId - - jobId - - candidateName - - status - - hasResults - - createdAt - - updatedAt - - files - properties: - candidateId: - type: string - description: Server-assigned candidate identifier. - jobId: - type: string - description: Owning optimization job id. - candidateName: - 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. - hasResults: - type: boolean - description: Whether detailed results are available for this candidate. - createdAt: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when the candidate was created, represented in Unix time. - updatedAt: - 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: - - candidateId + - candidate_id - results properties: - candidateId: + candidate_id: type: string description: Owning candidate id. results: @@ -15090,20 +14619,6 @@ components: x-ms-foundry-meta: required_previews: - AgentEndpoints=V1Preview - CreateSkillVersionFromFilesBody: - type: object - properties: - files: - type: array - items: - type: string - format: binary - description: Skill files to upload. Upload a single zip file or multiple individual files with relative paths. - default: - type: boolean - description: Whether to set this version as the default. Defaults to false. - required: - - files CreatedBy: type: object properties: @@ -15141,7 +14656,7 @@ components: description: Cron expression that defines the schedule frequency. timeZone: type: string - description: Time zone for the cron schedule. Defaults to `UTC`. + description: Time zone for the cron schedule. default: UTC startTime: type: string @@ -15373,6 +14888,7 @@ components: prompt: '#/components/schemas/PromptDataGenerationJobSource' agent: '#/components/schemas/AgentDataGenerationJobSource' traces: '#/components/schemas/TracesDataGenerationJobSource' + dataset: '#/components/schemas/DatasetDataGenerationJobSource' file: '#/components/schemas/FileDataGenerationJobSource' description: The base source model for data generation jobs. DataGenerationJobSourceType: @@ -15383,6 +14899,7 @@ components: - prompt - agent - traces + - dataset - file description: The supported source types for data generation jobs. DataGenerationJobType: @@ -15478,6 +14995,29 @@ components: allOf: - $ref: '#/components/schemas/DataGenerationJobOutput' description: Dataset output for a data generation job. + DatasetDataGenerationJobSource: + type: object + required: + - type + - name + properties: + description: + type: string + description: Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + type: + type: string + enum: + - dataset + description: The source type for this source, which is Dataset. + name: + type: string + description: The name of the dataset. + version: + type: string + description: The version of the dataset. If not specified, the latest version is used. + allOf: + - $ref: '#/components/schemas/DataGenerationJobSource' + description: Dataset source for data generation jobs — reference to a dataset. DatasetEvaluationSuiteJobSource: type: object required: @@ -15524,26 +15064,37 @@ components: allOf: - $ref: '#/components/schemas/EvaluatorGenerationJobSource' description: Dataset source for evaluator generation jobs — reference to a dataset. - DatasetInfo: + DatasetItem: type: object required: - - taskCount - - isInline + - name + - query properties: name: type: string - description: Dataset name when using a registered dataset reference. Null for inline datasets. - version: + description: Unique-within-the-dataset identifier for this task. + query: type: string - description: Dataset version when using a registered dataset reference. Null for inline datasets. - taskCount: - type: integer - format: int32 - description: Number of tasks/rows in the dataset. - isInline: - 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. + description: The user query / input for the task. + ground_truth: + type: string + description: Optional ground truth used by reference-based evaluators. + criteria: + type: array + items: + $ref: '#/components/schemas/EvaluationCriterion' + description: Per-task evaluation criteria. Defaults to the job-level evaluators if unset. + eval_results: + type: array + items: + $ref: '#/components/schemas/EvalRunOutputItemResult' + description: Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped. + response_items: + type: array + items: + $ref: '#/components/schemas/OpenAI.OutputItem' + description: Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run. + description: A single evaluation task with input query, expected output, and evaluation criteria. DatasetRef: type: object required: @@ -15798,43 +15349,16 @@ components: DeleteSkillResponse: type: object required: - - id - name - deleted properties: - id: - type: string - description: The unique identifier of the deleted skill. name: - allOf: - - $ref: '#/components/schemas/SkillName' + type: string description: The unique name of the skill. deleted: type: boolean description: Whether the skill was successfully deleted. - description: A deleted skill. - DeleteSkillVersionResponse: - type: object - required: - - id - - name - - deleted - - version - properties: - id: - type: string - description: The unique identifier of the deleted skill version. - name: - allOf: - - $ref: '#/components/schemas/SkillName' - description: The name of the skill. - deleted: - type: boolean - description: Whether the skill version was successfully deleted. - version: - type: string - description: The version that was deleted. - description: A deleted skill version. + description: A deleted skill Object Deployment: type: object required: @@ -15898,7 +15422,7 @@ components: description: Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. always_applicable: type: boolean - description: When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`. + description: When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. default: false description: A single dimension — one independent, measurable quality dimension within a rubric evaluator's scoring blueprint. DispatchRoutineRequest: @@ -16816,6 +16340,19 @@ components: allOf: - $ref: '#/components/schemas/InsightResult' description: Insights from the evaluation comparison. + EvaluationCriterion: + type: object + required: + - name + - instruction + properties: + name: + type: string + description: Criterion name (referenced in evaluation result rows). + instruction: + type: string + description: Natural-language instruction passed to the judge LLM. + description: LLM-as-judge evaluation criterion applied to a single task. EvaluationDataGenerationType: anyOf: - type: string @@ -17130,27 +16667,6 @@ components: description: |- Data generation options. Controls how the evaluation dataset is generated. If omitted, defaults are used (simple_qna, 100 max_samples). - target: - allOf: - - $ref: '#/components/schemas/Target' - description: |- - Target for the generated suite. Stored on the suite so it can be run - immediately after generation completes. - Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. - input_messages: - anyOf: - - $ref: '#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate' - - $ref: '#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference' - description: |- - How to send dataset rows to the target. - If omitted and target is provided, defaults to a template using item.query. - evaluation_level: - allOf: - - $ref: '#/components/schemas/EvaluationLevel' - description: |- - Evaluation level for the generated suite. - Default: turn (single-turn evaluation). - Use conversation for multi-turn evaluation. description: Caller-supplied inputs for an evaluation suite generation job. EvaluationSuiteGenerationTokenUsage: type: object @@ -18443,6 +17959,18 @@ components: description: |- An array of tools the hosted agent's model may call while generating a response. You can specify which tool to use by setting the `tool_choice` parameter. + container_protocol_versions: + type: array + items: + $ref: '#/components/schemas/ProtocolVersionRecord' + description: The protocols that the agent supports for ingress communication of the containers. + example: + - protocol: responses + version: v0.1.1 + - protocol: invocations + version: v0.0.1 + - protocol: a2a + version: v0.3.0 cpu: type: string description: The CPU configuration for the hosted agent. @@ -18459,6 +17987,10 @@ components: example: name: LOG_LEVEL value: debug + image: + type: string + description: The image ID for the agent, applicable to image-based hosted agents. + example: my-registry.azurecr.io/my-hosted-agent:latest container_configuration: allOf: - $ref: '#/components/schemas/ContainerConfiguration' @@ -19387,16 +18919,16 @@ components: description: Specific categories or types of user profile information to extract and store. chat_summary_enabled: type: boolean - description: Whether to enable chat summary extraction and storage. Defaults to `true`. + description: Whether to enable chat summary extraction and storage. Default is true. default: true procedural_memory_enabled: type: boolean - description: Whether to enable procedural memory extraction and storage. Defaults to `true`. + description: Whether to enable procedural memory extraction and storage. Default is true. default: true default_ttl_seconds: type: integer format: int32 - description: The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`. + description: The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire. default: 0 description: Default memory store configurations. x-ms-foundry-meta: @@ -19943,7 +19475,7 @@ components: description: Date and time for the one-time trigger in ISO 8601 format. timeZone: type: string - description: Time zone for the one-time trigger. Defaults to `UTC`. + description: Time zone for the one-time trigger. default: UTC allOf: - $ref: '#/components/schemas/Trigger' @@ -34797,47 +34329,55 @@ components: description: The output of an OpenAPI tool call. OptimizationAgentDefinition: type: object + required: + - agent_name properties: - agentName: + agent_name: type: string - description: Agent name. - agentVersion: + description: Registered Foundry agent name. Required — bare-model mode is not supported. + agent_version: type: string - description: Agent version. + description: Pinned agent version. Defaults to latest if omitted. model: type: string - description: Model deployment name. - systemPrompt: + description: Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model. + system_prompt: type: string - description: System prompt / instructions. + description: System prompt / instructions override. When set, used as the baseline instructions for the agent. skills: type: array items: - type: object - additionalProperties: {} - description: Agent skills. - tools: - type: array - items: - type: object - additionalProperties: {} - description: Agent tools. - description: Agent definition returned in response payloads (includes resolved config). + $ref: '#/components/schemas/OptimizationAgentSkill' + description: Optional named skills the optimizer may tune. Tool descriptions and parameters. + description: The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides. + OptimizationAgentSkill: + type: object + required: + - name + properties: + name: + type: string + description: Skill name (matches the tool name on the agent). + description: + type: string + description: Free-form description used as the seed when tuning skill descriptions. + description: A named skill on the agent that the optimizer may tune. OptimizationCandidate: type: object required: - name - config - mutations - - avgScore - - avgTokens - - passRate - - taskScores - - isParetoOptimal + - rationale + - avg_score + - avg_tokens + - pass_rate + - task_scores + - is_pareto_optimal properties: - candidateId: + candidate_id: type: string - description: Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints. + description: Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints. name: type: string description: Display name of the candidate (e.g., 'baseline', 'instruction-v2'). @@ -34848,49 +34388,72 @@ components: mutations: type: object additionalProperties: {} - description: "What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'})." - avgScore: + description: "What was mutated from the baseline (e.g., {instructions: 'new prompt'})." + rationale: + type: string + description: Strategy rationale — why this candidate was generated. + avg_score: type: number format: double description: Average composite score across all tasks. - avgTokens: + avg_tokens: type: number format: double description: Average token usage across all tasks. - passRate: + pass_rate: type: number format: double description: Fraction of tasks that met the pass threshold. - taskScores: + task_scores: type: array items: $ref: '#/components/schemas/OptimizationTaskResult' description: Individual task-level scores. - isParetoOptimal: + is_pareto_optimal: type: boolean description: Whether this candidate is on the Pareto frontier (score vs cost). - evalId: + sample_avg_score: + type: number + format: double + description: Average score from sampled evaluation (null if full dataset was used). + sample_size: + type: integer + format: int32 + description: Number of tasks in the sample (null if full dataset was used). + evaluation_type: + type: string + description: "'sample' if scored on a subset, 'full' if re-evaluated on the full dataset." + strategy: + allOf: + - $ref: '#/components/schemas/OptimizationStrategy' + description: Identifies the strategy that produced this candidate. + eval_id: type: string description: Foundry evaluation identifier used to score this candidate. - evalRunId: + eval_run_id: type: string description: Foundry evaluation run identifier for this candidate's scoring run. - promotion: - allOf: - - $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. OptimizationJob: type: object required: - id - status - - createdAt + - created_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' @@ -34901,21 +34464,12 @@ 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. - createdAt: + created_at: allOf: - $ref: '#/components/schemas/FoundryTimestamp' description: The timestamp when the job was created, represented in Unix time. readOnly: true - updatedAt: + updated_at: allOf: - $ref: '#/components/schemas/FoundryTimestamp' description: The timestamp when the job was last updated, represented in Unix time. @@ -34925,27 +34479,26 @@ components: - $ref: '#/components/schemas/OptimizationJobProgress' description: Progress while in flight. Absent in terminal states. readOnly: true - dataset: - allOf: - - $ref: '#/components/schemas/DatasetInfo' - description: Metadata about the dataset used for this optimization job. - 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. + description: Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates. OptimizationJobInputs: type: object required: - agent - - trainDatasetReference properties: agent: allOf: - - $ref: '#/components/schemas/AgentIdentifier' + - $ref: '#/components/schemas/OptimizationAgentDefinition' description: The agent (and pinned version) being optimized. - trainDatasetReference: + dataset: + type: array + items: + $ref: '#/components/schemas/DatasetItem' + description: Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`. + train_dataset_reference: allOf: - $ref: '#/components/schemas/DatasetRef' - description: Reference to a registered training dataset (required). - validationDatasetReference: + description: Reference to a registered training dataset. Mutually exclusive with `dataset`. + validation_dataset_reference: allOf: - $ref: '#/components/schemas/DatasetRef' description: Optional held-out validation dataset for measuring generalization of the final candidate. @@ -34953,7 +34506,12 @@ components: type: array items: type: string - description: "Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence']." + description: "Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence']." + criteria: + type: array + items: + $ref: '#/components/schemas/EvaluationCriterion' + description: Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`. options: allOf: - $ref: '#/components/schemas/OptimizationOptions' @@ -34962,23 +34520,38 @@ components: OptimizationJobProgress: type: object required: - - currentIteration - - bestScore - - elapsedSeconds + - current_strategy + - current_iteration + - tasks_completed + - tasks_total + - best_score + - elapsed_seconds properties: - currentIteration: + current_strategy: + allOf: + - $ref: '#/components/schemas/OptimizationStrategy' + description: Strategy currently being explored. + current_iteration: type: integer format: int32 description: 1-based current iteration index. - bestScore: + tasks_completed: + type: integer + format: int32 + description: Tasks evaluated so far this iteration. + tasks_total: + type: integer + format: int32 + description: Total tasks scheduled this iteration. + best_score: type: number format: double description: Best score observed so far across all candidates. - elapsedSeconds: + elapsed_seconds: type: number format: double - description: Wall-clock time elapsed in seconds since the job began executing. - description: In-flight progress; only populated while status is queued or in_progress. + description: Wall-clock time elapsed since the job began executing. + description: In-flight progress; only populated while status is `queued` or `in_progress`. OptimizationJobResult: type: object properties: @@ -34995,53 +34568,123 @@ components: items: $ref: '#/components/schemas/OptimizationCandidate' description: All evaluated candidates including baseline. + pareto_frontier: + type: array + items: + $ref: '#/components/schemas/OptimizationCandidate' + description: Candidates on the Pareto frontier (maximize score, minimize cost). + validation_score: + allOf: + - $ref: '#/components/schemas/OptimizationCandidate' + description: Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided. options: allOf: - $ref: '#/components/schemas/OptimizationOptions' description: The options used for this optimization run. + sample_size: + type: integer + format: int32 + description: Number of tasks sampled during optimization iterations (null if sampling was not used). warnings: type: array items: type: string - description: Non-fatal warnings from the optimization run (e.g., target attribute failures that were skipped). - allTargetAttributesFailed: + description: Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped). + all_strategies_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. + description: True when all optimization strategies failed — only the baseline was evaluated. + description: Terminal-state result body. Populated when `status` is `succeeded` or `failed`. + OptimizationMode: + anyOf: + - type: string + - type: string + enum: + - optimize + description: Run mode for an optimization job. OptimizationOptions: type: object properties: - maxIterations: + strategies: + type: array + items: + $ref: '#/components/schemas/OptimizationStrategy' + description: "Strategies to apply this run. Default: ['instruction']." + default: + - instruction + budget: type: integer format: int32 - description: 'Maximum optimization iterations per strategy. Must be >= 1. Default: 5.' + description: 'Total candidate generation budget (number of candidates explored). Default: 10.' + default: 10 + max_iterations: + type: integer + format: int32 + description: 'Maximum optimization iterations per strategy. Default: 5.' default: 5 - optimizationConfig: - type: object - additionalProperties: {} - description: Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization. - evalModel: + tasks_per_iteration: + type: integer + format: int32 + description: 'Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed).' + max_reflection_tasks: + type: integer + format: int32 + description: 'Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.' + default: 5 + min_improvement: + type: number + format: double + description: 'Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.' + default: 0.005 + pass_threshold: + type: number + format: double + description: 'Composite score threshold for a task to be considered passing. Default: 0.5.' + default: 0.5 + improvement_threshold: + type: number + format: double + description: 'Target average score at which optimization stops early (quality ceiling). Default: 0.95.' + default: 0.95 + mode: + allOf: + - $ref: '#/components/schemas/OptimizationMode' + description: Run mode. + eval_model: type: string - description: Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o'). - optimizationModel: + description: Foundry deployment name to use as the LLM-as-judge evaluation model. Required. + reflection_model: type: string - description: Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set. - evaluationLevel: - allOf: - - $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: Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset. + task_timeout_seconds: + type: integer + format: int32 + description: 'Per-task timeout for agent execution. Default: 300 seconds (5 minutes).' + default: 300 + keep_versions: + type: boolean + description: 'If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.' + default: false description: Tuning knobs and run-mode for an optimization job. + OptimizationStrategy: + anyOf: + - type: string + - type: string + enum: + - instruction + - model + - skill + description: Optimization strategy dimension. OptimizationTaskResult: type: object required: - - taskName + - task_name - scores - - compositeScore + - composite_score - tokens - - durationSeconds + - duration_seconds - passed properties: - taskName: + task_name: type: string description: Task name (from the dataset). query: @@ -35053,7 +34696,7 @@ components: type: number format: double description: Per-evaluator scores keyed by evaluator name. - compositeScore: + composite_score: type: number format: double description: Composite score combining all evaluator scores. @@ -35061,14 +34704,14 @@ components: type: integer format: int32 description: Total tokens consumed during the agent run for this task. - durationSeconds: + 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. - errorMessage: + error_message: type: string description: Error message if the task failed during execution. rationales: @@ -35079,7 +34722,7 @@ components: response: type: string description: Raw agent response text. - runId: + run_id: type: string description: Identifier of the agent run that produced this result. description: Per-task evaluation result for a single candidate. @@ -35410,63 +35053,6 @@ components: x-ms-foundry-meta: required_previews: - MemoryStores=V1Preview - PromoteCandidateRequest: - type: object - required: - - agentName - - agentVersion - properties: - agentName: - type: string - description: Name of the Foundry agent to promote to. - agentVersion: - 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: - - candidateId - - status - - promotedAt - - agentName - - agentVersion - properties: - candidateId: - type: string - description: The promoted candidate id. - status: - type: string - description: Status after promotion. - promotedAt: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when promotion occurred, represented in Unix time. - agentName: - type: string - description: Name of the Foundry agent promoted to. - agentVersion: - type: string - description: Version of the Foundry agent promoted to. - description: Response after successfully promoting a candidate. - PromotionInfo: - type: object - required: - - promotedAt - - agentName - - agentVersion - properties: - promotedAt: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: Timestamp when promotion occurred, represented in Unix time. - agentName: - type: string - description: Name of the Foundry agent this candidate was promoted to. - agentVersion: - type: string - description: Version of the Foundry agent this candidate was promoted to. - description: Promotion metadata recorded when a candidate is deployed to a Foundry agent. PromptAgentDefinition: type: object required: @@ -35492,7 +35078,7 @@ components: maximum: 2 description: |- What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. Defaults to `1`. + We generally recommend altering this or `top_p` but not both. default: 1 top_p: type: number @@ -35504,8 +35090,9 @@ components: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. We generally recommend altering this or `temperature` but not both. - Defaults to `1`. + are considered. + + We generally recommend altering this or `temperature` but not both. default: 1 reasoning: type: object @@ -35680,7 +35267,7 @@ components: description: End time for the recurrence schedule in ISO 8601 format. timeZone: type: string - description: Time zone for the recurrence schedule. Defaults to `UTC`. + description: Time zone for the recurrence schedule. default: UTC interval: type: integer @@ -36638,106 +36225,40 @@ components: - short_answer - long_answer description: The supported question types for SimpleQnA data generation jobs used for fine-tuning scenarios. - Skill: + SkillObject: type: object required: - - id + - skill_id + - has_blob - name - - description - - created_at - - default_version - - latest_version properties: - id: + skill_id: type: string description: The unique identifier of the skill. + has_blob: + type: boolean + description: Whether the skill was created from a zip blob package. name: - allOf: - - $ref: '#/components/schemas/SkillName' + type: string + maxLength: 63 description: The unique name of the skill. description: type: string maxLength: 1024 description: A human-readable description of the skill. - created_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: The Unix timestamp (seconds) when the skill was created. - default_version: - type: string - description: The default version for the skill. Can be changed via updateSkill. - latest_version: - type: string - description: The latest version for the skill. - description: A skill resource. - SkillInlineContent: - type: object - required: - - description - - instructions - properties: - description: - type: string - maxLength: 1024 - description: A human-readable description of what the skill does and when to use it. - instructions: - type: string - description: The skill instructions in markdown format. This is the body content of the SKILL.md file. - license: - type: string - description: License name or reference to a bundled license file. - compatibility: - type: string - maxLength: 500 - description: Environment requirements or compatibility notes for the skill. metadata: type: object additionalProperties: type: string - description: Arbitrary key-value metadata for additional properties. - allowed_tools: - type: array - items: - type: string - description: List of pre-approved tools the skill may use. Experimental. - description: Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification. - SkillName: - type: string - maxLength: 64 - pattern: ^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$ - description: 'A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens.' - SkillVersion: - type: object - required: - - id - - skill_id - - name - - version - - description - - created_at - properties: - id: - type: string - description: The unique identifier of the skill version. - skill_id: - type: string - description: The identifier of the parent skill. - name: - allOf: - - $ref: '#/components/schemas/SkillName' - description: The name of the skill version. - version: - type: string - description: The version identifier. Skill versions are immutable. - description: - type: string - maxLength: 1024 - description: A human-readable description of the skill version. - created_at: - allOf: - - $ref: '#/components/schemas/FoundryTimestamp' - description: The Unix timestamp (seconds) when the skill version was created. - description: A specific version of a skill. + description: |- + Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings + with a maximum length of 512 characters. + x-oaiTypeLabel: map + description: A skill object. Sku: type: object required: @@ -36778,7 +36299,7 @@ components: description: The JSON schema for the structured input (optional). required: type: boolean - description: Whether the input property is required when the agent is invoked. Defaults to `false`. + description: Whether the input property is required when the agent is invoked. default: false description: An structured input that can participate in prompt template substitutions and tool argument binding. StructuredOutputDefinition: @@ -37315,40 +36836,6 @@ components: A tool for searching over the agent's toolbox. When present, deferred tools are hidden from `tools/list` and only discoverable via `search_tools` queries at runtime. - ToolboxSkill: - type: object - required: - - type - properties: - type: - type: string - description: The type of skill source. - discriminator: - propertyName: type - mapping: - skill_reference: '#/components/schemas/ToolboxSkillReference' - description: A skill source included in a toolbox. - ToolboxSkillReference: - type: object - required: - - type - - name - properties: - type: - type: string - enum: - - skill_reference - description: The type of skill source. - name: - allOf: - - $ref: '#/components/schemas/SkillName' - description: The name of the skill. - version: - type: string - description: The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version. - allOf: - - $ref: '#/components/schemas/ToolboxSkill' - description: A reference to an existing skill to include in a toolbox. ToolboxVersionObject: type: object required: @@ -37395,11 +36882,6 @@ components: items: $ref: '#/components/schemas/OpenAI.Tool' description: The list of tools contained in this toolbox version. - skills: - type: array - items: - $ref: '#/components/schemas/ToolboxSkill' - description: The list of skill sources included in this toolbox version. policies: allOf: - $ref: '#/components/schemas/ToolboxPolicies' diff --git a/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp b/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp index acced4bde8e5..df13025626be 100644 --- a/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp +++ b/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp @@ -55,20 +55,19 @@ interface Evaluators {} @@clientLocation(Azure.AI.Projects.EvaluatorGenerationJobs.cancel, Evaluators); @@clientLocation(Azure.AI.Projects.EvaluatorGenerationJobs.delete, Evaluators); -// These were removed from v1: -// @@clientLocation(Azure.AI.Projects.EvaluationSuites.listVersions, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuites.listLatest, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuites.getVersion, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuites.deleteVersion, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuites.createOrUpdateVersion, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuites.createEvaluationSuiteVersion, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuites.run, Evaluators); - -// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.create, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.get, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.list, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.cancel, Evaluators); -// @@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.delete, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.create, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.get, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.list, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.cancel, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuiteGenerationJobs.delete, Evaluators); + +@@clientLocation(Azure.AI.Projects.EvaluationSuites.listVersions, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuites.listLatest, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuites.getVersion, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuites.deleteVersion, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuites.createOrUpdateVersion, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuites.createEvaluationSuiteVersion, Evaluators); +@@clientLocation(Azure.AI.Projects.EvaluationSuites.run, Evaluators); interface Schedules {} @@clientLocation(Azure.AI.Projects.Schedules.delete, Schedules); @@ -105,16 +104,6 @@ interface EvaluationTaxonomies {} EvaluationTaxonomies ); -interface Toolboxes {} -@@clientLocation(Azure.AI.Projects.Toolboxes.createToolboxVersion, Toolboxes); -@@clientLocation(Azure.AI.Projects.Toolboxes.updateToolbox, Toolboxes); -@@clientLocation(Azure.AI.Projects.Toolboxes.getToolbox, Toolboxes); -@@clientLocation(Azure.AI.Projects.Toolboxes.listToolboxes, Toolboxes); -@@clientLocation(Azure.AI.Projects.Toolboxes.listToolboxVersions, Toolboxes); -@@clientLocation(Azure.AI.Projects.Toolboxes.getToolboxVersion, Toolboxes); -@@clientLocation(Azure.AI.Projects.Toolboxes.deleteToolbox, Toolboxes); -@@clientLocation(Azure.AI.Projects.Toolboxes.deleteToolboxVersion, Toolboxes); - interface Skills {} @@clientLocation(Azure.AI.Projects.Skills.createSkill, Skills); @@clientLocation(Azure.AI.Projects.Skills.createSkillFromPackage, Skills); 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 cfd3e43c65f9..e573f8da4cdc 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 @@ -6,6 +6,13 @@ // JobStatus — shared lifecycle union (queued/in_progress/succeeded/failed/cancelled) // FoundryTimestamp — Unix epoch int32 // ApiError — standard error shape +// +// C# code changes required for Foundry alignment: +// - Status vocabulary: Pending/Running/Completed → queued/in_progress/succeeded +// - Timestamps: DateTimeOffset → unix epoch int32 +// - ID field: OperationId → id +// - Route: /optimize → /agent_optimization_jobs +// - Response shape: multiple response types → single JobLike model import "../common/models.tsp"; import "../openai-evaluations/models.tsp"; @@ -19,28 +26,25 @@ namespace Azure.AI.Projects; // Enums / unions // --------------------------------------------------------------------------- -/** Agent attribute that can be optimized. */ -union TargetAttribute { +/** Optimization strategy dimension. */ +union OptimizationStrategy { string, - @doc("Instruction-tuning — rewrites agent system prompts.") + @doc("Instruction-tuning strategy — rewrites agent system prompts.") instruction: "instruction", - @doc("Model-selection — evaluates alternative LLM deployments.") + @doc("Model-selection strategy — evaluates alternative LLM deployments.") `model`: "model", - @doc("Skill-tuning — generates or modifies agent skill descriptions.") + @doc("Skill-tuning strategy — generates or modifies agent tool descriptions.") skill: "skill", - - @doc("Tool-tuning — optimizes function tool descriptions and parameter descriptions.") - tool: "tool", } /** Run mode for an optimization job. */ union OptimizationMode { string, - @doc("Full optimization: baseline + mutation target attributes.") + @doc("Full optimization: baseline + mutation strategies.") optimize: "optimize", } @@ -48,34 +52,61 @@ union OptimizationMode { // Input models // --------------------------------------------------------------------------- -@doc("Identifies the registered Foundry agent to optimize (request-only). Skills, tools, and systemPrompt are specified in options.optimizationConfig.") -model AgentIdentifier { - @doc("Registered Foundry agent name (required).") - agentName: string; +@doc("The agent definition being optimized. Identifies the Foundry agent and optional configuration overrides.") +model OptimizationAgentDefinition { + @doc("Registered Foundry agent name. Required — bare-model mode is not supported.") + agent_name: string; @doc("Pinned agent version. Defaults to latest if omitted.") - agentVersion?: string; + agent_version?: string; + + @doc("Model deployment name (e.g., 'gpt-4o'). Optional when agent_name is set — the agent definition provides the model.") + `model`?: string; + + @doc("System prompt / instructions override. When set, used as the baseline instructions for the agent.") + system_prompt?: string; + + @doc("Optional named skills the optimizer may tune. Tool descriptions and parameters.") + skills?: OptimizationAgentSkill[]; } -@doc("Agent definition returned in response payloads (includes resolved config).") -model OptimizationAgentDefinition { - @doc("Agent name.") - agentName?: string; +@doc("A named skill on the agent that the optimizer may tune.") +model OptimizationAgentSkill { + @doc("Skill name (matches the tool name on the agent).") + name: string; - @doc("Agent version.") - agentVersion?: string; + @doc("Free-form description used as the seed when tuning skill descriptions.") + description?: string; +} - @doc("Model deployment name.") - `model`?: string; +@doc("A single evaluation task with input query, expected output, and evaluation criteria.") +model DatasetItem { + @doc("Unique-within-the-dataset identifier for this task.") + name: string; - @doc("System prompt / instructions.") - systemPrompt?: string; + @doc("The user query / input for the task.") + query: string; + + @doc("Optional ground truth used by reference-based evaluators.") + ground_truth?: string; + + @doc("Per-task evaluation criteria. Defaults to the job-level evaluators if unset.") + criteria?: EvaluationCriterion[]; + + @doc("Pre-computed evaluation results in AOAI-compatible format. When provided together with `response_items`, the baseline run-and-evaluate phase is skipped.") + eval_results?: EvalRunOutputItemResult[]; + + @doc("Pre-computed agent response output items. Captures the full trajectory (function calls, tool outputs, messages) from a prior agent run.") + response_items?: OpenAI.OutputItem[]; +} - @doc("Agent skills.") - skills?: Record[]; +@doc("LLM-as-judge evaluation criterion applied to a single task.") +model EvaluationCriterion { + @doc("Criterion name (referenced in evaluation result rows).") + name: string; - @doc("Agent tools.") - tools?: Record[]; + @doc("Natural-language instruction passed to the judge LLM.") + instruction: string; } @doc("Reference to a registered dataset in the Foundry Dataset Service.") @@ -89,36 +120,67 @@ model DatasetRef { @doc("Tuning knobs and run-mode for an optimization job.") model OptimizationOptions { - @doc("Maximum optimization iterations per strategy. Must be >= 1. Default: 5.") - maxIterations?: int32 = 5; + @doc("Strategies to apply this run. Default: ['instruction'].") + strategies?: OptimizationStrategy[] = #[OptimizationStrategy.instruction]; + + @doc("Total candidate generation budget (number of candidates explored). Default: 10.") + budget?: int32 = 10; + + @doc("Maximum optimization iterations per strategy. Default: 5.") + max_iterations?: int32 = 5; + + @doc("Tasks sampled per iteration (mutation step input). Default: service-decided (auto-computed).") + tasks_per_iteration?: int32; + + @doc("Maximum tasks fed into the reflective-mutation LLM per iteration. Default: 5.") + max_reflection_tasks?: int32 = 5; - @doc("Per-target-attribute configuration overrides. Contains skills, tools, systemPrompt for the agent, plus model space for model optimization.") - optimizationConfig?: Record; + @doc("Minimum score improvement between iterations to continue (plateau detection). Default: 0.005.") + min_improvement?: float64 = 0.005; - @doc("Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o').") - evalModel?: string; + @doc("Composite score threshold for a task to be considered passing. Default: 0.5.") + pass_threshold?: float64 = 0.5; - @doc("Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set.") - optimizationModel?: string; + @doc("Target average score at which optimization stops early (quality ceiling). Default: 0.95.") + improvement_threshold?: float64 = 0.95; - @doc("Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for per-conversation multi-turn simulation scoring.") - evaluationLevel?: EvaluationLevel; + @doc("Run mode.") + mode?: OptimizationMode; + + @doc("Foundry deployment name to use as the LLM-as-judge evaluation model. Required.") + eval_model?: string; + + @doc("Optional model deployment for strategy reflection (instruction rewriting, skill generation). Falls back to `eval_model` if unset.") + reflection_model?: string; + + @doc("Per-task timeout for agent execution. Default: 300 seconds (5 minutes).") + @encode(DurationKnownEncoding.seconds, int32) + task_timeout_seconds?: duration = duration.fromISO("PT5M"); + + @doc("If true, retain temporary candidate-evaluation agent versions for inspection. Default: false.") + keep_versions?: boolean = false; } @doc("Caller-supplied inputs for an optimization job.") model OptimizationJobInputs { @doc("The agent (and pinned version) being optimized.") - agent: AgentIdentifier; + agent: OptimizationAgentDefinition; + + @doc("Inline evaluation dataset. Mutually exclusive with `train_dataset_reference`.") + dataset?: DatasetItem[]; - @doc("Reference to a registered training dataset (required).") - trainDatasetReference: DatasetRef; + @doc("Reference to a registered training dataset. Mutually exclusive with `dataset`.") + train_dataset_reference?: DatasetRef; @doc("Optional held-out validation dataset for measuring generalization of the final candidate.") - validationDatasetReference?: DatasetRef; + validation_dataset_reference?: DatasetRef; - @doc("Job-level evaluators (referenced by name). Per-task criteria may override. Default: ['task_adherence'].") + @doc("Job-level evaluators (referenced by `name`). Per-task `criteria` may override. Default: ['task_adherence'].") evaluators?: string[]; + @doc("Job-level evaluation criteria. Applied to all tasks unless overridden by per-task `criteria`.") + criteria?: EvaluationCriterion[]; + @doc("Tuning knobs and run-mode.") options?: OptimizationOptions; } @@ -127,22 +189,32 @@ model OptimizationJobInputs { // Progress / result models // --------------------------------------------------------------------------- -@doc("In-flight progress; only populated while status is queued or in_progress.") +@doc("In-flight progress; only populated while status is `queued` or `in_progress`.") model OptimizationJobProgress { + @doc("Strategy currently being explored.") + current_strategy: OptimizationStrategy; + @doc("1-based current iteration index.") - currentIteration: int32; + current_iteration: int32; + + @doc("Tasks evaluated so far this iteration.") + tasks_completed: int32; + + @doc("Total tasks scheduled this iteration.") + tasks_total: int32; @doc("Best score observed so far across all candidates.") - bestScore: float64; + best_score: float64; - @doc("Wall-clock time elapsed in seconds since the job began executing.") - elapsedSeconds: float64; + @doc("Wall-clock time elapsed since the job began executing.") + @encode(DurationKnownEncoding.seconds, float64) + elapsed_seconds: duration; } @doc("Aggregated evaluation result for a single candidate agent configuration across all tasks.") model OptimizationCandidate { - @doc("Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints.") - candidateId?: string; + @doc("Server-assigned candidate identifier. Use with `GET /candidates/{id}` sub-endpoints.") + candidate_id?: string; @doc("Display name of the candidate (e.g., 'baseline', 'instruction-v2').") name: string; @@ -150,38 +222,50 @@ model OptimizationCandidate { @doc("The agent configuration that produced this candidate.") config: OptimizationAgentDefinition; - @doc("What was mutated from the baseline (e.g., {systemPrompt: 'new prompt'}).") + @doc("What was mutated from the baseline (e.g., {instructions: 'new prompt'}).") mutations: Record; + @doc("Strategy rationale — why this candidate was generated.") + rationale: string; + @doc("Average composite score across all tasks.") - avgScore: float64; + avg_score: float64; @doc("Average token usage across all tasks.") - avgTokens: float64; + avg_tokens: float64; @doc("Fraction of tasks that met the pass threshold.") - passRate: float64; + pass_rate: float64; @doc("Individual task-level scores.") - taskScores: OptimizationTaskResult[]; + task_scores: OptimizationTaskResult[]; @doc("Whether this candidate is on the Pareto frontier (score vs cost).") - isParetoOptimal: boolean; + is_pareto_optimal: boolean; + + @doc("Average score from sampled evaluation (null if full dataset was used).") + sample_avg_score?: float64; + + @doc("Number of tasks in the sample (null if full dataset was used).") + sample_size?: int32; + + @doc("'sample' if scored on a subset, 'full' if re-evaluated on the full dataset.") + evaluation_type?: string; + + @doc("Identifies the strategy that produced this candidate.") + strategy?: OptimizationStrategy; @doc("Foundry evaluation identifier used to score this candidate.") - evalId?: string; + eval_id?: string; @doc("Foundry evaluation run identifier for this candidate's scoring run.") - evalRunId?: string; - - @doc("Promotion metadata. Null if the candidate has not been promoted.") - promotion?: PromotionInfo; + eval_run_id?: string; } @doc("Per-task evaluation result for a single candidate.") model OptimizationTaskResult { @doc("Task name (from the dataset).") - taskName: string; + task_name: string; @doc("The user query / input for the task.") query?: string; @@ -190,19 +274,19 @@ model OptimizationTaskResult { scores: Record; @doc("Composite score combining all evaluator scores.") - compositeScore: float64; + composite_score: float64; @doc("Total tokens consumed during the agent run for this task.") tokens: int32; @doc("Wall-clock seconds for this task's agent execution.") - durationSeconds: float64; + duration_seconds: float64; @doc("Whether the task met the pass threshold.") passed: boolean; @doc("Error message if the task failed during execution.") - errorMessage?: string; + error_message?: string; @doc("Per-evaluator reasoning keyed by evaluator name.") rationales?: Record; @@ -211,10 +295,10 @@ model OptimizationTaskResult { response?: string; @doc("Identifier of the agent run that produced this result.") - runId?: string; + run_id?: string; } -@doc("Terminal-state result body. Populated when status is succeeded or failed.") +@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; @@ -225,119 +309,43 @@ model OptimizationJobResult { @doc("All evaluated candidates including baseline.") candidates?: OptimizationCandidate[]; + @doc("Candidates on the Pareto frontier (maximize score, minimize cost).") + pareto_frontier?: OptimizationCandidate[]; + + @doc("Score of the best candidate on the held-out validation dataset. Null when no validation dataset was provided.") + validation_score?: 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).") + @doc("Number of tasks sampled during optimization iterations (null if sampling was not used).") + sample_size?: int32; + + @doc("Non-fatal warnings from the optimization run (e.g., strategy failures that were skipped).") warnings?: string[]; - @doc("True when all target attributes failed — only the baseline was evaluated.") - allTargetAttributesFailed?: boolean; + @doc("True when all optimization strategies failed — only the baseline was evaluated.") + all_strategies_failed?: boolean; } // --------------------------------------------------------------------------- -// Job resource — flat request body (no `inputs` wrapper) to match vienna contract +// Job resource (uses shared JobLike template) // --------------------------------------------------------------------------- -@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; - +@doc("Agent optimization job resource — a long-running job that optimizes an agent's configuration (instructions, model, skills) to maximize evaluation scores. On success, the result contains scored candidates.") +model OptimizationJob + is JobLike { @doc("The timestamp when the job was created, represented in Unix time.") @visibility(Lifecycle.Read) - createdAt: FoundryTimestamp; + created_at: FoundryTimestamp; @doc("The timestamp when the job was last updated, represented in Unix time.") @visibility(Lifecycle.Read) - updatedAt?: FoundryTimestamp; + updated_at?: FoundryTimestamp; @doc("Progress while in flight. Absent in terminal states.") @visibility(Lifecycle.Read) progress?: OptimizationJobProgress; - - @doc("Metadata about the dataset used for this optimization job.") - @visibility(Lifecycle.Read) - dataset?: DatasetInfo; -} - -// --------------------------------------------------------------------------- -// Promotion models -// --------------------------------------------------------------------------- - -@doc("Promotion metadata recorded when a candidate is deployed to a Foundry agent.") -model PromotionInfo { - @doc("Timestamp when promotion occurred, represented in Unix time.") - promotedAt: FoundryTimestamp; - - @doc("Name of the Foundry agent this candidate was promoted to.") - agentName: string; - - @doc("Version of the Foundry agent this candidate was promoted to.") - agentVersion: string; -} - -@doc("Request body for promoting a candidate to a Foundry agent version.") -model PromoteCandidateRequest { - @doc("Name of the Foundry agent to promote to.") - agentName: string; - - @doc("Version of the Foundry agent to promote to.") - agentVersion: string; -} - -@doc("Response after successfully promoting a candidate.") -model PromoteCandidateResponse { - @doc("The promoted candidate id.") - candidateId: string; - - @doc("Status after promotion.") - status: string; - - @doc("Timestamp when promotion occurred, represented in Unix time.") - promotedAt: FoundryTimestamp; - - @doc("Name of the Foundry agent promoted to.") - agentName: string; - - @doc("Version of the Foundry agent promoted to.") - agentVersion: 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.") - taskCount: int32; - - @doc("True when the dataset was provided inline in the request body.") - isInline: boolean; } // --------------------------------------------------------------------------- @@ -358,62 +366,14 @@ model CandidateDeployConfig { temperature?: float32; @doc("Optional skill overrides.") - skills?: Record[]; - - @doc("Optional tool overrides.") - tools?: Record[]; + skills?: OptimizationAgentSkill[]; } @doc("Full per-task evaluation results for a candidate, returned by GET /candidates/{id}/results.") model CandidateResults { @doc("Owning candidate id.") - candidateId: string; + 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.") - candidateId: string; - - @doc("Owning optimization job id.") - jobId: string; - - @doc("Display name of the candidate.") - candidateName: string; - - @doc("Candidate lifecycle status.") - status: string; - - @doc("Candidate's aggregate score.") - score?: float64; - - @doc("Whether detailed results are available for this candidate.") - hasResults: boolean; - - @doc("Timestamp when the candidate was created, represented in Unix time.") - createdAt: FoundryTimestamp; - - @doc("Timestamp when the candidate was last updated, represented in Unix time.") - updatedAt: 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.") - sizeBytes: int64; -} 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 b1219520fa7c..e2056554dc1d 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 @@ -1,6 +1,11 @@ // Routes for the AgentsOptimization data-plane surface. // Follows the Foundry job-lifecycle pattern from servicepatterns.tsp // (same pattern as data_generation_jobs, evaluation suites). +// +// C# route changes required for Foundry alignment: +// - /optimize → /agent_optimization_jobs +// - Candidate routes: flat /optimize/candidates/{id} → nested /agent_optimization_jobs/{jobId}/candidates/{id} +// - Add DELETE endpoint (new — C# doesn't have one yet) import "./models.tsp"; @@ -32,35 +37,22 @@ interface AgentOptimizationJobs { @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< + create is postJobPreview< FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - ...WithOperationId; - - @doc("The optimization job inputs.") - @body body: OptimizationJobInputs; - }, - JobCreatedResponse + OptimizationJob >; @summary("Get info about an agent optimization job.") - @doc("Get an optimization job by id. Returns 202 while in progress, 200 when terminal.") + @doc("Get an optimization job by id. Emits `Retry-After` while the job is non-terminal.") @route("agent_optimization_jobs/{jobId}") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) - @get get is FoundryDataPlanePreviewOperation< + get is queryJobStatusPreview< FoundryFeaturesOptInKeys.agents_optimization_v1_preview, - { - /** The ID of the job. */ - @path jobId: string; - }, - OptimizationJob & { - @statusCode _: 200 | 202; - @header("Retry-After") retryAfter?: int32; - } + OptimizationJob >; @summary("Returns a list of agent optimization jobs.") - @doc("List optimization jobs. Supports cursor pagination and optional status / agentName filters.") + @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< @@ -72,8 +64,8 @@ interface AgentOptimizationJobs { status?: JobStatus; @doc("Filter to jobs targeting this agent name.") - @query - agentName?: string; + @query("agent_name") + agent_name?: string; } >; @@ -90,22 +82,12 @@ interface AgentOptimizationJobs { @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 + delete is deleteJobPreview< + FoundryFeaturesOptInKeys.agents_optimization_v1_preview >; // --------------------------------------------------------------------------- - // Candidate sub-resource operations + // Candidate sub-resource operations (custom — no shared template for sub-resources) // --------------------------------------------------------------------------- @summary("Returns a list of candidates for an optimization job.") @@ -125,7 +107,7 @@ interface AgentOptimizationJobs { >; @summary("Get a candidate by id.") - @doc("Get a single candidate's metadata, manifest, and promotion info.") + @doc("Get a single candidate manifest and aggregated evaluation summary.") @route("agent_optimization_jobs/{jobId}/candidates/{candidateId}") @extension("x-ms-foundry-meta", AgentOptimizationRequiredPreviews) @get @@ -138,7 +120,7 @@ interface AgentOptimizationJobs { @doc("The candidate id.") @path candidateId: string; }, - CandidateMetadata + OptimizationCandidate >; @summary("Get candidate deploy config.") @@ -174,45 +156,4 @@ interface AgentOptimizationJobs { }, CandidateResults >; - - @summary("Get a candidate file.") - @doc("Stream a specific file from the candidate's blob directory.") - @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 - >; - - @summary("Promote a candidate.") - @doc("Promotes a candidate, recording the deployment timestamp and target agent version.") - @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 body: PromoteCandidateRequest; - }, - PromoteCandidateResponse - >; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp index 04f25f515e9c..f3ce7ec87ebf 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/agents/models.tsp @@ -286,9 +286,6 @@ union AgentProtocol { responses: "responses", mcp: "mcp", invocations: "invocations", - - @doc("WebSocket-based protocol for hosted voice and real-time streaming agents.") - invocations_ws: "invocations_ws", } union AgentEndpointProtocol { @@ -300,6 +297,7 @@ union AgentEndpointProtocol { invocations: "invocations", @doc("WebSocket-based protocol for hosted voice and real-time streaming agents.") + @removed(Versions.v1) invocations_ws: "invocations_ws", } @@ -341,7 +339,7 @@ model PromptAgentDefinition extends AgentDefinition { @doc(""" What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. - We generally recommend altering this or `top_p` but not both. Defaults to `1`. + We generally recommend altering this or `top_p` but not both. """) @minValue(0) @maxValue(2) @@ -351,8 +349,9 @@ model PromptAgentDefinition extends AgentDefinition { An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass - are considered. We generally recommend altering this or `temperature` but not both. - Defaults to `1`. + are considered. + + We generally recommend altering this or `temperature` but not both. """) @minValue(0) @maxValue(1) @@ -484,6 +483,14 @@ model HostedAgentDefinition extends AgentDefinition { """) tools?: OpenAI.Tool[]; + @doc("The protocols that the agent supports for ingress communication of the containers.") + @example(#[ + #{ protocol: "responses", version: "v0.1.1" }, + #{ protocol: "invocations", version: "v0.0.1" }, + #{ protocol: "a2a", version: "v0.3.0" } + ]) + container_protocol_versions?: ProtocolVersionRecord[]; + /** * When specify the `cpu` and `memory`, the total CPU and memory allocated to all the containers in a container app must add up to one of the following combinations. * See [vCPU and memory allocation requirements](https://learn.microsoft.com/azure/container-apps/containers#allocations). @@ -500,6 +507,10 @@ model HostedAgentDefinition extends AgentDefinition { @example(#{ name: "LOG_LEVEL", value: "debug" }) environment_variables?: Record; + @doc("The image ID for the agent, applicable to image-based hosted agents.") + @example("my-registry.azurecr.io/my-hosted-agent:latest") + image?: string; + @doc("Container-based deployment configuration. Provide this for image-based deployments. Mutually exclusive with code_configuration — the service validates that exactly one is set.") @extension( "x-ms-foundry-meta", @@ -612,7 +623,7 @@ model StructuredInputDefinition { @doc("The JSON schema for the structured input (optional).") schema?: Record; - @doc("Whether the input property is required when the agent is invoked. Defaults to `false`.") + @doc("Whether the input property is required when the agent is invoked.") required?: boolean = false; } @@ -979,9 +990,6 @@ union AgentSessionStatus { /** Session initialization or lifecycle handling failed and requires delete to recover. */ Failed: "failed", - /** Session is being stopped */ - Stopping: "stopping", - /** Session is being deleted (cleanup in progress). */ Deleting: "deleting", diff --git a/specification/ai-foundry/data-plane/Foundry/src/agents/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/agents/routes.tsp index 591f39a5b464..8e32ea766291 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/agents/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/agents/routes.tsp @@ -164,7 +164,7 @@ interface Agents { /** The name of the agent to delete. */ @path agent_name: string; - /** For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. */ + /** For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. */ @query force?: boolean = false; }, DeleteAgentResponse @@ -260,7 +260,7 @@ interface Agents { /** The version of the agent to delete */ @path agent_version: string; - /** For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. Defaults to `false`. This value is not relevant for other Agent types. */ + /** For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. */ @query force?: boolean = false; }, DeleteAgentVersionResponse @@ -397,7 +397,6 @@ interface Agents { /** The name of the agent to create a session for. */ @path agent_name: string; - ...UserIsolationKeyHeader; ...CreateAgentSessionRequest; }, ResourceCreatedResponse @@ -422,8 +421,6 @@ interface Agents { /** The session identifier. */ @path session_id: string; - - ...UserIsolationKeyHeader; }, AgentSessionResource >; @@ -441,32 +438,6 @@ interface Agents { } ) deleteSession is FoundryDataPlanePreviewOperation< - AgentDefinitionOptInKeys.agent_endpoint_v1_preview, - { - /** The name of the agent. */ - @path agent_name: string; - - /** The session identifier. */ - @path session_id: string; - - ...UserIsolationKeyHeader; - }, - NoContentResponse - >; - - /** - * Stops a session. - * Returns 204 No Content when the stop succeeds. - */ - @post - @route("/agents/{agent_name}/endpoint/sessions/{session_id}:stop") - @extension( - "x-ms-foundry-meta", - #{ - required_previews: #[AgentDefinitionOptInKeys.agent_endpoint_v1_preview], - } - ) - stopSession is FoundryDataPlanePreviewOperation< AgentDefinitionOptInKeys.agent_endpoint_v1_preview, { /** The name of the agent. */ @@ -496,7 +467,6 @@ interface Agents { /** The name of the agent. */ @path agent_name: string; - ...UserIsolationKeyHeader; ...CommonPageQueryParameters; }, AgentsPagedResult @@ -549,5 +519,5 @@ interface Agents { @path session_id: string; }, SseResponseOf - >; + >; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/models.tsp index 2aa71eb97f00..1d4b739c8d82 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/models.tsp @@ -217,6 +217,9 @@ union DataGenerationJobSourceType { @doc("Traces source — conversation traces from Application Insights.") traces: "traces", + @doc("Dataset source — reference to a dataset.") + dataset: "dataset", + @doc("File source — Azure OpenAI file.") file: "file", } @@ -245,6 +248,11 @@ model TracesDataGenerationJobSource extends DataGenerationJobSource { ...TracesJobSource; } +@doc("Dataset source for data generation jobs — reference to a dataset.") +model DatasetDataGenerationJobSource extends DataGenerationJobSource { + ...DatasetJobSource; +} + @doc("File source for data generation jobs — Azure OpenAI file input.") model FileDataGenerationJobSource extends DataGenerationJobSource { @doc("The source type for this job, which is File.") diff --git a/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/routes.tsp index b9b43919f8cd..c7edb5a41954 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/data_generation_jobs/routes.tsp @@ -36,7 +36,16 @@ interface DataGenerationJobs { @extension("x-ms-foundry-meta", DataGenerationJobsRequiredPreviews) list is listJobsPreview< FoundryFeaturesOptInKeys.data_generation_jobs_v1_preview, - DataGenerationJob + DataGenerationJob, + { + @doc("Filter data generation jobs by their scenario.") + @query + scenario?: DataGenerationJobScenario; + + @doc("Filter data generation jobs by their type.") + @query(#{ explode: false }) + type?: DataGenerationJobType[]; + } >; /** diff --git a/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/models.tsp index 2b537c598acc..f6597f90e297 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/models.tsp @@ -281,28 +281,6 @@ model EvaluationSuiteGenerationJobInputs { If omitted, defaults are used (simple_qna, 100 max_samples). """) data_generation_options?: EvaluationSuiteDataGenerationOptions; - - @doc(""" - Target for the generated suite. Stored on the suite so it can be run - immediately after generation completes. - Supports azure_ai_agent, azure_ai_model, azure_ai_assistant. - """) - target?: Target; - - @doc(""" - How to send dataset rows to the target. - If omitted and target is provided, defaults to a template using item.query. - """) - #suppress "@azure-tools/typespec-azure-core/no-unnamed-union" "Supporting both input message types" - input_messages?: OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate - | OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference; - - @doc(""" - Evaluation level for the generated suite. - Default: turn (single-turn evaluation). - Use conversation for multi-turn evaluation. - """) - evaluation_level?: EvaluationLevel; } @doc("Options for dataset generation within an evaluation suite generation job.") diff --git a/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/routes.tsp index e2bf468de1d4..f4d9dbb7a773 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/evaluation-suites/routes.tsp @@ -25,7 +25,6 @@ const EvaluationSuitesRequiredPreviews = #{ ], }; -@removed(Versions.v1) interface EvaluationSuites extends VersionedOperations< EvaluationSuiteVersion, @@ -89,7 +88,6 @@ const EvaluationSuiteGenerationJobsRequiredPreviews = #{ #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "OpenAI-based operations are definitionally non-standard" #suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "LRO polling is handled by the client via Operation-Location" @tag("EvaluationSuiteGenerationJobs") -@removed(Versions.v1) interface EvaluationSuiteGenerationJobs { @summary("Creates an evaluation suite generation job.") @route("evaluation_suite_generation_jobs") diff --git a/specification/ai-foundry/data-plane/Foundry/src/evaluators/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/evaluators/models.tsp index 83ad025ebd54..59dc5d177a33 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/evaluators/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/evaluators/models.tsp @@ -129,7 +129,7 @@ model Dimension { @maxValue(10) weight: int32; - @doc("When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. Defaults to `false`.") + @doc("When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions.") always_applicable?: boolean = false; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/evaluators/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/evaluators/routes.tsp index 5ab701224d3d..6fe5a8c222c2 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/evaluators/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/evaluators/routes.tsp @@ -5,6 +5,8 @@ import "./models.tsp"; namespace Azure.AI.Projects; using Http; using OpenAPI; +using Rest; +using TypeSpec.Versioning; alias EvaluatorsPreviewHeader = WithRequiredFoundryPreviewHeader; @@ -97,7 +99,7 @@ interface Evaluators { ...EvaluatorsPreviewHeader; @Http.bodyRoot - evaluator_version: EvaluatorVersion; + evaluatorVersion: EvaluatorVersion; }, Azure.Core.Foundations.ResourceCreatedResponse >; @@ -119,7 +121,7 @@ interface Evaluators { @doc("Evaluator resource") @Http.bodyRoot - evaluator_version: EvaluatorVersion; + evaluatorVersion: EvaluatorVersion; }, Azure.Core.Foundations.ResourceOkResponse >; @@ -145,7 +147,7 @@ interface Evaluators { @doc("The pending upload request parameters") @Http.bodyRoot - pending_upload_request: PendingUploadRequest; + pendingUploadRequest: PendingUploadRequest; }, PendingUploadResponse >; @@ -167,7 +169,7 @@ interface Evaluators { @doc("The credential request parameters") @Http.bodyRoot - credential_request: EvaluatorCredentialRequest; + credentialRequest: EvaluatorCredentialRequest; @doc("The specific version id of the EvaluatorVersion to operate on.") @Rest.segment("versions") diff --git a/specification/ai-foundry/data-plane/Foundry/src/memory-stores/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/memory-stores/models.tsp index 5a9f61c420a5..b88a9699aa66 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/memory-stores/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/memory-stores/models.tsp @@ -104,13 +104,13 @@ model MemoryStoreDefaultOptions { @doc("Specific categories or types of user profile information to extract and store.") user_profile_details?: string; - @doc("Whether to enable chat summary extraction and storage. Defaults to `true`.") + @doc("Whether to enable chat summary extraction and storage. Default is true.") chat_summary_enabled: boolean = true; - @doc("Whether to enable procedural memory extraction and storage. Defaults to `true`.") + @doc("Whether to enable procedural memory extraction and storage. Default is true.") procedural_memory_enabled?: boolean = true; - @doc("The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`.") + @doc("The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire.") @encode(DurationKnownEncoding.seconds, int32) default_ttl_seconds?: duration = duration.fromISO("P0D"); } diff --git a/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp index 897a107a87ba..b6fbeaca9376 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp @@ -100,7 +100,7 @@ interface Models @doc("Model version to create.") @bodyRoot - model_version: ModelVersion; + body: ModelVersion; }, CreateModelVersionAsyncResponse >; @@ -123,7 +123,7 @@ interface Models version: string; @bodyRoot - pending_upload_request: ModelPendingUploadRequest; + body: ModelPendingUploadRequest; }, ModelPendingUploadResponse >; @@ -146,7 +146,7 @@ interface Models version: string; @bodyRoot - credential_request: ModelCredentialRequest; + body: ModelCredentialRequest; }, AssetCredentialResponse >; diff --git a/specification/ai-foundry/data-plane/Foundry/src/schedules/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/schedules/models.tsp index 9c2256699006..dbfa5c4cdb5f 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/schedules/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/schedules/models.tsp @@ -53,7 +53,7 @@ model CronTrigger extends Trigger { @doc("Cron expression that defines the schedule frequency.") expression: string; - @doc("Time zone for the cron schedule. Defaults to `UTC`.") + @doc("Time zone for the cron schedule.") timeZone?: string = "UTC"; @doc("Start time for the cron schedule in ISO 8601 format.") @@ -156,7 +156,7 @@ model RecurrenceTrigger extends Trigger { @doc("End time for the recurrence schedule in ISO 8601 format.") endTime?: string; - @doc("Time zone for the recurrence schedule. Defaults to `UTC`.") + @doc("Time zone for the recurrence schedule.") timeZone?: string = "UTC"; @doc("Interval for the recurrence schedule.") @@ -173,7 +173,7 @@ model OneTimeTrigger extends Trigger { @doc("Date and time for the one-time trigger in ISO 8601 format.") triggerAt: string; - @doc("Time zone for the one-time trigger. Defaults to `UTC`.") + @doc("Time zone for the one-time trigger.") timeZone?: string = "UTC"; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index 253c445cd63a..ae8d7b003269 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -622,5 +622,3 @@ union WebSearchToolSearchContextSizeExpandable { @@clientLocation(AgentOptimizationJobs.getCandidate, Agents); @@clientLocation(AgentOptimizationJobs.getCandidateConfig, Agents); @@clientLocation(AgentOptimizationJobs.getCandidateResults, Agents); -@@clientLocation(AgentOptimizationJobs.promoteCandidate, Agents); -@@clientLocation(AgentOptimizationJobs.getCandidateFile, Agents); diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-extensions-openai/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-extensions-openai/client.tsp index 3724fdb449fb..1d046a6b8cc1 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-extensions-openai/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-extensions-openai/client.tsp @@ -35,7 +35,7 @@ namespace Azure.AI.Projects { @@usage(OpenAI.ConversationResource, Usage.output); @@access(OpenAI.ConversationResource, Access.public); @@clientName(OpenAI.ConversationResource, "ProjectConversation"); - @@usage(OpenAI.CreateConversationBody, Usage.output | Usage.json | Usage.input); + @@usage(OpenAI.CreateConversationBody, Usage.input); @@access(OpenAI.CreateConversationBody, Access.public); @@usage(OpenAI.UpdateConversationBody, Usage.input); @@access(OpenAI.UpdateConversationBody, Access.public); @@ -57,6 +57,9 @@ namespace Azure.AI.Projects { @@clientName(CreatedBy, "AgentResponseItemSource"); @@clientName(FabricDataAgentToolParameters, "FabricDataAgentToolOptions"); + @@clientName(MemorySearchToolCallItemResource, + "MemorySearchToolCallResponseItem" + ); @@clientName(OAuthConsentRequestOutputItem, "OAuthConsentRequestResponseItem" ); diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-projects-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-projects-agents/client.tsp index d8d2a41311ec..3ccfbd9ec444 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-projects-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-projects-agents/client.tsp @@ -217,10 +217,6 @@ namespace Azure.AI.Projects { @@access(Agents.patchAgentObject, Access.internal); @@access(Agents.getSessionLogStream, Access.internal); - @@usage(CreateAgentFromCodeContent, Usage.input); - @@access(CreateAgentFromCodeContent, Access.public); - @@clientName(CreateAgentFromCodeContent, "CreateAgentFromCodeOptions"); - // -------------------------------------------------------------------------------- // Hide Agent administration opertaions, containing the foundry features // -------------------------------------------------------------------------------- @@ -257,5 +253,5 @@ namespace Azure.AI.Projects { // -------------------------------------------------------------------------------- // Skills sub‐client // -------------------------------------------------------------------------------- - @@clientName(Skill, "AgentsSkill"); + @@clientName(SkillObject, "AgentsSkill"); } diff --git a/specification/ai-foundry/data-plane/Foundry/src/skills/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/skills/models.tsp index 8d62be889091..1433b859108e 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/skills/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/skills/models.tsp @@ -2,200 +2,102 @@ using TypeSpec.Http; namespace Azure.AI.Projects; -@doc("A skill name following the agentskills.io spec: lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens.") -@maxLength(64) -@pattern("^[a-z0-9]([a-z0-9\\-]*[a-z0-9])?$") -scalar SkillName extends string; - const SkillsRequiredPreviews = #{ required_previews: #[FoundryFeaturesOptInKeys.skills_v1_preview], }; -@doc("Inline content for defining a simple skill without uploading files. Follows the agentskills.io SKILL.md specification.") -model SkillInlineContent { - @doc("A human-readable description of what the skill does and when to use it.") - @maxLength(1024) - description: string; - - @doc("The skill instructions in markdown format. This is the body content of the SKILL.md file.") - instructions: string; - - @doc("License name or reference to a bundled license file.") - license?: string; - - @doc("Environment requirements or compatibility notes for the skill.") - @maxLength(500) - compatibility?: string; - - @doc("Arbitrary key-value metadata for additional properties.") - metadata?: Record; - - @doc("List of pre-approved tools the skill may use. Experimental.") - allowed_tools?: string[]; -} +alias CreateSkillRequest = { + @doc("The unique name of the skill.") + @maxLength(63) + name: string; -@doc("Multipart request body for creating a skill version from files. Accepts either a single zip file or multiple individual skill files (directory upload). For zip uploads, the server extracts and validates contents. For directory uploads, files are validated as-is.") -model CreateSkillVersionFromFilesBody { - @doc("Skill files to upload. Upload a single zip file or multiple individual files with relative paths.") - files: HttpPart[]; + @doc("A human-readable description of the skill.") + @maxLength(1024) + description?: string; - @doc("Whether to set this version as the default. Defaults to false.") - default?: HttpPart; -} + @doc("Instructions that define the behavior of the skill.") + @maxLength(102400) + instructions?: string; -alias GetSkillRequest = { - @doc("The unique name of the skill.") - @path - name: SkillName; + ...MetadataPropertyForRequest; }; -alias ListSkillsRequest = { - ...CommonPageQueryParameters; -}; +alias CreateSkillFromPackageRequest = { + @doc("The content type of the incoming skill package payload.") + @header("Content-Type") + content_type: "application/zip"; -alias DeleteSkillRequest = { - @doc("The unique name of the skill.") - @path - name: SkillName; + @doc("The zip package used to create the skill.") + @body + content: bytes; }; -@doc("A skill resource.") -model Skill { - @doc("The unique identifier of the skill.") - id: string; - +alias UpdateSkillRequest = { @doc("The unique name of the skill.") - name: SkillName; + @path + name: string; @doc("A human-readable description of the skill.") @maxLength(1024) - description: string; - - @doc("The Unix timestamp (seconds) when the skill was created.") - created_at: FoundryTimestamp; + description?: string; - @doc("The default version for the skill. Can be changed via updateSkill.") - default_version: string; + @doc("Instructions that define the behavior of the skill.") + @maxLength(102400) + instructions?: string; - @doc("The latest version for the skill.") - latest_version: string; - -} - -@doc("A specific version of a skill.") -model SkillVersion { - @doc("The unique identifier of the skill version.") - id: string; - - @doc("The identifier of the parent skill.") - skill_id: string; - - @doc("The name of the skill version.") - name: SkillName; - - @doc("The version identifier. Skill versions are immutable.") - version: string; - - @doc("A human-readable description of the skill version.") - @maxLength(1024) - description: string; - - @doc("The Unix timestamp (seconds) when the skill version was created.") - created_at: FoundryTimestamp; -} - -alias CreateSkillVersionRequest = { - @doc("The name of the skill. If the skill does not exist, it will be created.") - @path - name: SkillName; - - @doc("Inline skill content for simple skills without file uploads. Foundry-specific extension.") - inline_content?: SkillInlineContent; - - @doc("Whether to set this version as the default.") - default?: boolean; + ...MetadataPropertyForRequest; }; -alias GetSkillVersionRequest = { - @doc("The name of the skill.") - @path - name: SkillName; - - @doc("The version identifier to retrieve.") +alias GetSkillRequest = { + @doc("The unique name of the skill.") @path - version: string; + name: string; }; -alias ListSkillVersionsRequest = { - @doc("The name of the skill to list versions for.") +alias DownloadSkillRequest = { + @doc("The unique name of the skill.") @path - name: SkillName; + name: string; +}; +alias ListSkillsRequest = { ...CommonPageQueryParameters; }; -alias GetSkillContentRequest = { - @doc("The name of the skill.") +alias DeleteSkillRequest = { + @doc("The unique name of the skill.") @path - name: SkillName; + name: string; }; -alias GetSkillVersionContentRequest = { - @doc("The name of the skill.") - @path - name: SkillName; - - @doc("The version to download content for.") - @path - version: string; -}; +@doc("A skill object.") +model SkillObject { + @doc("The unique identifier of the skill.") + skill_id: string; -alias UpdateSkillRequest = { - @doc("The name of the skill to update.") - @path - name: SkillName; + @doc("Whether the skill was created from a zip blob package.") + has_blob: boolean; - @doc("The version identifier that the skill should point to. When set, the skill's default version will resolve to this version instead of the latest.") - default_version: string; -}; + @doc("The unique name of the skill.") + @maxLength(63) + name: string; -alias DeleteSkillVersionRequest = { - @doc("The name of the skill.") - @path - name: SkillName; + @doc("A human-readable description of the skill.") + @maxLength(1024) + description?: string; - @doc("The version identifier to delete.") - @path - version: string; -}; + ...MetadataPropertyForRequest; +} -@doc("A deleted skill.") +@doc("A deleted skill Object") model DeleteSkillResponse { - @doc("The unique identifier of the deleted skill.") - id: string; - @doc("The unique name of the skill.") - name: SkillName; + name: string; @doc("Whether the skill was successfully deleted.") deleted: boolean; } -@doc("A deleted skill version.") -model DeleteSkillVersionResponse { - @doc("The unique identifier of the deleted skill version.") - id: string; - - @doc("The name of the skill.") - name: SkillName; - - @doc("Whether the skill version was successfully deleted.") - deleted: boolean; - - @doc("The version that was deleted.") - version: string; -} - @doc("The response body for downloading a skill package.") model DownloadSkillResponse { @doc("The media type of the returned package content.") diff --git a/specification/ai-foundry/data-plane/Foundry/src/skills/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/skills/routes.tsp index f6dd67c643db..76b733e750c7 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/skills/routes.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/skills/routes.tsp @@ -12,6 +12,28 @@ alias SkillsPreviewHeader = WithRequiredFoundryPreviewHeader + >; + + /** + * Creates a skill from a zip package. + */ + @post + @route("/skills:import") + @extension("x-ms-foundry-meta", SkillsRequiredPreviews) + createSkillFromPackage is FoundryDataPlaneOperation< + CreateSkillFromPackageRequest & SkillsPreviewHeader, + ResourceCreatedResponse + >; + /** * Retrieves a skill. */ @@ -20,7 +42,18 @@ interface Skills { @extension("x-ms-foundry-meta", SkillsRequiredPreviews) getSkill is FoundryDataPlaneOperation< GetSkillRequest & SkillsPreviewHeader, - Skill + SkillObject + >; + + /** + * Downloads a skill package. + */ + @get + @route("/skills/{name}:download") + @extension("x-ms-foundry-meta", SkillsRequiredPreviews) + downloadSkill is FoundryDataPlaneOperation< + DownloadSkillRequest & SkillsPreviewHeader, + DownloadSkillResponse >; /** @@ -31,20 +64,18 @@ interface Skills { @extension("x-ms-foundry-meta", SkillsRequiredPreviews) listSkills is FoundryDataPlaneOperation< ListSkillsRequest & SkillsPreviewHeader, - AgentsPagedResult + AgentsPagedResult >; /** - * Update a skill. + * Updates an existing skill. */ - #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" - @operationId("updateSkill") @post @route("/skills/{name}") @extension("x-ms-foundry-meta", SkillsRequiredPreviews) updateSkill is FoundryDataPlaneOperation< UpdateSkillRequest & SkillsPreviewHeader, - Skill + SkillObject >; /** @@ -58,108 +89,4 @@ interface Skills { DeleteSkillRequest & SkillsPreviewHeader, DeleteSkillResponse >; - - // ── Versioned Skill Operations ──────────────────────── - - /** - * Creates a new version of a skill. If the skill does not exist, it will be created. - */ - #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" - @operationId("createSkillVersion") - @post - @route("/skills/{name}/versions") - @sharedRoute - @extension("x-ms-foundry-meta", SkillsRequiredPreviews) - createSkillVersion is FoundryDataPlaneOperation< - CreateSkillVersionRequest & SkillsPreviewHeader, - SkillVersion - >; - - /** - * Creates a new version of a skill from uploaded files via multipart form data. - */ - #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" - #suppress "@azure-tools/typespec-azure-core/byos" "Skill file upload uses multipart form data" - @operationId("createSkillVersionFromFiles") - @post - @route("/skills/{name}/versions") - @sharedRoute - @extension("x-ms-foundry-meta", SkillsRequiredPreviews) - createSkillVersionFromFiles is FoundryDataPlaneOperation< - { - @doc("The name of the skill.") - @path - name: SkillName; - - @header contentType: "multipart/form-data"; - @multipartBody content: CreateSkillVersionFromFilesBody; - } & SkillsPreviewHeader, - SkillVersion - >; - - /** - * List all versions of a skill. - */ - #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" - @operationId("listSkillVersions") - @get - @list - @route("/skills/{name}/versions") - @extension("x-ms-foundry-meta", SkillsRequiredPreviews) - listSkillVersions is FoundryDataPlaneOperation< - ListSkillVersionsRequest & SkillsPreviewHeader, - AgentsPagedResult - >; - - /** - * Retrieve a specific version of a skill. - */ - #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" - @operationId("getSkillVersion") - @get - @route("/skills/{name}/versions/{version}") - @extension("x-ms-foundry-meta", SkillsRequiredPreviews) - getSkillVersion is FoundryDataPlaneOperation< - GetSkillVersionRequest & SkillsPreviewHeader, - SkillVersion - >; - - /** - * Download the zip content for the default version of a skill. - */ - #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" - @operationId("getSkillContent") - @get - @route("/skills/{name}/content") - @extension("x-ms-foundry-meta", SkillsRequiredPreviews) - getSkillContent is FoundryDataPlaneOperation< - GetSkillContentRequest & SkillsPreviewHeader, - DownloadSkillResponse - >; - - /** - * Download the zip content for a specific version of a skill. - */ - #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" - @operationId("getSkillVersionContent") - @get - @route("/skills/{name}/versions/{version}/content") - @extension("x-ms-foundry-meta", SkillsRequiredPreviews) - getSkillVersionContent is FoundryDataPlaneOperation< - GetSkillVersionContentRequest & SkillsPreviewHeader, - DownloadSkillResponse - >; - - /** - * Delete a specific version of a skill. - */ - #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" - @operationId("deleteSkillVersion") - @delete - @route("/skills/{name}/versions/{version}") - @extension("x-ms-foundry-meta", SkillsRequiredPreviews) - deleteSkillVersion is FoundryDataPlaneOperation< - DeleteSkillVersionRequest & SkillsPreviewHeader, - DeleteSkillVersionResponse - >; } diff --git a/specification/ai-foundry/data-plane/Foundry/src/toolboxes/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/toolboxes/models.tsp index 807c5208cca3..de0c5eb10bd7 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/toolboxes/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/toolboxes/models.tsp @@ -1,7 +1,6 @@ import "../common/service.tsp"; import "../tools/models.tsp"; import "../agents/models.tsp"; -import "../skills/models.tsp"; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -14,25 +13,6 @@ model ToolboxPolicies { rai_config?: RaiConfig; } -@doc("A skill source included in a toolbox.") -@discriminator("type") -model ToolboxSkill { - @doc("The type of skill source.") - type: string; -} - -@doc("A reference to an existing skill to include in a toolbox.") -model ToolboxSkillReference extends ToolboxSkill { - @doc("The type of skill source.") - type: "skill_reference"; - - @doc("The name of the skill.") - name: SkillName; - - @doc("The version of the skill. If not specified, the skill's default version is used. When a version is specified, the reference is pinned to that immutable version.") - version?: string; -} - @doc("A toolbox that stores reusable tool definitions for agents.") model ToolboxObject { @doc("The unique identifier of the toolbox.") @@ -71,9 +51,6 @@ model ToolboxVersionObject { @doc("The list of tools contained in this toolbox version.") tools: OpenAI.Tool[]; - @doc("The list of skill sources included in this toolbox version.") - skills?: ToolboxSkill[]; - @doc("Policy configuration for the toolbox version.") policies?: ToolboxPolicies; } @@ -94,9 +71,6 @@ alias CreateToolboxVersionRequest = { @doc("The list of tools to include in this version.") tools: OpenAI.Tool[]; - @doc("The list of skill sources to include in this version. A skill reference specifies a skill name and optionally a version. If version is omitted, the skill's default version is used.") - skills?: ToolboxSkill[]; - @doc("Policy configuration for this toolbox version.") policies?: ToolboxPolicies; }; From 48bac6c8406b783af7205bcfb9a3ddf644f418ac Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 26 May 2026 11:42:32 -0700 Subject: [PATCH 17/37] remove downloadskill override --- .../ai-foundry/data-plane/Foundry/client.java.tsp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index e739706ed514..6bf44fc008e2 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -272,15 +272,6 @@ model TimeZoneType {} @@alternateType(RecurrenceTrigger.timeZone, TimeZoneType, "java"); -// -------------------------------------------------------------------------------- -// Javadoc / Documentation overrides -// -------------------------------------------------------------------------------- - -@@clientDoc(Skills.downloadSkill, - "Downloads a skill package as a ZIP archive containing {@code SKILL.md}. Returns the original uploaded archive for skills created via {@code createSkillFromPackage}; materializes a ZIP from stored instructions for skills created via {@code createSkill}.", - DocumentationMode.replace -); - // -------------------------------------------------------------------------------- // Relocate EvaluatorGenerationJobs, EvaluationSuites, and // EvaluationSuiteGenerationJobs onto the Evaluators sub-client From 404382c62b17441f992abf1b9811edae4f804892 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 26 May 2026 11:43:34 -0700 Subject: [PATCH 18/37] remove skillobject override --- specification/ai-foundry/data-plane/Foundry/client.java.tsp | 3 --- 1 file changed, 3 deletions(-) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 6bf44fc008e2..1591ec29dd52 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -138,9 +138,6 @@ namespace Azure.AI.Projects; @@clientName(EvalRunResultComparison, "EvaluationRunResultComparison"); @@clientName(EvalRunResultSummary, "EvaluationRunResultSummary"); -@@clientName(SkillObject, "SkillDetails"); -@@clientName(SkillObject.has_blob, "blobPresent"); - @@clientName(Index, "AIProjectIndex", "java"); @@clientName(Azure.Core.Foundations.ResourceBody.resource, "schedule"); From 56ab6c42835f9a5d626d2e9f487a5a79a5f8aaf8 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 26 May 2026 13:17:02 -0700 Subject: [PATCH 19/37] relocate promote candidate --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index ae8d7b003269..6a1f9c336f5b 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -622,3 +622,4 @@ union WebSearchToolSearchContextSizeExpandable { @@clientLocation(AgentOptimizationJobs.getCandidate, Agents); @@clientLocation(AgentOptimizationJobs.getCandidateConfig, Agents); @@clientLocation(AgentOptimizationJobs.getCandidateResults, Agents); +@@clientLocation(AgentOptimizationJobs.promoteCandidate, Agents); From 7a56624240db46a5292639ef0934bb31b568f1dc Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 26 May 2026 13:21:30 -0700 Subject: [PATCH 20/37] relocate get candidate --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index 6a1f9c336f5b..253c445cd63a 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -623,3 +623,4 @@ union WebSearchToolSearchContextSizeExpandable { @@clientLocation(AgentOptimizationJobs.getCandidateConfig, Agents); @@clientLocation(AgentOptimizationJobs.getCandidateResults, Agents); @@clientLocation(AgentOptimizationJobs.promoteCandidate, Agents); +@@clientLocation(AgentOptimizationJobs.getCandidateFile, Agents); From cc1d5fdb47263a8d037a28c9d2d890cc83067eb7 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 26 May 2026 17:09:36 -0700 Subject: [PATCH 21/37] renames --- .../data-plane/Foundry/src/sdk-agents/client.tsp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index 253c445cd63a..b1326605d88c 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -142,6 +142,8 @@ using Azure.AI.Projects; @@clientName(ToolboxVersionObject, "ToolboxVersionDetails", "java"); @@clientName(ToolboxObject, "ToolboxDetails", "java"); +@@clientName(SkillObject, "SkillDetails", "java"); + @@clientName(WorkIQPreviewTool, "WorkIqPreviewTool", "java"); // Rename listSessionFiles to getSessionFiles for better accuracy, since it's a GET operation and returns the list of files in the response. @@ -168,6 +170,14 @@ using Azure.AI.Projects; "getOptimizationCandidateResults", "java" ); +@@clientName(AgentOptimizationJobs.promoteCandidate, + "promoteOptimizationCandidate", + "java" +); +@@clientName(AgentOptimizationJobs.getCandidateFile, + "getOptimizationCandidateFile", + "java" +); // -------------------------------------------------------------------------------- // Usage / Public accessibility overrides From 34133a2aadc9cc4ac69f99e4c94b82b2a189b244 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 26 May 2026 18:05:34 -0700 Subject: [PATCH 22/37] undo rename --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index b1326605d88c..fb64f180d567 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -142,8 +142,6 @@ using Azure.AI.Projects; @@clientName(ToolboxVersionObject, "ToolboxVersionDetails", "java"); @@clientName(ToolboxObject, "ToolboxDetails", "java"); -@@clientName(SkillObject, "SkillDetails", "java"); - @@clientName(WorkIQPreviewTool, "WorkIqPreviewTool", "java"); // Rename listSessionFiles to getSessionFiles for better accuracy, since it's a GET operation and returns the list of files in the response. From 18719de028c67ab481f82a4fe33598be86e4c2a4 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 26 May 2026 18:10:50 -0700 Subject: [PATCH 23/37] suppress tool type --- specification/ai-foundry/data-plane/Foundry/client.java.tsp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 1591ec29dd52..0f4b8bd4170c 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -243,6 +243,9 @@ union GrammarSyntaxExpandable { "java" ); +//Suppress the OpenAI.Tool type to prevent from emitting entire tool model tree +@@alternateType(OpenAI.Tool, unknown, "java"); + // SasCredential (BlobReferenceSasCredential) type field should use the shared CredentialType enum @@alternateType(SasCredential.type, CredentialType, "java"); From 61f2b214d25662347298ad4187bba9a58c4f060f Mon Sep 17 00:00:00 2001 From: kaylieee Date: Tue, 26 May 2026 19:35:44 -0700 Subject: [PATCH 24/37] suppress deleteskillversion --- specification/ai-foundry/data-plane/Foundry/client.java.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 0f4b8bd4170c..fd6631159283 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -196,6 +196,7 @@ namespace Azure.AI.Projects; // Disabled convenient API generation and make private to provide a custom shim returning `void` in the client @@convenientAPI(Skills.deleteSkill, false, "java"); +@@convenientAPI(Skills.deleteSkillVersion, false, "java"); // -------------------------------------------------------------------------------- // Type replacements / encodings From f32adc3f8ea3888eca6a43649930760e29b9c915 Mon Sep 17 00:00:00 2001 From: Jose Alvarez Date: Wed, 27 May 2026 13:52:20 +0200 Subject: [PATCH 25/37] Adding Azure related classes for evals (#43508) * Adding Azure related classes for evals * forced json object * unknown instead of string --- .../ai-foundry/data-plane/Foundry/client.java.tsp | 13 ++++++++++++- .../Foundry/src/openai-evaluations/models.tsp | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index fd6631159283..df9b4fad5271 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -7,7 +7,9 @@ import "./src/models/routes.tsp"; import "./src/deployments/routes.tsp"; import "./src/red-teams/routes.tsp"; import "./src/evaluation-rules/routes.tsp"; -// Don't import openai-evaluations, we'll use Stainless SDK like in AgentsV2 +// Don't import openai-evaluations routes, we'll use Stainless SDK like in AgentsV2. +// Import only the models so Java codegen can expose Azure-specific eval extensions. +import "./src/openai-evaluations/models.tsp"; // import "./openai-evaluations/routes.tsp"; import "./src/evaluation-taxonomies/routes.tsp"; import "./src/evaluators/routes.tsp"; @@ -162,6 +164,15 @@ namespace Azure.AI.Projects; // Needs forceful exposition @@access(FoundryFeaturesOptInKeys, Access.public); +// Azure-specific OpenAI eval extensions used with the Stainless OpenAI SDK. +@@usage(GraderAzureAIEvaluator, Usage.input | Usage.output | Usage.json, "java"); +@@access(GraderAzureAIEvaluator, Access.public, "java"); +@@usage(TestingCriterionAzureAIEvaluator, + Usage.input | Usage.output | Usage.json, + "java" +); +@@access(TestingCriterionAzureAIEvaluator, Access.public, "java"); + // Default name produces a style violation @@clientName(SASCredentials, "SasCredential", "java"); @@clientName(SasCredential, "BlobReferenceSasCredential"); diff --git a/specification/ai-foundry/data-plane/Foundry/src/openai-evaluations/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/openai-evaluations/models.tsp index d20f87204612..a9369e08cf00 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/openai-evaluations/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/openai-evaluations/models.tsp @@ -61,7 +61,7 @@ model GraderAzureAIEvaluator { evaluator_version?: string; /** The initialization parameters for the evaluation. Must support structured outputs. */ - initialization_parameters?: {}; + initialization_parameters?: Record; /** The model to use for the evaluation. Must support structured outputs. */ data_mapping?: Record; From 1b882c3355c140b1f78ce3d9645d644983d4a9d6 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Wed, 27 May 2026 11:14:39 -0700 Subject: [PATCH 26/37] remove listsessionfiles rename --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 3 --- 1 file changed, 3 deletions(-) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index fb64f180d567..be5bc210437a 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -144,9 +144,6 @@ using Azure.AI.Projects; @@clientName(WorkIQPreviewTool, "WorkIqPreviewTool", "java"); -// Rename listSessionFiles to getSessionFiles for better accuracy, since it's a GET operation and returns the list of files in the response. -@@clientName(AgentSessionFiles.listSessionFiles, "getSessionFiles"); - @@clientName(AgentOptimizationJobs.create, "createOptimizationJob", "java"); @@clientName(AgentOptimizationJobs.get, "getOptimizationJob", "java"); @@clientName(AgentOptimizationJobs.list, "listOptimizationJobs", "java"); From 4528d023eb4e69a896e90b51a0bfd819a2d9628a Mon Sep 17 00:00:00 2001 From: kaylieee Date: Wed, 27 May 2026 14:25:15 -0700 Subject: [PATCH 27/37] rename uri to url --- .../ai-foundry/data-plane/Foundry/client.java.tsp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index df9b4fad5271..f991339b0534 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -149,6 +149,9 @@ namespace Azure.AI.Projects; @@clientName(DatasetVersion.dataUri, "dataUrl"); @@clientName(FolderDatasetVersion.dataUri, "dataUrl"); @@clientName(CodeBasedEvaluatorDefinition.blob_uri, "blobUrl"); +@@clientName(ModelVersion.blobUri, "blobUrl"); +@@clientName(ModelCredentialRequest.blobUri, "blobUrl"); +@@clientName(EvaluatorCredentialRequest.blob_uri, "blobUrl"); // Rename OpenAI.Error to avoid conflict with Azure.Core.Foundations.Error. // OpenAI.Error is the object type of the `error` properties in `ApiErrorResponse` @@ -165,7 +168,10 @@ namespace Azure.AI.Projects; @@access(FoundryFeaturesOptInKeys, Access.public); // Azure-specific OpenAI eval extensions used with the Stainless OpenAI SDK. -@@usage(GraderAzureAIEvaluator, Usage.input | Usage.output | Usage.json, "java"); +@@usage(GraderAzureAIEvaluator, + Usage.input | Usage.output | Usage.json, + "java" +); @@access(GraderAzureAIEvaluator, Access.public, "java"); @@usage(TestingCriterionAzureAIEvaluator, Usage.input | Usage.output | Usage.json, From b6b6a3a3f912cd4f9e03e112a4d5485d0dc2af2e Mon Sep 17 00:00:00 2001 From: kaylieee Date: Wed, 27 May 2026 16:37:53 -0700 Subject: [PATCH 28/37] rename fabriciq --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index be5bc210437a..57180d4fb30b 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -143,6 +143,7 @@ using Azure.AI.Projects; @@clientName(ToolboxObject, "ToolboxDetails", "java"); @@clientName(WorkIQPreviewTool, "WorkIqPreviewTool", "java"); +@@clientName(FabricIQPreviewTool, "FabricIqPreviewTool", "java"); @@clientName(AgentOptimizationJobs.create, "createOptimizationJob", "java"); @@clientName(AgentOptimizationJobs.get, "getOptimizationJob", "java"); From 4c0ef5292911ccaa4e25b86eb177af654baa423c Mon Sep 17 00:00:00 2001 From: kaylieee Date: Thu, 28 May 2026 14:04:51 -0700 Subject: [PATCH 29/37] rename to blueprintIdentity --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index 57180d4fb30b..0086a907218a 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -70,6 +70,8 @@ using Azure.AI.Projects; @@clientName(MemorySearchPreviewTool.update_delay, "updateDelaySeconds"); +@@clientName(AgentObject.blueprint, "blueprintIdentity"); + @@clientName(OpenAI.ResponseFormatJsonSchemaSchema, "ResponseFormatJsonSchemaInner" ); From baea744344b65619dc008355f7a0aaed77255a89 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Thu, 28 May 2026 14:46:39 -0700 Subject: [PATCH 30/37] rename contentHash to specify method --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index 0086a907218a..c3335830e008 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -72,6 +72,8 @@ using Azure.AI.Projects; @@clientName(AgentObject.blueprint, "blueprintIdentity"); +@@clientName(CodeConfiguration.content_hash, ContentSha256); + @@clientName(OpenAI.ResponseFormatJsonSchemaSchema, "ResponseFormatJsonSchemaInner" ); From e437a05b202340082bcaa8ce341ddfb225c50000 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Thu, 28 May 2026 14:49:34 -0700 Subject: [PATCH 31/37] missing quotes --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index c3335830e008..833848c6d822 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -72,7 +72,7 @@ using Azure.AI.Projects; @@clientName(AgentObject.blueprint, "blueprintIdentity"); -@@clientName(CodeConfiguration.content_hash, ContentSha256); +@@clientName(CodeConfiguration.content_hash, "ContentSha256"); @@clientName(OpenAI.ResponseFormatJsonSchemaSchema, "ResponseFormatJsonSchemaInner" From 49b3a220875685804d905859b394f4c1a81d3491 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Thu, 28 May 2026 14:58:14 -0700 Subject: [PATCH 32/37] rename avg to average --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index 833848c6d822..104fe4406d16 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -72,7 +72,10 @@ using Azure.AI.Projects; @@clientName(AgentObject.blueprint, "blueprintIdentity"); -@@clientName(CodeConfiguration.content_hash, "ContentSha256"); +@@clientName(CodeConfiguration.content_hash, "contentSha256"); + +@@clientName(OptimizationCandidate.avg_score, "averageScore"); +@@clientName(OptimizationCandidate.avg_tokens, "averageTokens"); @@clientName(OpenAI.ResponseFormatJsonSchemaSchema, "ResponseFormatJsonSchemaInner" From 1fa42ec532ea0a465b5fa04bcdee5542ba1eb9fe Mon Sep 17 00:00:00 2001 From: kaylieee Date: Fri, 29 May 2026 09:48:40 -0700 Subject: [PATCH 33/37] deleteskill suppressions --- specification/ai-foundry/data-plane/Foundry/client.java.tsp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index f991339b0534..ec9edd665d27 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -215,6 +215,12 @@ namespace Azure.AI.Projects; @@convenientAPI(Skills.deleteSkill, false, "java"); @@convenientAPI(Skills.deleteSkillVersion, false, "java"); +//making delete methods internal to add public shims that return void +@@access(Skills.deleteSkill, Access.internal); +@@clientName(Skills.deleteSkill, "internalDeleteSkill"); +@@access(Skills.deleteSkillVersion, Access.internal); +@@clientName(Skills.deleteSkillVersion, "internalDeleteSkillVersion"); + // -------------------------------------------------------------------------------- // Type replacements / encodings // -------------------------------------------------------------------------------- From de3010c5fae6a5ca3c9b018e6e2ee1145a295b81 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Fri, 29 May 2026 10:23:05 -0700 Subject: [PATCH 34/37] customizations for deletememory --- .../ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index 104fe4406d16..a092e31eb689 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -203,16 +203,19 @@ using Azure.AI.Projects; @@convenientAPI(Agents.deleteAgentVersion, false, "java"); @@convenientAPI(MemoryStores.deleteMemoryStore, false, "java"); @@convenientAPI(MemoryStores.deleteScope, false, "java"); +@@convenientAPI(MemoryStores.deleteMemory, false, "java"); //making delete methods internal to add public shims that return void @@access(Agents.deleteAgentVersion, Access.internal); @@access(Agents.deleteAgent, Access.internal); @@access(MemoryStores.deleteMemoryStore, Access.internal); @@access(MemoryStores.deleteScope, Access.internal); +@@access(MemoryStores.deleteMemory, Access.internal); @@clientName(Agents.deleteAgentVersion, "internalDeleteAgentVersion"); @@clientName(Agents.deleteAgent, "internalDeleteAgent"); @@clientName(MemoryStores.deleteMemoryStore, "internalDeleteMemoryStore"); @@clientName(MemoryStores.deleteScope, "internalDeleteScope"); +@@clientName(MemoryStores.deleteMemory, "internalDeleteMemory"); @@access(MemoryStoreSearchResponse, Access.public); @@usage(MemoryStoreSearchResponse, Usage.output); From 05f44b5b126adb7ce8aecf07ab32d8774804eb7d Mon Sep 17 00:00:00 2001 From: kaylieee Date: Fri, 29 May 2026 10:52:39 -0700 Subject: [PATCH 35/37] remove async from method name --- specification/ai-foundry/data-plane/Foundry/client.java.tsp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index ec9edd665d27..816833695dc8 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -118,6 +118,9 @@ namespace Azure.AI.Projects; @@clientName(EvaluatorGenerationJobs.cancel, "cancelEvaluatorGenerationJob"); @@clientName(EvaluatorGenerationJobs.delete, "deleteEvaluatorGenerationJob"); +//Routines +@@clientName(Routines.dispatchRoutineAsync, "dispatchRoutine"); + // -------------------------------------------------------------------------------- // Renames - models // -------------------------------------------------------------------------------- From 36ed3f88fbc3da46c831e5f0acd4ff85ed163e1a Mon Sep 17 00:00:00 2001 From: kaylieee Date: Fri, 29 May 2026 11:20:22 -0700 Subject: [PATCH 36/37] renames --- .../ai-foundry/data-plane/Foundry/client.java.tsp | 10 ++++++++++ .../data-plane/Foundry/src/sdk-agents/client.tsp | 6 ++++++ .../data-plane/Foundry/src/sdk-agents/tspconfig.yaml | 1 + .../ai-foundry/data-plane/Foundry/tspconfig.yaml | 2 ++ 4 files changed, 19 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 816833695dc8..9dd03ee52311 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -163,6 +163,16 @@ namespace Azure.AI.Projects; @@clientName(RedTeamTargetConfig, "TargetConfig"); +// *Request → *Input renames for public body models +@@clientName(UpdateModelVersionRequest, "UpdateModelVersionInput"); +@@clientName(ModelPendingUploadRequest, "ModelPendingUploadInput"); +@@clientName(ModelCredentialRequest, "ModelCredentialInput"); +@@clientName(EvaluatorCredentialRequest, "EvaluatorCredentialInput"); + +// *Response → *Result renames for public response models +@@clientName(ModelPendingUploadResponse, "ModelPendingUploadResult"); +@@clientName(DispatchRoutineResponse, "DispatchRoutineResult"); + // -------------------------------------------------------------------------------- // Usage / Public accessibility overrides // -------------------------------------------------------------------------------- diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp index a092e31eb689..469570ccc86d 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/client.tsp @@ -76,6 +76,12 @@ using Azure.AI.Projects; @@clientName(OptimizationCandidate.avg_score, "averageScore"); @@clientName(OptimizationCandidate.avg_tokens, "averageTokens"); +@@clientName(OptimizationCandidate.eval_id, "evaluationId"); +@@clientName(OptimizationCandidate.eval_run_id, "evaluationRunId"); + +@@clientName(PromoteCandidateRequest, "PromoteCandidateInput"); +@@clientName(PromoteCandidateResponse, "PromoteCandidateResult"); +@@clientName(SessionFileWriteResponse, "SessionFileWriteResult"); @@clientName(OpenAI.ResponseFormatJsonSchemaSchema, "ResponseFormatJsonSchemaInner" diff --git a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/tspconfig.yaml b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/tspconfig.yaml index d45bce07ca2a..4d4e69ddbb4a 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/tspconfig.yaml +++ b/specification/ai-foundry/data-plane/Foundry/src/sdk-agents/tspconfig.yaml @@ -20,6 +20,7 @@ options: AzureFunctionDefinitionFunction: AzureFunctionDefinitionDetails MCPToolConnectorId: McpToolConnectorId UpdateAgentDetailsPatchRequest: UpdateAgentDetailsOptions + AgentsPagedResultOptimizationCandidate: OptimizationCandidatePagedResult customization-class: customizations/src/main/java/AgentsCustomizations.java flavor: azure "@typespec/json-schema": diff --git a/specification/ai-foundry/data-plane/Foundry/tspconfig.yaml b/specification/ai-foundry/data-plane/Foundry/tspconfig.yaml index 483384e74fc1..e03e763e36b3 100644 --- a/specification/ai-foundry/data-plane/Foundry/tspconfig.yaml +++ b/specification/ai-foundry/data-plane/Foundry/tspconfig.yaml @@ -53,6 +53,8 @@ options: generate-samples: false custom-types-subpackage: "implementation.models" customization-class: customizations/src/main/java/ProjectsCustomizations.java + rename-model: + FilesFileDetails: SkillFileDetails flavor: azure "@typespec/json-schema": emitAllModels: true From 283042fd72150672219d0977fbe957634e7a4445 Mon Sep 17 00:00:00 2001 From: kaylieee Date: Mon, 1 Jun 2026 16:25:12 -0700 Subject: [PATCH 37/37] skill rename --- specification/ai-foundry/data-plane/Foundry/client.java.tsp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/ai-foundry/data-plane/Foundry/client.java.tsp b/specification/ai-foundry/data-plane/Foundry/client.java.tsp index 9dd03ee52311..273e918dd258 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.java.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.java.tsp @@ -129,6 +129,8 @@ namespace Azure.AI.Projects; @@clientName(Sku, "ModelDeploymentSku"); @@clientName(SasCredential, "BlobReferenceSasCredential"); // Not to be confused with class "SASCredentials" +@@clientName(Skill, "SkillDetails"); + // // More accurate naming @@clientName(AssetCredentialResponse, "DatasetCredential");