diff --git a/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp b/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp index 0ea42bc1d19f..bc59b0e4794e 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.csharp.tsp @@ -3,6 +3,8 @@ import "./src/connections/routes.tsp"; import "./src/datasets/routes.tsp"; import "./src/indexes/routes.tsp"; import "./src/deployments/routes.tsp"; +import "./src/training_jobs/routes.tsp"; +import "./src/models/routes.tsp"; import "./src/red-teams/routes.tsp"; import "./src/evaluation-rules/routes.tsp"; import "./src/evaluation-taxonomies/routes.tsp"; @@ -80,9 +82,12 @@ namespace Azure.AI.Projects; // Less generic names for C# subclients @@clientName(Connections, "AIProjectConnectionsOperations", "csharp"); +@@clientName(Clusters, "AIProjectClustersOperations", "csharp"); @@clientName(Datasets, "AIProjectDatasetsOperations", "csharp"); @@clientName(Deployments, "AIProjectDeploymentsOperations", "csharp"); @@clientName(Indexes, "AIProjectIndexesOperations", "csharp"); +@@clientName(Models, "AIProjectModelsOperations", "csharp"); +@@clientName(TrainingJobs, "AIProjectTrainingJobsOperations", "csharp"); // Need to explicitly make all get and list methods include the object name for C# @@clientName(Connections.get, "getConnection", "csharp"); @@ -99,6 +104,11 @@ namespace Azure.AI.Projects; @@clientName(Indexes.getVersion, "getIndex", "csharp"); @@clientName(Indexes.listLatest, "listIndexes", "csharp"); @@clientName(Indexes.listVersions, "listIndexVersions", "csharp"); +@@clientName(TrainingJobs.create, "createTrainingJob", "csharp"); +@@clientName(TrainingJobs.get, "getTrainingJob", "csharp"); +@@clientName(TrainingJobs.list, "listTrainingJobs", "csharp"); +@@clientName(TrainingJobs.beginDelete, "beginDeleteTrainingJob", "csharp"); +@@clientName(TrainingJobs.beginCancel, "beginCancelTrainingJob", "csharp"); // Make these two internal, since all SDKs hand-write a single public method with boolean "includeCredentials" // input parameter that calls either on these two. diff --git a/specification/ai-foundry/data-plane/Foundry/client.tsp b/specification/ai-foundry/data-plane/Foundry/client.tsp index 68ca6f90c0fa..4801007176e0 100644 --- a/specification/ai-foundry/data-plane/Foundry/client.tsp +++ b/specification/ai-foundry/data-plane/Foundry/client.tsp @@ -13,14 +13,19 @@ import "./src/datasets/routes.tsp"; import "./src/deployments/routes.tsp"; import "./src/indexes/routes.tsp"; +// Beta SDK operations without preview feature headers +import "./src/mlflow/routes.tsp"; + // Beta operations (preview routes, requiring opt-in request header) import "./src/evaluation-taxonomies/routes.tsp"; import "./src/evaluators/routes.tsp"; import "./src/insights/routes.tsp"; import "./src/memory-stores/routes.tsp"; +import "./src/models/routes.tsp"; import "./src/red-teams/routes.tsp"; import "./src/schedules/routes.tsp"; import "./src/toolsets/routes.tsp"; +import "./src/training_jobs/routes.tsp"; // Create a ".beta" subclient for the above beta operations import "./relocate-beta-operations.tsp"; @@ -41,7 +46,7 @@ using Azure.AI.Projects; @@clientNamespace(OpenAI, "azure.ai.projects", "python"); // -------------------------------------------------------------------------------- -// Agents sub‐client +// Agents sub-client // -------------------------------------------------------------------------------- // Use short form method names @@ -139,7 +144,7 @@ using Azure.AI.Projects; @@clientName(MemoryStoreObject, "MemoryStore", "javascript"); // -------------------------------------------------------------------------------- -// Responses sub‐client +// Responses sub-client // -------------------------------------------------------------------------------- // Allow assigning a `dict[str, Any]` object directly to the "schema" property of TextResponseFormatJsonSchema @@ -155,7 +160,7 @@ using Azure.AI.Projects; ); // -------------------------------------------------------------------------------- -// Evaluators sub‐client +// Evaluators sub-client // -------------------------------------------------------------------------------- @@clientName(Evaluators.listLatestVersions, "list"); @@clientName(Evaluators.startPendingUpload, "pendingUpload"); @@ -165,13 +170,27 @@ using Azure.AI.Projects; @@alternateType(EvaluatorVersion.modified_at, utcDateTime, "python"); // -------------------------------------------------------------------------------- -// Insights sub‐client +// Insights sub-client // -------------------------------------------------------------------------------- @@clientName(Azure.AI.Projects.Insight.id, "insight_id"); @@clientName(InsightsGetParams.id, "insight_id"); // -------------------------------------------------------------------------------- -// Datasets sub‐client +// Models sub-client +// -------------------------------------------------------------------------------- + +@@clientName(Models.createTrainingJob, "training_job", "python"); +@@clientName(Models.createTrainingJob, "trainingJob", "javascript"); +@@scope(Models.createSftTrainingJob, "!(python,javascript)"); +@@scope(Models.createPreferenceTrainingJob, "!(python,javascript)"); +@@scope(Models.createKtoTrainingJob, "!(python,javascript)"); +@@scope(Models.createRewardModelTrainingJob, "!(python,javascript)"); +@@scope(Models.createGrpoTrainingJob, "!(python,javascript)"); +@@scope(Models.createPolicyGradientTrainingJob, "!(python,javascript)"); +@@scope(Models.createPpoTrainingJob, "!(python,javascript)"); + +// -------------------------------------------------------------------------------- +// Datasets sub-client // -------------------------------------------------------------------------------- // Shorter method names for SDK datasets operations @@ -186,7 +205,7 @@ using Azure.AI.Projects; @@clientName(SasCredential, "BlobReferenceSasCredential"); // Not to be confused with class "SASCredentials" // -------------------------------------------------------------------------------- -// Indexes sub‐client +// Indexes sub-client // -------------------------------------------------------------------------------- // Shorter method names for SDK Index operations @@ -196,7 +215,7 @@ using Azure.AI.Projects; @@clientName(Indexes.createOrUpdateVersion, "createOrUpdate"); // -------------------------------------------------------------------------------- -// Schedules sub‐client +// Schedules sub-client // -------------------------------------------------------------------------------- @@clientName(SchedulesCreateOrUpdateParams.resource, "schedule"); @@ -211,7 +230,7 @@ using Azure.AI.Projects; @@alternateType(ScheduleRun.triggerTime, utcDateTime, "python"); // -------------------------------------------------------------------------------- -// Toolsets sub‐client +// Toolsets sub-client // -------------------------------------------------------------------------------- @@clientName(Toolsets.createToolset, "create"); @@ -221,7 +240,7 @@ using Azure.AI.Projects; @@clientName(Toolsets.deleteToolset, "delete"); // -------------------------------------------------------------------------------- -// Connections sub‐client +// Connections sub-client // -------------------------------------------------------------------------------- // Make these two internal, since all SDKs hand-write a single public method with boolean "includeCredentials" @@ -230,12 +249,36 @@ using Azure.AI.Projects; @@access(Connections.getWithCredentials, Access.internal); // -------------------------------------------------------------------------------- -// Deployment sub‐client +// Deployment sub-client // -------------------------------------------------------------------------------- // Less generic names @@clientName(Sku, "ModelDeploymentSku"); +@@clientName(Azure.AI.Projects.TrainingJobs.get, "get", "python"); +@@clientName(Azure.AI.Projects.TrainingJobs.list, "list", "python"); +@@clientName(Azure.AI.Projects.TrainingJobs.create, "create", "python"); +@@clientName(Azure.AI.Projects.TrainingJobs.create, "create", "javascript"); +@@alternateType(JobCreate, InteractiveRayJob); +@@usage(InteractiveRayJob, Usage.input); +@@access(InteractiveRayJob, Access.public); +@@usage(InteractiveRayJobProperties, Usage.input); +@@access(InteractiveRayJobProperties, Access.public); +@@usage(InteractiveRayJobTrainingConfiguration, Usage.input); +@@access(InteractiveRayJobTrainingConfiguration, Access.public); +@@usage(InteractiveRayJobFramework, Usage.input); +@@access(InteractiveRayJobFramework, Access.public); +@@clientName(Azure.AI.Projects.Beta.TrainingJobs, "training_jobs", "python"); +@@clientName(Azure.AI.Projects.Beta.TrainingJobs, "trainingJobs", "javascript"); +@@clientName(Azure.AI.Projects.TrainingJobs.beginDelete, + "begin_delete", + "python" +); +@@clientName(Azure.AI.Projects.TrainingJobs.beginCancel, + "begin_cancel", + "python" +); + // -------------------------------------------------------------------------------- // To support custom client-side handling of "opt-in" to preview features. // -------------------------------------------------------------------------------- diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobGrpo_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobGrpo_MaximumSet_Gen.json new file mode 100644 index 000000000000..33eb72a82b76 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobGrpo_MaximumSet_Gen.json @@ -0,0 +1,84 @@ +{ + "title": "Models_CreateTrainingJobGrpo_MaximumSet", + "operationId": "Models_createTrainingJob", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-my-grpo-training-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "type": "grpo", + "name": "qwen-reasoning-grpo", + "version": "1", + "description": "GRPO model trained for reasoning tasks", + "tags": { + "algorithm": "grpo" + }, + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/train-dataset/versions/1", + "eval": "azureai://accounts/my-account/projects/my-project/data/eval-dataset/versions/1", + "columns": { + "prompt": "prompt", + "reference": "reference" + }, + "data_format": { + "chatTemplate": "chatml" + } + }, + "runtime": { + "framework": "verl", + "hyperparameters": { + "learning_rate": 0.00001, + "num_generations": 8, + "max_completion_length": 512 + }, + "judge": { + "kind": "inline_function", + "inline_function": { + "def": "def score(samples, **kwargs):\n return [1.0 for _ in samples]", + "runtime": { + "pip": [ + "numpy>=1.26" + ] + } + } + }, + "lora": { + "rank": 16, + "alpha": 32, + "dropout": 0.05, + "targetModules": "auto", + "quantize": true + }, + "rollout": { + "engine": "vllm", + "tensorParallelSize": 2, + "gpuMemoryUtilization": 0.9 + }, + "eval": { + "benchmark": "gsm8k", + "everyNSteps": 100 + } + }, + "compute": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "resources": { + "instanceCount": 4, + "instanceType": "Standard_NC96ads_A100_v4" + }, + "gpu_count": 32 + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "https://my-account.services.ai.azure.com/api/projects/my-project/models/operations/create-my-grpo-training-job-01/result?api-version=v1" + }, + "body": { + "operation_id": "create-my-grpo-training-job-01", + "status": "queued" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobKto_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobKto_MaximumSet_Gen.json new file mode 100644 index 000000000000..73efa1941956 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobKto_MaximumSet_Gen.json @@ -0,0 +1,67 @@ +{ + "title": "Models_CreateTrainingJobKto_MaximumSet", + "operationId": "Models_createTrainingJob", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-my-kto-training-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "type": "kto", + "name": "qwen-feedback-kto", + "version": "1", + "description": "KTO model trained from binary desirability feedback", + "tags": { + "algorithm": "kto" + }, + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/kto-train/versions/1", + "eval": "azureai://accounts/my-account/projects/my-project/data/kto-eval/versions/1", + "columns": { + "prompt": "prompt", + "response": "response", + "label": "is_desirable" + }, + "data_format": { + "chatTemplate": "chatml" + } + }, + "runtime": { + "framework": "trl", + "desirable_weight": 1, + "undesirable_weight": 1.33, + "hyperparameters": { + "learning_rate": 0.00005, + "beta": 0.1 + }, + "lora": { + "rank": 16, + "alpha": 32, + "targetModules": "auto" + }, + "packaging": { + "mode": "merged_model" + } + }, + "compute": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "resources": { + "instanceCount": 2, + "instanceType": "Standard_NC96ads_A100_v4" + }, + "gpu_count": 16 + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "https://my-account.services.ai.azure.com/api/projects/my-project/models/operations/create-my-kto-training-job-01/result?api-version=v1" + }, + "body": { + "operation_id": "create-my-kto-training-job-01", + "status": "queued" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobPolicyGradient_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobPolicyGradient_MaximumSet_Gen.json new file mode 100644 index 000000000000..7bd8bd6c64f5 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobPolicyGradient_MaximumSet_Gen.json @@ -0,0 +1,78 @@ +{ + "title": "Models_CreateTrainingJobPolicyGradient_MaximumSet", + "operationId": "Models_createTrainingJob", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-my-rloo-training-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "type": "policy_gradient", + "algorithm": "rloo", + "name": "qwen-rloo-math", + "version": "1", + "description": "RLOO policy model trained with a built-in math verifier", + "tags": { + "algorithm": "rloo" + }, + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/math-prompts-train/versions/1", + "eval": "azureai://accounts/my-account/projects/my-project/data/math-prompts-eval/versions/1", + "columns": { + "prompt": "prompt", + "reference": "answer" + }, + "data_format": { + "chatTemplate": "chatml" + } + }, + "runtime": { + "framework": "verl", + "judge": { + "kind": "builtin", + "type": "math_equivalence" + }, + "reference": { + "kind": "base_model" + }, + "rollout": { + "engine": "vllm", + "numGenerations": 8, + "maxCompletionLength": 512, + "temperature": 0.7, + "topP": 0.95, + "batchSize": 64, + "tensorParallelSize": 2 + }, + "hyperparameters": { + "learning_rate": 0.00001, + "kl_coefficient": 0.02 + }, + "lora": { + "rank": 16, + "alpha": 32, + "targetModules": "auto" + } + }, + "compute": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "resources": { + "instanceCount": 4, + "instanceType": "Standard_NC96ads_A100_v4" + }, + "gpu_count": 32 + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "https://my-account.services.ai.azure.com/api/projects/my-project/models/operations/create-my-rloo-training-job-01/result?api-version=v1" + }, + "body": { + "operation_id": "create-my-rloo-training-job-01", + "status": "queued" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobPpo_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobPpo_MaximumSet_Gen.json new file mode 100644 index 000000000000..2a0151574fa2 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobPpo_MaximumSet_Gen.json @@ -0,0 +1,78 @@ +{ + "title": "Models_CreateTrainingJobPpo_MaximumSet", + "operationId": "Models_createTrainingJob", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-my-ppo-training-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "type": "ppo", + "name": "qwen-ppo-helpfulness", + "version": "1", + "description": "PPO policy model trained with a reward model judge", + "tags": { + "algorithm": "ppo" + }, + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/helpfulness-prompts-train/versions/1", + "eval": "azureai://accounts/my-account/projects/my-project/data/helpfulness-prompts-eval/versions/1", + "columns": { + "prompt": "prompt", + "reference": "reference" + }, + "data_format": { + "chatTemplate": "chatml" + } + }, + "runtime": { + "framework": "open_rlhf", + "judge": { + "kind": "model", + "model": "azureai://accounts/my-account/projects/my-project/models/qwen-helpfulness-reward-model/versions/1" + }, + "reference": { + "kind": "base_model" + }, + "critic": { + "value_loss_coefficient": 0.1, + "gamma": 1, + "lambda": 0.95 + }, + "rollout": { + "engine": "vllm", + "numGenerations": 4, + "maxCompletionLength": 512, + "temperature": 0.8, + "topP": 0.95, + "batchSize": 64, + "tensorParallelSize": 2 + }, + "hyperparameters": { + "learning_rate": 0.000005, + "clip_range": 0.2, + "kl_coefficient": 0.02 + } + }, + "compute": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "resources": { + "instanceCount": 4, + "instanceType": "Standard_NC96ads_A100_v4" + }, + "gpu_count": 32 + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "https://my-account.services.ai.azure.com/api/projects/my-project/models/operations/create-my-ppo-training-job-01/result?api-version=v1" + }, + "body": { + "operation_id": "create-my-ppo-training-job-01", + "status": "queued" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobPreference_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobPreference_MaximumSet_Gen.json new file mode 100644 index 000000000000..343dfcf62310 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobPreference_MaximumSet_Gen.json @@ -0,0 +1,72 @@ +{ + "title": "Models_CreateTrainingJobPreference_MaximumSet", + "operationId": "Models_createTrainingJob", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-my-dpo-training-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "type": "preference", + "algorithm": "dpo", + "name": "qwen-helpful-dpo", + "version": "1", + "description": "DPO model trained from pairwise preferences", + "tags": { + "algorithm": "dpo" + }, + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/preference-train/versions/1", + "eval": "azureai://accounts/my-account/projects/my-project/data/preference-eval/versions/1", + "columns": { + "prompt": "prompt", + "chosen": "chosen", + "rejected": "rejected" + }, + "data_format": { + "chatTemplate": "chatml" + } + }, + "runtime": { + "framework": "trl", + "reference": { + "kind": "base_model" + }, + "hyperparameters": { + "learning_rate": 0.00005, + "beta": 0.1 + }, + "lora": { + "rank": 16, + "alpha": 32, + "targetModules": "auto" + }, + "eval": { + "dataset": "azureai://accounts/my-account/projects/my-project/data/preference-eval/versions/1" + }, + "packaging": { + "mode": "model_and_adapter" + } + }, + "compute": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "resources": { + "instanceCount": 2, + "instanceType": "Standard_NC96ads_A100_v4" + }, + "gpu_count": 16 + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "https://my-account.services.ai.azure.com/api/projects/my-project/models/operations/create-my-dpo-training-job-01/result?api-version=v1" + }, + "body": { + "operation_id": "create-my-dpo-training-job-01", + "status": "queued" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobRewardModel_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobRewardModel_MaximumSet_Gen.json new file mode 100644 index 000000000000..5639a4ea13b4 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobRewardModel_MaximumSet_Gen.json @@ -0,0 +1,64 @@ +{ + "title": "Models_CreateTrainingJobRewardModel_MaximumSet", + "operationId": "Models_createTrainingJob", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-my-reward-model-training-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "type": "reward_model", + "name": "qwen-helpfulness-reward-model", + "version": "1", + "description": "Reward model trained from pairwise helpfulness preferences", + "tags": { + "algorithm": "reward_model" + }, + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "kind": "pairwise", + "train": "azureai://accounts/my-account/projects/my-project/data/reward-train/versions/1", + "eval": "azureai://accounts/my-account/projects/my-project/data/reward-eval/versions/1", + "columns": { + "prompt": "prompt", + "chosen": "chosen", + "rejected": "rejected" + }, + "data_format": { + "chatTemplate": "chatml" + } + }, + "runtime": { + "framework": "trl", + "loss": "bradley_terry", + "hyperparameters": { + "learning_rate": 0.00002, + "num_train_epochs": 2 + }, + "lora": { + "rank": 8, + "alpha": 16, + "targetModules": "auto" + } + }, + "compute": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "resources": { + "instanceCount": 2, + "instanceType": "Standard_NC96ads_A100_v4" + }, + "gpu_count": 16 + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "https://my-account.services.ai.azure.com/api/projects/my-project/models/operations/create-my-reward-model-training-job-01/result?api-version=v1" + }, + "body": { + "operation_id": "create-my-reward-model-training-job-01", + "status": "queued" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobSft_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobSft_MaximumSet_Gen.json new file mode 100644 index 000000000000..432035249a47 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_CreateTrainingJobSft_MaximumSet_Gen.json @@ -0,0 +1,67 @@ +{ + "title": "Models_CreateTrainingJobSft_MaximumSet", + "operationId": "Models_createTrainingJob", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-my-sft-training-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "type": "sft", + "name": "qwen-medical-sft", + "version": "1", + "description": "SFT model trained for medical instruction following", + "tags": { + "algorithm": "sft" + }, + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/train-dataset/versions/1", + "eval": "azureai://accounts/my-account/projects/my-project/data/eval-dataset/versions/1", + "columns": { + "messages": "messages" + }, + "data_format": { + "chatTemplate": "chatml" + } + }, + "runtime": { + "framework": "trl", + "hyperparameters": { + "learning_rate": 0.0001, + "num_train_epochs": 3, + "per_device_train_batch_size": 2 + }, + "lora": { + "rank": 16, + "alpha": 32, + "dropout": 0.05, + "targetModules": "auto", + "quantize": true + }, + "eval": { + "benchmark": "mmlu", + "everyNSteps": 100 + } + }, + "compute": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "resources": { + "instanceCount": 2, + "instanceType": "Standard_NC6s_v3" + }, + "gpu_count": 4 + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "https://my-account.services.ai.azure.com/api/projects/my-project/models/operations/create-my-sft-training-job-01/result?api-version=v1" + }, + "body": { + "operation_id": "create-my-sft-training-job-01", + "status": "queued" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_GetTrainingOperationResult_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_GetTrainingOperationResult_MaximumSet_Gen.json new file mode 100644 index 000000000000..029b17e2fb31 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/Models_GetTrainingOperationResult_MaximumSet_Gen.json @@ -0,0 +1,29 @@ +{ + "title": "Models_GetTrainingOperationResult_MaximumSet", + "operationId": "Models_getTrainingOperationResult", + "parameters": { + "api-version": "v1", + "Foundry-Features": "TrainingJobs=V1Preview", + "operation_id": "create-my-grpo-training-job-01" + }, + "responses": { + "200": { + "body": { + "operation_id": "create-my-grpo-training-job-01", + "status": "succeeded", + "result": { + "id": "azureai://accounts/my-account/projects/my-project/models/qwen-reasoning-grpo/versions/1", + "name": "qwen-reasoning-grpo", + "version": "1", + "description": "GRPO model trained for reasoning tasks", + "tags": { + "algorithm": "grpo" + }, + "uri": "azureml://locations/eastus2/workspaces/00000000-0000-0000-0000-000000000000/models/qwen-reasoning-grpo/versions/1", + "base_model": "azureai://registries/azureml/models/qwen-base/versions/1", + "training_job": "grpo-qwen-reasoning-01" + } + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginCancel_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginCancel_MaximumSet_Gen.json new file mode 100644 index 000000000000..c00a0da539de --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginCancel_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "TrainingJobs_BeginCancel_MaximumSet", + "operationId": "TrainingJobs_BeginCancel", + "parameters": { + "api-version": "v1", + "name": "my_training_job_01", + "x-ms-client-request-id": "cf35b680-dc80-4815-ab83-9364acc3bce6", + "Foundry-Features": "TrainingJobs=V1Preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/operations/cancel-operation-id", + "Retry-After": "10" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginCancel_MinimumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginCancel_MinimumSet_Gen.json new file mode 100644 index 000000000000..da52a6797d8d --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginCancel_MinimumSet_Gen.json @@ -0,0 +1,11 @@ +{ + "title": "TrainingJobs_BeginCancel_MinimumSet", + "operationId": "TrainingJobs_BeginCancel", + "parameters": { + "api-version": "v1", + "name": "my_training_job_01" + }, + "responses": { + "200": {} + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginDelete_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginDelete_MaximumSet_Gen.json new file mode 100644 index 000000000000..9135d5afebaa --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginDelete_MaximumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "TrainingJobs_BeginDelete_MaximumSet", + "operationId": "TrainingJobs_BeginDelete", + "parameters": { + "api-version": "v1", + "name": "my_training_job_01", + "x-ms-client-request-id": "cf35b680-dc80-4815-ab83-9364acc3bce6", + "Foundry-Features": "TrainingJobs=V1Preview" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/operations/delete-operation-id", + "Retry-After": "10", + "x-ms-async-operation-timeout": "PT1H" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginDelete_MinimumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginDelete_MinimumSet_Gen.json new file mode 100644 index 000000000000..2610a55fd71b --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_BeginDelete_MinimumSet_Gen.json @@ -0,0 +1,11 @@ +{ + "title": "TrainingJobs_BeginDelete_MinimumSet", + "operationId": "TrainingJobs_BeginDelete", + "parameters": { + "api-version": "v1", + "name": "my_training_job_01" + }, + "responses": { + "204": {} + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_CreateRayCommandJob_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_CreateRayCommandJob_MaximumSet_Gen.json new file mode 100644 index 000000000000..4703fba6d5e1 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_CreateRayCommandJob_MaximumSet_Gen.json @@ -0,0 +1,60 @@ +{ + "title": "TrainingJobs_CreateRayCommandJob_MaximumSet", + "operationId": "TrainingJobs_Create", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-ray-command-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "name": "ray-command-job-01", + "job_type": "command", + "display_name": "interactive-ray-4node", + "description": "Interactive Ray command job (4 nodes)", + "tags": { + "scenario": "interactive-ray" + }, + "compute_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "command": "python -c \"import time; print('Ray cluster ready'); time.sleep(86400)\"", + "environment_image_reference": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04", + "distribution": { + "distribution_type": "ray", + "port": 6379, + "include_dashboard": true, + "dashboard_port": 8265, + "enable_remote_access_client_server": true, + "client_server_port": 10001 + }, + "resources": { + "instance_count": 4 + } + } + }, + "responses": { + "201": { + "body": { + "name": "ray-command-job-01", + "type": "Microsoft.MachineLearningServices/workspaces/training_jobs", + "job_type": "command", + "display_name": "interactive-ray-4node", + "description": "Interactive Ray command job (4 nodes)", + "tags": { + "scenario": "interactive-ray" + }, + "compute_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "command": "python -c \"import time; print('Ray cluster ready'); time.sleep(86400)\"", + "environment_image_reference": "mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04", + "distribution": { + "distribution_type": "ray", + "port": 6379, + "include_dashboard": true, + "dashboard_port": 8265, + "enable_remote_access_client_server": true, + "client_server_port": 10001 + }, + "resources": { + "instance_count": 4 + } + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Create_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Create_MaximumSet_Gen.json new file mode 100644 index 000000000000..7a9be02825e5 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Create_MaximumSet_Gen.json @@ -0,0 +1,244 @@ +{ + "title": "TrainingJobs_Create_MaximumSet", + "operationId": "TrainingJobs_Create", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-my-training-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "name": "my_training_job_01", + "job_type": "command", + "display_name": "My Training Job", + "description": "A sample declarative training job", + "tags": { + "framework": "trl", + "algorithm": "grpo" + }, + "code_id": "azureai://accounts/my-account/projects/my-project/data/my-training-code/versions/1", + "compute_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "training": { + "algorithm": "grpo", + "framework": "trl", + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/train-dataset/versions/1", + "eval": "azureai://accounts/my-account/projects/my-project/data/eval-dataset/versions/1", + "columns": { + "prompt": "prompt", + "chosen": "chosen", + "rejected": "rejected", + "reference": "reference", + "messages": "messages", + "response": "response", + "label": "label", + "score": "score" + }, + "data_format": { + "chat_template": "chatml" + } + }, + "hyperparameters": { + "learning_rate": 0.0001, + "num_train_epochs": 3, + "per_device_train_batch_size": 2 + }, + "reward": { + "kind": "inline_function", + "inline_function": { + "def": "def score(samples, **kwargs):\n return [1.0 for _ in samples]", + "runtime": { + "pip": [ + "numpy>=1.26" + ] + } + } + }, + "lora": { + "rank": 16, + "alpha": 32, + "dropout": 0.05, + "target_modules": "auto", + "quantize": true + }, + "rollout": { + "engine": "vllm", + "tensor_parallel_size": 2, + "gpu_memory_utilization": 0.9 + }, + "eval": { + "benchmark": "gsm8k", + "every_n_steps": 100 + } + }, + "inputs": { + "extra_context": { + "job_input_type": "uri_folder", + "uri": "azureai://datastores/mystore/paths/data/context", + "mode": "read_only_mount" + }, + "learning_rate": { + "job_input_type": "literal", + "value": "0.001" + } + }, + "outputs": { + "model": { + "job_output_type": "safetensors_model", + "mode": "read_write_mount", + "asset_name": "my-trained-model", + "asset_version": "1", + "uri": "azureai://datastores/workspaceblobstore/paths/outputs/model", + "base_model_id": "azureai://registries/azureml/models/qwen-base/versions/1", + "description": "Trained model output" + } + }, + "environment_variables": { + "AZUREML_DATASET_FILE": "/mnt/data/train.csv" + }, + "resources": { + "instance_count": 2, + "instance_type": "Standard_NC6s_v3", + "shm_size": "2g", + "docker_args": "--privileged" + }, + "gpu_count": 4, + "limits": { + "job_limits_type": "command", + "timeout": "PT2H30M" + }, + "queue_settings": { + "job_tier": "Standard" + }, + "user_assigned_identity_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-identity", + "properties": { + "experimentName": "my-experiment" + } + } + }, + "responses": { + "201": { + "body": { + "id": "my_training_job_01", + "name": "my_training_job_01", + "type": "Microsoft.MachineLearningServices/workspaces/training_jobs", + "system_data": { + "created_at": 1577882096, + "created_by": "user@example.com", + "created_by_type": "User", + "last_modified_at": 1577882096, + "last_modified_by": "user@example.com", + "last_modified_by_type": "User" + }, + "job_type": "command", + "display_name": "My Training Job", + "description": "A sample declarative training job", + "tags": { + "framework": "trl", + "algorithm": "grpo" + }, + "code_id": "azureai://accounts/my-account/projects/my-project/data/my-training-code/versions/1", + "compute_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster", + "training": { + "algorithm": "grpo", + "framework": "trl", + "resolved_framework": "trl", + "framework_version": "0.21.0", + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/train-dataset/versions/1", + "eval": "azureai://accounts/my-account/projects/my-project/data/eval-dataset/versions/1", + "columns": { + "prompt": "prompt", + "chosen": "chosen", + "rejected": "rejected", + "reference": "reference", + "messages": "messages", + "response": "response", + "label": "label", + "score": "score" + }, + "data_format": { + "chat_template": "chatml" + } + }, + "hyperparameters": { + "learning_rate": 0.0001, + "num_train_epochs": 3, + "per_device_train_batch_size": 2 + }, + "reward": { + "kind": "inline_function", + "inline_function": { + "def": "def score(samples, **kwargs):\n return [1.0 for _ in samples]", + "runtime": { + "pip": [ + "numpy>=1.26" + ] + } + } + }, + "lora": { + "rank": 16, + "alpha": 32, + "dropout": 0.05, + "target_modules": "auto", + "quantize": true + }, + "rollout": { + "engine": "vllm", + "tensor_parallel_size": 2, + "gpu_memory_utilization": 0.9 + }, + "eval": { + "benchmark": "gsm8k", + "every_n_steps": 100 + } + }, + "inputs": { + "extra_context": { + "job_input_type": "uri_folder", + "uri": "azureai://datastores/mystore/paths/data/context", + "mode": "read_only_mount" + }, + "learning_rate": { + "job_input_type": "literal", + "value": "0.001" + } + }, + "outputs": { + "model": { + "job_output_type": "safetensors_model", + "mode": "read_write_mount", + "asset_name": "my-trained-model", + "asset_version": "1", + "uri": "azureai://datastores/workspaceblobstore/paths/outputs/model", + "base_model_id": "azureai://registries/azureml/models/qwen-base/versions/1", + "description": "Trained model output" + } + }, + "environment_variables": { + "AZUREML_DATASET_FILE": "/mnt/data/train.csv" + }, + "resources": { + "instance_count": 2, + "instance_type": "Standard_NC6s_v3", + "shm_size": "2g", + "docker_args": "--privileged" + }, + "gpu_count": 4, + "limits": { + "job_limits_type": "command", + "timeout": "PT2H30M" + }, + "queue_settings": { + "job_tier": "Standard" + }, + "user_assigned_identity_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-identity", + "status": "NotStarted", + "properties": { + "experimentName": "my-experiment" + } + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Create_MinimumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Create_MinimumSet_Gen.json new file mode 100644 index 000000000000..5251abead332 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Create_MinimumSet_Gen.json @@ -0,0 +1,37 @@ +{ + "title": "TrainingJobs_Create_MinimumSet", + "operationId": "TrainingJobs_Create", + "parameters": { + "api-version": "v1", + "Operation-Id": "create-my-training-job-01", + "Foundry-Features": "TrainingJobs=V1Preview", + "job": { + "name": "my_training_job_01", + "job_type": "command", + "training": { + "algorithm": "sft", + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/train-dataset/versions/1" + } + }, + "compute_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster" + } + }, + "responses": { + "201": { + "body": { + "name": "my_training_job_01", + "job_type": "command", + "training": { + "algorithm": "sft", + "model": "azureai://registries/azureml/models/qwen-base/versions/1", + "dataset": { + "train": "azureai://accounts/my-account/projects/my-project/data/train-dataset/versions/1" + } + }, + "compute_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-account/computes/my-cluster" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_GetAttemptLatest_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_GetAttemptLatest_MaximumSet_Gen.json new file mode 100644 index 000000000000..ab2cf1658d6a --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_GetAttemptLatest_MaximumSet_Gen.json @@ -0,0 +1,34 @@ +{ + "title": "TrainingJobs_GetAttemptLatest_MaximumSet", + "operationId": "TrainingJobs_GetAttempt", + "parameters": { + "api-version": "v1", + "job_name": "my_training_job_01", + "attempt_id": "latest", + "x-ms-client-request-id": "cf35b680-dc80-4815-ab83-9364acc3bce6", + "Foundry-Features": "TrainingJobs=V1Preview" + }, + "responses": { + "200": { + "body": { + "id": "2", + "run_id": "my_training_job_01", + "job_name": "my_training_job_01", + "data_container_id": "dcid.my_training_job_01.2", + "sequence_number": 2, + "status": "running", + "status_reason": "Preparing compute", + "started_at": 1577882096, + "last_started_at": 1577882096, + "current_compute_time": "PT5M", + "compute_details": { + "instance_type": "Standard_NC6s_v3", + "instance_count": 2, + "gpu_count": 2, + "region": "westus2" + }, + "is_latest": true + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Get_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Get_MaximumSet_Gen.json new file mode 100644 index 000000000000..d55d422f4b1a --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Get_MaximumSet_Gen.json @@ -0,0 +1,104 @@ +{ + "title": "TrainingJobs_Get_MaximumSet", + "operationId": "TrainingJobs_Get", + "parameters": { + "api-version": "v1", + "name": "my_training_job_01", + "include": "latest_attempt", + "x-ms-client-request-id": "cf35b680-dc80-4815-ab83-9364acc3bce6", + "Foundry-Features": "TrainingJobs=V1Preview" + }, + "responses": { + "200": { + "body": { + "id": "my_training_job_01", + "name": "my_training_job_01", + "type": "Microsoft.MachineLearningServices/workspaces/training_jobs", + "system_data": { + "created_at": 1577882096, + "created_by": "user@example.com", + "created_by_type": "User", + "last_modified_at": 1577882096, + "last_modified_by": "user@example.com", + "last_modified_by_type": "User" + }, + "job_type": "command", + "command": "python train.py --data ${{inputs.training_data}} --output ${{outputs.model}}", + "environment_image_reference": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04:latest", + "display_name": "My Training Job", + "description": "A sample command job for training", + "tags": { + "framework": "pytorch" + }, + "code_id": "azureai:my-training-code:1", + "compute_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.MachineLearningServices/workspaces/my-ws/computes/my-cluster", + "inputs": { + "training_data": { + "job_input_type": "uri_folder", + "uri": "azureai://datastores/mystore/paths/data/train", + "mode": "read_only_mount" + }, + "learning_rate": { + "job_input_type": "literal", + "value": "0.001" + } + }, + "outputs": { + "model": { + "job_output_type": "uri_folder", + "mode": "read_write_mount", + "asset_name": "my-trained-model", + "asset_version": "1", + "uri": "azureai://datastores/workspaceblobstore/paths/outputs/model", + "base_model_id": "azureai:qwen-base-model:1", + "description": "Trained model output" + } + }, + "environment_variables": { + "AZUREML_DATASET_FILE": "/mnt/data/train.csv" + }, + "distribution": { + "distribution_type": "pytorch", + "process_count_per_instance": 4 + }, + "resources": { + "instance_count": 2, + "instance_type": "Standard_NC6s_v3", + "shm_size": "2g", + "docker_args": "--privileged" + }, + "limits": { + "job_limits_type": "command", + "timeout": "PT2H30M" + }, + "queue_settings": { + "job_tier": "Standard" + }, + "user_assigned_identity_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-identity", + "status": "running", + "properties": { + "experimentName": "my-experiment" + }, + "latest_attempt": { + "id": "2", + "run_id": "my_training_job_01", + "job_name": "my_training_job_01", + "data_container_id": "dcid.my_training_job_01.2", + "sequence_number": 2, + "status": "running", + "status_reason": "Preparing compute", + "started_at": 1577882096, + "last_started_at": 1577882096, + "current_compute_time": "PT5M", + "compute_details": { + "instance_type": "Standard_NC6s_v3", + "instance_count": 2, + "gpu_count": 2, + "region": "westus2" + }, + "is_latest": true + } + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Get_MinimumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Get_MinimumSet_Gen.json new file mode 100644 index 000000000000..72069605f26c --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_Get_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "TrainingJobs_Get_MinimumSet", + "operationId": "TrainingJobs_Get", + "parameters": { + "api-version": "v1", + "name": "my_training_job_01" + }, + "responses": { + "200": { + "body": { + "name": "my_training_job_01", + "job_type": "command", + "command": "python train.py", + "environment_image_reference": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04:latest" + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_List_MaximumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_List_MaximumSet_Gen.json new file mode 100644 index 000000000000..dbbcfac374af --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_List_MaximumSet_Gen.json @@ -0,0 +1,94 @@ +{ + "title": "TrainingJobs_List_MaximumSet", + "operationId": "TrainingJobs_List", + "parameters": { + "api-version": "v1", + "job_type": "command", + "tag": "framework=pytorch", + "list_view_type": "active_only", + "properties": "experimentName=my-experiment", + "x-ms-client-request-id": "cf35b680-dc80-4815-ab83-9364acc3bce6", + "Foundry-Features": "TrainingJobs=V1Preview" + }, + "responses": { + "200": { + "body": { + "data": [ + { + "id": "my_training_job_01", + "name": "my_training_job_01", + "type": "Microsoft.MachineLearningServices/workspaces/training_jobs", + "system_data": { + "created_at": 1577882096, + "created_by": "user@example.com", + "created_by_type": "User", + "last_modified_at": 1577882096, + "last_modified_by": "user@example.com", + "last_modified_by_type": "User" + }, + "job_type": "command", + "command": "python train.py --data ${{inputs.training_data}} --output ${{outputs.model}}", + "environment_image_reference": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04:latest", + "display_name": "My Training Job", + "description": "A sample command job for training", + "tags": { + "framework": "pytorch" + }, + "code_id": "azureai:my-training-code:1", + "compute_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.MachineLearningServices/workspaces/my-ws/computes/my-cluster", + "inputs": { + "training_data": { + "job_input_type": "uri_folder", + "uri": "azureai://datastores/mystore/paths/data/train", + "mode": "read_only_mount" + }, + "learning_rate": { + "job_input_type": "literal", + "value": "0.001" + } + }, + "outputs": { + "model": { + "job_output_type": "uri_folder", + "mode": "read_write_mount", + "asset_name": "my-trained-model", + "asset_version": "1", + "uri": "azureai://datastores/workspaceblobstore/paths/outputs/model", + "base_model_id": "azureai:qwen-base-model:1", + "description": "Trained model output" + } + }, + "environment_variables": { + "AZUREML_DATASET_FILE": "/mnt/data/train.csv" + }, + "distribution": { + "distribution_type": "pytorch", + "process_count_per_instance": 4 + }, + "resources": { + "instance_count": 2, + "instance_type": "Standard_NC6s_v3", + "shm_size": "2g", + "docker_args": "--privileged" + }, + "limits": { + "job_limits_type": "command", + "timeout": "PT2H30M" + }, + "queue_settings": { + "job_tier": "Standard" + }, + "user_assigned_identity_id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-identity", + "status": "running", + "properties": { + "experimentName": "my-experiment" + } + } + ], + "first_id": "my_training_job_01", + "last_id": "my_training_job_01", + "has_more": true + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_List_MinimumSet_Gen.json b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_List_MinimumSet_Gen.json new file mode 100644 index 000000000000..3b4742449da0 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/examples/v1/TrainingJobs_List_MinimumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "TrainingJobs_List_MinimumSet", + "operationId": "TrainingJobs_List", + "parameters": { + "api-version": "v1" + }, + "responses": { + "200": { + "body": { + "data": [ + { + "name": "my_training_job_01", + "job_type": "command", + "command": "python train.py", + "environment_image_reference": "mcr.microsoft.com/azureml/openmpi4.1.0-cuda11.8-cudnn8-ubuntu22.04:latest" + } + ], + "first_id": "my_training_job_01", + "last_id": "my_training_job_01", + "has_more": false + } + } + } +} diff --git a/specification/ai-foundry/data-plane/Foundry/main.tsp b/specification/ai-foundry/data-plane/Foundry/main.tsp index 2f4e65f50a6b..d707a7b90764 100644 --- a/specification/ai-foundry/data-plane/Foundry/main.tsp +++ b/specification/ai-foundry/data-plane/Foundry/main.tsp @@ -15,6 +15,8 @@ import "./src/indexes/routes.tsp"; import "./src/insights/routes.tsp"; import "./src/managed-blueprints/routes.tsp"; import "./src/memory-stores/routes.tsp"; +import "./src/mlflow/routes.tsp"; +import "./src/models/routes.tsp"; import "./src/openai-conversations/routes.tsp"; import "./src/openai-evaluations/routes.tsp"; import "./src/openai-finetuning/routes.tsp"; @@ -23,3 +25,4 @@ import "./src/red-teams/routes.tsp"; import "./src/schedules/routes.tsp"; import "./src/skills/routes.tsp"; import "./src/toolsets/routes.tsp"; +import "./src/training_jobs/routes.tsp"; 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 89e65ee5b7d7..01148bddc849 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 @@ -5,6 +5,24 @@ "version": "v1" }, "tags": [ + { + "name": "MLflow Experiments" + }, + { + "name": "MLflow Runs" + }, + { + "name": "MLflow Metrics" + }, + { + "name": "MLflow Artifacts" + }, + { + "name": "MLflow Registered Models" + }, + { + "name": "MLflow Model Versions" + }, { "name": "Agents" }, @@ -35,6 +53,9 @@ { "name": "Memory Stores" }, + { + "name": "Models" + }, { "name": "Conversations" }, @@ -58,6 +79,9 @@ }, { "name": "Toolsets" + }, + { + "name": "TrainingJobs" } ], "paths": { @@ -4411,108 +4435,46 @@ } } }, - "/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" - } - } - } - } - }, + "/mlflow/api/2.0/mlflow/artifacts/list": { "get": { - "operationId": "listConversations", - "description": "Returns the list of all conversations.", + "operationId": "Artifacts_list", + "description": "List MLflow artifacts.", "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", + "name": "run_id", "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": "MLflow run identifier.", "schema": { "type": "string" }, "explode": false }, { - "name": "before", + "name": "run_uuid", "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.", + "description": "MLflow run UUID.", "schema": { "type": "string" }, "explode": false }, { - "name": "agent_name", + "name": "path", "in": "query", "required": false, - "description": "Filter by agent name. If provided, only items associated with the specified agent will be returned.", + "description": "Artifact path to list.", "schema": { "type": "string" }, "explode": false }, { - "name": "agent_id", + "name": "api-version", "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.", + "required": true, + "description": "The API version to use for this operation.", "schema": { "type": "string" }, @@ -4525,33 +4487,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -4568,23 +4504,24 @@ } }, "tags": [ - "Conversations" + "MLflow Artifacts" ] } }, - "/openai/v1/conversations/{conversation_id}": { + "/mlflow/api/2.0/mlflow/experiments/create": { "post": { - "operationId": "updateConversation", - "description": "Update a conversation.", + "operationId": "Experiments_create", + "description": "Create an MLflow experiment.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation to update.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -4593,7 +4530,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -4610,31 +4547,34 @@ } }, "tags": [ - "Conversations" + "MLflow Experiments" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.UpdateConversationBody" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } - }, - "get": { - "operationId": "getConversation", - "description": "Retrieves a conversation.", + } + }, + "/mlflow/api/2.0/mlflow/experiments/delete": { + "post": { + "operationId": "Experiments_delete", + "description": "Delete an MLflow experiment.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -4643,7 +4583,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -4660,21 +4600,54 @@ } }, "tags": [ - "Conversations" - ] - }, - "delete": { - "operationId": "deleteConversation", - "description": "Deletes a conversation.", + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/experiments/get": { + "get": { + "operationId": "Experiments_get", + "description": "Get an MLflow experiment by ID.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "experiment_id", + "in": "query", + "required": false, + "description": "MLflow experiment identifier.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "experiment_name", + "in": "query", + "required": false, + "description": "MLflow experiment name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -4683,7 +4656,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.DeletedConversationResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -4700,34 +4673,42 @@ } }, "tags": [ - "Conversations" + "MLflow Experiments" ] } }, - "/openai/v1/conversations/{conversation_id}/items": { - "post": { - "operationId": "createConversationItems", - "description": "Create items in a conversation with the given ID.", + "/mlflow/api/2.0/mlflow/experiments/get-by-name": { + "get": { + "operationId": "Experiments_getByName", + "description": "Get an MLflow experiment by name.", "parameters": [ { - "name": "conversation_id", - "in": "path", - "required": true, - "description": "The id of the conversation on which the item needs to be created.", + "name": "experiment_id", + "in": "query", + "required": false, + "description": "MLflow experiment identifier.", "schema": { "type": "string" - } + }, + "explode": false }, { - "name": "include", + "name": "experiment_name", "in": "query", "required": false, - "description": "Additional fields to include in the response.\nSee the `include` parameter for listing Conversation items for more information.", + "description": "MLflow experiment name.", "schema": { - "type": "array", - "items": { - "type": "string" - } + "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 } @@ -4738,7 +4719,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationItemList" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -4755,94 +4736,53 @@ } }, "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" - ] - } - } - } - } - }, + "MLflow Experiments" + ] + } + }, + "/mlflow/api/2.0/mlflow/experiments/list": { "get": { - "operationId": "listConversationItems", - "description": "List all items for a conversation with the given ID.", + "operationId": "Experiments_list", + "description": "List MLflow experiments.", "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", + "name": "max_results", "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.", + "description": "Maximum number of items to return.", "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" + "format": "int32" }, "explode": false }, { - "name": "after", + "name": "page_token", "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": "Token used to retrieve the next page of results.", "schema": { "type": "string" }, "explode": false }, { - "name": "before", + "name": "view_type", "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.", + "description": "Experiment lifecycle stage filter.", "schema": { "type": "string" }, "explode": false }, { - "name": "item_type", + "name": "api-version", "in": "query", - "required": false, - "description": "Filter by item type. If provided, only items of the specified type will be returned.", + "required": true, + "description": "The API version to use for this operation.", "schema": { - "$ref": "#/components/schemas/OpenAI.ItemType" + "type": "string" }, "explode": false } @@ -4853,33 +4793,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -4896,32 +4810,77 @@ } }, "tags": [ - "Conversations" + "MLflow Experiments" ] } }, - "/openai/v1/conversations/{conversation_id}/items/{item_id}": { - "get": { - "operationId": "getConversationItem", - "description": "Get a single item from a conversation with the given IDs.", + "/mlflow/api/2.0/mlflow/experiments/restore": { + "post": { + "operationId": "Experiments_restore", + "description": "Restore a deleted MLflow experiment.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the conversation that contains the item.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/experiments/search": { + "post": { + "operationId": "Experiments_search", + "description": "Search MLflow experiments.", + "parameters": [ { - "name": "item_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation item to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -4930,7 +4889,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -4947,30 +4906,87 @@ } }, "tags": [ - "Conversations" - ] - }, - "delete": { - "operationId": "deleteConversationItem", - "description": "Delete an item from a conversation with the given IDs.", + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/experiments/set-experiment-tag": { + "post": { + "operationId": "Experiments_setTag", + "description": "Set an MLflow experiment tag.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation on which the item needs to be deleted from.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/experiments/update": { + "post": { + "operationId": "Experiments_update", + "description": "Update MLflow experiment metadata.", + "parameters": [ { - "name": "item_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation item to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -4979,7 +4995,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -4996,104 +5012,94 @@ } }, "tags": [ - "Conversations" - ] + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/evals": { + "/mlflow/api/2.0/mlflow/metrics/get-history": { "get": { - "operationId": "Evals_listEvals", - "summary": "List all evaluations", - "description": "List evaluations for a project.", + "operationId": "Metrics_getHistory", + "description": "Get MLflow metric history.", "parameters": [ { - "name": "after", + "name": "run_id", "in": "query", "required": false, - "description": "Identifier for the last run from the previous pagination request.", + "description": "MLflow run identifier.", "schema": { "type": "string" }, "explode": false }, { - "name": "limit", + "name": "run_uuid", "in": "query", "required": false, - "description": "Number of runs to retrieve.", + "description": "MLflow run UUID.", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "default": 20 + "type": "string" }, "explode": false }, { - "name": "order", + "name": "metric_key", "in": "query", "required": false, - "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "description": "Metric key.", "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "asc" + "type": "string" }, "explode": false }, { - "name": "order_by", + "name": "max_results", "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.", + "description": "Maximum number of metric points to return.", "schema": { - "type": "string", - "enum": [ - "created_at", - "updated_at" - ], - "default": "created_at" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { + "type": "integer", + "format": "int32" + }, + "explode": false + }, + { + "name": "page_token", + "in": "query", + "required": false, + "description": "Token used to retrieve the next page of metric points.", + "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/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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5110,21 +5116,33 @@ } }, "tags": [ - "Evals" + "MLflow Metrics" ] - }, + } + }, + "/mlflow/api/2.0/mlflow/model-versions/create": { "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": [], + "operationId": "ModelVersions_create", + "description": "Create an MLflow model version.", + "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/Eval" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5141,34 +5159,34 @@ } }, "tags": [ - "Evals" + "MLflow Model Versions" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEvalRequest" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } } }, - "/openai/v1/evals/{eval_id}": { + "/mlflow/api/2.0/mlflow/model-versions/delete": { "delete": { - "operationId": "Evals_deleteEval", - "summary": "Delete an evaluation", - "description": "Delete an evaluation.", + "operationId": "ModelVersions_delete", + "description": "Delete an MLflow model version.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -5177,7 +5195,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteEvalResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5194,22 +5212,34 @@ } }, "tags": [ - "Evals" - ] - }, - "get": { - "operationId": "Evals_getEval", - "summary": "Get an evaluation", - "description": "Get an evaluation by ID.", + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/model-versions/delete-tag": { + "delete": { + "operationId": "ModelVersions_deleteTag", + "description": "Delete an MLflow model-version tag.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -5218,7 +5248,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Eval" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5235,22 +5265,54 @@ } }, "tags": [ - "Evals" - ] - }, - "post": { - "operationId": "Evals_updateEval", - "summary": "Update an evaluation", - "description": "Update certain properties of an evaluation.", + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/model-versions/get": { + "get": { + "operationId": "ModelVersions_get", + "description": "Get an MLflow model version.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "name", + "in": "query", + "required": false, + "description": "Registered model name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "version", + "in": "query", + "required": false, + "description": "Model version.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to update.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -5259,7 +5321,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Eval" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5276,89 +5338,189 @@ } }, "tags": [ - "Evals" + "MLflow Model Versions" + ] + } + }, + "/mlflow/api/2.0/mlflow/model-versions/get-download-uri": { + "get": { + "operationId": "ModelVersions_getDownloadUri", + "description": "Get an MLflow model version download URI.", + "parameters": [ + { + "name": "name", + "in": "query", + "required": false, + "description": "Registered model name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "version", + "in": "query", + "required": false, + "description": "Model version.", + "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 + } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateEvalParametersBody" + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } } } } - } + }, + "tags": [ + "MLflow Model Versions" + ] } }, - "/openai/v1/evals/{eval_id}/runs": { + "/mlflow/api/2.0/mlflow/model-versions/get-storage-location-uri": { "get": { - "operationId": "Evals_listRuns", - "summary": "Get a list of runs for an evaluation", - "description": "Get a list of runs for an evaluation.", + "operationId": "ModelVersions_getStorageLocationUri", + "description": "Get an MLflow model version storage location URI.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "name", + "in": "query", + "required": false, + "description": "Registered model name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "version", + "in": "query", + "required": false, + "description": "Model version.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to retrieve runs for.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Model Versions" + ] + } + }, + "/mlflow/api/2.0/mlflow/model-versions/search": { + "get": { + "operationId": "ModelVersions_search", + "description": "Search MLflow model versions.", + "parameters": [ { - "name": "after", + "name": "max_results", "in": "query", "required": false, - "description": "Identifier for the last run from the previous pagination request.", + "description": "Maximum number of items to return.", "schema": { - "type": "string" + "type": "integer", + "format": "int32" }, "explode": false }, { - "name": "limit", + "name": "page_token", "in": "query", "required": false, - "description": "Number of runs to retrieve.", + "description": "Token used to retrieve the next page of results.", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "default": 20 + "type": "string" }, "explode": false }, { - "name": "order", + "name": "filter", "in": "query", "required": false, - "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "description": "Model version search filter.", "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "asc" + "type": "string" }, "explode": false }, { - "name": "status", + "name": "order_by", "in": "query", "required": false, - "description": "Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` | `canceled`.", + "description": "Model version ordering expression.", "schema": { - "type": "string", - "enum": [ - "queued", - "in_progress", - "completed", - "canceled", - "failed" - ] + "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 } @@ -5369,33 +5531,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5412,21 +5548,22 @@ } }, "tags": [ - "Evals" + "MLflow Model Versions" ] }, "post": { - "operationId": "Evals_createEvalRun", - "summary": "Create evaluation run", + "operationId": "ModelVersions_searchWithFilter", + "description": "Search MLflow model versions with search options in the request body.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to create a run for.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -5435,7 +5572,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalRun" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5452,43 +5589,34 @@ } }, "tags": [ - "Evals" + "MLflow Model Versions" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEvalRunRequest" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } } }, - "/openai/v1/evals/{eval_id}/runs/{run_id}": { - "delete": { - "operationId": "Evals_deleteEvalRun", - "summary": "Delete evaluation run", - "description": "Delete an eval run.", + "/mlflow/api/2.0/mlflow/model-versions/set-tag": { + "post": { + "operationId": "ModelVersions_setTag", + "description": "Set an MLflow model-version tag.", "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", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the run to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -5497,7 +5625,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteEvalRunResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5514,31 +5642,34 @@ } }, "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" + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } } - }, + } + } + } + }, + "/mlflow/api/2.0/mlflow/model-versions/transition-stage": { + "post": { + "operationId": "ModelVersions_transitionStage", + "description": "Transition an MLflow model version stage.", + "parameters": [ { - "name": "run_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the run to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -5547,7 +5678,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalRun" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5564,31 +5695,34 @@ } }, "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" + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } } - }, + } + } + } + }, + "/mlflow/api/2.0/mlflow/model-versions/update": { + "patch": { + "operationId": "ModelVersions_update", + "description": "Update an MLflow model version.", + "parameters": [ { - "name": "run_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the run to cancel.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -5597,7 +5731,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalRun" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5614,85 +5748,34 @@ } }, "tags": [ - "Evals" - ] + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/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.", + "/mlflow/api/2.0/mlflow/registered-models/create": { + "post": { + "operationId": "RegisteredModels_create", + "description": "Create an MLflow registered model.", "parameters": [ { - "name": "eval_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "run_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the run to retrieve output items for.", + "description": "The API version to use for this operation.", "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": { @@ -5701,33 +5784,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5744,42 +5801,34 @@ } }, "tags": [ - "Evals" - ] + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/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.", + "/mlflow/api/2.0/mlflow/registered-models/delete": { + "delete": { + "operationId": "RegisteredModels_delete", + "description": "Delete an MLflow registered model.", "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", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the output item to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -5788,7 +5837,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalRunOutputItem" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5805,14 +5854,24 @@ } }, "tags": [ - "Evals" - ] + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/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)", + "/mlflow/api/2.0/mlflow/registered-models/delete-tag": { + "delete": { + "operationId": "RegisteredModels_deleteTag", + "description": "Delete an MLflow registered-model tag.", "parameters": [ { "name": "api-version", @@ -5831,7 +5890,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5848,45 +5907,35 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequest" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } - }, + } + }, + "/mlflow/api/2.0/mlflow/registered-models/get": { "get": { - "operationId": "listPaginatedFineTuningJobs", - "description": "List your organization's fine-tuning jobs", + "operationId": "RegisteredModels_get", + "description": "Get an MLflow registered model.", "parameters": [ { - "name": "after", + "name": "name", "in": "query", "required": false, - "description": "Identifier for the last job from the previous pagination request.", + "description": "Registered model name.", "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", @@ -5904,7 +5953,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ListPaginatedFineTuningJobsResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5921,23 +5970,37 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ] } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}": { + "/mlflow/api/2.0/mlflow/registered-models/get-latest-versions": { "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)", + "operationId": "RegisteredModels_getLatestVersions", + "description": "Get latest versions for an MLflow registered model.", "parameters": [ { - "name": "fine_tuning_job_id", - "in": "path", - "required": true, - "description": "The ID of the fine-tuning job.", + "name": "name", + "in": "query", + "required": false, + "description": "Registered model name.", "schema": { "type": "string" - } + }, + "explode": false + }, + { + "name": "stages", + "in": "query", + "required": false, + "description": "Model version stages to include.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false }, { "name": "api-version", @@ -5956,7 +6019,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -5973,24 +6036,13 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ] - } - }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel": { + }, "post": { - "operationId": "cancelFineTuningJob", - "description": "Immediately cancel a fine-tune job.", + "operationId": "RegisteredModels_getLatestVersionsNameInBody", + "description": "Get latest versions for an MLflow registered model with the model name in the request body.", "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", @@ -6008,7 +6060,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -6025,43 +6077,43 @@ } }, "tags": [ - "Fine-Tuning" - ] + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints": { + "/mlflow/api/2.0/mlflow/registered-models/list": { "get": { - "operationId": "listFineTuningJobCheckpoints", - "description": "List checkpoints for a fine-tuning job.", + "operationId": "RegisteredModels_list", + "description": "List MLflow registered models.", "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", + "name": "max_results", "in": "query", "required": false, - "description": "Identifier for the last checkpoint ID from the previous pagination request.", + "description": "Maximum number of items to return.", "schema": { - "type": "string" + "type": "integer", + "format": "int32" }, "explode": false }, { - "name": "limit", + "name": "page_token", "in": "query", "required": false, - "description": "Number of checkpoints to retrieve.", + "description": "Token used to retrieve the next page of results.", "schema": { - "type": "integer", - "format": "int32", - "default": 10 + "type": "string" }, "explode": false }, @@ -6082,7 +6134,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ListFineTuningJobCheckpointsResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -6099,43 +6151,96 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ] } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/events": { - "get": { - "operationId": "listFineTuningJobEvents", - "description": "Get fine-grained status updates for a fine-tuning job.", + "/mlflow/api/2.0/mlflow/registered-models/rename": { + "post": { + "operationId": "RegisteredModels_rename", + "description": "Rename an MLflow registered model.", "parameters": [ { - "name": "fine_tuning_job_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the fine-tuning job to get events for.", + "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/Mlflow.MlflowResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } } + } + } + } + }, + "/mlflow/api/2.0/mlflow/registered-models/search": { + "get": { + "operationId": "RegisteredModels_search", + "description": "Search MLflow registered models.", + "parameters": [ + { + "name": "max_results", + "in": "query", + "required": false, + "description": "Maximum number of items to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "explode": false }, { - "name": "after", + "name": "page_token", "in": "query", "required": false, - "description": "Identifier for the last event from the previous pagination request.", + "description": "Token used to retrieve the next page of results.", "schema": { "type": "string" }, "explode": false }, { - "name": "limit", + "name": "filter", "in": "query", "required": false, - "description": "Number of events to retrieve.", + "description": "Registered model search filter.", "schema": { - "type": "integer", - "format": "int32", - "default": 20 + "type": "string" }, "explode": false }, @@ -6156,7 +6261,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ListFineTuningJobEventsResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -6173,24 +6278,68 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ] } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/pause": { + "/mlflow/api/2.0/mlflow/registered-models/set-tag": { "post": { - "operationId": "pauseFineTuningJob", - "description": "Pause a running fine-tune job.", + "operationId": "RegisteredModels_setTag", + "description": "Set an MLflow registered-model tag.", "parameters": [ { - "name": "fine_tuning_job_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the fine-tuning job to pause.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/registered-models/update": { + "patch": { + "operationId": "RegisteredModels_update", + "description": "Update an MLflow registered model.", + "parameters": [ { "name": "api-version", "in": "query", @@ -6208,7 +6357,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -6225,24 +6374,78 @@ } }, "tags": [ - "Fine-Tuning" - ] + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/resume": { + "/mlflow/api/2.0/mlflow/runs/create": { "post": { - "operationId": "resumeFineTuningJob", - "description": "Resume a paused fine-tune job.", + "operationId": "Runs_create", + "description": "Create an MLflow run.", "parameters": [ { - "name": "fine_tuning_job_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the fine-tuning job to resume.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/runs/delete": { + "post": { + "operationId": "Runs_delete", + "description": "Delete an MLflow run.", + "parameters": [ { "name": "api-version", "in": "query", @@ -6260,7 +6463,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -6277,27 +6480,43 @@ } }, "tags": [ - "Fine-Tuning" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/responses": { + "/mlflow/api/2.0/mlflow/runs/delete-tag": { "post": { - "operationId": "createResponse_createResponseStream", - "parameters": [], - "description": "Creates a model response. Creates a model response (streaming response).", + "operationId": "Runs_deleteTag", + "description": "Delete an MLflow run tag.", + "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.Response" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CreateResponseStreamingResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -6314,491 +6533,50 @@ } }, "tags": [ - "Responses" + "MLflow Runs" ], "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." - } - } - } - ] + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } - }, + } + }, + "/mlflow/api/2.0/mlflow/runs/get": { "get": { - "operationId": "listResponses", - "description": "Returns the list of all responses.", + "operationId": "Runs_get", + "description": "Get an MLflow run.", "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", + "name": "run_id", "in": "query", "required": false, - "description": "Filter by agent name. If provided, only items associated with the specified agent will be returned.", + "description": "MLflow run identifier.", "schema": { "type": "string" }, "explode": false }, { - "name": "agent_id", + "name": "run_uuid", "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.", + "description": "MLflow run UUID.", "schema": { "type": "string" }, "explode": false }, { - "name": "conversation_id", + "name": "api-version", "in": "query", - "required": false, - "description": "Filter by conversation ID. If provided, only responses associated with the specified conversation will be returned.", + "required": true, + "description": "The API version to use for this operation.", "schema": { "type": "string" }, @@ -6811,33 +6589,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -6854,22 +6606,33 @@ } }, "tags": [ - "Responses" + "MLflow Runs" ] } }, - "/openai/v1/responses/compact": { + "/mlflow/api/2.0/mlflow/runs/log-batch": { "post": { - "operationId": "compactResponseConversation", - "description": "Produces a compaction of a responses conversation.", - "parameters": [], + "operationId": "Runs_logBatch", + "description": "Log a batch of metrics, parameters, and tags to an MLflow run.", + "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.CompactResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -6886,89 +6649,43 @@ } }, "tags": [ - "Responses" + "MLflow Runs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.CompactResponseMethodPublicBody" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } } }, - "/openai/v1/responses/{response_id}": { - "get": { - "operationId": "getResponse_getResponseStream", + "/mlflow/api/2.0/mlflow/runs/log-inputs": { + "post": { + "operationId": "Runs_logInputs", + "description": "Log MLflow run input relationships.", "parameters": [ { - "name": "response_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, + "description": "The API version to use for this operation.", "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.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.Response" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CreateResponseStreamingResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -6985,21 +6702,34 @@ } }, "tags": [ - "Responses" - ] - }, - "delete": { - "operationId": "deleteResponse", - "description": "Deletes a model response.", + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/runs/log-metric": { + "post": { + "operationId": "Runs_logMetric", + "description": "Log one metric to an MLflow run.", "parameters": [ { - "name": "response_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the response to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7008,7 +6738,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteResponseResult" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7025,23 +6755,34 @@ } }, "tags": [ - "Responses" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/responses/{response_id}/cancel": { + "/mlflow/api/2.0/mlflow/runs/log-model": { "post": { - "operationId": "cancelResponse", - "description": "Cancels a model response.", + "operationId": "Runs_logModel", + "description": "Log MLflow model metadata.", "parameters": [ { - "name": "response_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the response to cancel.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7050,7 +6791,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.Response" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7067,60 +6808,30 @@ } }, "tags": [ - "Responses" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/responses/{response_id}/input_items": { - "get": { - "operationId": "listInputItems", - "description": "Returns a list of input items for a given response.", + "/mlflow/api/2.0/mlflow/runs/log-parameter": { + "post": { + "operationId": "Runs_logParameter", + "description": "Log one parameter to an MLflow run.", "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", + "name": "api-version", "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.", + "required": true, + "description": "The API version to use for this operation.", "schema": { "type": "string" }, @@ -7133,33 +6844,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7176,29 +6861,34 @@ } }, "tags": [ - "Responses" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/redTeams/runs": { - "get": { - "operationId": "RedTeams_list", - "description": "List a redteam by name.", + "/mlflow/api/2.0/mlflow/runs/restore": { + "post": { + "operationId": "Runs_restore", + "description": "Restore a deleted MLflow run.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "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": [ - "RedTeams=V1Preview" - ] - } + "type": "string" + }, + "explode": false } ], "responses": { @@ -7207,64 +6897,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedRedTeam" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } }, "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": [ - "Redteams" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/redTeams/runs/{name}": { - "get": { - "operationId": "RedTeams_get", - "description": "Get a redteam by name.", + "/mlflow/api/2.0/mlflow/runs/search": { + "post": { + "operationId": "Runs_search", + "description": "Search MLflow runs.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "Identifier of the red team run.", + "description": "The API version to use for this operation.", "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" - ] - } + }, + "explode": false } ], "responses": { @@ -7273,53 +6950,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RedTeam" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } }, "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": [ - "Redteams" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/redTeams/runs:run": { + "/mlflow/api/2.0/mlflow/runs/set-tag": { "post": { - "operationId": "RedTeams_create", - "description": "Creates a redteam run.", + "operationId": "Runs_setTag", + "description": "Set an MLflow run tag.", "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", @@ -7332,12 +6998,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/RedTeam" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7354,60 +7020,34 @@ } }, "tags": [ - "Redteams" + "MLflow Runs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RedTeam" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } - }, - "description": "Redteam to be run" + } } } }, - "/schedules": { - "get": { - "operationId": "Schedules_list", - "description": "List all schedules.", + "/mlflow/api/2.0/mlflow/runs/update": { + "post": { + "operationId": "Runs_update", + "description": "Update MLflow run metadata or status.", "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", + "name": "api-version", "in": "query", - "required": false, - "description": "Filter by the enabled status.", + "required": true, + "description": "The API version to use for this operation.", "schema": { - "type": "boolean" + "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": [ - "Schedules=V1Preview" - ] - } } ], "responses": { @@ -7416,53 +7056,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedSchedule" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } }, "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": [ - "Schedules" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/schedules/{id}": { - "delete": { - "operationId": "Schedules_delete", - "description": "Delete a schedule.", + "/models/operations/{operation_id}/result": { + "get": { + "operationId": "Models_getTrainingOperationResult", + "description": "Poll the result of a managed model training operation.", "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", @@ -7471,66 +7100,28 @@ "schema": { "type": "string", "enum": [ - "Schedules=V1Preview" + "TrainingJobs=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", + "name": "operation_id", "in": "path", "required": true, - "description": "Identifier of the schedule.", + "description": "The managed model training operation identifier.", "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": [ - "Schedules=V1Preview" - ] - } + "type": "string" + }, + "explode": false } ], "responses": { @@ -7539,51 +7130,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Schedule" + "$ref": "#/components/schemas/ModelTrainingOperation" } } } }, "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": [ - "Schedules" + "Models" ] - }, - "put": { - "operationId": "Schedules_createOrUpdate", - "description": "Create or update operation template.", + } + }, + "/models:create_training_job": { + "post": { + "operationId": "Models_createTrainingJob", + "description": "Create a model by running managed model training.", "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", @@ -7592,116 +7164,184 @@ "schema": { "type": "string", "enum": [ - "Schedules=V1Preview" + "TrainingJobs=V1Preview" ] } + }, + { + "name": "Operation-Id", + "in": "header", + "required": false, + "description": "Idempotency key used to safely retry managed model training.", + "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": { + "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": { - "$ref": "#/components/schemas/Schedule" + "type": "string", + "format": "uri" } } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Schedule" + "$ref": "#/components/schemas/ModelTrainingOperation" } } } }, "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": [ - "Schedules" + "Models" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Schedule" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } } }, - "description": "The resource instance." + "description": "The managed model training job to create." } } }, - "/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", + "/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": "Filter by the type of schedule.", + "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/ScheduleTaskType" + "type": "integer", + "format": "int32", + "default": 20 }, "explode": false }, { - "name": "enabled", + "name": "order", "in": "query", "required": false, - "description": "Filter by the enabled status.", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`\nfor descending order.", "schema": { - "type": "boolean" + "$ref": "#/components/schemas/PageOrder" }, "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.", + "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", - "enum": [ - "Schedules=V1Preview" - ] - } + "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": { @@ -7710,80 +7350,156 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedScheduleRun" + "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.", - "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": [ - "Schedules" + "Conversations" ] } }, - "/schedules/{schedule_id}/runs/{run_id}": { - "get": { - "operationId": "Schedules_getRun", - "description": "Get a schedule run by id.", + "/openai/v1/conversations/{conversation_id}": { + "post": { + "operationId": "updateConversation", + "description": "Update a conversation.", "parameters": [ { - "name": "schedule_id", + "name": "conversation_id", "in": "path", "required": true, - "description": "The unique identifier of the schedule.", + "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": "run_id", + "name": "conversation_id", "in": "path", "required": true, - "description": "The unique identifier of the schedule run.", + "description": "The id of the conversation 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": [ - "Schedules=V1Preview" - ] + } + ], + "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": "api-version", - "in": "query", + "name": "conversation_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The id of the conversation to delete.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -7792,7 +7508,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScheduleRun" + "$ref": "#/components/schemas/OpenAI.DeletedConversationResource" } } } @@ -7809,34 +7525,34 @@ } }, "tags": [ - "Schedules" + "Conversations" ] } }, - "/skills": { + "/openai/v1/conversations/{conversation_id}/items": { "post": { - "operationId": "Skills_createSkill", - "description": "Creates a skill.", + "operationId": "createConversationItems", + "description": "Create items in a conversation with the given ID.", "parameters": [ { - "name": "Foundry-Features", - "in": "header", + "name": "conversation_id", + "in": "path", "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "description": "The id of the conversation on which the item needs to be created.", "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] + "type": "string" } }, { - "name": "api-version", + "name": "include", "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "required": false, + "description": "Additional fields to include in the response.\nSee the `include` parameter for listing Conversation items for more information.", "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } }, "explode": false } @@ -7847,7 +7563,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/OpenAI.ConversationItemList" } } } @@ -7864,7 +7580,7 @@ } }, "tags": [ - "Skills" + "Conversations" ], "requestBody": { "required": true, @@ -7873,46 +7589,36 @@ "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" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Item" }, - "description": "Set of key-value pairs associated with the skill." + "maxItems": 20, + "description": "The items to add to the conversation. You may add up to 20 items at a time." } }, "required": [ - "name" + "items" ] } } } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] } }, "get": { - "operationId": "Skills_listSkills", - "description": "Returns the list of all skills.", + "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", @@ -7956,24 +7662,12 @@ "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", + "name": "item_type", "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "required": false, + "description": "Filter by item type. If provided, only items of the specified type will be returned.", "schema": { - "type": "string" + "$ref": "#/components/schemas/OpenAI.ItemType" }, "explode": false } @@ -7993,7 +7687,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/OpenAI.OutputItem" }, "description": "The requested list of items." }, @@ -8027,50 +7721,32 @@ } }, "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } + "Conversations" + ] } }, - "/skills/{skill_name}": { + "/openai/v1/conversations/{conversation_id}/items/{item_id}": { "get": { - "operationId": "Skills_getSkill", - "description": "Retrieves a skill.", + "operationId": "getConversationItem", + "description": "Get a single item from a conversation with the given IDs.", "parameters": [ { - "name": "skill_name", + "name": "conversation_id", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The ID of the conversation that contains the item.", "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", + "name": "item_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The id of the conversation item to retrieve.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -8079,7 +7755,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/OpenAI.OutputItem" } } } @@ -8096,48 +7772,30 @@ } }, "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } + "Conversations" + ] }, - "post": { - "operationId": "Skills_updateSkill", - "description": "Updates an existing skill.", + "delete": { + "operationId": "deleteConversationItem", + "description": "Delete an item from a conversation with the given IDs.", "parameters": [ { - "name": "skill_name", + "name": "conversation_id", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The id of the conversation on which the item needs to be deleted from.", "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", + "name": "item_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The id of the conversation item to delete.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -8146,7 +7804,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/OpenAI.ConversationResource" } } } @@ -8163,77 +7821,69 @@ } }, "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 key-value pairs associated with the skill." - } - } - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - }, - "delete": { - "operationId": "Skills_deleteSkill", - "description": "Deletes a skill.", + "Conversations" + ] + } + }, + "/openai/v1/evals": { + "get": { + "operationId": "Evals_listEvals", + "summary": "List all evaluations", + "description": "List evaluations for a project.", "parameters": [ { - "name": "skill_name", - "in": "path", - "required": true, - "description": "The unique name of the skill.", + "name": "after", + "in": "query", + "required": false, + "description": "Identifier for the last run from the previous pagination request.", "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.", + "name": "limit", + "in": "query", + "required": false, + "description": "Number of runs to retrieve.", "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "default": 20 + }, + "explode": false }, { - "name": "api-version", + "name": "order", "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "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" + "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": { @@ -8242,7 +7892,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSkillResponse" + "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." } } } @@ -8259,60 +7935,74 @@ } }, "tags": [ - "Skills" + "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" ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEvalRequest" + } + } + } } } }, - "/skills/{skill_name}:download": { - "get": { - "operationId": "Skills_downloadSkill", - "description": "Downloads a skill package.", + "/openai/v1/evals/{eval_id}": { + "delete": { + "operationId": "Evals_deleteEval", + "summary": "Delete an evaluation", + "description": "Delete an evaluation.", "parameters": [ { - "name": "skill_name", + "name": "eval_id", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The ID of the evaluation 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 response body for downloading a skill package.", + "description": "The request has succeeded.", "content": { - "application/gzip": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/DeleteEvalResponse" } } } @@ -8329,41 +8019,22 @@ } }, "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/skills:import": { - "post": { - "operationId": "Skills_createSkillFromPackage", - "description": "Creates a skill from a GZip package.", + "Evals" + ] + }, + "get": { + "operationId": "Evals_getEval", + "summary": "Get an evaluation", + "description": "Get an evaluation by ID.", "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", + "name": "eval_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The ID of the evaluation to retrieve.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -8372,7 +8043,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/Eval" } } } @@ -8389,53 +8060,22 @@ } }, "tags": [ - "Skills" - ], - "requestBody": { - "required": true, - "content": { - "application/gzip": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "description": "The GZip package used to create the skill." - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/toolsets": { + "Evals" + ] + }, "post": { - "operationId": "createToolset", - "description": "Create a toolset.", + "operationId": "Evals_updateEval", + "summary": "Update an evaluation", + "description": "Update certain properties of an evaluation.", "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": [ - "Toolsets=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", + "name": "eval_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The ID of the evaluation to update.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -8444,7 +8084,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolsetObject" + "$ref": "#/components/schemas/Eval" } } } @@ -8461,119 +8101,89 @@ } }, "tags": [ - "Toolsets" + "Evals" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the toolset." - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolset." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the toolset." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools to include in the toolset." - } - }, - "required": [ - "name", - "tools" - ] + "$ref": "#/components/schemas/UpdateEvalParametersBody" } } } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" - ] } - }, + } + }, + "/openai/v1/evals/{eval_id}/runs": { "get": { - "operationId": "listToolsets", - "description": "List all toolsets.", + "operationId": "Evals_listRuns", + "summary": "Get a list of runs for an evaluation", + "description": "Get a list of runs for an evaluation.", "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.", + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to retrieve runs for.", "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false + "type": "string" + } }, { - "name": "order", + "name": "after", "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": "Identifier for the last run from the previous pagination request.", "schema": { - "$ref": "#/components/schemas/PageOrder" + "type": "string" }, "explode": false }, { - "name": "after", + "name": "limit", "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": "Number of runs to retrieve.", "schema": { - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "default": 20 }, "explode": false }, { - "name": "before", + "name": "order", "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.", + "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", "schema": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" }, "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.", + "name": "status", + "in": "query", + "required": false, + "description": "Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` | `canceled`.", "schema": { "type": "string", "enum": [ - "Toolsets=V1Preview" + "queued", + "in_progress", + "completed", + "canceled", + "failed" ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" }, "explode": false } @@ -8593,7 +8203,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ToolsetObject" + "$ref": "#/components/schemas/EvalRun" }, "description": "The requested list of items." }, @@ -8627,50 +8237,21 @@ } }, "tags": [ - "Toolsets" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" - ] - } - } - }, - "/toolsets/{tool_set_name}": { + "Evals" + ] + }, "post": { - "operationId": "updateToolset", - "description": "Update a toolset.", + "operationId": "Evals_createEvalRun", + "summary": "Create evaluation run", "parameters": [ { - "name": "tool_set_name", + "name": "eval_id", "in": "path", "required": true, - "description": "The name of the toolset to update.", + "description": "The ID of the evaluation to create a run 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": [ - "Toolsets=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false } ], "responses": { @@ -8679,7 +8260,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolsetObject" + "$ref": "#/components/schemas/EvalRun" } } } @@ -8696,82 +8277,43 @@ } }, "tags": [ - "Toolsets" + "Evals" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolset." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the toolset." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools to include in the toolset." - } - }, - "required": [ - "tools" - ] + "$ref": "#/components/schemas/CreateEvalRunRequest" } } } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" - ] } - }, - "get": { - "operationId": "getToolset", - "description": "Retrieve a toolset.", + } + }, + "/openai/v1/evals/{eval_id}/runs/{run_id}": { + "delete": { + "operationId": "Evals_deleteEvalRun", + "summary": "Delete evaluation run", + "description": "Delete an eval run.", "parameters": [ { - "name": "tool_set_name", + "name": "eval_id", "in": "path", "required": true, - "description": "The name of the toolset to retrieve.", + "description": "The ID of the evaluation to delete the run from.", "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": [ - "Toolsets=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", + "name": "run_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The ID of the run to delete.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -8780,7 +8322,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolsetObject" + "$ref": "#/components/schemas/DeleteEvalRunResponse" } } } @@ -8797,38 +8339,378 @@ } }, "tags": [ - "Toolsets" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" - ] - } + "Evals" + ] }, - "delete": { - "operationId": "deleteToolset", - "description": "Delete a toolset.", + "get": { + "operationId": "Evals_getEvalRun", + "summary": "Get an evaluation run", + "description": "Get an evaluation run by ID.", "parameters": [ { - "name": "tool_set_name", + "name": "eval_id", "in": "path", "required": true, - "description": "The name of the toolset to delete.", + "description": "The ID of the evaluation to retrieve runs for.", "schema": { "type": "string" } }, { - "name": "Foundry-Features", - "in": "header", + "name": "run_id", + "in": "path", "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "description": "The ID of the run to retrieve.", "schema": { - "type": "string", - "enum": [ - "Toolsets=V1Preview" - ] + "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", @@ -8847,79 +8729,7914 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteToolsetResponse" + "$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.", + "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.", + "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.", + "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.", + "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.", + "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": { + "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": { + "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 key-value pairs associated with the skill." + } + }, + "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/{skill_name}": { + "get": { + "operationId": "Skills_getSkill", + "description": "Retrieves a skill.", + "parameters": [ + { + "name": "skill_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": "skill_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 key-value pairs associated with the skill." + } + } + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + }, + "delete": { + "operationId": "Skills_deleteSkill", + "description": "Deletes a skill.", + "parameters": [ + { + "name": "skill_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/{skill_name}:download": { + "get": { + "operationId": "Skills_downloadSkill", + "description": "Downloads a skill package.", + "parameters": [ + { + "name": "skill_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/gzip": { + "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 GZip 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": { + "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/gzip": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "description": "The GZip package used to create the skill." + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + } + }, + "/toolsets": { + "post": { + "operationId": "createToolset", + "description": "Create a toolset.", + "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": [ + "Toolsets=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/ToolsetObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolsets" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "description": "The name of the toolset." + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the toolset." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the toolset." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "The list of tools to include in the toolset." + } + }, + "required": [ + "name", + "tools" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + }, + "get": { + "operationId": "listToolsets", + "description": "List all toolsets.", + "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": [ + "Toolsets=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/ToolsetObject" + }, + "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": [ + "Toolsets" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + } + }, + "/toolsets/{tool_set_name}": { + "post": { + "operationId": "updateToolset", + "description": "Update a toolset.", + "parameters": [ + { + "name": "tool_set_name", + "in": "path", + "required": true, + "description": "The name of the toolset to 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": [ + "Toolsets=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/ToolsetObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolsets" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the toolset." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the toolset." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "The list of tools to include in the toolset." + } + }, + "required": [ + "tools" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + }, + "get": { + "operationId": "getToolset", + "description": "Retrieve a toolset.", + "parameters": [ + { + "name": "tool_set_name", + "in": "path", + "required": true, + "description": "The name of the toolset 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": [ + "Toolsets=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/ToolsetObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolsets" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + }, + "delete": { + "operationId": "deleteToolset", + "description": "Delete a toolset.", + "parameters": [ + { + "name": "tool_set_name", + "in": "path", + "required": true, + "description": "The name of the toolset 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": [ + "Toolsets=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/DeleteToolsetResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolsets" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + } + }, + "/training_jobs": { + "get": { + "operationId": "TrainingJobs_list", + "description": "List training jobs.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_type", + "in": "query", + "required": false, + "description": "Filter by job type (e.g. 'Command').", + "schema": { + "$ref": "#/components/schemas/JobType" + }, + "explode": false + }, + { + "name": "tag", + "in": "query", + "required": false, + "description": "Filter jobs by tag in the format 'key=value' (e.g., 'framework=pytorch').", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "list_view_type", + "in": "query", + "required": false, + "description": "Specifies which view type to apply when listing jobs.", + "schema": { + "$ref": "#/components/schemas/ListViewType" + }, + "explode": false + }, + { + "name": "properties", + "in": "query", + "required": false, + "description": "Comma-separated user property names and optionally values. Example: prop1,prop2=value2.", + "schema": { + "type": "string" + }, + "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": "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": "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": "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/Job" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + }, + "post": { + "operationId": "TrainingJobs_create", + "description": "Create and execute a model training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "Operation-Id", + "in": "header", + "required": false, + "description": "Idempotency key used to safely retry job creation.", + "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/Job" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobCreate" + } + } + }, + "description": "The training job to create." + } + } + }, + "/training_jobs/operations/{operation_id}/result": { + "get": { + "operationId": "TrainingJobOperations_getOperationResult", + "description": "Poll the result of an asynchronous training job operation.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "operation_id", + "in": "path", + "required": true, + "description": "The operation identifier returned by a training job create, cancel, or delete request.", + "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/JobOperationResource" + } + } + } + }, + "202": { + "description": "Response returned when a training job operation is still in progress.", + "headers": { + "Location": { + "required": false, + "description": "URL to poll for the operation result.", + "schema": { + "type": "string" + } + }, + "Operation-Location": { + "required": false, + "description": "URL to poll for the operation status.", + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/operations/{operation_id}/status": { + "get": { + "operationId": "TrainingJobOperations_getOperationStatus", + "description": "Poll the status of an asynchronous training job operation.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "operation_id", + "in": "path", + "required": true, + "description": "The operation identifier returned by a training job create, cancel, or delete request.", + "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/JobOperationResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}": { + "get": { + "operationId": "TrainingJobs_get", + "description": "Get a training job by name.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "include", + "in": "query", + "required": false, + "description": "Additional related data to include in the response. Values are comma-separated expansion names such as latest_attempt, input_datasets, output_datasets, execution_definition, services, log_files, and job_cost.", + "schema": { + "$ref": "#/components/schemas/TrainingJobInclude" + }, + "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/Job" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + }, + "delete": { + "operationId": "TrainingJobs_beginDelete", + "description": "Delete a training job by name. Returns 202 Accepted with Location and Operation-Location headers to poll for completion, or 204 if the job does not exist.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "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": "Response returned when a job delete operation is accepted asynchronously.", + "headers": { + "Location": { + "required": true, + "description": "URL to poll for the final result of the delete operation.", + "schema": { + "type": "string" + } + }, + "Operation-Location": { + "required": false, + "description": "URL to poll for the status of the delete operation.", + "schema": { + "type": "string" + } + }, + "Retry-After": { + "required": false, + "description": "Suggested delay in seconds before polling.", + "schema": { + "type": "integer", + "format": "int32" + } + } + } + }, + "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": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts": { + "get": { + "operationId": "TrainingJobAttempts_listAttempts", + "description": "List attempts for a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "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": "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/JobAttempt" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}": { + "get": { + "operationId": "TrainingJobAttempts_getAttempt", + "description": "Get one attempt for a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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/JobAttempt" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_listAttemptArtifacts", + "description": "List artifacts for a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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": "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": "path_prefix", + "in": "query", + "required": false, + "description": "Artifact path prefix to 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/JobArtifact" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/content": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_downloadAttemptArtifact", + "description": "Download artifact content from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The artifact path.", + "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": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/content_info": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_getAttemptArtifactContentInfo", + "description": "Get download information for an artifact from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The artifact path.", + "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/JobArtifactContentInfo" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/content_info_by_prefix": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_getAttemptArtifactContentInfoByPrefix", + "description": "List download information for artifacts under a path prefix from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "path_prefix", + "in": "query", + "required": false, + "description": "Artifact path prefix to list download information for. If omitted, download information is returned for the artifact root.", + "schema": { + "type": "string" + }, + "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": "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/JobArtifactContentInfo" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/metadata": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_getAttemptArtifactMetadata", + "description": "Get metadata for an artifact from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The artifact path.", + "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/JobArtifact" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics": { + "get": { + "operationId": "TrainingJobAttemptMetrics_listAttemptMetrics", + "description": "List metrics emitted by a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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": "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": "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/JobMetric" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/last_values": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetricLastValues", + "description": "Get latest metric values for a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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/JobMetricLastValue" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetric", + "description": "Get the full history for a metric from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "metric_name", + "in": "path", + "required": true, + "description": "The metric name.", + "schema": { + "type": "string" + } + }, + { + "name": "started_at", + "in": "query", + "required": false, + "description": "Start of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "ended_at", + "in": "query", + "required": false, + "description": "End of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "min_step", + "in": "query", + "required": false, + "description": "Minimum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "max_step", + "in": "query", + "required": false, + "description": "Maximum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Maximum number of metric points to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/JobMetricPoint" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}/aggregates": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetricAggregates", + "description": "Get aggregate metric values from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "metric_name", + "in": "path", + "required": true, + "description": "The metric name.", + "schema": { + "type": "string" + } + }, + { + "name": "started_at", + "in": "query", + "required": false, + "description": "Start of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "ended_at", + "in": "query", + "required": false, + "description": "End of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "min_step", + "in": "query", + "required": false, + "description": "Minimum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "max_step", + "in": "query", + "required": false, + "description": "Maximum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Maximum number of metric points to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/JobMetricAggregate" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}/sample": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetricSample", + "description": "Get one sampled value or window from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "metric_name", + "in": "path", + "required": true, + "description": "The metric name.", + "schema": { + "type": "string" + } + }, + { + "name": "started_at", + "in": "query", + "required": false, + "description": "Start of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "ended_at", + "in": "query", + "required": false, + "description": "End of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "min_step", + "in": "query", + "required": false, + "description": "Minimum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "max_step", + "in": "query", + "required": false, + "description": "Maximum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Maximum number of metric points to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/JobMetricSample" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}/samples": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetricSamples", + "description": "Get sampled metric values from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "metric_name", + "in": "path", + "required": true, + "description": "The metric name.", + "schema": { + "type": "string" + } + }, + { + "name": "started_at", + "in": "query", + "required": false, + "description": "Start of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "ended_at", + "in": "query", + "required": false, + "description": "End of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "min_step", + "in": "query", + "required": false, + "description": "Minimum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "max_step", + "in": "query", + "required": false, + "description": "Maximum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Maximum number of metric points to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/JobMetricSample" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/outputs": { + "get": { + "operationId": "TrainingJobAttemptOutputs_listAttemptOutputs", + "description": "List outputs produced by a specific training job attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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/JobOutputReference" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/outputs/{output_name}": { + "get": { + "operationId": "TrainingJobAttemptOutputs_getAttemptOutput", + "description": "Get one output produced by a specific training job attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "output_name", + "in": "path", + "required": true, + "description": "The output name.", + "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/JobOutputReference" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/outputs": { + "get": { + "operationId": "TrainingJobOutputs_listOutputs", + "description": "List outputs produced by a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "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": { + "type": "object", + "required": [ + "data", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobOutputReference" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/outputs/{output_name}": { + "get": { + "operationId": "TrainingJobOutputs_getOutput", + "description": "Get one output produced by a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "output_name", + "in": "path", + "required": true, + "description": "The output name.", + "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/JobOutputReference" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/services": { + "get": { + "operationId": "TrainingJobs_showServices", + "description": "List service endpoints for the current view of a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "node_id", + "in": "query", + "required": false, + "description": "Node identifier whose service endpoints should be returned. If omitted, leader-node services are returned.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/TrainingJobServiceCollection" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}:cancel": { + "post": { + "operationId": "TrainingJobs_beginCancel", + "description": "Cancel a training job by name. Returns 200 if cancelled immediately, or 202 Accepted with Location and Operation-Location headers to poll for completion.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "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." + }, + "202": { + "description": "Response returned when a job cancel operation is accepted asynchronously.", + "headers": { + "Location": { + "required": true, + "description": "URL to poll for the final result of the cancel operation.", + "schema": { + "type": "string" + } + }, + "Operation-Location": { + "required": false, + "description": "URL to poll for the status of the cancel operation.", + "schema": { + "type": "string" + } + }, + "Retry-After": { + "required": false, + "description": "Suggested delay in seconds before polling.", + "schema": { + "type": "integer", + "format": "int32" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "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 + } + }, + "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." + }, + "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." + }, + "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." + }, + "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": { + "prompt": "#/components/schemas/PromptAgentDefinition", + "workflow": "#/components/schemas/WorkflowAgentDefinition", + "hosted": "#/components/schemas/HostedAgentDefinition" + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview" + ] + } + }, + "AgentDefinitionOptInKeys": { + "type": "string", + "enum": [ + "HostedAgents=V1Preview", + "WorkflowAgents=V1Preview" + ], + "description": "Opt-in keys for defining preview Hosted or Workflow Agents." + }, + "AgentKind": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "prompt", + "hosted", + "workflow" + ] + } + ] + }, + "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." + } + } + }, + "AgentProtocol": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "activity_protocol", + "responses" + ] + } + ] + }, + "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." + } + } + }, + "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": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (seconds) when the agent was created." + }, + "definition": { + "$ref": "#/components/schemas/AgentDefinition" + } + } + }, + "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" + }, + "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." + }, + "AssetTypes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "uri_file", + "uri_folder", + "safetensors_model", + "literal" + ] + } + ], + "description": "Type of job input/output 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": { + "allOf": [ + { + "$ref": "#/components/schemas/BenchmarkName" + } + ], + "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" + } + ] + }, + "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/ModelSamplingParamsUpdate" + } + ], + "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": { + "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." + }, + "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." + }, + "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/TargetConfig" + } + ], + "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" + }, + "BaseModelReferenceConfiguration": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "base_model" + ], + "description": "Reference policy kind, always 'base_model'." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Use the submitted base model as the reference policy." + }, + "BenchmarkName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "builtin.gpqa_diamond", + "builtin.bbeh", + "builtin.bigbenchhard", + "builtin.frontierscience", + "builtin.musr", + "builtin.truthful_qa", + "builtin.inspect_ai.gpqa_diamond", + "builtin.inspect_ai.chembench", + "builtin.inspect_ai.aime_2025", + "builtin.inspect_ai.musr" + ] + } + ], + "description": "The set of available benchmark specifications." + }, + "BingCustomSearchConfiguration": { + "type": "object", + "required": [ + "project_connection_id", + "instance_name" + ], + "properties": { + "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." + }, + "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": { + "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." + }, + "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": { + "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." + }, + "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": { + "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." + }, + "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." }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolCallStatus" } - } + ], + "description": "The status of the tool call." } }, - "tags": [ - "Toolsets" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" - ] - } - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "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" - } + "description": "The output of a Bing grounding tool call." }, - "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 + "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." + } }, - "explode": false - } - }, - "schemas": { - "A2APreviewTool": { + "description": "Blob reference details." + }, + "BrowserAutomationPreviewTool": { "type": "object", "required": [ - "type" + "type", + "browser_automation_preview" ], "properties": { "type": { "type": "string", "enum": [ - "a2a_preview" + "browser_automation_preview" ], - "description": "The type of the tool. Always `\"a2a_preview`." + "description": "The object type, which is always 'browser_automation_preview'." }, "name": { "type": "string", @@ -8929,18 +16646,13 @@ "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." + "browser_automation_preview": { + "allOf": [ + { + "$ref": "#/components/schemas/BrowserAutomationToolParameters" + } + ], + "description": "The Browser Automation Tool parameters." } }, "allOf": [ @@ -8948,14 +16660,13 @@ "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "An agent implementing the A2A protocol." + "description": "The input definition information for a Browser Automation Tool, as used to configure an Agent." }, - "A2AToolCall": { + "BrowserAutomationToolCall": { "type": "object", "required": [ "type", "call_id", - "name", "arguments", "status" ], @@ -8963,17 +16674,13 @@ "type": { "type": "string", "enum": [ - "a2a_preview_call" + "browser_automation_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." @@ -8992,38 +16699,33 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "An A2A (Agent-to-Agent) tool call." + "description": "A browser automation tool call." }, - "A2AToolCallOutput": { + "BrowserAutomationToolCallOutput": { "type": "object", "required": [ "type", "call_id", - "name", "status" ], "properties": { "type": { "type": "string", "enum": [ - "a2a_preview_call_output" + "browser_automation_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." + "description": "The output from the browser automation tool call." }, "status": { "allOf": [ @@ -9039,372 +16741,865 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "The output of an A2A (Agent-to-Agent) tool call." + "description": "The output of a browser automation tool call." }, - "AISearchIndexResource": { + "BrowserAutomationToolConnectionParameters": { "type": "object", + "required": [ + "project_connection_id" + ], "properties": { - "project_connection_id": { + "name": { "type": "string", - "description": "An index connection ID in an IndexResource attached to this agent." + "description": "Optional user-defined name for this tool or configuration." }, - "index_name": { + "description": { "type": "string", - "description": "The name of an index in an IndexResource attached to this agent." + "description": "Optional user-defined description for this tool or configuration." }, + "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": { "name": { "type": "string", "description": "Optional user-defined name for this tool or configuration." }, - "description": { + "description": { + "type": "string", + "description": "Optional user-defined description for this tool or configuration." + }, + "connection": { + "allOf": [ + { + "$ref": "#/components/schemas/BrowserAutomationToolConnectionParameters" + } + ], + "description": "The project connection parameters associated with the Browser Automation Tool." + } + }, + "description": "Definition of input parameters for the Browser Automation Tool." + }, + "CaptureStructuredOutputsTool": { + "type": "object", + "required": [ + "type", + "outputs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "capture_structured_outputs" + ], + "description": "The type of the tool. Always `capture_structured_outputs`." + }, + "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" + ] + } + }, + "ChatTemplate": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "chatml", + "llama_3", + "zephyr", + "gemma", + "phi_3" + ] + } + ], + "description": "Chat template used to format conversational training data." + }, + "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')" + }, + "image_tag": { + "type": "string", + "description": "The container image tag to use for evaluator code execution" + }, + "blob_uri": { + "type": "string", + "description": "The blob URI for the evaluator storage" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorDefinition" + } + ], + "description": "Code-based evaluator definition using python code" + }, + "CommandJobLimits": { + "type": "object", + "required": [ + "job_limits_type" + ], + "properties": { + "job_limits_type": { + "type": "string", + "enum": [ + "command" + ], + "description": "JobLimit type." + }, + "timeout": { + "type": "string", + "format": "duration", + "description": "The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds." + } + }, + "description": "Command Job limit class." + }, + "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" + }, + "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": "Optional user-defined description for this tool or configuration." + "description": "The source type of the content filter evaluation (e.g., 'prompt', 'response', 'pre_tool_call', 'post_tool_call')." }, - "query_type": { + "content_filter_results": { "allOf": [ { - "$ref": "#/components/schemas/AzureAISearchQueryType" + "$ref": "#/components/schemas/AzureContentFilterResultsForResponses" } ], - "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)." + "description": "The content filter results for this evaluation." }, - "index_asset_id": { + "tool_call_id": { "type": "string", - "description": "Index asset id for search resource." + "description": "The ID of the tool call associated with this content filter result, if applicable." } }, - "description": "A AI Search Index resource." + "description": "A content filter evaluation result for a specific source in the response." }, - "AgentClusterInsightRequest": { + "ContinuousEvaluationRuleAction": { "type": "object", "required": [ "type", - "agentName" + "evalId" ], "properties": { "type": { "type": "string", "enum": [ - "AgentClusterInsight" - ], - "description": "The type of request." + "continuousEvaluation" + ] }, - "agentName": { + "evalId": { "type": "string", - "description": "Identifier for the agent." + "description": "Eval Id to add continuous evaluation runs to." }, - "modelConfiguration": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightModelConfiguration" - } + "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." + }, + "CosmosDBIndex": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "CosmosDBNoSqlVectorStore" ], - "description": "Configuration of the model used in the insight generation." + "description": "Type of index" } }, "allOf": [ { - "$ref": "#/components/schemas/InsightRequest" + "$ref": "#/components/schemas/Index" } ], - "description": "Insights on set of Agent Evaluation Results" + "description": "CosmosDB Vector Store Index Definition" }, - "AgentClusterInsightResult": { + "CosmosDBIndexUpdate": { "type": "object", "required": [ - "type", - "clusterInsight" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "AgentClusterInsight" + "CosmosDBNoSqlVectorStore" ], - "description": "The type of insights result." - }, - "clusterInsight": { - "$ref": "#/components/schemas/ClusterInsightResult" + "description": "Type of index" } }, "allOf": [ { - "$ref": "#/components/schemas/InsightResult" + "$ref": "#/components/schemas/IndexUpdate" } ], - "description": "Insights from the agent cluster analysis." + "description": "CosmosDB Vector Store Index Definition" }, - "AgentDefinition": { + "CpoTrainingConfiguration": { "type": "object", "required": [ - "kind" + "algorithm" ], "properties": { - "kind": { - "$ref": "#/components/schemas/AgentKind" + "algorithm": { + "type": "string", + "enum": [ + "cpo" + ], + "description": "Training algorithm, always 'cpo'." }, - "rai_config": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/RaiConfig" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "Configuration for Responsible AI (RAI) content filtering and safety features." - } - }, - "discriminator": { - "propertyName": "kind", - "mapping": { - "prompt": "#/components/schemas/PromptAgentDefinition", - "workflow": "#/components/schemas/WorkflowAgentDefinition", - "hosted": "#/components/schemas/HostedAgentDefinition" + "description": "LoRA adapter configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview" - ] - } - }, - "AgentDefinitionOptInKeys": { - "type": "string", - "enum": [ - "HostedAgents=V1Preview", - "WorkflowAgents=V1Preview" - ], - "description": "Opt-in keys for defining preview Hosted or Workflow Agents." - }, - "AgentKind": { - "anyOf": [ - { - "type": "string" - }, + "allOf": [ { - "type": "string", - "enum": [ - "prompt", - "hosted", - "workflow" - ] + "$ref": "#/components/schemas/TrainingConfiguration" } - ] + ], + "description": "Contrastive preference optimization training recipe." }, - "AgentObject": { + "CreateAgentFromManifestRequest": { "type": "object", "required": [ - "object", - "id", "name", - "versions" + "manifest_id", + "parameter_values" ], "properties": { - "object": { + "name": { "type": "string", - "enum": [ - "agent" - ], - "description": "The object type, which is always 'agent'." + "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." }, - "id": { + "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", - "description": "The unique identifier of the agent." + "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 name of the agent." + "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." }, - "versions": { + "metadata": { "type": "object", - "properties": { - "latest": { - "$ref": "#/components/schemas/AgentVersionObject" - } + "additionalProperties": { + "type": "string" }, - "required": [ - "latest" + "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 latest version of the agent." + "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" + ] + } } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview" + ] } }, - "AgentProtocol": { - "anyOf": [ - { - "type": "string" + "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", - "enum": [ - "activity_protocol", - "responses" - ] + "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." } - ] + } }, - "AgentReference": { + "CreateAgentVersionRequest": { "type": "object", "required": [ - "type", - "name" + "definition" ], "properties": { - "type": { - "type": "string", - "enum": [ - "agent_reference" - ] + "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" }, - "name": { + "description": { "type": "string", - "maxLength": 256, - "description": "The name of the agent." + "maxLength": 512, + "description": "A human-readable description of the agent." }, - "version": { - "type": "string", - "description": "The version identifier 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" + ] + } } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview" + ] } }, - "AgentTaxonomyInput": { + "CreateEvalRequest": { "type": "object", "required": [ - "type", - "target", - "riskCategories" + "data_source_config", + "testing_criteria" ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "agent" - ], - "description": "Input type of the evaluation taxonomy." + "description": "The name of the evaluation." }, - "target": { + "metadata": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/Target" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "description": "Target configuration for the agent." + "nullable": true }, - "riskCategories": { + "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": { - "$ref": "#/components/schemas/RiskCategory" + "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/EvalGraderAzureAIEvaluator" + }, + { + "$ref": "#/components/schemas/EvalGraderInspectAI" + } + ] }, - "description": "List of risk categories to evaluate against." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTaxonomyInput" - } - ], - "description": "Input configuration for the evaluation taxonomy when the input type is agent." + "title": "CreateEvalRequest" }, - "AgentTaxonomyInputUpdate": { + "CreateEvalRunRequest": { "type": "object", + "required": [ + "data_source" + ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "agent" - ], - "description": "Input type of the evaluation taxonomy." + "description": "The name of the run." }, - "target": { + "metadata": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/TargetUpdate" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "description": "Target configuration for the agent." + "nullable": true }, - "riskCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RiskCategory" + "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": "List of risk categories to evaluate against." + "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." } }, - "allOf": [ + "title": "CreateEvalRunRequest" + }, + "CredentialType": { + "anyOf": [ { - "$ref": "#/components/schemas/EvaluationTaxonomyInputUpdate" + "type": "string" + }, + { + "type": "string", + "enum": [ + "ApiKey", + "AAD", + "SAS", + "CustomKeys", + "None", + "AgenticIdentityToken_Preview" + ] } ], - "description": "Input configuration for the evaluation taxonomy when the input type is agent." + "description": "The credential type used by the connection" }, - "AgentVersionObject": { + "CronTrigger": { "type": "object", "required": [ - "metadata", - "object", - "id", - "name", - "version", - "created_at", - "definition" + "type", + "expression" ], "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": { "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." + "Cron" + ] }, - "version": { + "expression": { "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": "Cron expression that defines the schedule frequency." }, - "description": { + "timeZone": { "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (seconds) when the agent was created." + "description": "Time zone for the cron schedule.", + "default": "UTC" }, - "definition": { - "$ref": "#/components/schemas/AgentDefinition" + "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." }, - "AgenticIdentityPreviewCredentials": { + "CustomCredential": { "type": "object", "required": [ "type" @@ -9413,80 +17608,76 @@ "type": { "type": "string", "enum": [ - "AgenticIdentityToken_Preview" + "CustomKeys" ], "description": "The credential type", "readOnly": true } }, + "additionalProperties": { + "type": "string" + }, "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." + "description": "Custom credential definition" }, - "ApiKeyCredentials": { + "DailyRecurrenceSchedule": { "type": "object", "required": [ - "type" + "type", + "hours" ], "properties": { "type": { "type": "string", "enum": [ - "ApiKey" + "Daily" ], - "description": "The credential type", - "readOnly": true + "description": "Daily recurrence type." }, - "key": { - "type": "string", - "description": "API Key", - "readOnly": true + "hours": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Hours for the recurrence schedule." } }, "allOf": [ { - "$ref": "#/components/schemas/BaseCredentials" + "$ref": "#/components/schemas/RecurrenceSchedule" } ], - "description": "API Key Credential definition" + "description": "Daily recurrence schedule." }, - "AssetCredentialResponse": { + "DataSourceConfig": { "type": "object", "required": [ - "blobReference" + "type", + "schema" ], "properties": { - "blobReference": { - "allOf": [ - { - "$ref": "#/components/schemas/BlobReference" - } - ], - "description": "Credential info to access the storage account." + "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." } }, - "description": "Represents a reference to a blob for consumption" - }, - "AssetId": { - "type": "string", - "description": "Identifier of a saved asset." + "discriminator": { + "propertyName": "type", + "mapping": {} + }, + "description": "Base class for run data sources with discriminator support." }, - "AttackStrategy": { + "DatasetType": { "anyOf": [ { "type": "string" @@ -9494,416 +17685,627 @@ { "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" + "uri_file", + "uri_folder" ] } ], - "description": "Strategies for attacks." + "description": "Enum to determine the type of data." }, - "Azure.Core.Foundations.Error": { + "DatasetVersion": { "type": "object", "required": [ - "code", - "message" + "dataUri", + "type", + "name", + "version" ], "properties": { - "code": { + "dataUri": { "type": "string", - "description": "One of a server-defined set of error codes." + "minLength": 1, + "pattern": "[a-zA-Z0-9_]", + "description": "URI of the data ([example](https://go.microsoft.com/fwlink/?linkid=2202330))" }, - "message": { + "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": "A human-readable representation of the error." + "description": "The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset" }, - "target": { + "id": { "type": "string", - "description": "The target of the error." + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true }, - "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." + "name": { + "type": "string", + "description": "The name of the resource", + "readOnly": true }, - "innererror": { - "allOf": [ - { - "$ref": "#/components/schemas/Azure.Core.Foundations.InnerError" - } - ], - "description": "An object containing more specific information than the current object about the error." + "version": { + "type": "string", + "description": "The version of the resource", + "readOnly": true } }, - "description": "The error object." + "discriminator": { + "propertyName": "type", + "mapping": { + "uri_file": "#/components/schemas/FileDatasetVersion", + "uri_folder": "#/components/schemas/FolderDatasetVersion" + } + }, + "description": "DatasetVersion Definition" }, - "Azure.Core.Foundations.ErrorResponse": { + "DatasetVersionUpdate": { "type": "object", "required": [ - "error" + "type" ], "properties": { - "error": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/Azure.Core.Foundations.Error" + "$ref": "#/components/schemas/DatasetType" } ], - "description": "The error object." - } - }, - "description": "A response containing error details." - }, - "Azure.Core.Foundations.InnerError": { - "type": "object", - "properties": { - "code": { + "description": "Dataset type" + }, + "description": { "type": "string", - "description": "One of a server-defined set of error codes." + "description": "The asset description text." }, - "innererror": { - "allOf": [ - { - "$ref": "#/components/schemas/Azure.Core.Foundations.InnerError" - } - ], - "description": "Inner error." + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." } }, - "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors." + "discriminator": { + "propertyName": "type", + "mapping": { + "uri_file": "#/components/schemas/FileDatasetVersionUpdate", + "uri_folder": "#/components/schemas/FolderDatasetVersionUpdate" + } + }, + "description": "DatasetVersion Definition" }, - "Azure.Core.Foundations.OperationState": { + "DayOfWeek": { "anyOf": [ + { + "type": "string" + }, { "type": "string", "enum": [ - "NotStarted", - "Running", - "Succeeded", - "Failed", - "Canceled" + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" ] - }, - { - "type": "string" } ], - "description": "Enum describing allowed operation states." + "description": "Days of the week for recurrence schedule." }, - "Azure.Core.uuid": { - "type": "string", - "format": "uuid", - "description": "Universally Unique Identifier" + "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" }, - "AzureAIAgentTarget": { + "DeleteAgentVersionResponse": { "type": "object", "required": [ - "type", - "name" + "object", + "name", + "version", + "deleted" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "azure_ai_agent" + "agent.version.deleted" ], - "description": "The type of target, always `azure_ai_agent`." + "description": "The object type. Always 'agent.version.deleted'." }, "name": { "type": "string", - "description": "The unique identifier of the Azure AI agent." + "description": "The name of the agent." }, "version": { "type": "string", - "description": "The version of the Azure AI agent." + "description": "The version identifier of the 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." + "deleted": { + "type": "boolean", + "description": "Whether the agent was successfully deleted." } }, - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } + "description": "A deleted agent version Object" + }, + "DeleteEvalResponse": { + "type": "object", + "required": [ + "object", + "eval_id", + "deleted" ], - "description": "Represents a target specifying an Azure AI agent." + "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" }, - "AzureAIAgentTargetUpdate": { + "DeleteEvalRunResponse": { "type": "object", "properties": { - "type": { + "object": { "type": "string", "enum": [ - "azure_ai_agent" + "eval.deleted" ], - "description": "The type of target, always `azure_ai_agent`." + "description": "The object type. Always 'eval.deleted'." }, - "name": { + "run_id": { "type": "string", - "description": "The unique identifier of the Azure AI agent." + "description": "id of the eval." }, - "version": { + "deleted": { + "type": "boolean", + "description": "Whether the eval was successfully deleted." + } + }, + "description": "A deleted evaluation run Object." + }, + "DeleteMemoryStoreResponse": { + "type": "object", + "required": [ + "object", + "name", + "deleted" + ], + "properties": { + "object": { "type": "string", - "description": "The version of the Azure AI agent." + "enum": [ + "memory_store.deleted" + ], + "description": "The object type. Always 'memory_store.deleted'." }, - "tool_descriptions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ToolDescription" - }, - "description": "The parameters used to control the sampling behavior of the agent during text generation." + "name": { + "type": "string", + "description": "The name of the memory store." + }, + "deleted": { + "type": "boolean", + "description": "Whether the memory store was successfully deleted." } }, - "allOf": [ - { - "$ref": "#/components/schemas/TargetUpdate" + "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": [ + "object", + "name", + "deleted" ], - "description": "Represents a target specifying an Azure AI agent." + "properties": { + "object": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillObjectType" + } + ], + "description": "The object type. Always 'skill.deleted'.", + "default": "skill.deleted" + }, + "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" }, - "AzureAIBenchmarkDataSourceConfig": { + "DeleteToolsetResponse": { "type": "object", "required": [ - "scenario", - "benchmark_name" + "object", + "name", + "deleted" ], "properties": { - "scenario": { + "object": { "type": "string", "enum": [ - "benchmark_preview" + "toolset.deleted" ], - "description": "Data schema scenario, always `benchmark` for benchmark evaluations." + "description": "The object type. Always 'toolset.deleted'." }, - "benchmark_name": { + "name": { + "type": "string", + "description": "The name of the toolset." + }, + "deleted": { + "type": "boolean", + "description": "Whether the toolset was successfully deleted." + } + }, + "description": "Response returned when a toolset is deleted." + }, + "Deployment": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/BenchmarkName" + "$ref": "#/components/schemas/DeploymentType" } ], - "description": "The name of the benchmark specification." + "description": "The type of the deployment" }, - "benchmark_version": { + "name": { "type": "string", - "description": "The version of the benchmark specification (e.g., '0.1'). Latest version if not specified." + "description": "Name of the deployment", + "readOnly": true + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "ModelDeployment": "#/components/schemas/ModelDeployment" + } + }, + "description": "Model Deployment Definition" + }, + "DeploymentType": { + "anyOf": [ + { + "type": "string" }, - "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." + "enum": [ + "ModelDeployment" + ] + } + ] + }, + "DistributionConfiguration": { + "type": "object", + "required": [ + "distribution_type" + ], + "properties": { + "distribution_type": { + "type": "string", + "description": "Specifies the type of distribution framework." } }, - "allOf": [ - { - "$ref": "#/components/schemas/AzureAIDataSourceConfig" + "discriminator": { + "propertyName": "distribution_type", + "mapping": { + "pytorch": "#/components/schemas/PyTorchDistribution", + "mpi": "#/components/schemas/MpiDistribution", + "tensorflow": "#/components/schemas/TensorFlowDistribution", + "ray": "#/components/schemas/RayDistribution" } - ], - "description": "Data source configuration for benchmark evaluations." + }, + "description": "Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null." }, - "AzureAIBenchmarkPreviewEvalRunDataSource": { + "DpoTrainingConfiguration": { "type": "object", "required": [ - "type", - "target" + "algorithm" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "azure_ai_benchmark_preview" + "dpo" ], - "description": "The type of data source, always `azure_ai_benchmark_preview`." + "description": "Training algorithm, always 'dpo'." }, - "input_messages": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "Input messages configuration." + "description": "LoRA adapter configuration." }, - "target": { - "anyOf": [ - { - "$ref": "#/components/schemas/AzureAIModelTarget" - }, + "eval": { + "allOf": [ { - "$ref": "#/components/schemas/AzureAIAgentTarget" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "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." + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "Represents a data source for benchmark evaluation runs." + "description": "Direct preference optimization training recipe." }, - "AzureAIDataSourceConfig": { + "EntraIDCredentials": { "type": "object", "required": [ - "type", - "scenario" + "type" ], "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" + "AAD" ], - "description": "Data schema scenario." - } - }, - "discriminator": { - "propertyName": "scenario", - "mapping": { - "benchmark_preview": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" + "description": "The credential type", + "readOnly": true } }, "allOf": [ { - "$ref": "#/components/schemas/DataSourceConfig" + "$ref": "#/components/schemas/BaseCredentials" } - ] + ], + "description": "Entra ID credential definition" }, - "AzureAIModelTarget": { + "Eval": { "type": "object", "required": [ - "type" + "object", + "id", + "name", + "data_source_config", + "testing_criteria", + "created_at", + "metadata" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "azure_ai_model" + "eval" ], - "description": "The type of target, always `azure_ai_model`." + "description": "The object type.", + "x-stainless-const": true, + "default": "eval" }, - "model": { + "id": { "type": "string", - "description": "The unique identifier of the Azure AI model." + "description": "Unique identifier for the evaluation." }, - "sampling_params": { + "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/EvalGraderAzureAIEvaluator" + }, + { + "$ref": "#/components/schemas/EvalGraderInspectAI" + } + ] + }, + "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/ModelSamplingParams" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "description": "The parameters used to control the sampling behavior of the model during text generation." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Represents a target specifying an Azure AI model for operations requiring model selection." + "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" + } }, - "AzureAIModelTargetUpdate": { + "EvalCsvFileIdSource": { "type": "object", + "required": [ + "type", + "id" + ], "properties": { "type": { "type": "string", "enum": [ - "azure_ai_model" + "file_id" ], - "description": "The type of target, always `azure_ai_model`." + "description": "The type of source, always `file_id`." }, - "model": { + "id": { "type": "string", - "description": "The unique identifier of the Azure AI model." - }, - "sampling_params": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelSamplingParamsUpdate" - } - ], - "description": "The parameters used to control the sampling behavior of the model during text generation." + "description": "The identifier of the uploaded CSV file." } }, - "allOf": [ - { - "$ref": "#/components/schemas/TargetUpdate" - } - ], - "description": "Represents a target specifying an Azure AI model for operations requiring model selection." + "description": "Represents a reference to an uploaded CSV file used as a source for evaluation data." }, - "AzureAIResponsesEvalRunDataSource": { + "EvalCsvRunDataSource": { "type": "object", "required": [ "type", - "item_generation_params", - "max_runs_hourly", - "event_configuration_id" + "source" ], "properties": { "type": { "type": "string", "enum": [ - "azure_ai_responses" + "csv" ], - "description": "The type of data source, always `azure_ai_responses`." + "description": "The type of data source, always `csv`." }, - "item_generation_params": { + "source": { "allOf": [ { - "$ref": "#/components/schemas/ResponseRetrievalItemGenerationParams" + "$ref": "#/components/schemas/EvalCsvFileIdSource" } ], - "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." + "description": "The source of the CSV data, either inline content or a file reference." } }, "allOf": [ @@ -9911,563 +18313,767 @@ "$ref": "#/components/schemas/EvalRunDataSource" } ], - "description": "Represents a data source for evaluation runs that are specific to Continuous Evaluation scenarios." + "description": "Represents a CSV data source for evaluation runs." }, - "AzureAISearchIndex": { + "EvalGraderAzureAIEvaluator": { "type": "object", "required": [ - "type" + "type", + "name", + "evaluator_name" ], "properties": { "type": { "type": "string", "enum": [ - "AzureSearch" + "azure_ai_evaluator" ], - "description": "Type of index" + "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", + "additionalProperties": {}, + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/Index" - } - ], - "description": "Azure AI Search Index Definition" + "title": "AzureAIEvaluatorGrader" }, - "AzureAISearchIndexUpdate": { + "EvalGraderInspectAI": { "type": "object", "required": [ - "type" + "type", + "name", + "task_name" ], "properties": { "type": { "type": "string", "enum": [ - "AzureSearch" + "inspect_ai" ], - "description": "Type of index" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/IndexUpdate" - } - ], - "description": "Azure AI Search Index Definition" - }, - "AzureAISearchQueryType": { - "anyOf": [ - { - "type": "string" + "description": "The object type, which is always `inspect_ai`." }, - { + "name": { "type": "string", - "enum": [ - "simple", - "semantic", - "vector", - "vector_simple_hybrid", - "vector_semantic_hybrid" - ] + "description": "The display name of the benchmark." + }, + "task_name": { + "type": "string", + "description": "The inspect_ai task module path (e.g., `inspect_evals/gpqa_diamond`)." } - ], - "description": "Available query types for Azure AI Search tool." + }, + "description": "Grader inspect_ai definition for inspect_ai benchmark evaluators." }, - "AzureAISearchTool": { + "EvalResult": { "type": "object", "required": [ + "name", "type", - "azure_ai_search" + "score", + "passed" ], "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": "name of the check" }, - "description": { + "type": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "description": "type of the check" }, - "azure_ai_search": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureAISearchToolResource" - } - ], - "description": "The azure ai search index resource." + "score": { + "type": "number", + "format": "float", + "description": "score" + }, + "passed": { + "type": "boolean", + "description": "indicates if the check passed or failed" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for an Azure AI search tool as used to configure an agent." + "description": "Result of the evaluation." }, - "AzureAISearchToolCall": { + "EvalRun": { "type": "object", "required": [ - "type", - "call_id", - "arguments", - "status" + "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": { - "type": { + "object": { "type": "string", "enum": [ - "azure_ai_search_call" - ] + "eval.run" + ], + "description": "The type of the object. Always \"eval.run\".", + "x-stainless-const": true, + "default": "eval.run" }, - "call_id": { + "id": { "type": "string", - "description": "The unique ID of the tool call generated by the model." + "description": "Unique identifier for the evaluation run." }, - "arguments": { + "eval_id": { "type": "string", - "description": "A JSON string of the arguments to pass to the tool." + "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/ToolCallStatus" + "$ref": "#/components/schemas/OpenAI.EvalRunResultCounts" } ], - "description": "The status of the tool call." + "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." + } + }, + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "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_benchmark_preview": "#/components/schemas/AzureAIBenchmarkPreviewEvalRunDataSource" } - ], - "description": "An Azure AI Search tool call." + }, + "description": "Base class for run data sources with discriminator support." }, - "AzureAISearchToolCallOutput": { + "EvalRunOutputItem": { "type": "object", "required": [ - "type", - "call_id", - "status" + "object", + "id", + "run_id", + "eval_id", + "created_at", + "status", + "datasource_item_id", + "datasource_item", + "results", + "sample" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "azure_ai_search_call_output" - ] + "eval.run.output_item" + ], + "description": "The type of the object. Always \"eval.run.output_item\".", + "x-stainless-const": true, + "default": "eval.run.output_item" }, - "call_id": { + "id": { "type": "string", - "description": "The unique ID of the tool call generated by the model." + "description": "Unique identifier for the evaluation run output item." }, - "output": { + "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/ToolCallOutputContent" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The output from the Azure AI Search tool call." + "description": "The identifier for the data source item." }, - "status": { + "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/ToolCallStatus" + "$ref": "#/components/schemas/OpenAI.EvalRunOutputItemSample" } ], - "description": "The status of the tool call." + "description": "A sample containing the input and output of the evaluation run." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of an Azure AI Search tool call." + "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" + } }, - "AzureAISearchToolResource": { + "EvalRunOutputItemResult": { "type": "object", "required": [ - "indexes" + "name", + "score", + "passed" ], "properties": { "name": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "The name of the grader." }, - "description": { + "type": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "description": "The grader type (for example, \"string-check-grader\")." }, - "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." - }, - "AzureContentFilterBlocklistIdResult": { - "type": "object", - "required": [ - "id", - "filtered" - ], - "properties": { - "id": { - "type": "string", - "description": "The ID of the custom blocklist." + "score": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The numeric score produced by the grader." }, - "filtered": { - "type": "boolean", - "description": "Whether the blocklist resulted in filtering." - } - }, - "description": "A content filter blocklist ID result." - }, - "AzureContentFilterBlocklistResult": { - "type": "object", - "required": [ - "filtered" - ], - "properties": { - "filtered": { + "passed": { "type": "boolean", - "description": "Whether any blocklist resulted in filtering." + "description": "Whether the grader considered the output a pass." }, - "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": { + "sample": { + "type": "object", + "additionalProperties": {}, + "nullable": true, + "description": "Optional sample or intermediate data produced by the grader." + }, + "metric": { "type": "string", - "description": "The license associated with the detection." + "description": "The name of the metric (e.g., \"fluency\", \"f1_score\")." }, - "url": { + "label": { "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." + "description": "The label associated with the test criteria metric (e.g., \"pass\", \"fail\", \"good\", \"bad\")." }, - "completion_end_offset": { - "type": "integer", - "format": "int32", - "description": "Offset of the first UTF32 code point which is excluded from the span." + "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." } }, - "description": "A representation of a span of completion text as used by Azure OpenAI content filter results." + "additionalProperties": {}, + "description": "A single grader result for an evaluation run output item.", + "title": "EvalRunOutputItemResult" }, - "AzureContentFilterCompletionTextSpanDetectionResult": { + "EvalRunOutputItemSampleInput": { "type": "object", "required": [ - "filtered", - "detected", - "details" + "role", + "content", + "tool_calls" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." + "role": { + "type": "string" }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." + "content": { + "type": "string" }, - "details": { + "tool_calls": { "type": "array", "items": { - "$ref": "#/components/schemas/AzureContentFilterCompletionTextSpan" + "$ref": "#/components/schemas/CompletionMessageToolCallChunk" }, - "description": "Detailed information about the detected completion text spans." + "description": "Tool calls made within the message, if any." } }, - "description": "A content filter detection result with completion text span details." + "description": "A message in the evaluation run." }, - "AzureContentFilterDetectionResult": { + "EvalRunOutputItemSampleOutput": { "type": "object", "required": [ - "filtered", - "detected" + "tool_calls" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." + "role": { + "type": "string" }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." + "content": { + "type": "string" + }, + "tool_calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CompletionMessageToolCallChunk" + }, + "description": "Tool calls made within the message, if any." } }, - "description": "A content filter result indicating whether the content was detected and filtered." + "description": "A message in the evaluation run." }, - "AzureContentFilterDetectionWithCitationResult": { + "EvalRunResultCompareItem": { "type": "object", "required": [ - "filtered", - "detected" + "treatmentRunId", + "treatmentRunSummary", + "deltaEstimate", + "pValue", + "treatmentEffect" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." + "treatmentRunId": { + "type": "string", + "description": "The treatment run ID." }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." + "treatmentRunSummary": { + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunResultSummary" + } + ], + "description": "Summary statistics of the treatment run." }, - "citation": { + "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/AzureContentFilterCitation" + "$ref": "#/components/schemas/TreatmentEffectType" } ], - "description": "Citation details describing the associated license and its location." + "description": "Type of treatment effect." } }, - "description": "A content filter detection result that includes citation information for protected material." + "description": "Metric comparison for a treatment against the baseline." }, - "AzureContentFilterDetectionWithReasonResult": { + "EvalRunResultComparison": { "type": "object", "required": [ - "filtered", - "detected" + "testingCriteria", + "metric", + "evaluator", + "baselineRunSummary", + "compareItems" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." + "testingCriteria": { + "type": "string", + "description": "Name of the testing criteria." }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." + "metric": { + "type": "string", + "description": "Metric being evaluated." }, - "reason": { + "evaluator": { "type": "string", - "description": "A human-readable explanation of why the detection result was produced." + "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": "A content filter detection result that includes a reason description." + "description": "Comparison results for treatment runs against the baseline." }, - "AzureContentFilterError": { + "EvalRunResultSummary": { "type": "object", "required": [ - "code", - "message" + "runId", + "sampleCount", + "average", + "standardDeviation" ], "properties": { - "code": { + "runId": { + "type": "string", + "description": "The evaluation run ID." + }, + "sampleCount": { "type": "integer", "format": "int32", - "description": "A machine-readable error code." + "description": "Number of samples in the evaluation run." }, - "message": { - "type": "string", - "description": "A human-readable error message." + "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": "Error details from the content filtering system." + "description": "Summary statistics of a metric in an evaluation run." }, - "AzureContentFilterPersonallyIdentifiableInformationResult": { + "EvaluationComparisonInsightRequest": { "type": "object", "required": [ - "filtered", - "detected" + "type", + "evalId", + "baselineRunId", + "treatmentRunIds" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." + "type": { + "type": "string", + "enum": [ + "EvaluationComparison" + ], + "description": "The type of request." }, - "detected": { - "type": "boolean", - "description": "Whether PII was detected in the content." + "evalId": { + "type": "string", + "description": "Identifier for the evaluation." }, - "sub_categories": { + "baselineRunId": { + "type": "string", + "description": "The baseline run ID for comparison." + }, + "treatmentRunIds": { "type": "array", "items": { - "$ref": "#/components/schemas/AzureContentFilterPiiSubCategoryResult" + "type": "string" }, - "description": "Detailed results for individual PII subcategories." + "description": "List of treatment run IDs for comparison." } }, - "description": "A content filter detection result for Personally Identifiable Information." + "allOf": [ + { + "$ref": "#/components/schemas/InsightRequest" + } + ], + "description": "Evaluation Comparison Request" }, - "AzureContentFilterPiiSubCategoryResult": { + "EvaluationComparisonInsightResult": { "type": "object", "required": [ - "sub_category", - "filtered", - "detected" + "type", + "comparisons", + "method" ], "properties": { - "sub_category": { + "type": { "type": "string", - "description": "The PII subcategory that was evaluated." + "enum": [ + "EvaluationComparison" + ], + "description": "The type of insights result." }, - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered for this subcategory." + "comparisons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunResultComparison" + }, + "description": "Comparison results for each treatment run against the baseline." }, - "detected": { - "type": "boolean", - "description": "Whether the subcategory was detected in the content." + "method": { + "type": "string", + "description": "The statistical method used for comparison." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/InsightResult" + } + ], + "description": "Insights from the evaluation comparison." + }, + "EvaluationResultSample": { + "type": "object", + "required": [ + "type", + "evaluationResult" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "EvaluationResultSample" ], - "description": "Results for configured custom blocklists." + "description": "Evaluation Result Sample Type" }, - "jailbreak": { + "evaluationResult": { "allOf": [ { - "$ref": "#/components/schemas/AzureContentFilterDetectionResult" + "$ref": "#/components/schemas/EvalResult" } ], - "description": "Detection result for jailbreak attempts." + "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 }, - "task_adherence": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionWithReasonResult" - } - ], - "description": "Detection result for task adherence evaluation." + "displayName": { + "type": "string", + "description": "Display Name for the evaluation rule." }, - "protected_material_text": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionResult" - } - ], - "description": "Detection result for protected material text." + "description": { + "type": "string", + "description": "Description for the evaluation rule." }, - "protected_material_code": { + "action": { "allOf": [ { - "$ref": "#/components/schemas/AzureContentFilterDetectionWithCitationResult" + "$ref": "#/components/schemas/EvaluationRuleAction" } ], - "description": "Detection result for protected material code with citation." + "description": "Definition of the evaluation rule action.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "Evaluations=V1Preview" + ] + } }, - "ungrounded_material": { + "filter": { "allOf": [ { - "$ref": "#/components/schemas/AzureContentFilterCompletionTextSpanDetectionResult" + "$ref": "#/components/schemas/EvaluationRuleFilter" } ], - "description": "Detection result for ungrounded material with completion text span details." + "description": "Filter condition of the evaluation rule." }, - "personally_identifiable_information": { + "eventType": { "allOf": [ { - "$ref": "#/components/schemas/AzureContentFilterPersonallyIdentifiableInformationResult" + "$ref": "#/components/schemas/EvaluationRuleEventType" } ], - "description": "Detection result for Personally Identifiable Information." + "description": "Event type that the evaluation rule applies to." }, - "indirect_attack": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionResult" - } - ], - "description": "Detection result for indirect attacks." + "enabled": { + "type": "boolean", + "description": "Indicates whether the evaluation rule is enabled. Default is true." }, - "error": { + "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/AzureContentFilterError" + "$ref": "#/components/schemas/EvaluationRuleActionType" } ], - "description": "Error details if content filtering evaluation failed." + "description": "Type of the evaluation action." } }, - "description": "Content filter results for the Responses API." + "discriminator": { + "propertyName": "type", + "mapping": { + "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", + "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" + } + }, + "description": "Evaluation action model." }, - "AzureContentFilterSeverity": { + "EvaluationRuleActionType": { "anyOf": [ { "type": "string" @@ -10475,277 +19081,267 @@ { "type": "string", "enum": [ - "safe", - "low", - "medium", - "high" + "continuousEvaluation", + "humanEvaluationPreview" ] } ], - "description": "Ratings for the intensity and risk level of harmful content." + "description": "Type of the evaluation action." }, - "AzureContentFilterSeverityResult": { + "EvaluationRuleEventType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "responseCompleted", + "manual" + ] + } + ], + "description": "Type of the evaluation rule event." + }, + "EvaluationRuleFilter": { "type": "object", "required": [ - "filtered", - "severity" + "agentName" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." - }, - "severity": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterSeverity" - } - ], - "description": "The severity level of the content." + "agentName": { + "type": "string", + "description": "Filter by agent name." } }, - "description": "A content filter result indicating severity level and whether content was filtered." + "description": "Evaluation filter model." }, - "AzureFunctionBinding": { + "EvaluationRunClusterInsightRequest": { "type": "object", "required": [ "type", - "storage_queue" + "evalId", + "runIds" ], "properties": { "type": { "type": "string", "enum": [ - "storage_queue" + "EvaluationRunClusterInsight" ], - "description": "The type of binding, which is always 'storage_queue'." + "description": "The type of insights request." }, - "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." + "evalId": { + "type": "string", + "description": "Evaluation Id for the insights." }, - "input_binding": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureFunctionBinding" - } - ], - "description": "Input storage queue. The queue storage trigger runs a function as messages are added to it." + "runIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of evaluation run IDs for the insights." }, - "output_binding": { + "modelConfiguration": { "allOf": [ { - "$ref": "#/components/schemas/AzureFunctionBinding" + "$ref": "#/components/schemas/InsightModelConfiguration" } ], - "description": "Output storage queue. The function writes output to this queue when the input items are processed." + "description": "Configuration of the model used in the insight generation." } }, - "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." + "allOf": [ + { + "$ref": "#/components/schemas/InsightRequest" } - }, - "description": "The structure for keeping storage queue name and URI." + ], + "description": "Insights on set of Evaluation Results" }, - "AzureFunctionTool": { + "EvaluationRunClusterInsightResult": { "type": "object", "required": [ "type", - "azure_function" + "clusterInsight" ], "properties": { "type": { "type": "string", "enum": [ - "azure_function" + "EvaluationRunClusterInsight" ], - "description": "The object type, which is always 'browser_automation'." + "description": "The type of insights result." }, - "azure_function": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureFunctionDefinition" - } - ], - "description": "The Azure Function Tool definition." + "clusterInsight": { + "$ref": "#/components/schemas/ClusterInsightResult" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/InsightResult" } ], - "description": "The input definition information for an Azure Function Tool, as used to configure an Agent." + "description": "Insights from the evaluation run cluster analysis." }, - "AzureFunctionToolCall": { + "EvaluationScheduleTask": { "type": "object", "required": [ "type", - "call_id", - "name", - "arguments", - "status" + "evalId", + "evalRun" ], "properties": { "type": { "type": "string", "enum": [ - "azure_function_call" + "Evaluation" ] }, - "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": { + "evalId": { "type": "string", - "description": "A JSON string of the arguments to pass to the tool." + "description": "Identifier of the evaluation group." }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallStatus" - } - ], - "description": "The status of the tool call." + "evalRun": { + "type": "object", + "description": "The evaluation run payload." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/ScheduleTask" } ], - "description": "An Azure Function tool call." + "description": "Evaluation task for the schedule." }, - "AzureFunctionToolCallOutput": { + "EvaluationTaxonomy": { "type": "object", "required": [ - "type", - "call_id", "name", - "status" + "version", + "taxonomyInput" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "azure_function_call_output" - ] + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true }, - "call_id": { + "name": { "type": "string", - "description": "The unique ID of the tool call generated by the model." + "description": "The name of the resource", + "readOnly": true }, - "name": { + "version": { "type": "string", - "description": "The name of the Azure Function that was called." + "description": "The version of the resource", + "readOnly": true }, - "output": { + "taxonomyInput": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallOutputContent" + "$ref": "#/components/schemas/EvaluationTaxonomyInput" } ], - "description": "The output from the Azure Function tool call." + "description": "Input configuration for the evaluation taxonomy." }, - "status": { + "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/ToolCallStatus" + "$ref": "#/components/schemas/EvaluationTaxonomyInput" } ], - "description": "The status of the tool call." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of an Azure Function tool call." + "description": "Evaluation Taxonomy Definition" }, - "AzureOpenAIModelConfiguration": { + "EvaluationTaxonomyInput": { "type": "object", "required": [ - "type", - "modelDeploymentName" + "type" ], "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/EvaluationTaxonomyInputType" + } + ], + "description": "Input type of the evaluation taxonomy." } }, - "allOf": [ + "discriminator": { + "propertyName": "type", + "mapping": { + "agent": "#/components/schemas/AgentTaxonomyInput" + } + }, + "description": "Input configuration for the evaluation taxonomy." + }, + "EvaluationTaxonomyInputType": { + "anyOf": [ { - "$ref": "#/components/schemas/TargetConfig" + "type": "string" + }, + { + "type": "string", + "enum": [ + "agent", + "policy" + ] } ], - "description": "Azure OpenAI model configuration. The API version would be selected by the service for querying the model." + "description": "Type of the evaluation taxonomy input." }, - "BaseCredentials": { + "EvaluationTaxonomyInputUpdate": { "type": "object", "required": [ "type" @@ -10754,27 +19350,60 @@ "type": { "allOf": [ { - "$ref": "#/components/schemas/CredentialType" + "$ref": "#/components/schemas/EvaluationTaxonomyInputType" } ], - "description": "The type of credential used by the connection", - "readOnly": true + "description": "Input type of the evaluation taxonomy." } }, "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" + "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": "A base class for connection credentials" + "description": "Evaluation Taxonomy Definition" }, - "BenchmarkName": { + "EvaluatorCategory": { "anyOf": [ { "type": "string" @@ -10782,457 +19411,373 @@ { "type": "string", "enum": [ - "builtin.gpqa_diamond", - "builtin.bbeh", - "builtin.bigbenchhard", - "builtin.frontierscience", - "builtin.musr", - "builtin.truthful_qa", - "builtin.inspect_ai.gpqa_diamond", - "builtin.inspect_ai.chembench", - "builtin.inspect_ai.aime_2025", - "builtin.inspect_ai.musr" + "quality", + "safety", + "agents" ] } ], - "description": "The set of available benchmark specifications." + "description": "The category of the evaluator" }, - "BingCustomSearchConfiguration": { + "EvaluatorCredentialRequest": { "type": "object", "required": [ - "project_connection_id", - "instance_name" + "blobUri" ], "properties": { - "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." - }, - "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": { + "blobUri": { "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)." + "format": "uri", + "description": "The blob URI for the evaluator storage. Example: `https://account.blob.core.windows.net:443/container`" } }, - "description": "A bing custom search configuration." + "description": "Request body for getting evaluator credentials" }, - "BingCustomSearchPreviewTool": { + "EvaluatorDefinition": { "type": "object", "required": [ - "type", - "bing_custom_search_preview" + "type" ], "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" + "$ref": "#/components/schemas/EvaluatorDefinitionType" } ], - "description": "The bing custom search tool parameters." + "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" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" + "discriminator": { + "propertyName": "type", + "mapping": { + "code": "#/components/schemas/CodeBasedEvaluatorDefinition", + "prompt": "#/components/schemas/PromptBasedEvaluatorDefinition" } - ], - "description": "The input definition information for a Bing custom search tool as used to configure an agent." + }, + "description": "Base evaluator configuration with discriminator" }, - "BingCustomSearchToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { + "EvaluatorDefinitionType": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", "enum": [ - "bing_custom_search_preview_call" + "prompt", + "code", + "prompt_and_code", + "service", + "openai_graders" ] - }, - "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." + "description": "The type of evaluator definition" }, - "BingCustomSearchToolCallOutput": { + "EvaluatorMetric": { "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" + "$ref": "#/components/schemas/EvaluatorMetricType" } ], - "description": "The output from the Bing custom search tool call." + "description": "Type of the metric." }, - "status": { + "desirable_direction": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/EvaluatorMetricDirection" } ], - "description": "The status of the tool call." + "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." } }, - "allOf": [ + "description": "Evaluator Metric" + }, + "EvaluatorMetricDirection": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "type": "string" + }, + { + "type": "string", + "enum": [ + "increase", + "decrease", + "neutral" + ] } ], - "description": "The output of a Bing custom search tool call." + "description": "The direction of the metric indicating whether a higher value is better, a lower value is better, or neutral" }, - "BingCustomSearchToolParameters": { - "type": "object", - "required": [ - "search_configurations" - ], - "properties": { - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "EvaluatorMetricType": { + "anyOf": [ + { + "type": "string" }, - "description": { + { "type": "string", - "description": "Optional user-defined description for this tool or configuration." - }, - "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." + "enum": [ + "ordinal", + "continuous", + "boolean" + ] } - }, - "description": "The bing custom search tool parameters." - }, - "BingGroundingSearchConfiguration": { - "type": "object", - "required": [ - "project_connection_id" ], - "properties": { - "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." - }, - "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" + "description": "The type of the evaluator" + }, + "EvaluatorType": { + "anyOf": [ + { + "type": "string" }, - "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)." + "enum": [ + "builtin", + "custom" + ] } - }, - "description": "Search configuration for Bing Grounding" + ], + "description": "The type of the evaluator" }, - "BingGroundingSearchToolParameters": { + "EvaluatorVersion": { "type": "object", "required": [ - "search_configurations" + "evaluator_type", + "categories", + "definition", + "created_by", + "created_at", + "modified_at", + "name", + "version" ], "properties": { - "name": { + "display_name": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." }, - "description": { - "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata about the evaluator" }, - "search_configurations": { + "evaluator_type": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorType" + } + ], + "description": "The type of the evaluator" + }, + "categories": { "type": "array", "items": { - "$ref": "#/components/schemas/BingGroundingSearchConfiguration" + "$ref": "#/components/schemas/EvaluatorCategory" }, - "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 categories of the evaluator" + }, + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorDefinition" + } ], - "description": "The object type, which is always 'bing_grounding'." + "description": "Definition of the evaluator" }, - "name": { + "created_by": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "Creator of the evaluator", + "readOnly": true }, - "description": { + "created_at": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "description": "Creation date/time of the evaluator", + "readOnly": true }, - "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": { + "modified_at": { "type": "string", - "enum": [ - "bing_grounding_call" - ] + "description": "Last modified date/time of the evaluator", + "readOnly": true }, - "call_id": { + "id": { "type": "string", - "description": "The unique ID of the tool call generated by the model." + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true }, - "arguments": { + "name": { "type": "string", - "description": "A JSON string of the arguments to pass to the tool." + "description": "The name of the resource", + "readOnly": true }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallStatus" - } - ], - "description": "The status of the tool call." + "version": { + "type": "string", + "description": "The version of the resource", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A Bing grounding tool call." + "description": "Evaluator Definition" }, - "BingGroundingToolCallOutput": { + "EvaluatorVersionCreate": { "type": "object", "required": [ - "type", - "call_id", - "status" + "evaluator_type", + "categories", + "definition" ], "properties": { - "type": { + "display_name": { "type": "string", - "enum": [ - "bing_grounding_call_output" - ] + "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata about the evaluator" }, - "output": { + "evaluator_type": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallOutputContent" + "$ref": "#/components/schemas/EvaluatorType" } ], - "description": "The output from the Bing grounding tool call." + "description": "The type of the evaluator" }, - "status": { + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorCategory" + }, + "description": "The categories of the evaluator" + }, + "definition": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/EvaluatorDefinition" } ], - "description": "The status of the tool call." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of a Bing grounding tool call." + "description": "Evaluator Definition" }, - "BlobReference": { + "EvaluatorVersionUpdate": { "type": "object", - "required": [ - "blobUri", - "storageAccountArmId", - "credential" - ], "properties": { - "blobUri": { + "display_name": { "type": "string", - "format": "uri", - "description": "Blob URI path for client to upload data. Example: `https://blob.windows.core.net/Container/Path`" + "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" }, - "storageAccountArmId": { + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorCategory" + }, + "description": "The categories of the evaluator" + }, + "description": { "type": "string", - "description": "ARM ID of the storage account to use." + "description": "The asset description text." }, - "credential": { - "allOf": [ - { - "$ref": "#/components/schemas/SasCredential" - } - ], - "description": "Credential info to access the storage account." + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." } }, - "description": "Blob reference details." + "description": "Evaluator Definition" }, - "BrowserAutomationPreviewTool": { + "ExplicitModelReferenceConfiguration": { "type": "object", "required": [ - "type", - "browser_automation_preview" + "kind", + "model" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "browser_automation_preview" + "model" ], - "description": "The object type, which is always 'browser_automation_preview'." - }, - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "Reference policy kind, always 'model'." }, - "description": { + "model": { "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." + "description": "Reference model asset URI." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" } ], - "description": "The input definition information for a Browser Automation Tool, as used to configure an Agent." + "description": "Use an explicit model as the reference policy." }, - "BrowserAutomationToolCall": { + "FabricDataAgentToolCall": { "type": "object", "required": [ "type", @@ -11244,7 +19789,7 @@ "type": { "type": "string", "enum": [ - "browser_automation_preview_call" + "fabric_dataagent_preview_call" ] }, "call_id": { @@ -11269,9 +19814,9 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A browser automation tool call." + "description": "A Fabric data agent tool call." }, - "BrowserAutomationToolCallOutput": { + "FabricDataAgentToolCallOutput": { "type": "object", "required": [ "type", @@ -11282,7 +19827,7 @@ "type": { "type": "string", "enum": [ - "browser_automation_preview_call_output" + "fabric_dataagent_preview_call_output" ] }, "call_id": { @@ -11295,7 +19840,7 @@ "$ref": "#/components/schemas/ToolCallOutputContent" } ], - "description": "The output from the browser automation tool call." + "description": "The output from the Fabric data agent tool call." }, "status": { "allOf": [ @@ -11311,13 +19856,10 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "The output of a browser automation tool call." + "description": "The output of a Fabric data agent tool call." }, - "BrowserAutomationToolConnectionParameters": { + "FabricDataAgentToolParameters": { "type": "object", - "required": [ - "project_connection_id" - ], "properties": { "name": { "type": "string", @@ -11327,389 +19869,417 @@ "type": "string", "description": "Optional user-defined description for this tool or configuration." }, - "project_connection_id": { - "type": "string", - "description": "The ID of the project connection to your Azure Playwright resource." + "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": "Definition of input parameters for the connection used by the Browser Automation Tool." + "description": "The fabric data agent tool parameters." }, - "BrowserAutomationToolParameters": { + "FileDatasetVersion": { "type": "object", "required": [ - "connection" + "type" ], "properties": { - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." - }, - "description": { + "type": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." - }, - "connection": { - "allOf": [ - { - "$ref": "#/components/schemas/BrowserAutomationToolConnectionParameters" - } + "enum": [ + "uri_file" ], - "description": "The project connection parameters associated with the Browser Automation Tool." + "description": "Dataset type" } }, - "description": "Definition of input parameters for the Browser Automation Tool." + "allOf": [ + { + "$ref": "#/components/schemas/DatasetVersion" + } + ], + "description": "FileDatasetVersion Definition" }, - "CaptureStructuredOutputsTool": { + "FileDatasetVersionUpdate": { "type": "object", "required": [ - "type", - "outputs" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "capture_structured_outputs" - ], - "description": "The type of the tool. Always `capture_structured_outputs`." - }, - "outputs": { - "allOf": [ - { - "$ref": "#/components/schemas/StructuredOutputDefinition" - } + "uri_file" ], - "description": "The structured outputs to capture from the model." + "description": "Dataset type" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/DatasetVersionUpdate" } ], - "description": "A tool for capturing structured outputs" + "description": "FileDatasetVersion Definition" }, - "ChartCoordinate": { + "FolderDatasetVersion": { "type": "object", "required": [ - "x", - "y", - "size" + "type" ], "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." + "type": { + "type": "string", + "enum": [ + "uri_folder" + ], + "description": "Dataset type" } }, - "description": "Coordinates for the analysis chart." + "allOf": [ + { + "$ref": "#/components/schemas/DatasetVersion" + } + ], + "description": "FileDatasetVersion Definition" }, - "ChatSummaryMemoryItem": { + "FolderDatasetVersionUpdate": { "type": "object", "required": [ - "kind" + "type" ], "properties": { - "kind": { + "type": { "type": "string", "enum": [ - "chat_summary" + "uri_folder" ], - "description": "The kind of the memory item." + "description": "Dataset type" } }, "allOf": [ { - "$ref": "#/components/schemas/MemoryItem" + "$ref": "#/components/schemas/DatasetVersionUpdate" } ], - "description": "A memory item containing a summary extracted from conversations.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "description": "FileDatasetVersion Definition" }, - "ClusterInsightResult": { + "FoundryTimestamp": { + "type": "integer", + "format": "unixtime", + "description": "Unix timestamp in seconds used by Foundry data-plane resources." + }, + "FunctionToolCall": { "type": "object", "required": [ - "summary", - "clusters" + "name", + "arguments" ], "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." + "name": { + "type": "string", + "description": "The name of the function to call." }, - "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." + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format." } }, - "description": "Insights from the cluster analysis." + "description": "Details of a function tool call." }, - "ClusterTokenUsage": { + "GrpoTrainingColumnMapping": { "type": "object", "required": [ - "inputTokenUsage", - "outputTokenUsage", - "totalTokenUsage" + "prompt" ], "properties": { - "inputTokenUsage": { - "type": "integer", - "format": "int32", - "description": "input token usage" - }, - "outputTokenUsage": { - "type": "integer", - "format": "int32", - "description": "output token usage" + "prompt": { + "type": "string", + "description": "Actual dataset column name containing prompts for rollout generation, for example 'prompt', 'question', or 'problem'." }, - "totalTokenUsage": { - "type": "integer", - "format": "int32", - "description": "total token usage" + "reference": { + "type": "string", + "description": "Actual dataset column name containing reference answers or reward context passed to the judge, for example 'answer' or 'reference'." } }, - "description": "Token usage for cluster analysis" + "description": "Column mapping for managed online RL prompt datasets. Keys are logical fields expected by GRPO, RLOO, REINFORCE++, and PPO; values are the exact column names in the referenced dataset asset. The training dataset must contain prompts; reference answers or reward context can be passed to the judge." }, - "CodeBasedEvaluatorDefinition": { + "GrpoTrainingConfiguration": { "type": "object", "required": [ - "type" + "algorithm", + "reward" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "code" - ] + "grpo" + ], + "description": "Training algorithm, always 'grpo'." }, - "code_text": { - "type": "string", - "description": "Inline code text for the evaluator" + "reward": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Reward signal configuration." }, - "entry_point": { - "type": "string", - "description": "The entry point Python file name for the uploaded evaluator code (e.g. 'answer_length_evaluator.py')" + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." }, - "image_tag": { - "type": "string", - "description": "The container image tag to use for evaluator code execution" + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration." }, - "blob_uri": { - "type": "string", - "description": "The blob URI for the evaluator storage" + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/EvaluatorDefinition" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "Code-based evaluator definition using python code" + "description": "Group relative policy optimization training recipe." }, - "CompletionMessageToolCallChunk": { + "GrpoTrainingDatasetConfiguration": { "type": "object", "required": [ - "id", - "type" + "train", + "columns" ], "properties": { - "id": { + "train": { "type": "string", - "description": "The Id for the tool call." + "description": "Training dataset asset reference." }, - "type": { + "eval": { "type": "string", - "enum": [ - "function" + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ + { + "$ref": "#/components/schemas/GrpoTrainingColumnMapping" + } ], - "description": "The type of tool call, which is always \"function\"." + "description": "Mapping from online RL logical fields to actual dataset column names. GRPO, policy-gradient, and PPO require the 'prompt' logical field and can optionally map 'reference'." }, - "function": { + "data_format": { "allOf": [ { - "$ref": "#/components/schemas/FunctionToolCall" + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" } ], - "description": "Details of the function tool call, if applicable." + "description": "Conversational data formatting options." } }, - "description": "Tool call details within a message." + "description": "Dataset configuration for managed GRPO training." }, - "Connection": { + "GrpoTrainingJob": { "type": "object", "required": [ - "name", - "id", "type", - "target", - "isDefault", - "credentials", - "metadata" + "dataset", + "runtime" ], "properties": { - "name": { - "type": "string", - "description": "The friendly name of the connection, provided by the user.", - "readOnly": true - }, - "id": { + "type": { "type": "string", - "description": "A unique identifier for the connection, generated by the service", - "readOnly": true + "enum": [ + "grpo" + ], + "description": "Managed training job type, always 'grpo'." }, - "type": { + "dataset": { "allOf": [ { - "$ref": "#/components/schemas/ConnectionType" + "$ref": "#/components/schemas/GrpoTrainingDatasetConfiguration" } ], - "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 + "description": "Training and optional evaluation datasets." }, - "credentials": { + "runtime": { "allOf": [ { - "$ref": "#/components/schemas/BaseCredentials" + "$ref": "#/components/schemas/GrpoTrainingRuntimeConfiguration" } ], - "description": "The credentials used by the connection", - "readOnly": true - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Metadata of the connection", - "readOnly": true + "description": "Runtime options for managed GRPO." } }, - "description": "Response from the list and get connections operations" - }, - "ConnectionType": { - "anyOf": [ - { - "type": "string" - }, + "allOf": [ { - "type": "string", - "enum": [ - "AzureOpenAI", - "AzureBlob", - "AzureStorageAccount", - "CognitiveSearch", - "CosmosDB", - "ApiKey", - "AppConfig", - "AppInsights", - "CustomKeys", - "RemoteTool_Preview" - ] + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "description": "The Type (or category) of the connection" + "description": "Request body for creating a managed GRPO training job from a base model." }, - "ContentFilterResult": { + "GrpoTrainingRuntimeConfiguration": { "type": "object", "required": [ - "blocked", - "source_type", - "content_filter_results" + "judge" ], "properties": { - "blocked": { - "type": "boolean", - "description": "Whether the content was blocked by the content filter." + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." }, - "source_type": { - "type": "string", - "description": "The source type of the content filter evaluation (e.g., 'prompt', 'response', 'pre_tool_call', 'post_tool_call')." + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." }, - "content_filter_results": { + "judge": { "allOf": [ { - "$ref": "#/components/schemas/AzureContentFilterResultsForResponses" + "$ref": "#/components/schemas/TrainingRewardConfiguration" } ], - "description": "The content filter results for this evaluation." + "description": "Judge used to score generated completions during GRPO training. Required for GRPO." }, - "tool_call_id": { - "type": "string", - "description": "The ID of the tool call associated with this content filter result, if applicable." + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." + }, + "reference": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Reference policy used for KL anchoring." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "description": "A content filter evaluation result for a specific source in the response." + "description": "Runtime options for managed GRPO training." }, - "ContinuousEvaluationRuleAction": { + "HostedAgentDefinition": { "type": "object", "required": [ - "type", - "evalId" + "kind", + "container_protocol_versions", + "cpu", + "memory" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "continuousEvaluation" + "hosted" ] }, - "evalId": { + "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": "a2a", + "version": "v0.3.0" + } + ] + }, + "cpu": { "type": "string", - "description": "Eval Id to add continuous evaluation runs to." + "description": "The CPU configuration for the hosted agent.", + "example": "0.25" }, - "maxHourlyRuns": { - "type": "integer", - "format": "int32", - "description": "Maximum number of evaluation runs allowed per hour." + "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" } }, "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleAction" + "$ref": "#/components/schemas/AgentDefinition" } ], - "description": "Evaluation rule action for continuous evaluation." + "description": "The hosted agent definition.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } }, - "CosmosDBIndex": { + "HourlyRecurrenceSchedule": { "type": "object", "required": [ "type" @@ -11718,460 +20288,473 @@ "type": { "type": "string", "enum": [ - "CosmosDBNoSqlVectorStore" - ], - "description": "Type of index" + "Hourly" + ] } }, "allOf": [ { - "$ref": "#/components/schemas/Index" + "$ref": "#/components/schemas/RecurrenceSchedule" } ], - "description": "CosmosDB Vector Store Index Definition" + "description": "Hourly recurrence schedule." }, - "CosmosDBIndexUpdate": { + "HumanEvaluationPreviewRuleAction": { "type": "object", "required": [ - "type" + "type", + "templateId" ], "properties": { "type": { "type": "string", "enum": [ - "CosmosDBNoSqlVectorStore" + "humanEvaluationPreview" + ] + }, + "templateId": { + "allOf": [ + { + "$ref": "#/components/schemas/AssetId" + } ], - "description": "Type of index" + "description": "Human evaluation template Id." } }, "allOf": [ { - "$ref": "#/components/schemas/IndexUpdate" + "$ref": "#/components/schemas/EvaluationRuleAction" } ], - "description": "CosmosDB Vector Store Index Definition" + "description": "Evaluation rule action for human evaluation." }, - "CreateAgentFromManifestRequest": { + "Index": { "type": "object", "required": [ + "type", "name", - "manifest_id", - "parameter_values" + "version" ], "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." + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/IndexType" + } + ], + "description": "Type of index" }, - "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" + "id": { + "type": "string", + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true }, - "description": { + "name": { "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." + "description": "The name of the resource", + "readOnly": true }, - "manifest_id": { + "version": { "type": "string", - "description": "The manifest ID to import the agent version from." + "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" }, - "parameter_values": { - "type": "object", - "additionalProperties": {}, - "description": "The inputs to the manifest that will result in a fully materialized Agent." + { + "type": "string", + "enum": [ + "AzureSearch", + "CosmosDBNoSqlVectorStore", + "ManagedAzureSearch" + ] } - } + ] }, - "CreateAgentRequest": { + "IndexUpdate": { "type": "object", "required": [ - "name", - "definition" + "type" ], "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": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/AgentDefinition" + "$ref": "#/components/schemas/IndexType" } ], - "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" - ] - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=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 of index" }, "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." + "description": "The asset description text." }, - "parameter_values": { + "tags": { "type": "object", - "additionalProperties": {}, - "description": "The inputs to the manifest that will result in a fully materialized Agent." + "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" }, - "CreateAgentVersionRequest": { + "Input": { "type": "object", "required": [ - "definition" + "job_input_type" ], "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" + "job_input_type": { + "allOf": [ + { + "$ref": "#/components/schemas/AssetTypes" + } + ], + "description": "Specifies the type of job input." }, - "description": { + "uri": { "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." + "description": "Input Asset URI. Required for uri_file, uri_folder, and safetensors_model types." }, - "definition": { + "mode": { "allOf": [ { - "$ref": "#/components/schemas/AgentDefinition" + "$ref": "#/components/schemas/InputOutputModes" } ], - "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" - ] - } + "description": "Input Asset Delivery Mode. Applies to uri-based inputs." + }, + "value": { + "type": "string", + "description": "Literal value. Required for literal type." } }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview" - ] - } + "description": "Job input definition." }, - "CreateEvalRequest": { + "InputOutputModes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "read_only_mount", + "read_write_mount", + "download", + "direct", + "upload" + ] + } + ], + "description": "Enum to determine the input/output data delivery mode." + }, + "Insight": { "type": "object", "required": [ - "data_source_config", - "testing_criteria" + "id", + "metadata", + "state", + "displayName", + "request" ], "properties": { - "name": { + "id": { "type": "string", - "description": "The name of the evaluation." + "description": "The unique identifier for the insights report.", + "readOnly": true }, "metadata": { - "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/InsightsMetadata" } ], - "nullable": true + "description": "Metadata about the insights report.", + "readOnly": true }, - "data_source_config": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCustomDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalLogsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalStoredCompletionsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/AzureAIDataSourceConfig" - }, + "state": { + "allOf": [ { - "$ref": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" + "$ref": "#/components/schemas/Azure.Core.Foundations.OperationState" } ], - "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/EvalGraderAzureAIEvaluator" - }, - { - "$ref": "#/components/schemas/EvalGraderInspectAI" - } - ] - }, - "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}}`)." + "description": "The current state of the insights.", + "readOnly": 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." - } - }, - "title": "CreateEvalRequest" - }, - "CreateEvalRunRequest": { - "type": "object", - "required": [ - "data_source" - ], - "properties": { - "name": { + "displayName": { "type": "string", - "description": "The name of the run." + "description": "User friendly display name for the insight." }, - "metadata": { - "type": "object", + "request": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/InsightRequest" } ], - "nullable": true + "description": "Request for the insights analysis." }, - "data_source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalJsonlRunDataSource" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSource" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSource" - }, + "result": { + "allOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "$ref": "#/components/schemas/InsightResult" } ], - "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." + "description": "The result of the insights report.", + "readOnly": true } }, - "title": "CreateEvalRunRequest" - }, - "CredentialType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "ApiKey", - "AAD", - "SAS", - "CustomKeys", - "None", - "AgenticIdentityToken_Preview" - ] - } - ], - "description": "The credential type used by the connection" + "description": "The response body for cluster insights." }, - "CronTrigger": { + "InsightCluster": { "type": "object", "required": [ - "type", - "expression" + "id", + "label", + "suggestion", + "suggestionTitle", + "description", + "weight" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "Cron" - ] + "description": "The id of the analysis cluster." }, - "expression": { + "label": { "type": "string", - "description": "Cron expression that defines the schedule frequency." + "description": "Label for the cluster" }, - "timeZone": { + "suggestion": { "type": "string", - "description": "Time zone for the cron schedule.", - "default": "UTC" + "description": "Suggestion for the cluster" }, - "startTime": { + "suggestionTitle": { "type": "string", - "description": "Start time for the cron schedule in ISO 8601 format." + "description": "The title of the suggestion for the cluster" }, - "endTime": { + "description": { "type": "string", - "description": "End time for the cron schedule in ISO 8601 format." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/Trigger" - } + "description": "A cluster of analysis samples." + }, + "InsightModelConfiguration": { + "type": "object", + "required": [ + "modelDeploymentName" ], - "description": "Cron based trigger." + "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." }, - "CustomCredential": { + "InsightRequest": { "type": "object", "required": [ "type" ], "properties": { "type": { - "type": "string", - "enum": [ - "CustomKeys" + "allOf": [ + { + "$ref": "#/components/schemas/InsightType" + } ], - "description": "The credential type", - "readOnly": true + "description": "The type of request." } }, - "additionalProperties": { - "type": "string" + "discriminator": { + "propertyName": "type", + "mapping": { + "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightRequest", + "AgentClusterInsight": "#/components/schemas/AgentClusterInsightRequest", + "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightRequest" + } }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" + "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" ], - "description": "Custom credential definition" + "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." }, - "DailyRecurrenceSchedule": { + "InsightScheduleTask": { "type": "object", "required": [ "type", - "hours" + "insight" ], "properties": { "type": { "type": "string", "enum": [ - "Daily" - ], - "description": "Daily recurrence type." + "Insight" + ] }, - "hours": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Hours for the recurrence schedule." + "insight": { + "allOf": [ + { + "$ref": "#/components/schemas/Insight" + } + ], + "description": "The insight payload." } }, "allOf": [ { - "$ref": "#/components/schemas/RecurrenceSchedule" + "$ref": "#/components/schemas/ScheduleTask" } ], - "description": "Daily recurrence schedule." + "description": "Insight task for the schedule." }, - "DataSourceConfig": { + "InsightSummary": { "type": "object", "required": [ - "type", - "schema" + "sampleCount", + "uniqueSubclusterCount", + "uniqueClusterCount", + "method", + "usage" ], "properties": { - "type": { + "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": "The data source type discriminator." + "description": "Method used for clustering." }, - "schema": { - "type": "object", - "additionalProperties": {}, - "description": "The overall object JSON schema for the run data source items." + "usage": { + "allOf": [ + { + "$ref": "#/components/schemas/ClusterTokenUsage" + } + ], + "description": "Token usage while performing clustering analysis" } }, - "discriminator": { - "propertyName": "type", - "mapping": {} - }, - "description": "Base class for run data sources with discriminator support." + "description": "Summary of the error cluster analysis." }, - "DatasetType": { + "InsightType": { "anyOf": [ { "type": "string" @@ -12179,71 +20762,34 @@ { "type": "string", "enum": [ - "uri_file", - "uri_folder" + "EvaluationRunClusterInsight", + "AgentClusterInsight", + "EvaluationComparison" ] } ], - "description": "Enum to determine the type of data." + "description": "The request of the insights." }, - "DatasetVersion": { + "InsightsMetadata": { "type": "object", "required": [ - "dataUri", - "type", - "name", - "version" + "createdAt" ], "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": { + "createdAt": { "type": "string", - "description": "The name of the resource", - "readOnly": true + "format": "date-time", + "description": "The timestamp when the insights were created." }, - "version": { + "completedAt": { "type": "string", - "description": "The version of the resource", - "readOnly": true - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "uri_file": "#/components/schemas/FileDatasetVersion", - "uri_folder": "#/components/schemas/FolderDatasetVersion" + "format": "date-time", + "description": "The timestamp when the insights were completed." } }, - "description": "DatasetVersion Definition" + "description": "Metadata about the insights." }, - "DatasetVersionUpdate": { + "ItemGenerationParams": { "type": "object", "required": [ "type" @@ -12252,33 +20798,24 @@ "type": { "allOf": [ { - "$ref": "#/components/schemas/DatasetType" + "$ref": "#/components/schemas/ItemGenerationParamsType" } ], - "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." + "description": "The type of item generation parameters to use." } }, "discriminator": { "propertyName": "type", "mapping": { - "uri_file": "#/components/schemas/FileDatasetVersionUpdate", - "uri_folder": "#/components/schemas/FolderDatasetVersionUpdate" + "red_team": "#/components/schemas/RedTeamItemGenerationParams", + "red_team_seed_prompts": "#/components/schemas/RedTeamSeedPromptsItemGenerationParams", + "red_team_taxonomy": "#/components/schemas/RedTeamTaxonomyItemGenerationParams", + "response_retrieval": "#/components/schemas/ResponseRetrievalItemGenerationParams" } }, - "description": "DatasetVersion Definition" + "description": "Represents the set of parameters used to control item generation operations." }, - "DayOfWeek": { + "ItemGenerationParamsType": { "anyOf": [ { "type": "string" @@ -12286,265 +20823,425 @@ { "type": "string", "enum": [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" + "red_team", + "response_retrieval", + "red_team_seed_prompts", + "red_team_taxonomy", + "synthetic_data_gen_preview" ] } ], - "description": "Days of the week for recurrence schedule." + "description": "The types of parameters for red team item generation." }, - "DeleteAgentResponse": { + "Job": { "type": "object", "required": [ - "object", "name", - "deleted" + "job_type", + "compute_id" ], "properties": { - "object": { + "name": { "type": "string", - "enum": [ - "agent.deleted" - ], - "description": "The object type. Always 'agent.deleted'." + "description": "The name of the training job. This is case-sensitive.", + "readOnly": true }, - "name": { + "id": { "type": "string", - "description": "The name of the agent." + "description": "The resource ID.", + "readOnly": true }, - "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": { + "type": "string", + "description": "The resource type.", + "readOnly": true + }, + "job_type": { "type": "string", "enum": [ - "agent.version.deleted" + "command" ], - "description": "The object type. Always 'agent.version.deleted'." + "description": "Job type." }, - "name": { + "command": { "type": "string", - "description": "The name of the agent." + "description": "The command to execute on startup of the job. Required when training is not specified, and must be omitted when training is specified." }, - "version": { + "environment_image_reference": { "type": "string", - "description": "The version identifier of the agent." + "description": "ACR path or Azure ML environment reference. Required when training is not specified." }, - "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" + "training": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" + } ], - "description": "The object type. Always 'eval.deleted'." + "description": "Declarative training recipe. When specified, the service compiles the recipe into the command and environment used for execution." }, - "eval_id": { + "display_name": { "type": "string", - "description": "id of the eval." + "description": "Display name of job." }, - "deleted": { - "type": "boolean", - "description": "Whether the eval was successfully deleted." - } - }, - "description": "A deleted evaluation Object" - }, - "DeleteEvalRunResponse": { - "type": "object", - "properties": { - "object": { + "description": { "type": "string", - "enum": [ - "eval.deleted" - ], - "description": "The object type. Always 'eval.deleted'." + "description": "The asset description text." }, - "run_id": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The asset property dictionary." + }, + "code_id": { "type": "string", - "description": "id of the eval." + "description": "Code asset reference." }, - "deleted": { - "type": "boolean", - "description": "Whether the eval was successfully deleted." - } - }, - "description": "A deleted evaluation run Object." - }, - "DeleteMemoryStoreResponse": { - "type": "object", - "required": [ - "object", - "name", - "deleted" - ], - "properties": { - "object": { + "compute_id": { "type": "string", - "enum": [ - "memory_store.deleted" + "description": "Compute resource ID." + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Input" + }, + "description": "Mapping of input data bindings used in the job." + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Output" + }, + "description": "Mapping of output data bindings used in the job." + }, + "environment_variables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables included in the job." + }, + "resources": { + "allOf": [ + { + "$ref": "#/components/schemas/JobResourceConfiguration" + } ], - "description": "The object type. Always 'memory_store.deleted'." + "description": "Compute Resource configuration for the job." }, - "name": { - "type": "string", - "description": "The name of the memory store." + "gpu_count": { + "type": "integer", + "format": "int32", + "description": "Number of GPUs requested by the training job." }, - "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": { + "distribution": { + "allOf": [ + { + "$ref": "#/components/schemas/DistributionConfiguration" + } + ], + "description": "Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null." + }, + "limits": { + "allOf": [ + { + "$ref": "#/components/schemas/CommandJobLimits" + } + ], + "description": "Command Job limit." + }, + "queue_settings": { + "allOf": [ + { + "$ref": "#/components/schemas/QueueSettings" + } + ], + "description": "Queue settings for the job." + }, + "user_assigned_identity_id": { "type": "string", - "description": "The operation ID." + "description": "user-assigned managed identity" }, - "object": { + "status": { "type": "string", - "enum": [ - "response" + "description": "Status of the job.", + "readOnly": true + }, + "latest_attempt": { + "allOf": [ + { + "$ref": "#/components/schemas/JobAttempt" + } ], - "description": "Always return 'response'." + "description": "The latest execution attempt for the job. This field is omitted unless requested with include=latest_attempt. The same attempt resource is available from /training_jobs/{job_name}/attempts/latest.", + "readOnly": true }, - "deleted": { - "type": "boolean", - "enum": [ - true + "input_datasets": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "description": "Input dataset lineage recorded for the job. This field is omitted unless requested with include=input_datasets.", + "readOnly": true + }, + "output_datasets": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "description": "Output dataset lineage recorded for the job. This field is omitted unless requested with include=output_datasets.", + "readOnly": true + }, + "execution_definition": { + "type": "object", + "additionalProperties": {}, + "description": "Backend execution definition used to run the job. This field is omitted unless requested with include=execution_definition.", + "readOnly": true + }, + "resolved_specification": { + "type": "object", + "additionalProperties": {}, + "description": "Backend-resolved job specification. This field is omitted unless requested with include=resolved_specification.", + "readOnly": true + }, + "parameters": { + "type": "object", + "additionalProperties": {}, + "description": "Parameters recorded for the job. This field is omitted unless requested with include=parameters.", + "readOnly": true + }, + "settings": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Settings recorded for the job. This field is omitted unless requested with include=settings.", + "readOnly": true + }, + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TrainingJobService" + }, + "description": "Service endpoints for the current job run. This field is omitted unless requested with include=services.", + "readOnly": true + }, + "log_files": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Log file URI metadata for the job. This field is omitted unless requested with include=log_files.", + "readOnly": true + }, + "job_cost": { + "type": "object", + "additionalProperties": {}, + "description": "Job cost summary. This field is omitted unless requested with include=job_cost.", + "readOnly": true + }, + "compute_request": { + "type": "object", + "additionalProperties": {}, + "description": "Compute request recorded for the job. This field is omitted unless requested with include=compute_request.", + "readOnly": true + }, + "compute": { + "type": "object", + "additionalProperties": {}, + "description": "Compute record for the job. This field is omitted unless requested with include=compute.", + "readOnly": true + }, + "system_data": { + "allOf": [ + { + "$ref": "#/components/schemas/SystemData" + } ], - "description": "Always return true" + "description": "Metadata pertaining to creation and last modification of the resource.", + "readOnly": true } }, - "description": "The result of a delete response operation." + "description": "Training job resource." }, - "DeleteSkillResponse": { + "JobArtifact": { "type": "object", "required": [ - "object", - "name", - "deleted" + "path", + "type" ], "properties": { - "object": { + "artifact_id": { + "type": "string", + "description": "Backend artifact identifier.", + "readOnly": true + }, + "origin": { + "type": "string", + "description": "Artifact origin.", + "readOnly": true + }, + "container": { + "type": "string", + "description": "Artifact container name.", + "readOnly": true + }, + "path": { + "type": "string", + "description": "Artifact path relative to the job artifact root.", + "readOnly": true + }, + "etag": { + "type": "string", + "description": "Artifact entity tag.", + "readOnly": true + }, + "type": { "allOf": [ { - "$ref": "#/components/schemas/SkillObjectType" + "$ref": "#/components/schemas/JobArtifactType" } ], - "description": "The object type. Always 'skill.deleted'.", - "default": "skill.deleted" + "description": "Artifact type.", + "readOnly": true }, - "name": { - "type": "string", - "description": "The unique name of the skill." + "size": { + "type": "integer", + "format": "int64", + "description": "Artifact size in bytes.", + "readOnly": true }, - "deleted": { - "type": "boolean", - "description": "Whether the skill was successfully deleted." - } - }, - "description": "A deleted skill Object" - }, - "DeleteToolsetResponse": { - "type": "object", - "required": [ - "object", - "name", - "deleted" - ], - "properties": { - "object": { - "type": "string", - "enum": [ - "toolset.deleted" + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } ], - "description": "The object type. Always 'toolset.deleted'." + "description": "Time the artifact was created.", + "readOnly": true }, - "name": { - "type": "string", - "description": "The name of the toolset." + "updated_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Time the artifact was last updated.", + "readOnly": true }, - "deleted": { - "type": "boolean", - "description": "Whether the toolset was successfully deleted." + "data_path": { + "allOf": [ + { + "$ref": "#/components/schemas/JobArtifactDataPath" + } + ], + "description": "Storage path details for the artifact.", + "readOnly": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Artifact tags.", + "readOnly": true } }, - "description": "Response returned when a toolset is deleted." + "description": "Metadata for an artifact produced by or attached to a job." }, - "Deployment": { + "JobArtifactContentInfo": { "type": "object", "required": [ - "type", - "name" + "path", + "content_uri" ], "properties": { - "type": { + "origin": { + "type": "string", + "description": "Artifact origin.", + "readOnly": true + }, + "container": { + "type": "string", + "description": "Artifact container name.", + "readOnly": true + }, + "path": { + "type": "string", + "description": "Artifact path relative to the job artifact root.", + "readOnly": true + }, + "content_uri": { + "type": "string", + "format": "uri", + "description": "Download URI for the artifact content.", + "readOnly": true + }, + "content_type": { + "type": "string", + "description": "MIME type of the content.", + "readOnly": true + }, + "content_length": { + "type": "integer", + "format": "int64", + "description": "Content length in bytes, when known.", + "readOnly": true + }, + "expires_at": { "allOf": [ { - "$ref": "#/components/schemas/DeploymentType" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "The type of the deployment" + "description": "Time the content URI expires.", + "readOnly": true }, - "name": { - "type": "string", - "description": "Name of the deployment", + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Artifact tags.", "readOnly": true } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "ModelDeployment": "#/components/schemas/ModelDeployment" + "description": "Content access information for a job artifact." + }, + "JobArtifactDataPath": { + "type": "object", + "properties": { + "datastore_name": { + "type": "string", + "description": "Datastore containing the artifact content.", + "readOnly": true + }, + "relative_path": { + "type": "string", + "description": "Path relative to the datastore root.", + "readOnly": true + }, + "sql_data_path": { + "type": "object", + "additionalProperties": {}, + "description": "SQL path information, when the artifact is backed by SQL storage.", + "readOnly": true } }, - "description": "Model Deployment Definition" + "description": "Storage path details for an artifact." }, - "DeploymentType": { + "JobArtifactType": { "anyOf": [ { "type": "string" @@ -12552,963 +21249,1087 @@ { "type": "string", "enum": [ - "ModelDeployment" + "file", + "directory" ] } - ] - }, - "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" + "description": "Type of a job artifact." }, - "Eval": { + "JobAttempt": { "type": "object", "required": [ - "object", "id", - "name", - "data_source_config", - "testing_criteria", - "created_at", - "metadata" + "job_name" ], "properties": { - "object": { + "id": { "type": "string", - "enum": [ - "eval" - ], - "description": "The object type.", - "x-stainless-const": true, - "default": "eval" + "description": "The attempt identifier.", + "readOnly": true }, - "id": { + "run_id": { "type": "string", - "description": "Unique identifier for the evaluation." + "description": "The RunHistory run identifier backing this attempt.", + "readOnly": true }, - "name": { + "job_name": { "type": "string", - "description": "The name of the evaluation." + "description": "The job name this attempt belongs to.", + "readOnly": true }, - "data_source_config": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCustomDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalLogsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalStoredCompletionsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/AzureAIDataSourceConfig" - }, + "data_container_id": { + "type": "string", + "description": "The data container identifier backing this attempt's artifacts and metrics.", + "readOnly": true + }, + "sequence_number": { + "type": "integer", + "format": "int64", + "description": "Backend attempt sequence number.", + "readOnly": true + }, + "status": { + "allOf": [ { - "$ref": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" + "$ref": "#/components/schemas/JobAttemptStatus" } ], - "description": "Configuration of data sources used in runs of the evaluation." + "description": "The attempt status.", + "readOnly": true }, - "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/EvalGraderAzureAIEvaluator" - }, - { - "$ref": "#/components/schemas/EvalGraderInspectAI" - } - ] - }, - "description": "A list of testing criteria." + "status_reason": { + "type": "string", + "description": "Additional status reason.", + "readOnly": true }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) for when the eval was created." + "started_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Time the attempt started.", + "readOnly": true }, - "metadata": { - "type": "object", + "ended_at": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "nullable": true + "description": "Time the attempt ended.", + "readOnly": true }, - "modified_at": { + "last_started_at": { "allOf": [ { - "$ref": "#/components/schemas/integer" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "Unix timestamp (in seconds) when the evaluation run was last modified." + "description": "Most recent time the attempt started running.", + "readOnly": true }, - "created_by": { + "compute_duration": { "type": "string", - "description": "the name of the person who created the run." + "format": "duration", + "description": "Total compute duration consumed by the attempt.", + "readOnly": 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." - } - }, - "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" - } - }, - "EvalCsvFileIdSource": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { + "current_compute_time": { "type": "string", - "enum": [ - "file_id" - ], - "description": "The type of source, always `file_id`." + "format": "duration", + "description": "Current active compute duration for a running attempt.", + "readOnly": true }, - "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" + "queueing_info": { + "type": "object", + "additionalProperties": {}, + "description": "Queueing details associated with the attempt.", + "readOnly": true + }, + "compute_details": { + "allOf": [ + { + "$ref": "#/components/schemas/JobAttemptComputeDetails" + } ], - "description": "The type of data source, always `csv`." + "description": "Compute details associated with the attempt.", + "readOnly": true }, - "source": { + "error": { "allOf": [ { - "$ref": "#/components/schemas/EvalCsvFileIdSource" + "$ref": "#/components/schemas/JobAttemptError" } ], - "description": "The source of the CSV data, either inline content or a file reference." + "description": "Terminal error for the attempt, if any.", + "readOnly": true + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobAttemptWarning" + }, + "description": "Warnings emitted for the attempt.", + "readOnly": true + }, + "is_latest": { + "type": "boolean", + "description": "Whether this attempt is the current attempt for the job.", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a CSV data source for evaluation runs." + "description": "One execution attempt of a training job." }, - "EvalGraderAzureAIEvaluator": { + "JobAttemptComputeDetails": { "type": "object", - "required": [ - "type", - "name", - "evaluator_name" - ], "properties": { - "type": { + "vm_size": { "type": "string", - "enum": [ - "azure_ai_evaluator" - ], - "description": "The object type, which is always `azure_ai_evaluator`." + "description": "Virtual machine size used for this attempt.", + "readOnly": true }, - "name": { + "instance_type": { "type": "string", - "description": "The name of the grader." + "description": "Instance type used for this attempt.", + "readOnly": true }, - "evaluator_name": { - "type": "string", - "description": "The name of the evaluator." + "instance_count": { + "type": "integer", + "format": "int32", + "description": "Number of instances allocated to this attempt.", + "readOnly": true }, - "evaluator_version": { - "type": "string", - "description": "The version of the evaluator. Latest version if not specified." + "gpu_count": { + "type": "integer", + "format": "int32", + "description": "Number of GPUs allocated to this attempt.", + "readOnly": true }, - "initialization_parameters": { - "type": "object", - "additionalProperties": {}, - "description": "The initialization parameters for the evaluation. Must support structured outputs." + "region": { + "type": "string", + "description": "Region where this attempt was placed.", + "readOnly": true }, - "data_mapping": { + "properties": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "The model to use for the evaluation. Must support structured outputs." + "description": "Additional backend-specific compute placement properties.", + "readOnly": true } }, - "title": "AzureAIEvaluatorGrader" + "description": "Compute placement details for a job attempt." }, - "EvalGraderInspectAI": { + "JobAttemptError": { "type": "object", - "required": [ - "type", - "name", - "task_name" - ], "properties": { - "type": { + "code": { "type": "string", - "enum": [ - "inspect_ai" - ], - "description": "The object type, which is always `inspect_ai`." + "description": "Machine-readable error code." }, - "name": { + "message": { "type": "string", - "description": "The display name of the benchmark." + "description": "Human-readable error message." }, - "task_name": { - "type": "string", - "description": "The inspect_ai task module path (e.g., `inspect_evals/gpqa_diamond`)." + "details": { + "type": "object", + "additionalProperties": {}, + "description": "Additional error details." } }, - "description": "Grader inspect_ai definition for inspect_ai benchmark evaluators." + "description": "Error emitted during a job attempt." }, - "EvalResult": { - "type": "object", - "required": [ - "name", - "type", - "score", - "passed" + "JobAttemptIdentifier": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "latest" + ] + } + ], + "description": "Training job attempt identifier. Use 'latest' for the latest attempt." + }, + "JobAttemptStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "queued", + "running", + "completed", + "failed", + "canceled" + ] + } ], + "description": "Status of a job execution attempt." + }, + "JobAttemptWarning": { + "type": "object", "properties": { - "name": { + "code": { "type": "string", - "description": "name of the check" + "description": "Machine-readable warning code." }, - "type": { + "message": { "type": "string", - "description": "type of the check" - }, - "score": { - "type": "number", - "format": "float", - "description": "score" + "description": "Human-readable warning message." }, - "passed": { - "type": "boolean", - "description": "indicates if the check passed or failed" + "details": { + "type": "object", + "additionalProperties": {}, + "description": "Additional warning details." } }, - "description": "Result of the evaluation." + "description": "Warning emitted during a job attempt." }, - "EvalRun": { + "JobCreate": { "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" + "job_type", + "compute_id" ], "properties": { - "object": { + "name": { + "type": "string", + "description": "The name of the training job. This is case-sensitive." + }, + "job_type": { "type": "string", "enum": [ - "eval.run" + "command" ], - "description": "The type of the object. Always \"eval.run\".", - "x-stainless-const": true, - "default": "eval.run" + "description": "Job type." }, - "id": { + "command": { "type": "string", - "description": "Unique identifier for the evaluation run." + "description": "The command to execute on startup of the job. Required when training is not specified, and must be omitted when training is specified." }, - "eval_id": { + "environment_image_reference": { "type": "string", - "description": "The identifier of the associated evaluation." + "description": "ACR path or Azure ML environment reference. Required when training is not specified." }, - "status": { - "type": "string", - "description": "The status of the evaluation run." + "training": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" + } + ], + "description": "Declarative training recipe. When specified, the service compiles the recipe into the command and environment used for execution." }, - "model": { + "display_name": { "type": "string", - "description": "The model that is evaluated, if applicable." + "description": "Display name of job." }, - "name": { + "description": { "type": "string", - "description": "The name of the evaluation run." + "description": "The asset description text." }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "Unix timestamp (in seconds) when the evaluation run was created." + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." }, - "report_url": { + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The asset property dictionary." + }, + "code_id": { "type": "string", - "format": "uri", - "description": "The URL to the rendered evaluation run report on the UI dashboard." + "description": "Code asset reference." }, - "result_counts": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalRunResultCounts" - } - ], - "description": "Counters summarizing the outcomes of the evaluation run." + "compute_id": { + "type": "string", + "description": "Compute resource ID." }, - "per_model_usage": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalRunPerModelUsage" + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Input" }, - "description": "Usage statistics for each model during the evaluation run." + "description": "Mapping of input data bindings used in the job." }, - "per_testing_criteria_results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalRunPerTestingCriteriaResults" + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Output" }, - "description": "Results per testing criteria applied during the evaluation run." + "description": "Mapping of output data bindings used in the job." }, - "data_source": { - "oneOf": [ + "environment_variables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables included in the job." + }, + "resources": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateEvalJsonlRunDataSource" - }, + "$ref": "#/components/schemas/JobResourceConfiguration" + } + ], + "description": "Compute Resource configuration for the job." + }, + "gpu_count": { + "type": "integer", + "format": "int32", + "description": "Number of GPUs requested by the training job." + }, + "distribution": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSource" - }, + "$ref": "#/components/schemas/DistributionConfiguration" + } + ], + "description": "Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null." + }, + "limits": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSource" - }, + "$ref": "#/components/schemas/CommandJobLimits" + } + ], + "description": "Command Job limit." + }, + "queue_settings": { + "allOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "$ref": "#/components/schemas/QueueSettings" } ], - "description": "Information about the run's data source." + "description": "Queue settings for the job." + }, + "user_assigned_identity_id": { + "type": "string", + "description": "user-assigned managed identity" + }, + "status": { + "type": "string", + "description": "Status of the job.", + "readOnly": true + } + }, + "description": "Request body for creating a training job." + }, + "JobMetric": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Metric name.", + "readOnly": true + }, + "run_id": { + "type": "string", + "description": "Run identifier that emitted the metric.", + "readOnly": true + }, + "data_container_id": { + "type": "string", + "description": "Data container identifier that stores the metric.", + "readOnly": true }, - "metadata": { - "type": "object", + "metric_type": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/JobMetricType" } ], - "nullable": true + "description": "Metric type.", + "readOnly": true }, - "error": { - "$ref": "#/components/schemas/OpenAI.EvalApiError" + "description": { + "type": "string", + "description": "Metric description.", + "readOnly": true }, - "modified_at": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "description": "Unix timestamp (in seconds) when the evaluation run was last modified." + "label": { + "type": "string", + "description": "Metric label.", + "readOnly": true }, - "created_by": { + "num_cells": { + "type": "integer", + "format": "int32", + "description": "Number of metric cells.", + "readOnly": true + }, + "data_location": { "type": "string", - "description": "the name of the person who created the run." + "description": "Metric data location.", + "readOnly": true }, - "properties": { + "columns": { "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": "Column metadata for structured metric values.", + "readOnly": true + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/JobMetricSchema" + } + ], + "description": "Full metric schema metadata.", + "readOnly": true } }, - "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" - } + "description": "Metadata for a metric emitted by a job or run." }, - "EvalRunDataSource": { + "JobMetricAggregate": { "type": "object", "required": [ - "type" + "name" ], "properties": { - "type": { + "name": { "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_benchmark_preview": "#/components/schemas/AzureAIBenchmarkPreviewEvalRunDataSource" + "description": "Metric name.", + "readOnly": true + }, + "started_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Aggregate window start.", + "readOnly": true + }, + "ended_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Aggregate window end.", + "readOnly": true + }, + "values": { + "type": "object", + "additionalProperties": {}, + "description": "Aggregate values.", + "readOnly": true } }, - "description": "Base class for run data sources with discriminator support." + "description": "Aggregated values for a metric." }, - "EvalRunOutputItem": { + "JobMetricLastValue": { "type": "object", "required": [ - "object", - "id", - "run_id", - "eval_id", - "created_at", - "status", - "datasource_item_id", - "datasource_item", - "results", - "sample" + "name" ], "properties": { - "object": { + "name": { "type": "string", - "enum": [ - "eval.run.output_item" + "description": "Metric name.", + "readOnly": true + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/JobMetricPoint" + } ], - "description": "The type of the object. Always \"eval.run.output_item\".", - "x-stainless-const": true, - "default": "eval.run.output_item" + "description": "Latest metric point.", + "readOnly": true + } + }, + "description": "Latest value for a metric." + }, + "JobMetricPoint": { + "type": "object", + "properties": { + "metric_id": { + "type": "string", + "description": "Metric identifier.", + "readOnly": true }, - "id": { + "name": { "type": "string", - "description": "Unique identifier for the evaluation run output item." + "description": "Metric name.", + "readOnly": true }, "run_id": { "type": "string", - "description": "The identifier of the evaluation run associated with this output item." + "description": "Run identifier that emitted the metric.", + "readOnly": true }, - "eval_id": { + "data_container_id": { "type": "string", - "description": "The identifier of the evaluation group." + "description": "Data container identifier that stores the metric.", + "readOnly": true }, - "created_at": { + "metric_type": { + "allOf": [ + { + "$ref": "#/components/schemas/JobMetricType" + } + ], + "description": "Metric type.", + "readOnly": true + }, + "description": { + "type": "string", + "description": "Metric description.", + "readOnly": true + }, + "label": { + "type": "string", + "description": "Metric label.", + "readOnly": true + }, + "num_cells": { "type": "integer", - "format": "unixtime", - "description": "Unix timestamp (in seconds) when the evaluation run was created." + "format": "int32", + "description": "Number of metric cells.", + "readOnly": true }, - "status": { + "data_location": { "type": "string", - "description": "The status of the evaluation run." + "description": "Metric data location.", + "readOnly": true }, - "datasource_item_id": { + "schema": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/JobMetricSchema" } ], - "description": "The identifier for the data source item." - }, - "datasource_item": { - "type": "object", - "additionalProperties": {}, - "description": "Details of the input data source item." + "description": "Full metric schema metadata.", + "readOnly": true }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemResult" - }, - "description": "A list of grader results for this output item." + "step": { + "type": "integer", + "format": "int64", + "description": "Metric step.", + "readOnly": true }, - "sample": { + "created_at": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalRunOutputItemSample" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "A sample containing the input and output of the evaluation run." + "description": "Time the metric point was created.", + "readOnly": true + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Metric data values.", + "readOnly": true } }, - "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" - } + "description": "A metric data point." }, - "EvalRunOutputItemResult": { + "JobMetricSample": { "type": "object", "required": [ "name", - "score", - "passed" + "points" ], "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." - }, - "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." + "description": "Metric name.", + "readOnly": true }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobMetricPoint" }, - "description": "Additional details about the test criteria metric." + "description": "Sampled metric points.", + "readOnly": true } }, - "additionalProperties": {}, - "description": "A single grader result for an evaluation run output item.", - "title": "EvalRunOutputItemResult" + "description": "Sampled values for a metric." }, - "EvalRunOutputItemSampleInput": { + "JobMetricSchema": { "type": "object", - "required": [ - "role", - "content", - "tool_calls" - ], "properties": { - "role": { - "type": "string" - }, - "content": { - "type": "string" + "num_properties": { + "type": "integer", + "format": "int32", + "description": "Number of properties in the schema.", + "readOnly": true }, - "tool_calls": { + "properties": { "type": "array", "items": { - "$ref": "#/components/schemas/CompletionMessageToolCallChunk" + "$ref": "#/components/schemas/JobMetricSchemaProperty" }, - "description": "Tool calls made within the message, if any." + "description": "Metric schema properties.", + "readOnly": true } }, - "description": "A message in the evaluation run." + "description": "Full metric schema metadata." }, - "EvalRunOutputItemSampleOutput": { + "JobMetricSchemaProperty": { "type": "object", - "required": [ - "tool_calls" - ], "properties": { - "role": { - "type": "string" + "property_id": { + "type": "string", + "description": "Metric schema property identifier.", + "readOnly": true }, - "content": { + "name": { + "type": "string", + "description": "Metric schema property name.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Metric schema property type.", + "readOnly": true + } + }, + "description": "One property in a metric schema." + }, + "JobMetricType": { + "anyOf": [ + { "type": "string" }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CompletionMessageToolCallChunk" - }, - "description": "Tool calls made within the message, if any." + { + "type": "string", + "enum": [ + "scalar", + "table", + "image" + ] + } + ], + "description": "The kind of metric emitted by a job." + }, + "JobOperationError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Machine-readable error code." + }, + "message": { + "type": "string", + "description": "Human-readable error message." + }, + "details": { + "type": "object", + "additionalProperties": {}, + "description": "Additional error information." } }, - "description": "A message in the evaluation run." + "description": "Error details for an asynchronous training job operation." }, - "EvalRunResultCompareItem": { + "JobOperationResource": { "type": "object", "required": [ - "treatmentRunId", - "treatmentRunSummary", - "deltaEstimate", - "pValue", - "treatmentEffect" + "status" ], "properties": { - "treatmentRunId": { + "id": { "type": "string", - "description": "The treatment run ID." + "description": "Operation resource ID.", + "readOnly": true }, - "treatmentRunSummary": { + "name": { + "type": "string", + "description": "Operation name.", + "readOnly": true + }, + "status": { "allOf": [ { - "$ref": "#/components/schemas/EvalRunResultSummary" + "$ref": "#/components/schemas/JobOperationStatus" } ], - "description": "Summary statistics of the treatment run." + "description": "Operation status.", + "readOnly": true }, - "deltaEstimate": { - "type": "number", - "format": "float", - "description": "Estimated difference between treatment and baseline." + "properties": { + "type": "object", + "additionalProperties": {}, + "description": "Operation result properties.", + "readOnly": true }, - "pValue": { + "started_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Operation start time.", + "readOnly": true + }, + "ended_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Operation end time.", + "readOnly": true + }, + "percent_complete": { "type": "number", - "format": "float", - "description": "P-value for the treatment effect." + "format": "double", + "description": "Operation completion percentage from 0 to 100.", + "readOnly": true }, - "treatmentEffect": { + "error": { "allOf": [ { - "$ref": "#/components/schemas/TreatmentEffectType" + "$ref": "#/components/schemas/JobOperationError" } ], - "description": "Type of treatment effect." + "description": "Operation error information.", + "readOnly": true } }, - "description": "Metric comparison for a treatment against the baseline." + "description": "Asynchronous training job operation resource." }, - "EvalRunResultComparison": { + "JobOperationStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "in_progress", + "deleting", + "succeeded", + "failed", + "canceled" + ] + } + ], + "description": "Status of an asynchronous training job operation." + }, + "JobOutputReference": { "type": "object", "required": [ - "testingCriteria", - "metric", - "evaluator", - "baselineRunSummary", - "compareItems" + "name" ], "properties": { - "testingCriteria": { - "type": "string", - "description": "Name of the testing criteria." - }, - "metric": { + "name": { "type": "string", - "description": "Metric being evaluated." + "description": "Output name.", + "readOnly": true }, - "evaluator": { - "type": "string", - "description": "Name of the evaluator for this testing criteria." + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/AssetTypes" + } + ], + "description": "Output asset type.", + "readOnly": true }, - "baselineRunSummary": { + "mode": { "allOf": [ { - "$ref": "#/components/schemas/EvalRunResultSummary" + "$ref": "#/components/schemas/InputOutputModes" } ], - "description": "Summary statistics of the baseline run." + "description": "Output delivery mode.", + "readOnly": true }, - "compareItems": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunResultCompareItem" - }, - "description": "List of comparison results for each treatment run." + "uri": { + "type": "string", + "description": "Output storage URI.", + "readOnly": true + }, + "asset_name": { + "type": "string", + "description": "Registered asset name, if the output produced an asset.", + "readOnly": true + }, + "asset_version": { + "type": "string", + "description": "Registered asset version, if the output produced an asset.", + "readOnly": true + }, + "base_model_id": { + "type": "string", + "description": "Base model ID for model outputs.", + "readOnly": true + }, + "description": { + "type": "string", + "description": "Output description.", + "readOnly": true } }, - "description": "Comparison results for treatment runs against the baseline." + "description": "Named output produced by a job." }, - "EvalRunResultSummary": { + "JobResourceConfiguration": { "type": "object", - "required": [ - "runId", - "sampleCount", - "average", - "standardDeviation" - ], "properties": { - "runId": { - "type": "string", - "description": "The evaluation run ID." - }, - "sampleCount": { + "instance_count": { "type": "integer", "format": "int32", - "description": "Number of samples in the evaluation run." + "description": "Optional number of instances or nodes used by the compute target." }, - "average": { - "type": "number", - "format": "float", - "description": "Average value of the metric in the evaluation run." + "instance_type": { + "type": "string", + "description": "Optional type of VM used as supported by the compute target." }, - "standardDeviation": { - "type": "number", - "format": "float", - "description": "Standard deviation of the metric in the evaluation run." + "properties": { + "type": "object", + "additionalProperties": {}, + "description": "Additional properties bag." + }, + "shm_size": { + "type": "string", + "description": "Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes)." + }, + "docker_args": { + "type": "string", + "description": "Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types." } }, - "description": "Summary statistics of a metric in an evaluation run." + "description": "Compute Resource configuration for the job." }, - "EvaluationComparisonInsightRequest": { + "JobServiceType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "studio", + "tracking" + ] + } + ], + "description": "Job service endpoint type." + }, + "JobType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "command" + ] + } + ], + "description": "Type of a job." + }, + "KtoFeedbackColumnMapping": { "type": "object", "required": [ - "type", - "evalId", - "baselineRunId", - "treatmentRunIds" + "prompt", + "response", + "label" ], "properties": { - "type": { + "prompt": { "type": "string", - "enum": [ - "EvaluationComparison" - ], - "description": "The type of request." + "description": "Actual dataset column name containing prompts, for example 'prompt' or 'question'." }, - "evalId": { + "response": { "type": "string", - "description": "Identifier for the evaluation." + "description": "Actual dataset column name containing responses, for example 'response', 'completion', or 'answer'." }, - "baselineRunId": { + "label": { "type": "string", - "description": "The baseline run ID for comparison." + "description": "Actual dataset column name containing the binary desirability label, for example 'label' or 'is_desirable'." + } + }, + "description": "Column mapping for KTO feedback datasets. Keys are logical fields expected by KTO; values are the exact column names in the referenced dataset asset." + }, + "KtoTrainingConfiguration": { + "type": "object", + "required": [ + "algorithm" + ], + "properties": { + "algorithm": { + "type": "string", + "enum": [ + "kto" + ], + "description": "Training algorithm, always 'kto'." }, - "treatmentRunIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of treatment run IDs for comparison." + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/InsightRequest" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "Evaluation Comparison Request" + "description": "Kahneman-Tversky optimization training recipe." }, - "EvaluationComparisonInsightResult": { + "KtoTrainingDatasetConfiguration": { "type": "object", "required": [ - "type", - "comparisons", - "method" + "train", + "columns" ], "properties": { - "type": { + "train": { "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." + "description": "Training dataset asset reference." }, - "method": { + "eval": { "type": "string", - "description": "The statistical method used for comparison." + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ + { + "$ref": "#/components/schemas/KtoFeedbackColumnMapping" + } + ], + "description": "Mapping from KTO logical fields to actual dataset column names. KTO requires 'prompt', 'response', and 'label'." + }, + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } + ], + "description": "Conversational data formatting options." } }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "Insights from the evaluation comparison." + "description": "Dataset configuration for managed KTO training." }, - "EvaluationResultSample": { + "KtoTrainingJob": { "type": "object", "required": [ "type", - "evaluationResult" + "dataset" ], "properties": { "type": { "type": "string", "enum": [ - "EvaluationResultSample" + "kto" ], - "description": "Evaluation Result Sample Type" + "description": "Managed training job type, always 'kto'." }, - "evaluationResult": { + "dataset": { "allOf": [ { - "$ref": "#/components/schemas/EvalResult" + "$ref": "#/components/schemas/KtoTrainingDatasetConfiguration" } ], - "description": "Evaluation result for the analysis sample." + "description": "Training and optional evaluation datasets." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/KtoTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed KTO." } }, "allOf": [ { - "$ref": "#/components/schemas/InsightSample" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "description": "A sample from the evaluation result." + "description": "Request body for creating a managed KTO training job from a base model." }, - "EvaluationRule": { + "KtoTrainingRuntimeConfiguration": { "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": { + "framework": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleAction" + "$ref": "#/components/schemas/TrainingFramework" } ], - "description": "Definition of the evaluation rule action.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "Evaluations=V1Preview" - ] - } + "description": "Training framework implementation. If omitted, the service selects a compatible framework." }, - "filter": { + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." + }, + "desirable_weight": { + "type": "number", + "format": "double", + "description": "Weight applied to desirable examples." + }, + "undesirable_weight": { + "type": "number", + "format": "double", + "description": "Weight applied to undesirable examples." + }, + "lora": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleFilter" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "Filter condition of the evaluation rule." + "description": "LoRA adapter configuration." }, - "eventType": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleEventType" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "Event type that the evaluation rule applies to." - }, - "enabled": { - "type": "boolean", - "description": "Indicates whether the evaluation rule is enabled. Default is true." + "description": "Evaluation configuration." }, - "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": { + "packaging": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleActionType" + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" } ], - "description": "Type of the evaluation action." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", - "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" + "description": "Model artifact packaging options." } }, - "description": "Evaluation action model." + "description": "Runtime options for managed KTO training." }, - "EvaluationRuleActionType": { + "ListViewType": { "anyOf": [ { "type": "string" @@ -13516,491 +22337,473 @@ { "type": "string", "enum": [ - "continuousEvaluation", - "humanEvaluationPreview" + "active_only", + "archived_only", + "all" ] } ], - "description": "Type of the evaluation action." + "description": "Specifies which jobs to include in a list result based on their lifecycle state." }, - "EvaluationRuleEventType": { - "anyOf": [ - { - "type": "string" - }, - { + "ManagedAzureAISearchIndex": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { "type": "string", "enum": [ - "responseCompleted", - "manual" - ] + "ManagedAzureSearch" + ], + "description": "Type of index" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Index" } ], - "description": "Type of the evaluation rule event." + "description": "Managed Azure AI Search Index Definition" }, - "EvaluationRuleFilter": { + "ManagedAzureAISearchIndexUpdate": { "type": "object", "required": [ - "agentName" + "type" ], "properties": { - "agentName": { + "type": { "type": "string", - "description": "Filter by agent name." + "enum": [ + "ManagedAzureSearch" + ], + "description": "Type of index" } }, - "description": "Evaluation filter model." + "allOf": [ + { + "$ref": "#/components/schemas/IndexUpdate" + } + ], + "description": "Managed Azure AI Search Index Definition" }, - "EvaluationRunClusterInsightRequest": { + "MemoryItem": { "type": "object", "required": [ - "type", - "evalId", - "runIds" + "memory_id", + "updated_at", + "scope", + "content", + "kind" ], "properties": { - "type": { + "memory_id": { "type": "string", - "enum": [ - "EvaluationRunClusterInsight" - ], - "description": "The type of insights request." + "description": "The unique ID of the memory item." }, - "evalId": { + "updated_at": { + "type": "integer", + "format": "unixtime", + "description": "The last update time of the memory item." + }, + "scope": { "type": "string", - "description": "Evaluation Id for the insights." + "description": "The namespace that logically groups and isolates memories, such as a user ID." }, - "runIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of evaluation run IDs for the insights." + "content": { + "type": "string", + "description": "The content of the memory." }, - "modelConfiguration": { + "kind": { "allOf": [ { - "$ref": "#/components/schemas/InsightModelConfiguration" + "$ref": "#/components/schemas/MemoryItemKind" } ], - "description": "Configuration of the model used in the insight generation." + "description": "The kind of the memory item." } }, - "allOf": [ + "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": [ { - "$ref": "#/components/schemas/InsightRequest" + "type": "string" + }, + { + "type": "string", + "enum": [ + "user_profile", + "chat_summary" + ] } ], - "description": "Insights on set of Evaluation Results" + "description": "Memory item kind.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluationRunClusterInsightResult": { + "MemoryOperation": { "type": "object", "required": [ - "type", - "clusterInsight" + "kind", + "memory_item" ], "properties": { - "type": { - "type": "string", - "enum": [ - "EvaluationRunClusterInsight" + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryOperationKind" + } ], - "description": "The type of insights result." + "description": "The type of memory operation being performed." }, - "clusterInsight": { - "$ref": "#/components/schemas/ClusterInsightResult" + "memory_item": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItem" + } + ], + "description": "The memory item to create, update, or delete." } }, - "allOf": [ + "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": [ { - "$ref": "#/components/schemas/InsightResult" + "type": "string" + }, + { + "type": "string", + "enum": [ + "create", + "update", + "delete" + ] } ], - "description": "Insights from the evaluation run cluster analysis." + "description": "Memory operation kind.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluationScheduleTask": { + "MemorySearchItem": { "type": "object", "required": [ - "type", - "evalId", - "evalRun" + "memory_item" ], "properties": { - "type": { - "type": "string", - "enum": [ - "Evaluation" - ] - }, - "evalId": { - "type": "string", - "description": "Identifier of the evaluation group." - }, - "evalRun": { - "type": "object", - "description": "The evaluation run payload." + "memory_item": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItem" + } + ], + "description": "Retrieved memory item." } }, - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleTask" + "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": "Evaluation task for the schedule." + }, + "description": "Memory search options.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluationTaxonomy": { + "MemorySearchPreviewTool": { "type": "object", "required": [ - "name", - "version", - "taxonomyInput" + "type", + "memory_store_name", + "scope" ], "properties": { - "id": { + "type": { "type": "string", - "description": "Asset ID, a unique identifier for the asset", - "readOnly": true + "enum": [ + "memory_search_preview" + ], + "description": "The type of the tool. Always `memory_search_preview`." }, "name": { "type": "string", - "description": "The name of the resource", - "readOnly": true + "description": "Optional user-defined name for this tool or configuration." }, - "version": { + "description": { "type": "string", - "description": "The version of the resource", - "readOnly": true + "description": "Optional user-defined description for this tool or configuration." }, - "taxonomyInput": { + "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/EvaluationTaxonomyInput" + "$ref": "#/components/schemas/MemorySearchOptions" } ], - "description": "Input configuration for the evaluation taxonomy." - }, - "taxonomyCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxonomyCategory" - }, - "description": "List of taxonomy categories." + "description": "Options for searching the memory store." }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the evaluation taxonomy." + "update_delay": { + "type": "integer", + "format": "int32", + "description": "Time to wait before updating memories after inactivity (seconds). Default 300.", + "default": 300 } }, - "description": "Evaluation Taxonomy Definition" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool for integrating memories into the agent." }, - "EvaluationTaxonomyCreateOrUpdate": { + "MemorySearchToolCallItemParam": { "type": "object", "required": [ - "taxonomyInput" + "type" ], "properties": { - "description": { + "type": { "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." + "enum": [ + "memory_search_call" + ] }, - "taxonomyCategories": { + "results": { "type": "array", "items": { - "$ref": "#/components/schemas/TaxonomyCategory" - }, - "description": "List of taxonomy categories." - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/MemorySearchItem" }, - "description": "Additional properties for the evaluation taxonomy." + "nullable": true, + "description": "The results returned from the memory search." } }, - "description": "Evaluation Taxonomy Definition" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ] }, - "EvaluationTaxonomyInput": { + "MemorySearchToolCallItemResource": { "type": "object", "required": [ - "type" + "type", + "status" ], "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" + "memory_search_call" ] - } - ], - "description": "Type of the evaluation taxonomy input." - }, - "EvaluationTaxonomyInputUpdate": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTaxonomyInputType" - } + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "incomplete", + "failed" ], - "description": "Input type of the evaluation taxonomy." + "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." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "agent": "#/components/schemas/AgentTaxonomyInputUpdate" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" } - }, - "description": "Input configuration for the evaluation taxonomy." + ] }, - "EvaluationTaxonomyUpdate": { + "MemoryStoreDefaultDefinition": { "type": "object", + "required": [ + "kind", + "chat_model", + "embedding_model" + ], "properties": { - "description": { + "kind": { "type": "string", - "description": "The asset description text." + "enum": [ + "default" + ], + "description": "The kind of the memory store." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "chat_model": { + "type": "string", + "description": "The name or identifier of the chat completion model deployment used for memory processing." }, - "taxonomyInput": { + "embedding_model": { + "type": "string", + "description": "The name or identifier of the embedding model deployment used for memory processing." + }, + "options": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationTaxonomyInputUpdate" + "$ref": "#/components/schemas/MemoryStoreDefaultOptions" } ], - "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": "Default memory store options." } }, - "description": "Evaluation Taxonomy Definition" - }, - "EvaluatorCategory": { - "anyOf": [ - { - "type": "string" - }, + "allOf": [ { - "type": "string", - "enum": [ - "quality", - "safety", - "agents" - ] + "$ref": "#/components/schemas/MemoryStoreDefinition" } ], - "description": "The category of the evaluator" + "description": "Default memory store implementation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorCredentialRequest": { + "MemoryStoreDefaultOptions": { "type": "object", "required": [ - "blobUri" + "user_profile_enabled", + "chat_summary_enabled" ], "properties": { - "blobUri": { + "user_profile_enabled": { + "type": "boolean", + "description": "Whether to enable user profile extraction and storage. Default is true.", + "default": true + }, + "user_profile_details": { "type": "string", - "format": "uri", - "description": "The blob URI for the evaluator storage. Example: `https://account.blob.core.windows.net:443/container`" + "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": "Request body for getting evaluator credentials" + "description": "Default memory store configurations.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorDefinition": { + "MemoryStoreDefinition": { "type": "object", "required": [ - "type" + "kind" ], "properties": { - "type": { + "kind": { "allOf": [ { - "$ref": "#/components/schemas/EvaluatorDefinitionType" + "$ref": "#/components/schemas/MemoryStoreKind" } ], - "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" + "description": "The kind of the memory store." } }, "discriminator": { - "propertyName": "type", + "propertyName": "kind", "mapping": { - "code": "#/components/schemas/CodeBasedEvaluatorDefinition", - "prompt": "#/components/schemas/PromptBasedEvaluatorDefinition" + "default": "#/components/schemas/MemoryStoreDefaultDefinition" } }, - "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" + "description": "Base definition for memory store configurations.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorMetric": { + "MemoryStoreDeleteScopeResponse": { "type": "object", + "required": [ + "object", + "name", + "scope", + "deleted" + ], "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorMetricType" - } - ], - "description": "Type of the metric." - }, - "desirable_direction": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorMetricDirection" - } + "object": { + "type": "string", + "enum": [ + "memory_store.scope.deleted" ], - "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" + "description": "The object type. Always 'memory_store.scope.deleted'." }, - "max_value": { - "type": "number", - "format": "float", - "description": "Maximum value for the metric. If not specified, it is assumed to be unbounded." + "name": { + "type": "string", + "description": "The name of the memory store." }, - "threshold": { - "type": "number", - "format": "float", - "description": "Default pass/fail threshold for this metric." + "scope": { + "type": "string", + "description": "The scope from which memories were deleted." }, - "is_primary": { + "deleted": { "type": "boolean", - "description": "Indicates if this metric is primary when there are multiple metrics." + "description": "Whether the deletion operation was successful." } }, - "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" + "description": "Response for deleting memories from a scope.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorType": { + "MemoryStoreKind": { "anyOf": [ { "type": "string" @@ -14008,268 +22811,288 @@ { "type": "string", "enum": [ - "builtin", - "custom" + "default" ] } ], - "description": "The type of the evaluator" + "description": "The type of memory store implementation to use.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorVersion": { + "MemoryStoreObject": { "type": "object", "required": [ - "evaluator_type", - "categories", - "definition", - "created_by", + "object", + "id", "created_at", - "modified_at", + "updated_at", "name", - "version" + "definition" ], "properties": { - "display_name": { + "object": { "type": "string", - "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." + "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": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (seconds) when the memory store was created." + }, + "updated_at": { + "type": "integer", + "format": "unixtime", + "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": "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" + "description": "Arbitrary key-value metadata to associate with the memory store." }, "definition": { "allOf": [ { - "$ref": "#/components/schemas/EvaluatorDefinition" + "$ref": "#/components/schemas/MemoryStoreDefinition" } ], - "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": "The definition of the memory store." } }, - "description": "Evaluator Definition" + "description": "A memory store that can store and retrieve user memories.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorVersionCreate": { + "MemoryStoreOperationUsage": { "type": "object", "required": [ - "evaluator_type", - "categories", - "definition" + "embedding_tokens", + "input_tokens", + "input_tokens_details", + "output_tokens", + "output_tokens_details", + "total_tokens" ], "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" + "embedding_tokens": { + "type": "integer", + "format": "int32", + "description": "The number of embedding tokens." }, - "evaluator_type": { + "input_tokens": { "allOf": [ { - "$ref": "#/components/schemas/EvaluatorType" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The type of the evaluator" + "description": "The number of input tokens." }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorCategory" - }, - "description": "The categories of the evaluator" + "input_tokens_details": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" + } + ], + "description": "A detailed breakdown of the input tokens." }, - "definition": { + "output_tokens": { "allOf": [ { - "$ref": "#/components/schemas/EvaluatorDefinition" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "Definition of the evaluator" + "description": "The number of output tokens." }, - "description": { - "type": "string", - "description": "The asset description text." + "output_tokens_details": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" + } + ], + "description": "A detailed breakdown of the output tokens." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "total_tokens": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The total number of tokens used." } }, - "description": "Evaluator Definition" + "description": "Usage statistics of a memory store operation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorVersionUpdate": { + "MemoryStoreSearchResponse": { "type": "object", + "required": [ + "search_id", + "memories", + "usage" + ], "properties": { - "display_name": { + "search_id": { "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" + "description": "The unique ID of this search request. Use this value as previous_search_id in subsequent requests to perform incremental searches." }, - "categories": { + "memories": { "type": "array", "items": { - "$ref": "#/components/schemas/EvaluatorCategory" + "$ref": "#/components/schemas/MemorySearchItem" }, - "description": "The categories of the evaluator" - }, - "description": { - "type": "string", - "description": "The asset description text." + "description": "Related memory items found during the search operation." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "usage": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreOperationUsage" + } + ], + "description": "Usage statistics associated with the memory search operation." } }, - "description": "Evaluator Definition" + "description": "Memory search response.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "FabricDataAgentToolCall": { + "MemoryStoreUpdateCompletedResult": { "type": "object", "required": [ - "type", - "call_id", - "arguments", - "status" + "memory_operations", + "usage" ], "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." + "memory_operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemoryOperation" + }, + "description": "A list of individual memory operations that were performed during the update." }, - "status": { + "usage": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/MemoryStoreOperationUsage" } ], - "description": "The status of the tool call." + "description": "Usage statistics associated with the memory update operation." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A Fabric data agent tool call." + "description": "Memory update result.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "FabricDataAgentToolCallOutput": { + "MemoryStoreUpdateResponse": { "type": "object", "required": [ - "type", - "call_id", + "update_id", "status" ], "properties": { - "type": { + "update_id": { "type": "string", - "enum": [ - "fabric_dataagent_preview_call_output" - ] + "description": "The unique ID of this update request. Use this value as previous_update_id in subsequent requests to perform incremental updates." }, - "call_id": { + "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 unique ID of the tool call generated by the model." + "description": "The update_id the operation was superseded by when status is \"superseded\"." }, - "output": { + "result": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallOutputContent" + "$ref": "#/components/schemas/MemoryStoreUpdateCompletedResult" } ], - "description": "The output from the Fabric data agent tool call." + "description": "The result of memory store update operation when status is \"completed\"." }, - "status": { + "error": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/OpenAI.Error" } ], - "description": "The status of the tool call." + "description": "Error object that describes the error when status is \"failed\"." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } + "description": "Provides the status of a memory store update operation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreUpdateStatus": { + "type": "string", + "enum": [ + "queued", + "in_progress", + "completed", + "failed", + "superseded" ], - "description": "The output of a Fabric data agent tool call." + "description": "Status of a memory store update operation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "FabricDataAgentToolParameters": { + "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." @@ -14278,683 +23101,589 @@ "type": "string", "description": "Optional user-defined description for this tool or configuration." }, - "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." - }, - "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" + "fabric_dataagent_preview": { + "allOf": [ + { + "$ref": "#/components/schemas/FabricDataAgentToolParameters" + } ], - "description": "Dataset type" + "description": "The fabric data agent tool parameters." } }, "allOf": [ { - "$ref": "#/components/schemas/DatasetVersionUpdate" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "FileDatasetVersion Definition" + "description": "The input definition information for a Microsoft Fabric tool as used to configure an agent." }, - "FolderDatasetVersion": { + "Mlflow.MlflowPayload": { "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "uri_folder" - ], - "description": "Dataset type" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/DatasetVersion" - } - ], - "description": "FileDatasetVersion Definition" + "additionalProperties": {}, + "description": "Generic MLflow compatibility request payload." }, - "FolderDatasetVersionUpdate": { + "Mlflow.MlflowResponse": { "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "uri_folder" - ], - "description": "Dataset type" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/DatasetVersionUpdate" - } - ], - "description": "FileDatasetVersion Definition" + "additionalProperties": {}, + "description": "Generic MLflow compatibility response payload." }, - "FunctionToolCall": { + "Model": { "type": "object", "required": [ "name", - "arguments" + "version" ], "properties": { - "name": { + "id": { "type": "string", - "description": "The name of the function to call." + "description": "Asset ID, a unique identifier for the model asset.", + "readOnly": true }, - "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." - }, - "HostedAgentDefinition": { - "type": "object", - "required": [ - "kind", - "container_protocol_versions", - "cpu", - "memory" - ], - "properties": { - "kind": { + "name": { "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": "a2a", - "version": "v0.3.0" - } - ] + "description": "The name of the model asset.", + "readOnly": true }, - "cpu": { + "version": { "type": "string", - "description": "The CPU configuration for the hosted agent.", - "example": "0.25" + "description": "The version of the model asset.", + "readOnly": true }, - "memory": { + "description": { "type": "string", - "description": "The memory configuration for the hosted agent.", - "example": "0.5Gi" + "description": "The model asset description text.", + "readOnly": true }, - "environment_variables": { + "tags": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Environment variables to set in the hosted agent container.", - "example": { - "name": "LOG_LEVEL", - "value": "debug" - } + "description": "Tags associated with the model asset.", + "readOnly": true }, - "image": { + "uri": { "type": "string", - "description": "The image ID for the agent, applicable to image-based hosted agents.", - "example": "my-registry.azurecr.io/my-hosted-agent:latest" - } - }, - "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": { + "description": "URI of the registered model artifact.", + "readOnly": true + }, + "base_model": { "type": "string", - "enum": [ - "Hourly" - ] + "description": "Base model used to create this model, when the model was produced by managed training.", + "readOnly": true + }, + "training_job": { + "type": "string", + "description": "Backing training job that produced this model, when available.", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/RecurrenceSchedule" - } - ], - "description": "Hourly recurrence schedule." + "description": "Model asset produced by managed model training." }, - "HumanEvaluationPreviewRuleAction": { + "ModelDeployment": { "type": "object", "required": [ "type", - "templateId" + "modelName", + "modelVersion", + "modelPublisher", + "capabilities", + "sku" ], "properties": { "type": { "type": "string", "enum": [ - "humanEvaluationPreview" - ] + "ModelDeployment" + ], + "description": "The type of the deployment" }, - "templateId": { + "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/AssetId" + "$ref": "#/components/schemas/Sku" } ], - "description": "Human evaluation template Id." + "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/EvaluationRuleAction" + "$ref": "#/components/schemas/Deployment" } ], - "description": "Evaluation rule action for human evaluation." + "description": "Model Deployment Definition" }, - "Index": { + "ModelSamplingParams": { "type": "object", "required": [ - "type", - "name", - "version" + "temperature", + "top_p", + "seed", + "max_completion_tokens" ], "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/IndexType" - } - ], - "description": "Type of index" + "temperature": { + "type": "number", + "format": "float", + "description": "The temperature parameter for sampling." }, - "id": { - "type": "string", - "description": "Asset ID, a unique identifier for the asset", - "readOnly": true + "top_p": { + "type": "number", + "format": "float", + "description": "The top-p parameter for nucleus sampling." }, - "name": { - "type": "string", - "description": "The name of the resource", - "readOnly": true + "seed": { + "type": "integer", + "format": "int32", + "description": "The random seed for reproducibility." }, - "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" + "max_completion_tokens": { + "type": "integer", + "format": "int32", + "description": "The maximum number of tokens allowed in the completion." } }, - "description": "Index resource Definition" - }, - "IndexType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "AzureSearch", - "CosmosDBNoSqlVectorStore", - "ManagedAzureSearch" - ] - } - ] + "description": "Represents a set of parameters used to control the sampling behavior of a language model during text generation." }, - "IndexUpdate": { + "ModelSamplingParamsUpdate": { "type": "object", - "required": [ - "type" - ], "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/IndexType" - } - ], - "description": "Type of index" + "temperature": { + "type": "number", + "format": "float", + "description": "The temperature parameter for sampling." }, - "description": { - "type": "string", - "description": "The asset description text." + "top_p": { + "type": "number", + "format": "float", + "description": "The top-p parameter for nucleus sampling." }, - "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" + "seed": { + "type": "integer", + "format": "int32", + "description": "The random seed for reproducibility." + }, + "max_completion_tokens": { + "type": "integer", + "format": "int32", + "description": "The maximum number of tokens allowed in the completion." } }, - "description": "Index resource Definition" + "description": "Represents a set of parameters used to control the sampling behavior of a language model during text generation." }, - "Insight": { + "ModelTrainingComputeConfiguration": { "type": "object", "required": [ - "id", - "metadata", - "state", - "displayName", - "request" + "id" ], "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 + "description": "Compute resource ID used to run the managed training job." }, - "state": { + "resources": { "allOf": [ { - "$ref": "#/components/schemas/Azure.Core.Foundations.OperationState" + "$ref": "#/components/schemas/JobResourceConfiguration" } - ], - "description": "The current state of the insights.", - "readOnly": true - }, - "displayName": { - "type": "string", - "description": "User friendly display name for the insight." + ], + "description": "Compute resource configuration for the managed training job." }, - "request": { + "gpu_count": { + "type": "integer", + "format": "int32", + "description": "Number of GPUs requested by the managed training job." + }, + "distribution": { "allOf": [ { - "$ref": "#/components/schemas/InsightRequest" + "$ref": "#/components/schemas/DistributionConfiguration" } ], - "description": "Request for the insights analysis." + "description": "Distribution configuration for the managed training job." }, - "result": { + "queue_settings": { "allOf": [ { - "$ref": "#/components/schemas/InsightResult" + "$ref": "#/components/schemas/QueueSettings" } ], - "description": "The result of the insights report.", - "readOnly": true + "description": "Queue settings for the managed training job." + }, + "user_assigned_identity_id": { + "type": "string", + "description": "ARM resource ID of a user-assigned managed identity attached to the Foundry project." } }, - "description": "The response body for cluster insights." + "description": "Compute placement for a managed model training job." }, - "InsightCluster": { + "ModelTrainingJobCreate": { "type": "object", "required": [ - "id", - "label", - "suggestion", - "suggestionTitle", - "description", - "weight" + "type", + "model", + "compute" ], "properties": { - "id": { - "type": "string", - "description": "The id of the analysis cluster." - }, - "label": { + "type": { "type": "string", - "description": "Label for the cluster" + "description": "Managed training job type." }, - "suggestion": { + "name": { "type": "string", - "description": "Suggestion for the cluster" + "description": "Optional name of the model to create. If omitted, the service generates one." }, - "suggestionTitle": { + "version": { "type": "string", - "description": "The title of the suggestion for the cluster" + "description": "Optional version of the model to create. If omitted, the service generates one." }, "description": { "type": "string", - "description": "Description of the analysis cluster." + "description": "Optional description for the model to create." }, - "weight": { - "type": "integer", - "format": "int32", - "description": "The weight of the analysis cluster. This indicate number of samples in the cluster." + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Optional tags for the model to create." }, - "subClusters": { - "description": "List of subclusters within this cluster. Empty if no subclusters exist.", - "type": "array", - "items": { - "$ref": "#/components/schemas/InsightCluster" - } + "model": { + "type": "string", + "description": "Base model asset reference." }, - "samples": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InsightSample" - }, - "description": "List of samples that belong to this cluster. Empty if samples are part of subclusters." + "compute": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingComputeConfiguration" + } + ], + "description": "Compute placement for the managed training job." } }, - "description": "A cluster of analysis samples." + "discriminator": { + "propertyName": "type", + "mapping": { + "sft": "#/components/schemas/SftTrainingJob", + "preference": "#/components/schemas/PreferenceTrainingJob", + "kto": "#/components/schemas/KtoTrainingJob", + "reward_model": "#/components/schemas/RewardModelTrainingJob", + "grpo": "#/components/schemas/GrpoTrainingJob", + "policy_gradient": "#/components/schemas/PolicyGradientTrainingJob", + "ppo": "#/components/schemas/PpoTrainingJob" + } + }, + "description": "Base request body for creating a managed training job from a base model." }, - "InsightModelConfiguration": { + "ModelTrainingOperation": { "type": "object", "required": [ - "modelDeploymentName" + "operation_id", + "status" ], "properties": { - "modelDeploymentName": { + "operation_id": { "type": "string", - "description": "The model deployment to be evaluated. Accepts either the deployment name alone or with the connection name as '{connectionName}/'." + "description": "Operation identifier for the managed model training request." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingOperationStatus" + } + ], + "description": "Managed model training operation status." + }, + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/Model" + } + ], + "description": "The model produced by managed training when the operation succeeds." + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Error" + } + ], + "description": "Error object that describes the failure when status is 'failed'." } }, - "description": "Configuration of the model used in the insight generation." + "description": "Status resource for a managed model training operation." }, - "InsightRequest": { - "type": "object", - "required": [ - "type" + "ModelTrainingOperationStatus": { + "type": "string", + "enum": [ + "queued", + "in_progress", + "succeeded", + "failed", + "canceled" ], + "description": "Status of a managed model training operation." + }, + "ModelTrainingPackagingConfiguration": { + "type": "object", "properties": { - "type": { + "mode": { "allOf": [ { - "$ref": "#/components/schemas/InsightType" + "$ref": "#/components/schemas/ModelTrainingPackagingMode" } ], - "description": "The type of request." + "description": "How the trained model artifact should be packaged.", + "default": "merged_model" + } + }, + "description": "Model artifact packaging options." + }, + "ModelTrainingPackagingMode": { + "type": "string", + "enum": [ + "merged_model", + "adapter", + "model_and_adapter" + ], + "description": "Output packaging for a managed model training job." + }, + "ModelTrainingReferenceConfiguration": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "description": "Reference policy kind." } }, "discriminator": { - "propertyName": "type", + "propertyName": "kind", "mapping": { - "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightRequest", - "AgentClusterInsight": "#/components/schemas/AgentClusterInsightRequest", - "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightRequest" + "base_model": "#/components/schemas/BaseModelReferenceConfiguration", + "model": "#/components/schemas/ExplicitModelReferenceConfiguration", + "none": "#/components/schemas/NoReferenceConfiguration" } }, - "description": "The request of the insights report." + "description": "Reference policy used for preference optimization or online reinforcement training." }, - "InsightResult": { + "MonthlyRecurrenceSchedule": { "type": "object", "required": [ - "type" + "type", + "daysOfMonth" ], "properties": { "type": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightType" - } + "type": "string", + "enum": [ + "Monthly" ], - "description": "The type of insights result." + "description": "Monthly recurrence type." + }, + "daysOfMonth": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Days of the month for the recurrence schedule." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightResult", - "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightResult", - "AgentClusterInsight": "#/components/schemas/AgentClusterInsightResult" + "allOf": [ + { + "$ref": "#/components/schemas/RecurrenceSchedule" } - }, - "description": "The result of the insights." + ], + "description": "Monthly recurrence schedule." }, - "InsightSample": { + "MpiDistribution": { "type": "object", "required": [ - "id", - "type", - "features", - "correlationInfo" + "distribution_type" ], "properties": { - "id": { + "distribution_type": { "type": "string", - "description": "The unique identifier for the analysis sample." - }, - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/SampleType" - } + "enum": [ + "mpi" ], - "description": "Sample type" - }, - "features": { - "type": "object", - "additionalProperties": {}, - "description": "Features to help with additional filtering of data in UX." + "description": "Specifies the type of distribution framework." }, - "correlationInfo": { - "type": "object", - "additionalProperties": {}, - "description": "Info about the correlation for the analysis sample." + "process_count_per_node": { + "type": "integer", + "format": "int32", + "description": "Number of processes per MPI node." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "EvaluationResultSample": "#/components/schemas/EvaluationResultSample" + "allOf": [ + { + "$ref": "#/components/schemas/DistributionConfiguration" } - }, - "description": "A sample from the analysis." + ], + "description": "MPI distribution configuration." }, - "InsightScheduleTask": { + "NoAuthenticationCredentials": { "type": "object", "required": [ - "type", - "insight" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "Insight" - ] - }, - "insight": { - "allOf": [ - { - "$ref": "#/components/schemas/Insight" - } + "None" ], - "description": "The insight payload." + "description": "The credential type ", + "readOnly": true } }, "allOf": [ { - "$ref": "#/components/schemas/ScheduleTask" + "$ref": "#/components/schemas/BaseCredentials" } ], - "description": "Insight task for the schedule." + "description": "Credentials that do not require authentication" }, - "InsightSummary": { + "NoReferenceConfiguration": { "type": "object", "required": [ - "sampleCount", - "uniqueSubclusterCount", - "uniqueClusterCount", - "method", - "usage" + "kind" ], "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": { + "kind": { "type": "string", - "description": "Method used for clustering." - }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterTokenUsage" - } + "enum": [ + "none" ], - "description": "Token usage while performing clustering analysis" + "description": "Reference policy kind, always 'none'." } }, - "description": "Summary of the error cluster analysis." - }, - "InsightType": { - "anyOf": [ + "allOf": [ { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Disable reference policy or KL anchoring." + }, + "OAuthConsentRequestOutputItem": { + "type": "object", + "required": [ + "id", + "type", + "consent_link", + "server_label" + ], + "properties": { + "id": { "type": "string" }, - { + "type": { "type": "string", "enum": [ - "EvaluationRunClusterInsight", - "AgentClusterInsight", - "EvaluationComparison" + "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": "The request of the insights." + "description": "Request from the service for the user to perform OAuth consent." }, - "InsightsMetadata": { + "OneTimeTrigger": { "type": "object", "required": [ - "createdAt" + "type", + "triggerAt" ], "properties": { - "createdAt": { + "type": { "type": "string", - "format": "date-time", - "description": "The timestamp when the insights were created." + "enum": [ + "OneTime" + ] }, - "completedAt": { + "triggerAt": { "type": "string", - "format": "date-time", - "description": "The timestamp when the insights were completed." + "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" } }, - "description": "Metadata about the insights." + "allOf": [ + { + "$ref": "#/components/schemas/Trigger" + } + ], + "description": "One-time trigger." }, - "ItemGenerationParams": { + "OpenAI.Annotation": { "type": "object", "required": [ "type" ], "properties": { "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParamsType" - } - ], - "description": "The type of item generation parameters to use." + "$ref": "#/components/schemas/OpenAI.AnnotationType" } }, "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" + "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": "Represents the set of parameters used to control item generation operations." + "description": "An annotation that applies to a span of output text." }, - "ItemGenerationParamsType": { + "OpenAI.AnnotationType": { "anyOf": [ { "type": "string" @@ -14962,109 +23691,197 @@ { "type": "string", "enum": [ - "red_team", - "response_retrieval", - "red_team_seed_prompts", - "red_team_taxonomy", - "synthetic_data_gen_preview" + "file_citation", + "url_citation", + "container_file_citation", + "file_path" ] } + ] + }, + "OpenAI.ApplyPatchCallOutputStatus": { + "type": "string", + "enum": [ + "completed", + "failed" + ] + }, + "OpenAI.ApplyPatchCallOutputStatusParam": { + "type": "string", + "enum": [ + "completed", + "failed" ], - "description": "The types of parameters for red team item generation." + "description": "Outcome values reported for apply_patch tool call outputs.", + "title": "Apply patch call output status" }, - "ManagedAzureAISearchIndex": { + "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" + "type", + "path", + "diff" ], "properties": { "type": { "type": "string", "enum": [ - "ManagedAzureSearch" + "create_file" ], - "description": "Type of index" + "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/Index" + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" } ], - "description": "Managed Azure AI Search Index Definition" + "description": "Instruction describing how to create a file via the apply_patch tool.", + "title": "Apply patch create file operation" }, - "ManagedAzureAISearchIndexUpdate": { + "OpenAI.ApplyPatchCreateFileOperationParam": { "type": "object", "required": [ - "type" + "type", + "path", + "diff" ], "properties": { "type": { "type": "string", "enum": [ - "ManagedAzureSearch" + "create_file" ], - "description": "Type of index" + "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/IndexUpdate" + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" } ], - "description": "Managed Azure AI Search Index Definition" + "description": "Instruction for creating a new file via the apply_patch tool.", + "title": "Apply patch create file operation" }, - "MemoryItem": { + "OpenAI.ApplyPatchDeleteFileOperation": { "type": "object", "required": [ - "memory_id", - "updated_at", - "scope", - "content", - "kind" + "type", + "path" ], "properties": { - "memory_id": { + "type": { "type": "string", - "description": "The unique ID of the memory item." - }, - "updated_at": { - "type": "integer", - "format": "unixtime", - "description": "The last update time of the memory item." + "enum": [ + "delete_file" + ], + "description": "Delete the specified file.", + "x-stainless-const": true, + "default": "delete_file" }, - "scope": { + "path": { "type": "string", - "description": "The namespace that logically groups and isolates memories, such as a user ID." - }, - "content": { + "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", - "description": "The content of the memory." - }, - "kind": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryItemKind" - } + "enum": [ + "delete_file" ], - "description": "The kind of the memory item." + "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": "kind", + "propertyName": "type", "mapping": { - "user_profile": "#/components/schemas/UserProfileMemoryItem", - "chat_summary": "#/components/schemas/ChatSummaryMemoryItem" + "create_file": "#/components/schemas/OpenAI.ApplyPatchCreateFileOperation", + "delete_file": "#/components/schemas/OpenAI.ApplyPatchDeleteFileOperation", + "update_file": "#/components/schemas/OpenAI.ApplyPatchUpdateFileOperation" } }, - "description": "A single memory item stored in the memory store, containing content and metadata.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", + "title": "Apply patch operation" }, - "MemoryItemKind": { + "OpenAI.ApplyPatchFileOperationType": { "anyOf": [ { "type": "string" @@ -15072,50 +23889,35 @@ { "type": "string", "enum": [ - "user_profile", - "chat_summary" + "create_file", + "delete_file", + "update_file" ] } - ], - "description": "Memory item kind.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + ] }, - "MemoryOperation": { + "OpenAI.ApplyPatchOperationParam": { "type": "object", "required": [ - "kind", - "memory_item" + "type" ], "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." + "type": { + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParamType" } }, - "description": "Represents a single memory operation (create, update, or delete) performed on a memory item.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "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" }, - "MemoryOperationKind": { + "OpenAI.ApplyPatchOperationParamType": { "anyOf": [ { "type": "string" @@ -15123,779 +23925,946 @@ { "type": "string", "enum": [ - "create", - "update", - "delete" + "create_file", + "delete_file", + "update_file" ] } - ], - "description": "Memory operation kind.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + ] }, - "MemorySearchItem": { + "OpenAI.ApplyPatchToolParam": { "type": "object", "required": [ - "memory_item" + "type" ], "properties": { - "memory_item": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryItem" - } + "type": { + "type": "string", + "enum": [ + "apply_patch" ], - "description": "Retrieved memory item." + "description": "The type of the tool. Always `apply_patch`.", + "x-stainless-const": true, + "default": "apply_patch" } }, - "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." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" } - }, - "description": "Memory search options.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + ], + "description": "Allows the assistant to create, delete, or update files using unified diffs.", + "title": "Apply patch tool" }, - "MemorySearchPreviewTool": { + "OpenAI.ApplyPatchUpdateFileOperation": { "type": "object", "required": [ "type", - "memory_store_name", - "scope" + "path", + "diff" ], "properties": { "type": { "type": "string", "enum": [ - "memory_search_preview" + "update_file" ], - "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." + "description": "Update an existing file with the provided diff.", + "x-stainless-const": true, + "default": "update_file" }, - "memory_store_name": { + "path": { "type": "string", - "description": "The name of the memory store to use." + "description": "Path of the file to update." }, - "scope": { + "diff": { "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 + "description": "Diff to apply." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" } ], - "description": "A tool for integrating memories into the agent." + "description": "Instruction describing how to update a file via the apply_patch tool.", + "title": "Apply patch update file operation" }, - "MemorySearchToolCallItemParam": { + "OpenAI.ApplyPatchUpdateFileOperationParam": { "type": "object", "required": [ - "type" + "type", + "path", + "diff" ], "properties": { "type": { "type": "string", "enum": [ - "memory_search_call" - ] + "update_file" + ], + "description": "The operation type. Always `update_file`.", + "x-stainless-const": true, + "default": "update_file" }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemorySearchItem" - }, - "nullable": true, - "description": "The results returned from the memory search." + "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.Item" + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" } - ] + ], + "description": "Instruction for updating an existing file via the apply_patch tool.", + "title": "Apply patch update file operation" }, - "MemorySearchToolCallItemResource": { + "OpenAI.ApproximateLocation": { "type": "object", "required": [ - "type", - "status" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "memory_search_call" - ] + "approximate" + ], + "description": "The type of location approximation. Always `approximate`.", + "x-stainless-const": true, + "default": "approximate" }, - "status": { + "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": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" + "auto" ], - "description": "The status of the memory search tool call. One of `in_progress`,\n`searching`, `completed`, `incomplete` or `failed`," + "description": "Always `auto`.", + "x-stainless-const": true, + "default": "auto" }, - "results": { + "file_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/MemorySearchItem" + "type": "string" }, - "nullable": true, - "description": "The results returned from the memory search." + "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" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "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" ] }, - "MemoryStoreDefaultDefinition": { + "OpenAI.ClickButtonType": { + "type": "string", + "enum": [ + "left", + "right", + "wheel", + "back", + "forward" + ] + }, + "OpenAI.ClickParam": { "type": "object", "required": [ - "kind", - "chat_model", - "embedding_model" + "type", + "button", + "x", + "y" ], "properties": { - "kind": { + "type": { "type": "string", "enum": [ - "default" + "click" ], - "description": "The kind of the memory store." + "description": "Specifies the event type. For a click action, this property is always `click`.", + "x-stainless-const": true, + "default": "click" }, - "chat_model": { - "type": "string", - "description": "The name or identifier of the chat completion model deployment used for memory processing." + "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`." }, - "embedding_model": { - "type": "string", - "description": "The name or identifier of the embedding model deployment used for memory processing." + "x": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The x-coordinate where the click occurred." }, - "options": { + "y": { "allOf": [ { - "$ref": "#/components/schemas/MemoryStoreDefaultOptions" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "Default memory store options." + "description": "The y-coordinate where the click occurred." } }, "allOf": [ { - "$ref": "#/components/schemas/MemoryStoreDefinition" + "$ref": "#/components/schemas/OpenAI.ComputerAction" } ], - "description": "Default memory store implementation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "description": "A click action.", + "title": "Click" }, - "MemoryStoreDefaultOptions": { + "OpenAI.CodeInterpreterOutputImage": { "type": "object", "required": [ - "user_profile_enabled", - "chat_summary_enabled" + "type", + "url" ], "properties": { - "user_profile_enabled": { - "type": "boolean", - "description": "Whether to enable user profile extraction and storage. Default is true.", - "default": true - }, - "user_profile_details": { + "type": { "type": "string", - "description": "Specific categories or types of user profile information to extract and store." + "enum": [ + "image" + ], + "description": "The type of the output. Always `image`.", + "x-stainless-const": true, + "default": "image" }, - "chat_summary_enabled": { - "type": "boolean", - "description": "Whether to enable chat summary extraction and storage. Default is true.", - "default": true + "url": { + "type": "string", + "format": "uri", + "description": "The URL of the image output from the code interpreter." } }, - "description": "Default memory store configurations.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "description": "The image output from the code interpreter.", + "title": "Code interpreter output image" }, - "MemoryStoreDefinition": { + "OpenAI.CodeInterpreterOutputLogs": { "type": "object", "required": [ - "kind" + "type", + "logs" ], "properties": { - "kind": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreKind" - } + "type": { + "type": "string", + "enum": [ + "logs" ], - "description": "The kind of the memory store." - } - }, - "discriminator": { - "propertyName": "kind", - "mapping": { - "default": "#/components/schemas/MemoryStoreDefaultDefinition" + "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": "Base definition for memory store configurations.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "description": "The logs output from the code interpreter.", + "title": "Code interpreter output logs" }, - "MemoryStoreDeleteScopeResponse": { + "OpenAI.CodeInterpreterTool": { "type": "object", "required": [ - "object", - "name", - "scope", - "deleted" + "type" ], "properties": { - "object": { + "type": { "type": "string", "enum": [ - "memory_store.scope.deleted" + "code_interpreter" ], - "description": "The object type. Always 'memory_store.scope.deleted'." + "description": "The type of the code interpreter tool. Always `code_interpreter`.", + "x-stainless-const": true }, "name": { "type": "string", - "description": "The name of the memory store." + "description": "Optional user-defined name for this tool or configuration." }, - "scope": { + "description": { "type": "string", - "description": "The scope from which memories were deleted." + "description": "Optional user-defined description for this tool or configuration." }, - "deleted": { - "type": "boolean", - "description": "Whether the deletion operation was successful." + "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." } }, - "description": "Response for deleting memories from a scope.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreKind": { - "anyOf": [ - { - "type": "string" - }, + "allOf": [ { - "type": "string", - "enum": [ - "default" - ] + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "The type of memory store implementation to use.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "description": "A tool that runs Python code to help generate a response to a prompt.", + "title": "Code interpreter" }, - "MemoryStoreObject": { + "OpenAI.CompactResource": { "type": "object", "required": [ - "object", "id", + "object", + "output", "created_at", - "updated_at", - "name", - "definition" + "usage" ], "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the compacted response." + }, "object": { "type": "string", "enum": [ - "memory_store" + "response.compaction" ], - "description": "The object type, which is always 'memory_store'." + "description": "The object type. Always `response.compaction`.", + "x-stainless-const": true, + "default": "response.compaction" }, - "id": { - "type": "string", - "description": "The unique identifier of the memory store." + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ItemField" + }, + "description": "The compacted list of output items." }, "created_at": { "type": "integer", "format": "unixtime", - "description": "The Unix timestamp (seconds) when the memory store was created." - }, - "updated_at": { - "type": "integer", - "format": "unixtime", - "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." + "description": "Unix timestamp (in seconds) when the compacted conversation was created." }, - "definition": { + "usage": { "allOf": [ { - "$ref": "#/components/schemas/MemoryStoreDefinition" + "$ref": "#/components/schemas/OpenAI.ResponseUsage" } ], - "description": "The definition of the memory store." + "description": "Token accounting for the compaction pass, including cached, reasoning, and total tokens." } }, - "description": "A memory store that can store and retrieve user memories.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "title": "The compacted response object" }, - "MemoryStoreOperationUsage": { + "OpenAI.CompactResponseMethodPublicBody": { "type": "object", "required": [ - "embedding_tokens", - "input_tokens", - "input_tokens_details", - "output_tokens", - "output_tokens_details", - "total_tokens" + "model" ], "properties": { - "embedding_tokens": { - "type": "integer", - "format": "int32", - "description": "The number of embedding tokens." + "model": { + "$ref": "#/components/schemas/OpenAI.ModelIdsCompaction" }, - "input_tokens": { - "allOf": [ + "input": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of input tokens." - }, - "input_tokens_details": { - "allOf": [ + "type": "string" + }, { - "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + } } ], - "description": "A detailed breakdown of the input tokens." + "nullable": true }, - "output_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of output tokens." + "previous_response_id": { + "type": "string", + "nullable": true }, - "output_tokens_details": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" - } + "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": "A detailed breakdown of the output tokens." + "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" }, - "total_tokens": { - "allOf": [ + "key": { + "type": "string", + "description": "The key to compare against the value." + }, + "value": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ] + } } ], - "description": "The total number of tokens used." + "description": "The value to compare against the attribute key; supports string, number, or boolean types." } }, - "description": "Usage statistics of a memory store operation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] + "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" } }, - "MemoryStoreSearchResponse": { + "OpenAI.CompoundFilter": { "type": "object", "required": [ - "search_id", - "memories", - "usage" + "type", + "filters" ], "properties": { - "search_id": { + "type": { "type": "string", - "description": "The unique ID of this search request. Use this value as previous_search_id in subsequent requests to perform incremental searches." + "enum": [ + "and", + "or" + ], + "description": "Type of operation: `and` or `or`." }, - "memories": { + "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/MemorySearchItem" + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComparisonFilter" + }, + {} + ] }, - "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": "Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`." } }, - "description": "Memory search response.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] + "description": "Combine multiple filters using `and` or `or`.", + "title": "Compound Filter", + "x-oaiMeta": { + "name": "CompoundFilter" } }, - "MemoryStoreUpdateCompletedResult": { + "OpenAI.ComputerAction": { "type": "object", "required": [ - "memory_operations", - "usage" + "type" ], "properties": { - "memory_operations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemoryOperation" - }, - "description": "A list of individual memory operations that were performed during the update." + "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" }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreOperationUsage" - } + { + "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": "Usage statistics associated with the memory update operation." + "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 } }, - "description": "Memory update result.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A screenshot of a computer.", + "title": "Computer screenshot" }, - "MemoryStoreUpdateResponse": { + "OpenAI.ComputerScreenshotImage": { "type": "object", "required": [ - "update_id", - "status" + "type" ], "properties": { - "update_id": { + "type": { "type": "string", - "description": "The unique ID of this update request. Use this value as previous_update_id in subsequent requests to perform incremental updates." + "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" }, - "status": { + "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/MemoryStoreUpdateStatus" + "$ref": "#/components/schemas/OpenAI.ComputerEnvironment" } ], - "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\"." + "description": "The type of computer environment to control." }, - "result": { + "display_width": { "allOf": [ { - "$ref": "#/components/schemas/MemoryStoreUpdateCompletedResult" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The result of memory store update operation when status is \"completed\"." + "description": "The width of the computer display." }, - "error": { + "display_height": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Error" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "Error object that describes the error when status is \"failed\"." + "description": "The height of the computer display." } }, - "description": "Provides the status of a memory store update operation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } - }, - "MemoryStoreUpdateStatus": { - "type": "string", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "superseded" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } ], - "description": "Status of a memory store update operation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "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" }, - "MicrosoftFabricPreviewTool": { + "OpenAI.ContainerAutoParam": { "type": "object", "required": [ - "type", - "fabric_dataagent_preview" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "fabric_dataagent_preview" + "container_auto" ], - "description": "The object type, which is always 'fabric_dataagent_preview'." - }, - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "Automatically creates a container for this request", + "x-stainless-const": true, + "default": "container_auto" }, - "description": { - "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "file_ids": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 50, + "description": "An optional list of uploaded files to make available to your code." }, - "fabric_dataagent_preview": { + "memory_limit": { "allOf": [ { - "$ref": "#/components/schemas/FabricDataAgentToolParameters" + "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" } ], - "description": "The fabric data agent tool parameters." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" } - ], - "description": "The input definition information for a Microsoft Fabric tool as used to configure an agent." + ] }, - "ModelDeployment": { + "OpenAI.ContainerFileCitationBody": { "type": "object", "required": [ "type", - "modelName", - "modelVersion", - "modelPublisher", - "capabilities", - "sku" + "container_id", + "file_id", + "start_index", + "end_index", + "filename" ], "properties": { "type": { "type": "string", "enum": [ - "ModelDeployment" + "container_file_citation" ], - "description": "The type of the deployment" - }, - "modelName": { - "type": "string", - "description": "Publisher-specific name of the deployed model", - "readOnly": true + "description": "The type of the container file citation. Always `container_file_citation`.", + "x-stainless-const": true, + "default": "container_file_citation" }, - "modelVersion": { + "container_id": { "type": "string", - "description": "Publisher-specific version of the deployed model", - "readOnly": true + "description": "The ID of the container file." }, - "modelPublisher": { + "file_id": { "type": "string", - "description": "Name of the deployed model's publisher", - "readOnly": true + "description": "The ID of the file." }, - "capabilities": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Capabilities of deployed model", - "readOnly": true + "start_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the first character of the container file citation in the message." }, - "sku": { + "end_index": { "allOf": [ { - "$ref": "#/components/schemas/Sku" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "Sku of the model deployment", - "readOnly": true + "description": "The index of the last character of the container file citation in the message." }, - "connectionName": { + "filename": { "type": "string", - "description": "Name of the connection the deployment comes from", - "readOnly": true + "description": "The filename of the container file cited." } }, "allOf": [ { - "$ref": "#/components/schemas/Deployment" + "$ref": "#/components/schemas/OpenAI.Annotation" } ], - "description": "Model Deployment Definition" - }, - "ModelSamplingParams": { - "type": "object", - "required": [ - "temperature", - "top_p", - "seed", - "max_completion_tokens" - ], - "properties": { - "temperature": { - "type": "number", - "format": "float", - "description": "The temperature parameter for sampling." - }, - "top_p": { - "type": "number", - "format": "float", - "description": "The top-p parameter for nucleus sampling." - }, - "seed": { - "type": "integer", - "format": "int32", - "description": "The random seed for reproducibility." - }, - "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." + "description": "A citation for a container file used to generate a model response.", + "title": "Container file citation" }, - "ModelSamplingParamsUpdate": { - "type": "object", - "properties": { - "temperature": { - "type": "number", - "format": "float", - "description": "The temperature parameter for sampling." - }, - "top_p": { - "type": "number", - "format": "float", - "description": "The top-p parameter for nucleus sampling." - }, - "seed": { - "type": "integer", - "format": "int32", - "description": "The random seed for reproducibility." - }, - "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." + "OpenAI.ContainerMemoryLimit": { + "type": "string", + "enum": [ + "1g", + "4g", + "16g", + "64g" + ] }, - "MonthlyRecurrenceSchedule": { + "OpenAI.ContainerNetworkPolicyAllowlistParam": { "type": "object", "required": [ "type", - "daysOfMonth" + "allowed_domains" ], "properties": { "type": { "type": "string", "enum": [ - "Monthly" + "allowlist" ], - "description": "Monthly recurrence type." + "description": "Allow outbound network access only to specified domains. Always `allowlist`.", + "x-stainless-const": true, + "default": "allowlist" }, - "daysOfMonth": { + "allowed_domains": { "type": "array", "items": { - "type": "integer", - "format": "int32" + "type": "string" }, - "description": "Days of the month for the recurrence schedule." + "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/RecurrenceSchedule" + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" } - ], - "description": "Monthly recurrence schedule." + ] }, - "NoAuthenticationCredentials": { + "OpenAI.ContainerNetworkPolicyDisabledParam": { "type": "object", "required": [ "type" @@ -15904,105 +24873,125 @@ "type": { "type": "string", "enum": [ - "None" + "disabled" ], - "description": "The credential type ", - "readOnly": true + "description": "Disable outbound network access. Always `disabled`.", + "x-stainless-const": true, + "default": "disabled" } }, "allOf": [ { - "$ref": "#/components/schemas/BaseCredentials" + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" } - ], - "description": "Credentials that do not require authentication" + ] }, - "OAuthConsentRequestOutputItem": { + "OpenAI.ContainerNetworkPolicyDomainSecretParam": { "type": "object", "required": [ - "id", - "type", - "consent_link", - "server_label" + "domain", + "name", + "value" ], "properties": { - "id": { - "type": "string" - }, - "type": { + "domain": { "type": "string", - "enum": [ - "oauth_consent_request" - ] + "minLength": 1, + "description": "The domain associated with the secret." }, - "consent_link": { + "name": { "type": "string", - "description": "The link the user can use to perform OAuth consent." + "minLength": 1, + "description": "The name of the secret to inject for the domain." }, - "server_label": { + "value": { "type": "string", - "description": "The server label for the OAuth consent request." + "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" } }, - "allOf": [ + "discriminator": { + "propertyName": "type", + "mapping": { + "disabled": "#/components/schemas/OpenAI.ContainerNetworkPolicyDisabledParam", + "allowlist": "#/components/schemas/OpenAI.ContainerNetworkPolicyAllowlistParam" + } + }, + "description": "Network access policy for the container." + }, + "OpenAI.ContainerNetworkPolicyParamType": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "type": "string" + }, + { + "type": "string", + "enum": [ + "disabled", + "allowlist" + ] } - ], - "description": "Request from the service for the user to perform OAuth consent." + ] }, - "OneTimeTrigger": { + "OpenAI.ContainerReferenceResource": { "type": "object", "required": [ "type", - "triggerAt" + "container_id" ], "properties": { "type": { "type": "string", "enum": [ - "OneTime" - ] - }, - "triggerAt": { - "type": "string", - "description": "Date and time for the one-time trigger in ISO 8601 format." + "container_reference" + ], + "description": "The environment type. Always `container_reference`.", + "x-stainless-const": true, + "default": "container_reference" }, - "timeZone": { - "type": "string", - "description": "Time zone for the one-time trigger.", - "default": "UTC" + "container_id": { + "type": "string" } }, "allOf": [ { - "$ref": "#/components/schemas/Trigger" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" } ], - "description": "One-time trigger." + "description": "Represents a container created with /v1/containers.", + "title": "Container Reference" }, - "OpenAI.Annotation": { + "OpenAI.ContainerSkill": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.AnnotationType" + "$ref": "#/components/schemas/OpenAI.ContainerSkillType" } }, "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" + "skill_reference": "#/components/schemas/OpenAI.SkillReferenceParam", + "inline": "#/components/schemas/OpenAI.InlineSkillParam" } - }, - "description": "An annotation that applies to a span of output text." + } }, - "OpenAI.AnnotationType": { + "OpenAI.ContainerSkillType": { "anyOf": [ { "type": "string" @@ -16010,1247 +24999,1216 @@ { "type": "string", "enum": [ - "file_citation", - "url_citation", - "container_file_citation", - "file_path" + "skill_reference", + "inline" ] } ] }, - "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": { + "OpenAI.ContextManagementParam": { "type": "object", "required": [ - "type", - "path", - "diff" + "type" ], "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." + "description": "The context management entry type. Currently only 'compaction' is supported." }, - "diff": { - "type": "string", - "description": "Diff to apply." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + "compact_threshold": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true } - ], - "description": "Instruction describing how to create a file via the apply_patch tool.", - "title": "Apply patch create file operation" + } }, - "OpenAI.ApplyPatchCreateFileOperationParam": { + "OpenAI.ConversationItem": { "type": "object", "required": [ - "type", - "path", - "diff" + "type" ], "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." + "$ref": "#/components/schemas/OpenAI.ConversationItemType" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + "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": "Instruction for creating a new file via the apply_patch tool.", - "title": "Apply patch create file operation" + }, + "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.ApplyPatchDeleteFileOperation": { + "OpenAI.ConversationItemApplyPatchToolCall": { "type": "object", "required": [ "type", - "path" + "id", + "call_id", + "status", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "delete_file" + "apply_patch_call" ], - "description": "Delete the specified file.", + "description": "The type of the item. Always `apply_patch_call`.", "x-stainless-const": true, - "default": "delete_file" + "default": "apply_patch_call" }, - "path": { + "id": { "type": "string", - "description": "Path of the file to delete." + "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.ApplyPatchFileOperation" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Instruction describing how to delete a file via the apply_patch tool.", - "title": "Apply patch delete file operation" + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", + "title": "Apply patch tool call" }, - "OpenAI.ApplyPatchDeleteFileOperationParam": { + "OpenAI.ConversationItemApplyPatchToolCallOutput": { "type": "object", "required": [ "type", - "path" + "id", + "call_id", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "delete_file" + "apply_patch_call_output" ], - "description": "The operation type. Always `delete_file`.", + "description": "The type of the item. Always `apply_patch_call_output`.", "x-stainless-const": true, - "default": "delete_file" + "default": "apply_patch_call_output" }, - "path": { + "id": { "type": "string", - "minLength": 1, - "description": "Path of the file to delete relative to the workspace root." + "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.ApplyPatchOperationParam" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Instruction for deleting an existing file via the apply_patch tool.", - "title": "Apply patch delete file operation" + "description": "The output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" }, - "OpenAI.ApplyPatchFileOperation": { + "OpenAI.ConversationItemCodeInterpreterToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "status", + "container_id", + "code", + "outputs" ], "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" + "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", - "enum": [ - "create_file", - "delete_file", - "update_file" - ] - } - ] - }, - "OpenAI.ApplyPatchToolParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { + "description": "The unique ID of the code interpreter tool call." + }, + "status": { "type": "string", "enum": [ - "apply_patch" + "in_progress", + "completed", + "incomplete", + "interpreting", + "failed" ], - "description": "The type of the tool. Always `apply_patch`.", - "x-stainless-const": true, - "default": "apply_patch" + "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.Tool" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Allows the assistant to create, delete, or update files using unified diffs.", - "title": "Apply patch tool" + "description": "A tool call to run code.", + "title": "Code interpreter tool call" }, - "OpenAI.ApplyPatchUpdateFileOperation": { + "OpenAI.ConversationItemComputerToolCall": { "type": "object", "required": [ "type", - "path", - "diff" + "id", + "call_id", + "action", + "pending_safety_checks", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "update_file" + "computer_call" ], - "description": "Update an existing file with the provided diff.", - "x-stainless-const": true, - "default": "update_file" + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" }, - "path": { + "id": { "type": "string", - "description": "Path of the file to update." + "description": "The unique ID of the computer call." }, - "diff": { + "call_id": { "type": "string", - "description": "Diff to apply." + "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.ApplyPatchFileOperation" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Instruction describing how to update a file via the apply_patch tool.", - "title": "Apply patch update file operation" + "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.ApplyPatchUpdateFileOperationParam": { + "OpenAI.ConversationItemComputerToolCallOutputResource": { "type": "object", "required": [ "type", - "path", - "diff" + "call_id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "update_file" + "computer_call_output" ], - "description": "The operation type. Always `update_file`.", + "description": "The type of the computer tool call output. Always `computer_call_output`.", "x-stainless-const": true, - "default": "update_file" + "default": "computer_call_output" }, - "path": { + "id": { "type": "string", - "minLength": 1, - "description": "Path of the file to update relative to the workspace root." + "description": "The ID of the computer tool call output." }, - "diff": { + "call_id": { "type": "string", - "maxLength": 10485760, - "description": "Unified diff content to apply to the existing file." + "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.ApplyPatchOperationParam" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } - ], - "description": "Instruction for updating an existing file via the apply_patch tool.", - "title": "Apply patch update file operation" + ] }, - "OpenAI.ApproximateLocation": { + "OpenAI.ConversationItemCustomToolCall": { "type": "object", "required": [ - "type" + "type", + "call_id", + "name", + "input" ], "properties": { "type": { "type": "string", "enum": [ - "approximate" + "custom_tool_call" ], - "description": "The type of location approximation. Always `approximate`.", - "x-stainless-const": true, - "default": "approximate" + "description": "The type of the custom tool call. Always `custom_tool_call`.", + "x-stainless-const": true }, - "country": { + "id": { "type": "string", - "nullable": true + "description": "The unique ID of the custom tool call in the OpenAI platform." }, - "region": { + "call_id": { "type": "string", - "nullable": true + "description": "An identifier used to map this custom tool call to a tool call output." }, - "city": { + "name": { "type": "string", - "nullable": true + "description": "The name of the custom tool being called." }, - "timezone": { + "input": { "type": "string", - "nullable": true + "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.AutoCodeInterpreterToolParam": { + "OpenAI.ConversationItemCustomToolCallOutput": { "type": "object", "required": [ - "type" + "type", + "call_id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "auto" + "custom_tool_call_output" ], - "description": "Always `auto`.", - "x-stainless-const": true, - "default": "auto" + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true }, - "file_ids": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 50, - "description": "An optional list of uploaded files to make available to your code." + "id": { + "type": "string", + "description": "The unique ID of the custom tool call output in the OpenAI platform." }, - "memory_limit": { - "allOf": [ + "call_id": { + "type": "string", + "description": "The call ID, used to map this custom tool call output to a custom tool call." + }, + "output": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } } ], - "nullable": true - }, - "network_policy": { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" + "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." } }, - "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" + "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.ChatCompletionTool": { + "OpenAI.ConversationItemFileSearchToolCall": { "type": "object", "required": [ + "id", "type", - "function" + "status", + "queries" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, "type": { "type": "string", "enum": [ - "function" + "file_search_call" ], - "description": "The type of the tool. Currently, only `function` is supported.", + "description": "The type of the file search tool call. Always `file_search_call`.", "x-stainless-const": true }, - "function": { - "$ref": "#/components/schemas/OpenAI.FunctionObject" + "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 } }, - "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" - ] + "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.ClickParam": { + "OpenAI.ConversationItemFunctionShellCall": { "type": "object", "required": [ "type", - "button", - "x", - "y" + "id", + "call_id", + "action", + "status", + "environment" ], "properties": { "type": { "type": "string", "enum": [ - "click" + "shell_call" ], - "description": "Specifies the event type. For a click action, this property is always `click`.", + "description": "The type of the item. Always `shell_call`.", "x-stainless-const": true, - "default": "click" + "default": "shell_call" }, - "button": { + "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.ClickButtonType" + "$ref": "#/components/schemas/OpenAI.FunctionShellAction" } ], - "description": "Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`." + "description": "The shell commands and limits that describe how to run the tool call." }, - "x": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" } ], - "description": "The x-coordinate where the click occurred." + "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." }, - "y": { + "environment": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" } ], - "description": "The y-coordinate where the click occurred." + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "A click action.", - "title": "Click" + "description": "A tool call that executes one or more shell commands in a managed environment.", + "title": "Shell tool call" }, - "OpenAI.CodeInterpreterOutputImage": { + "OpenAI.ConversationItemFunctionShellCallOutput": { "type": "object", "required": [ "type", - "url" + "id", + "call_id", + "status", + "output", + "max_output_length" ], "properties": { "type": { "type": "string", "enum": [ - "image" + "shell_call_output" ], - "description": "The type of the output. Always `image`.", + "description": "The type of the shell call output. Always `shell_call_output`.", "x-stainless-const": true, - "default": "image" + "default": "shell_call_output" }, - "url": { + "id": { "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": { + "description": "The unique ID of the shell call output. Populated when this item is returned via API." + }, + "call_id": { "type": "string", - "enum": [ - "logs" + "description": "The unique ID of the shell tool call generated by the model." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + } ], - "description": "The type of the output. Always `logs`.", - "x-stainless-const": true, - "default": "logs" + "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." }, - "logs": { + "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 logs output from the code interpreter." + "description": "The identifier of the actor that created the item." } }, - "description": "The logs output from the code interpreter.", - "title": "Code interpreter output logs" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "The output of a shell tool call that was emitted.", + "title": "Shell call output" }, - "OpenAI.CodeInterpreterTool": { + "OpenAI.ConversationItemFunctionToolCallOutputResource": { "type": "object", "required": [ - "type" + "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": [ - "code_interpreter" + "function_call_output" ], - "description": "The type of the code interpreter tool. Always `code_interpreter`.", + "description": "The type of the function tool call output. Always `function_call_output`.", "x-stainless-const": true }, - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." - }, - "description": { + "call_id": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "description": "The unique ID of the function tool call generated by the model." }, - "container": { - "anyOf": [ + "output": { + "oneOf": [ { "type": "string" }, { - "$ref": "#/components/schemas/OpenAI.AutoCodeInterpreterToolParam" + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } } ], - "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." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } - ], - "description": "A tool that runs Python code to help generate a response to a prompt.", - "title": "Code interpreter" + ] }, - "OpenAI.CompactResource": { + "OpenAI.ConversationItemFunctionToolCallResource": { "type": "object", "required": [ - "id", - "object", - "output", - "created_at", - "usage" + "type", + "call_id", + "name", + "arguments" ], "properties": { "id": { "type": "string", - "description": "The unique identifier for the compacted response." + "description": "The unique ID of the function tool call." }, - "object": { + "type": { "type": "string", "enum": [ - "response.compaction" + "function_call" ], - "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." + "description": "The type of the function tool call. Always `function_call`.", + "x-stainless-const": true }, - "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" + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." }, - "input": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - } - } - ], - "nullable": true + "name": { + "type": "string", + "description": "The name of the function to run." }, - "previous_response_id": { + "arguments": { "type": "string", - "nullable": true + "description": "A JSON string of the arguments to pass to the function." }, - "instructions": { + "status": { "type": "string", - "nullable": true + "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.ComparisonFilter": { + "OpenAI.ConversationItemImageGenToolCall": { "type": "object", "required": [ "type", - "key", - "value" + "id", + "status", + "result" ], "properties": { "type": { "type": "string", "enum": [ - "eq", - "ne", - "gt", - "gte", - "lt", - "lte" + "image_generation_call" ], - "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" + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true }, - "key": { + "id": { "type": "string", - "description": "The key to compare against the value." + "description": "The unique ID of the image generation call." }, - "value": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - { - "type": "boolean" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ] - } - } + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "generating", + "failed" ], - "description": "The value to compare against the attribute key; supports string, number, or boolean types." + "description": "The status of the image generation call." + }, + "result": { + "type": "string", + "nullable": true } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "An image generation request made by the model.", + "title": "Image generation call" }, - "OpenAI.CompoundFilter": { + "OpenAI.ConversationItemList": { "type": "object", "required": [ - "type", - "filters" + "object", + "data", + "has_more", + "first_id", + "last_id" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "and", - "or" + "list" ], - "description": "Type of operation: `and` or `or`." + "description": "The type of object returned, must be `list`.", + "x-stainless-const": true }, - "filters": { + "data": { "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComparisonFilter" - }, - {} - ] + "$ref": "#/components/schemas/OpenAI.ConversationItem" }, - "description": "Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`." + "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": "Combine multiple filters using `and` or `or`.", - "title": "Compound Filter", + "description": "A list of Conversation items.", + "title": "The conversation item list", "x-oaiMeta": { - "name": "CompoundFilter" + "name": "The item list", + "group": "conversations" } }, - "OpenAI.ComputerAction": { + "OpenAI.ConversationItemLocalShellToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "call_id", + "action", + "status" ], "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": [ + "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": [ - "click", - "double_click", - "drag", - "keypress", - "move", - "screenshot", - "scroll", - "type", - "wait" - ] + "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.ComputerCallSafetyCheckParam": { + "OpenAI.ConversationItemLocalShellToolCallOutput": { "type": "object", "required": [ - "id" + "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 ID of the pending safety check." + "description": "The unique ID of the local shell tool call generated by the model." }, - "code": { + "output": { "type": "string", - "nullable": true + "description": "A JSON string of the output of the local shell tool call." }, - "message": { + "status": { "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], "nullable": true } }, - "description": "A pending safety check for the computer call." - }, - "OpenAI.ComputerEnvironment": { - "type": "string", - "enum": [ - "windows", - "mac", - "linux", - "ubuntu", - "browser" - ] + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "The output of a local shell tool call.", + "title": "Local shell call output" }, - "OpenAI.ComputerScreenshotContent": { + "OpenAI.ConversationItemMcpApprovalRequest": { "type": "object", "required": [ "type", - "image_url", - "file_id" + "id", + "server_label", + "name", + "arguments" ], "properties": { "type": { "type": "string", "enum": [ - "computer_screenshot" + "mcp_approval_request" ], - "description": "Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.", - "x-stainless-const": true, - "default": "computer_screenshot" + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true }, - "image_url": { + "id": { "type": "string", - "format": "uri", - "nullable": true + "description": "The unique ID of the approval request." }, - "file_id": { + "server_label": { "type": "string", - "nullable": true + "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.MessageContent" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "A screenshot of a computer.", - "title": "Computer screenshot" + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" }, - "OpenAI.ComputerScreenshotImage": { + "OpenAI.ConversationItemMcpApprovalResponseResource": { "type": "object", "required": [ - "type" + "type", + "id", + "approval_request_id", + "approve" ], "properties": { "type": { "type": "string", "enum": [ - "computer_screenshot" + "mcp_approval_response" ], - "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" + "description": "The type of the item. Always `mcp_approval_response`.", + "x-stainless-const": true }, - "image_url": { + "id": { "type": "string", - "format": "uri", - "description": "The URL of the screenshot image." + "description": "The unique ID of the approval response" }, - "file_id": { + "approval_request_id": { "type": "string", - "description": "The identifier of an uploaded file that contains the screenshot." + "description": "The ID of the approval request being answered." + }, + "approve": { + "type": "boolean", + "description": "Whether the request was approved." + }, + "reason": { + "type": "string", + "nullable": true } }, - "description": "A computer screenshot image used with the computer use tool." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A response to an MCP approval request.", + "title": "MCP approval response" }, - "OpenAI.ComputerUsePreviewTool": { + "OpenAI.ConversationItemMcpListTools": { "type": "object", "required": [ "type", - "environment", - "display_width", - "display_height" + "id", + "server_label", + "tools" ], "properties": { "type": { "type": "string", "enum": [ - "computer_use_preview" + "mcp_list_tools" ], - "description": "The type of the computer use tool. Always `computer_use_preview`.", - "x-stainless-const": true, - "default": "computer_use_preview" + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerEnvironment" - } - ], - "description": "The type of computer environment to control." + "id": { + "type": "string", + "description": "The unique ID of the list." }, - "display_width": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The width of the computer display." + "server_label": { + "type": "string", + "description": "The label of the MCP server." }, - "display_height": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The height of the computer display." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "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" + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" }, - "OpenAI.ContainerAutoParam": { + "OpenAI.ConversationItemMcpToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "server_label", + "name", + "arguments" ], "properties": { "type": { "type": "string", "enum": [ - "container_auto" + "mcp_call" ], - "description": "Automatically creates a container for this request", - "x-stainless-const": true, - "default": "container_auto" + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true }, - "file_ids": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 50, - "description": "An optional list of uploaded files to make available to your code." + "id": { + "type": "string", + "description": "The unique ID of the tool call." }, - "memory_limit": { + "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.ContainerMemoryLimit" + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" } ], - "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." + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." }, - "network_policy": { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" + "approval_request_id": { + "type": "string", + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } - ] + ], + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" }, - "OpenAI.ContainerFileCitationBody": { + "OpenAI.ConversationItemMessage": { "type": "object", "required": [ "type", - "container_id", - "file_id", - "start_index", - "end_index", - "filename" + "id", + "status", + "role", + "content" ], "properties": { "type": { "type": "string", "enum": [ - "container_file_citation" + "message" ], - "description": "The type of the container file citation. Always `container_file_citation`.", + "description": "The type of the message. Always set to `message`.", "x-stainless-const": true, - "default": "container_file_citation" - }, - "container_id": { - "type": "string", - "description": "The ID of the container file." + "default": "message" }, - "file_id": { + "id": { "type": "string", - "description": "The ID of the file." + "description": "The unique ID of the message." }, - "start_index": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.MessageStatus" } ], - "description": "The index of the first character of the container file citation in the message." + "description": "The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API." }, - "end_index": { + "role": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.MessageRole" } ], - "description": "The index of the last character of the container file citation in the message." + "description": "The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`." }, - "filename": { - "type": "string", - "description": "The filename of the container file cited." + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MessageContent" + }, + "description": "The content of the message" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Annotation" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "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" - ] + "description": "A message to or from the model.", + "title": "Message" }, - "OpenAI.ContainerNetworkPolicyAllowlistParam": { + "OpenAI.ConversationItemReasoningItem": { "type": "object", "required": [ "type", - "allowed_domains" + "id", + "summary" ], "properties": { "type": { "type": "string", "enum": [ - "allowlist" + "reasoning" ], - "description": "Allow outbound network access only to specified domains. Always `allowlist`.", - "x-stainless-const": true, - "default": "allowlist" + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true }, - "allowed_domains": { + "id": { + "type": "string", + "description": "The unique identifier of the reasoning content." + }, + "encrypted_content": { + "type": "string", + "nullable": true + }, + "summary": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" }, - "minItems": 1, - "description": "A list of allowed domains when type is `allowlist`." + "description": "Reasoning summary content." }, - "domain_secrets": { + "content": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyDomainSecretParam" + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" }, - "minItems": 1, - "description": "Optional domain-scoped secrets for allowlisted domains." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" - } - ] - }, - "OpenAI.ContainerNetworkPolicyDisabledParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { + "description": "Reasoning text content." + }, + "status": { "type": "string", "enum": [ - "disabled" + "in_progress", + "completed", + "incomplete" ], - "description": "Disable outbound network access. Always `disabled`.", - "x-stainless-const": true, - "default": "disabled" + "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.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." + "$ref": "#/components/schemas/OpenAI.ConversationItem" } - } - }, - "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." + "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.ContainerNetworkPolicyParamType": { + "OpenAI.ConversationItemType": { "anyOf": [ { "type": "string" @@ -17258,1453 +26216,1271 @@ { "type": "string", "enum": [ - "disabled", - "allowlist" + "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.ContainerReferenceResource": { + "OpenAI.ConversationItemWebSearchToolCall": { "type": "object", "required": [ + "id", "type", - "container_id" + "status", + "action" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, "type": { "type": "string", "enum": [ - "container_reference" + "web_search_call" ], - "description": "The environment type. Always `container_reference`.", - "x-stainless-const": true, - "default": "container_reference" + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true }, - "container_id": { - "type": "string" + "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.FunctionShellCallEnvironment" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Represents a container created with /v1/containers.", - "title": "Container Reference" + "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.ContainerSkill": { + "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": [ - "type" + "id" ], "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ContainerSkillType" + "id": { + "type": "string", + "description": "The unique ID of the conversation." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "skill_reference": "#/components/schemas/OpenAI.SkillReferenceParam", - "inline": "#/components/schemas/OpenAI.InlineSkillParam" + "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.ContainerSkillType": { - "anyOf": [ - { - "type": "string" + "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": [ - "skill_reference", - "inline" - ] + "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.ContextManagementParam": { + "OpenAI.CoordParam": { "type": "object", "required": [ - "type" + "x", + "y" ], "properties": { - "type": { - "type": "string", - "description": "The context management entry type. Currently only 'compaction' is supported." + "x": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The x-coordinate." }, - "compact_threshold": { - "type": "integer", + "y": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "description": "The y-coordinate." } - } + }, + "description": "An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.", + "title": "Coordinate" }, - "OpenAI.ConversationItem": { + "OpenAI.CreateChatCompletionRequestResponseFormat": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.ConversationItemType" + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatType" } }, "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" + "text": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatText", + "json_object": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject" } }, - "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" + "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.ConversationItemApplyPatchToolCall": { + "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject": { "type": "object", "required": [ - "type", - "id", - "call_id", - "status", - "operation" + "type" ], "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" - } + "json_object" ], - "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." + "description": "The type of response format being defined. Always `json_object`.", + "x-stainless-const": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" } ], - "description": "A tool call that applies file diffs by creating, deleting, or updating files.", - "title": "Apply patch tool call" + "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.ConversationItemApplyPatchToolCallOutput": { + "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatText": { "type": "object", "required": [ - "type", - "id", - "call_id", - "status" + "type" ], "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" - } + "text" ], - "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." + "description": "The type of response format being defined. Always `text`.", + "x-stainless-const": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" } ], - "description": "The output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" + "description": "Default response format. Used to generate text responses.", + "title": "Text" }, - "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." + "OpenAI.CreateChatCompletionRequestResponseFormatType": { + "anyOf": [ + { + "type": "string" }, - "status": { + { "type": "string", "enum": [ - "in_progress", - "completed", - "incomplete", - "interpreting", - "failed" + "text", + "json_schema", + "json_object" + ] + } + ] + }, + "OpenAI.CreateConversationBody": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } ], - "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": { + "items": { "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] + "$ref": "#/components/schemas/OpenAI.InputItem" }, "nullable": true } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" + } }, - "OpenAI.ConversationItemComputerToolCall": { + "OpenAI.CreateEvalCompletionsRunDataSource": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" + "source" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call" + "completions" ], - "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." + "description": "The type of run data source. Always `completions`.", + "default": "completions" }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "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." }, - "pending_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The pending safety checks for the computer call." + "sampling_params": { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams" }, - "status": { + "model": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "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": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "Determines what populates the `item` namespace in this run's data source." } }, - "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" + "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.ConversationItemComputerToolCallOutputResource": { + "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference": { "type": "object", "required": [ "type", - "call_id", - "output" + "item_reference" ], "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" + "item_reference" + ] }, - "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" + "item_reference": { + "type": "string" } - ] + } }, - "OpenAI.ConversationItemCustomToolCall": { + "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplate": { "type": "object", "required": [ "type", - "call_id", - "name", - "input" + "template" ], "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." + "template" + ] }, - "input": { - "type": "string", - "description": "The input for the custom tool call generated by the model." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "template": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.EasyInputMessage" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalItem" + } + ] + } } - ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" + } }, - "OpenAI.ConversationItemCustomToolCallOutput": { + "OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams": { "type": "object", - "required": [ - "type", - "call_id", - "output" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "custom_tool_call_output" + "reasoning_effort": { + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" + }, + "temperature": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } ], - "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", - "x-stainless-const": true + "default": 1 }, - "id": { - "type": "string", - "description": "The unique ID of the custom tool call output in the OpenAI platform." + "max_completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - "call_id": { - "type": "string", - "description": "The call ID, used to map this custom tool call output to a custom tool call." + "top_p": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "default": 1 }, - "output": { + "seed": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "default": 42 + }, + "response_format": { "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/OpenAI.ResponseFormatText" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchema" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonObject" } - ], - "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" + ] + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ChatCompletionTool" + } } - ], - "description": "The output of a custom tool call from your code, being sent back to the model.", - "title": "Custom tool call output" + } }, - "OpenAI.ConversationItemFileSearchToolCall": { + "OpenAI.CreateEvalCustomDataSourceConfig": { "type": "object", "required": [ - "id", "type", - "status", - "queries" + "item_schema" ], "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" + "custom" ], - "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," + "description": "The type of data source. Always `custom`.", + "x-stainless-const": true, + "default": "custom" }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The queries used to search for files." + "item_schema": { + "type": "object", + "additionalProperties": {}, + "description": "The json schema for each row in the data source." }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" - }, - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "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": "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" + }, + "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.ConversationItemFunctionShellCall": { + "OpenAI.CreateEvalJsonlRunDataSource": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status", - "environment" + "source" ], "properties": { "type": { "type": "string", "enum": [ - "shell_call" + "jsonl" ], - "description": "The type of the item. Always `shell_call`.", + "description": "The type of data source. Always `jsonl`.", "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." + "default": "jsonl" }, - "status": { - "allOf": [ + "source": { + "oneOf": [ { - "$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.EvalJsonlFileContentSource" + }, { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" } ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." + "description": "Determines what populates the `item` namespace in the data source." } }, - "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" + "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.ConversationItemFunctionShellCallOutput": { + "OpenAI.CreateEvalLogsDataSourceConfig": { "type": "object", "required": [ - "type", - "id", - "call_id", - "status", - "output", - "max_output_length" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "shell_call_output" + "logs" ], - "description": "The type of the shell call output. Always `shell_call_output`.", + "description": "The type of data source. Always `logs`.", "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 + "default": "logs" }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." + "metadata": { + "type": "object", + "additionalProperties": {}, + "description": "Metadata filters for the logs data source." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" + "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.ConversationItemFunctionToolCallOutputResource": { + "OpenAI.CreateEvalResponsesRunDataSource": { "type": "object", "required": [ "type", - "call_id", - "output" + "source" ], "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" + "responses" ], - "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." + "description": "The type of run data source. Always `responses`.", + "default": "responses" }, - "output": { + "input_messages": { "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference" } ], - "description": "The output from the function call generated by your code.\n Can be a string or an list of output content." + "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." }, - "status": { + "sampling_params": { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceSamplingParams" + }, + "model": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "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": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "Determines what populates the `item` namespace in this run's data source." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ] + "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.ConversationItemFunctionToolCallResource": { + "OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference": { "type": "object", "required": [ "type", - "call_id", - "name", - "arguments" + "item_reference" ], "properties": { - "id": { + "type": { "type": "string", - "description": "The unique ID of the function tool call." + "enum": [ + "item_reference" + ] }, + "item_reference": { + "type": "string" + } + } + }, + "OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate": { + "type": "object", + "required": [ + "type", + "template" + ], + "properties": { "type": { "type": "string", "enum": [ - "function_call" - ], - "description": "The type of the function tool call. Always `function_call`.", - "x-stainless-const": true + "template" + ] }, - "call_id": { - "type": "string", - "description": "The unique ID of the function tool call generated by the model." + "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" }, - "name": { - "type": "string", - "description": "The name of the function to run." + "temperature": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "default": 1 }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." + "max_completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "top_p": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "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" } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + }, + "OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText": { + "type": "object", + "properties": { + "format": { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" } - ] + } }, - "OpenAI.ConversationItemImageGenToolCall": { + "OpenAI.CreateEvalStoredCompletionsDataSourceConfig": { "type": "object", "required": [ - "type", - "id", - "status", - "result" + "type" ], "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" + "stored_completions" ], - "description": "The status of the image generation call." + "description": "The type of data source. Always `stored_completions`.", + "x-stainless-const": true, + "default": "stored_completions" }, - "result": { - "type": "string", - "nullable": true + "metadata": { + "type": "object", + "additionalProperties": {}, + "description": "Metadata filters for the stored completions data source." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "An image generation request made by the model.", - "title": "Image generation call" + "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.ConversationItemList": { + "OpenAI.CreateFineTuningJobRequest": { "type": "object", "required": [ - "object", - "data", - "has_more", - "first_id", - "last_id" + "model", + "training_file" ], "properties": { - "object": { + "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", - "enum": [ - "list" + "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 type of object returned, must be `list`.", - "x-stainless-const": true + "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 }, - "data": { + "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.ConversationItem" + "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrations" }, - "description": "A list of conversation items.", - "x-ms-list-page-items": true + "nullable": true, + "description": "A list of integrations to enable for your fine-tuning job." }, - "has_more": { - "type": "boolean", - "description": "Whether there are more items available." + "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." }, - "first_id": { - "type": "string", - "description": "The ID of the first item in the list." + "method": { + "$ref": "#/components/schemas/OpenAI.FineTuneMethod" }, - "last_id": { - "type": "string", - "description": "The ID of the last item in the list.", - "x-ms-list-continuation-token": true + "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" } - }, - "description": "A list of Conversation items.", - "title": "The conversation item list", - "x-oaiMeta": { - "name": "The item list", - "group": "conversations" } }, - "OpenAI.ConversationItemLocalShellToolCall": { + "OpenAI.CreateFineTuningJobRequestIntegrations": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status" + "wandb" ], "properties": { "type": { "type": "string", "enum": [ - "local_shell_call" + "wandb" ], - "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" + "wandb": { + "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrationsWandb" } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" + } }, - "OpenAI.ConversationItemLocalShellToolCallOutput": { + "OpenAI.CreateFineTuningJobRequestIntegrationsWandb": { "type": "object", "required": [ - "type", - "id", - "output" + "project" ], "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." + "project": { + "type": "string" }, - "output": { + "name": { "type": "string", - "description": "A JSON string of the output of the local shell tool call." + "nullable": true }, - "status": { + "entity": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } } - }, - "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 + "OpenAI.CreateResponseStreamingResponse": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseAudioDeltaEvent" }, - "id": { - "type": "string", - "description": "The unique ID of the approval request." + { + "$ref": "#/components/schemas/OpenAI.ResponseAudioTranscriptDeltaEvent" }, - "server_label": { - "type": "string", - "description": "The label of the MCP server making the request." + { + "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent" }, - "name": { - "type": "string", - "description": "The name of the tool to run." + { + "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallInProgressEvent" }, - "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 + "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallInterpretingEvent" }, - "id": { - "type": "string", - "description": "The unique ID of the approval response" + { + "$ref": "#/components/schemas/OpenAI.ResponseContentPartAddedEvent" }, - "approval_request_id": { - "type": "string", - "description": "The ID of the approval request being answered." + { + "$ref": "#/components/schemas/OpenAI.ResponseCreatedEvent" }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." + { + "$ref": "#/components/schemas/OpenAI.ResponseErrorEvent" }, - "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 + "$ref": "#/components/schemas/OpenAI.ResponseFileSearchCallInProgressEvent" }, - "id": { - "type": "string", - "description": "The unique ID of the list." + { + "$ref": "#/components/schemas/OpenAI.ResponseFileSearchCallSearchingEvent" }, - "server_label": { - "type": "string", - "description": "The label of the MCP server." + { + "$ref": "#/components/schemas/OpenAI.ResponseFunctionCallArgumentsDeltaEvent" }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." + { + "$ref": "#/components/schemas/OpenAI.ResponseInProgressEvent" }, - "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 + "$ref": "#/components/schemas/OpenAI.ResponseFailedEvent" }, - "id": { - "type": "string", - "description": "The unique ID of the tool call." + { + "$ref": "#/components/schemas/OpenAI.ResponseIncompleteEvent" }, - "server_label": { - "type": "string", - "description": "The label of the MCP server running the tool." + { + "$ref": "#/components/schemas/OpenAI.ResponseOutputItemAddedEvent" }, - "name": { - "type": "string", - "description": "The name of the tool that was run." + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartAddedEvent" }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments passed to the tool." + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryTextDeltaEvent" }, - "output": { - "type": "string", - "nullable": true + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningTextDeltaEvent" }, - "error": { - "type": "object", - "additionalProperties": {} + { + "$ref": "#/components/schemas/OpenAI.ResponseRefusalDeltaEvent" }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" - } - ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + { + "$ref": "#/components/schemas/OpenAI.ResponseTextDeltaEvent" }, - "approval_request_id": { - "type": "string", - "nullable": true - } - }, - "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$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" } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" + ] }, - "OpenAI.ConversationItemMessage": { + "OpenAI.CustomGrammarFormatParam": { "type": "object", "required": [ "type", - "id", - "status", - "role", - "content" + "syntax", + "definition" ], "properties": { "type": { "type": "string", "enum": [ - "message" + "grammar" ], - "description": "The type of the message. Always set to `message`.", + "description": "Grammar format. Always `grammar`.", "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." + "default": "grammar" }, - "role": { + "syntax": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MessageRole" + "$ref": "#/components/schemas/OpenAI.GrammarSyntax1" } ], - "description": "The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`." + "description": "The syntax of the grammar definition. One of `lark` or `regex`." }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MessageContent" - }, - "description": "The content of the message" + "definition": { + "type": "string", + "description": "The grammar definition." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" } ], - "description": "A message to or from the model.", - "title": "Message" + "description": "A grammar defined by the user.", + "title": "Grammar format" }, - "OpenAI.ConversationItemReasoningItem": { + "OpenAI.CustomTextFormatParam": { "type": "object", "required": [ - "type", - "id", - "summary" + "type" ], "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" + "text" ], - "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" - }, + "description": "Unconstrained text format. Always `text`.", + "x-stainless-const": true, + "default": "text" + } + }, + "allOf": [ { - "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" - ] + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" } - ] + ], + "description": "Unconstrained free-form text.", + "title": "Text format" }, - "OpenAI.ConversationItemWebSearchToolCall": { + "OpenAI.CustomToolParam": { "type": "object", "required": [ - "id", "type", - "status", - "action" + "name" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, "type": { "type": "string", "enum": [ - "web_search_call" + "custom" ], - "description": "The type of the web search tool call. Always `web_search_call`.", - "x-stainless-const": true + "description": "The type of the custom tool. Always `custom`.", + "x-stainless-const": true, + "default": "custom" }, - "status": { + "name": { "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" - ], - "description": "The status of the web search tool call." + "description": "The name of the custom tool, used to identify it in tool calls." }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, + "description": { + "type": "string", + "description": "Optional description of the custom tool, used to provide more context." + }, + "format": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" } ], - "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)." + "description": "The input format for the custom tool. Default is unconstrained text." } }, "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" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "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." + "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.ConversationParam-2": { + "OpenAI.CustomToolParamFormat": { "type": "object", "required": [ - "id" + "type" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the conversation." + "type": { + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormatType" } }, - "description": "The conversation that this response belongs to.", - "title": "Conversation object" + "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.ConversationReference": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { + "OpenAI.CustomToolParamFormatType": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", - "description": "The unique ID of the conversation that this response was associated with." + "enum": [ + "text", + "grammar" + ] } - }, - "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": { + "OpenAI.DeletedConversationResource": { "type": "object", "required": [ - "id", "object", - "metadata", - "created_at" + "deleted", + "id" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the conversation." - }, "object": { "type": "string", "enum": [ - "conversation" + "conversation.deleted" ], - "description": "The object type, which is always `conversation`.", "x-stainless-const": true, - "default": "conversation" + "default": "conversation.deleted" }, - "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." + "deleted": { + "type": "boolean" }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The time at which the conversation was created, measured in seconds since the Unix epoch." + "id": { + "type": "string" } } }, - "OpenAI.CoordParam": { + "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." + "description": "The x-coordinate where the double click occurred." }, "y": { "allOf": [ @@ -18712,995 +27488,1162 @@ "$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" + "description": "The y-coordinate where the double click occurred." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "text": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatText", - "json_object": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" } - }, - "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." + ], + "description": "A double click action.", + "title": "DoubleClick" }, - "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject": { + "OpenAI.DragParam": { "type": "object", "required": [ - "type" + "type", + "path" ], "properties": { "type": { "type": "string", "enum": [ - "json_object" + "drag" ], - "description": "The type of response format being defined. Always `json_object`.", - "x-stainless-const": true + "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.CreateChatCompletionRequestResponseFormat" + "$ref": "#/components/schemas/OpenAI.ComputerAction" } ], - "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" + "description": "A drag action.", + "title": "Drag" }, - "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatText": { + "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": [ - "text" + "message" ], - "description": "The type of response format being defined. Always `text`.", + "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.CreateChatCompletionRequestResponseFormat" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "Default response format. Used to generate text responses.", - "title": "Text" + "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.CreateChatCompletionRequestResponseFormatType": { - "anyOf": [ - { + "OpenAI.Error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "nullable": true + }, + "message": { "type": "string" }, - { + "param": { "type": "string", - "enum": [ - "text", - "json_schema", - "json_object" - ] + "nullable": true + }, + "type": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Error" + } + }, + "additionalInfo": { + "type": "object", + "additionalProperties": {} + }, + "debugInfo": { + "type": "object", + "additionalProperties": {} } - ] + } }, - "OpenAI.CreateConversationBody": { + "OpenAI.EvalApiError": { "type": "object", + "required": [ + "code", + "message" + ], "properties": { - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true + "code": { + "type": "string", + "description": "The error code." }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - }, - "nullable": true + "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.CreateEvalCompletionsRunDataSource": { + "OpenAI.EvalGraderLabelModel": { "type": "object", "required": [ "type", - "source" + "name", + "model", + "input", + "labels", + "passing_labels" ], "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" - } + "label_model" ], - "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." + "description": "The object type, which is always `label_model`.", + "x-stainless-const": true }, - "sampling_params": { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams" + "name": { + "type": "string", + "description": "The name of the grader." }, "model": { "type": "string", - "description": "The name of the model to use for generating completions (e.g. \"o3-mini\")." + "description": "The model to use for the evaluation. Must support structured outputs." }, - "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." + "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 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" - } + "title": "LabelModelGrader" }, - "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference": { + "OpenAI.EvalGraderPython": { "type": "object", "required": [ "type", - "item_reference" + "name", + "source" ], "properties": { "type": { "type": "string", "enum": [ - "item_reference" - ] + "python" + ], + "description": "The object type, which is always `python`.", + "x-stainless-const": true }, - "item_reference": { - "type": "string" + "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.CreateEvalCompletionsRunDataSourceInputMessagesTemplate": { + "OpenAI.EvalGraderScoreModel": { "type": "object", "required": [ "type", - "template" + "name", + "model", + "input" ], "properties": { "type": { "type": "string", "enum": [ - "template" - ] + "score_model" + ], + "description": "The object type, which is always `score_model`.", + "x-stainless-const": true }, - "template": { + "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": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EasyInputMessage" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalItem" - } - ] - } + "$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.CreateEvalCompletionsRunDataSourceSamplingParams": { + "OpenAI.EvalGraderScoreModelSamplingParams": { "type": "object", "properties": { - "reasoning_effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" - }, - "temperature": { + "seed": { + "type": "integer", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "default": 1 - }, - "max_completion_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" + "nullable": true }, "top_p": { + "type": "number", "allOf": [ { "$ref": "#/components/schemas/OpenAI.numeric" } ], + "nullable": true, "default": 1 }, - "seed": { + "temperature": { + "type": "number", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "default": 42 + "nullable": true }, - "response_format": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseFormatText" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchema" - }, + "max_completions_tokens": { + "type": "integer", + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonObject" + "$ref": "#/components/schemas/OpenAI.integer" } - ] + ], + "nullable": true }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ChatCompletionTool" - } + "reasoning_effort": { + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" } } }, - "OpenAI.CreateEvalCustomDataSourceConfig": { + "OpenAI.EvalGraderStringCheck": { "type": "object", "required": [ "type", - "item_schema" + "name", + "input", + "reference", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "custom" + "string_check" ], - "description": "The type of data source. Always `custom`.", - "x-stainless-const": true, - "default": "custom" + "description": "The object type, which is always `string_check`.", + "x-stainless-const": true }, - "item_schema": { - "type": "object", - "additionalProperties": {}, - "description": "The json schema for each row in the data source." + "name": { + "type": "string", + "description": "The name of the grader." }, - "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)" + "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 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" - } + "title": "StringCheckGrader" }, - "OpenAI.CreateEvalJsonlRunDataSource": { + "OpenAI.EvalGraderTextSimilarity": { "type": "object", "required": [ "type", - "source" + "name", + "input", + "reference", + "evaluation_metric", + "pass_threshold" ], "properties": { "type": { "type": "string", "enum": [ - "jsonl" + "text_similarity" ], - "description": "The type of data source. Always `jsonl`.", + "description": "The type of grader.", "x-stainless-const": true, - "default": "jsonl" + "default": "text_similarity" }, - "source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, + "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.EvalJsonlFileIdSource" + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "description": "Determines what populates the `item` namespace in the data source." + "description": "The threshold for the score." } }, - "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" - } + "title": "TextSimilarityGrader" }, - "OpenAI.CreateEvalLogsDataSourceConfig": { + "OpenAI.EvalItem": { "type": "object", "required": [ - "type" + "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": [ - "logs" + "message" ], - "description": "The type of data source. Always `logs`.", - "x-stainless-const": true, - "default": "logs" + "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" }, - "metadata": { - "type": "object", - "additionalProperties": {}, - "description": "Metadata filters for the logs data source." + { + "$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 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" - } + "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.CreateEvalResponsesRunDataSource": { + "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", - "source" + "text" ], "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" - } + "input_text" ], - "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" + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" }, - "model": { + "text": { "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": "The text input to the model." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + } + ], + "description": "A text input to the model.", + "title": "Input text" }, - "OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference": { + "OpenAI.EvalItemContentItemObjectType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "input_text", + "output_text", + "input_image", + "input_audio" + ] + } + ] + }, + "OpenAI.EvalItemContentOutputText": { "type": "object", "required": [ "type", - "item_reference" + "text" ], "properties": { "type": { "type": "string", "enum": [ - "item_reference" - ] + "output_text" + ], + "description": "The type of the output text. Always `output_text`.", + "x-stainless-const": true }, - "item_reference": { - "type": "string" + "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.CreateEvalResponsesRunDataSourceInputMessagesTemplate": { + "OpenAI.EvalItemContentText": { + "type": "string", + "description": "A text input to the model.", + "title": "Text input" + }, + "OpenAI.EvalItemInputImage": { "type": "object", "required": [ "type", - "template" + "image_url" ], "properties": { "type": { "type": "string", "enum": [ - "template" - ] + "input_image" + ], + "description": "The type of the image input. Always `input_image`.", + "x-stainless-const": true }, - "template": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string" - }, - "content": { - "type": "string" - } - }, - "required": [ - "role", - "content" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.EvalItem" - } - ] - } + "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.CreateEvalResponsesRunDataSourceSamplingParams": { + "OpenAI.EvalJsonlFileContentSource": { "type": "object", + "required": [ + "type", + "content" + ], "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" - } + "type": { + "type": "string", + "enum": [ + "file_content" ], - "default": 42 + "description": "The type of jsonl source. Always `file_content`.", + "x-stainless-const": true, + "default": "file_content" }, - "tools": { + "content": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - } - }, - "text": { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText" + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSourceContent" + }, + "description": "The content of the jsonl file." } - } + }, + "title": "EvalJsonlFileContentSource" }, - "OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText": { + "OpenAI.EvalJsonlFileContentSourceContent": { "type": "object", + "required": [ + "item" + ], "properties": { - "format": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + "item": { + "type": "object", + "additionalProperties": {} + }, + "sample": { + "type": "object", + "additionalProperties": {} } } }, - "OpenAI.CreateEvalStoredCompletionsDataSourceConfig": { + "OpenAI.EvalJsonlFileIdSource": { "type": "object", "required": [ - "type" + "type", + "id" ], "properties": { "type": { "type": "string", "enum": [ - "stored_completions" + "file_id" ], - "description": "The type of data source. Always `stored_completions`.", + "description": "The type of jsonl source. Always `file_id`.", "x-stainless-const": true, - "default": "stored_completions" + "default": "file_id" }, - "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" - } + "id": { + "type": "string", + "description": "The identifier of the file." + } + }, + "title": "EvalJsonlFileIdSource" }, - "OpenAI.CreateFineTuningJobRequest": { + "OpenAI.EvalResponsesSource": { "type": "object", "required": [ - "model", - "training_file" + "type" ], "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": { "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" - } + "enum": [ + "responses" ], - "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 + "description": "The type of run data source. Always `responses`." }, - "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`." + "metadata": { + "type": "object", + "additionalProperties": {}, + "nullable": true }, - "validation_file": { + "model": { "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." + "nullable": true }, - "integrations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrations" - }, - "nullable": true, - "description": "A list of integrations to enable for your fine-tuning job." + "instructions_search": { + "type": "string", + "nullable": true }, - "seed": { + "created_after": { "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" + "nullable": true }, - "metadata": { - "type": "object", + "created_before": { + "type": "integer", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/OpenAI.integer" } ], "nullable": true - } - } - }, - "OpenAI.CreateFineTuningJobRequestHyperparameters": { - "type": "object", - "properties": { - "batch_size": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, + }, + "reasoning_effort": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" } ], - "default": "auto" + "nullable": true }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, + "temperature": { + "type": "number", + "allOf": [ { "$ref": "#/components/schemas/OpenAI.numeric" } ], - "default": "auto" + "nullable": true }, - "n_epochs": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, + "top_p": { + "type": "number", + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "default": "auto" - } - } - }, - "OpenAI.CreateFineTuningJobRequestIntegrations": { - "type": "object", - "required": [ - "type", - "wandb" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "wandb" - ], - "x-stainless-const": true + "nullable": true }, - "wandb": { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrationsWandb" + "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.CreateFineTuningJobRequestIntegrationsWandb": { + "OpenAI.EvalRunOutputItemSample": { "type": "object", "required": [ - "project" + "input", + "output", + "finish_reason", + "model", + "usage", + "error", + "temperature", + "max_completion_tokens", + "top_p", + "seed" ], "properties": { - "project": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "entity": { - "type": "string", - "nullable": true - }, - "tags": { + "input": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/EvalRunOutputItemSampleInput" } - } - } - }, - "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" + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunOutputItemSampleOutput" + } }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPCallInProgressEvent" + "finish_reason": { + "type": "string" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsFailedEvent" + "model": { + "type": "string" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsInProgressEvent" + "usage": { + "$ref": "#/components/schemas/OpenAI.EvalRunOutputItemSampleUsage" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseOutputTextAnnotationAddedEvent" + "error": { + "$ref": "#/components/schemas/OpenAI.EvalApiError" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseQueuedEvent" + "temperature": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCustomToolCallInputDeltaEvent" + "max_completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseAudioDoneEvent" + "top_p": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseAudioTranscriptDoneEvent" + "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" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallCodeDoneEvent" + "completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCodeInterpreterCallCompletedEvent" + "prompt_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCompletedEvent" + "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" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseContentPartDoneEvent" + "invocation_count": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFileSearchCallCompletedEvent" + "prompt_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFunctionCallArgumentsDoneEvent" + "completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseOutputItemDoneEvent" + "total_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEvent" + "cached_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "OpenAI.EvalRunPerTestingCriteriaResults": { + "type": "object", + "required": [ + "testing_criteria", + "passed", + "failed" + ], + "properties": { + "testing_criteria": { + "type": "string" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryTextDoneEvent" + "passed": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningTextDoneEvent" + "failed": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "OpenAI.EvalRunResultCounts": { + "type": "object", + "required": [ + "total", + "errored", + "failed", + "passed" + ], + "properties": { + "total": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseRefusalDoneEvent" + "errored": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseTextDoneEvent" + "failed": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseWebSearchCallCompletedEvent" + "passed": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "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" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallCompletedEvent" + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], + "nullable": true }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPCallArgumentsDoneEvent" + "model": { + "type": "string", + "nullable": true }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPCallCompletedEvent" + "created_after": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true }, - { - "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsCompletedEvent" + "created_before": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCustomToolCallInputDoneEvent" + "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.CustomGrammarFormatParam": { + "OpenAI.FileCitationBody": { "type": "object", "required": [ "type", - "syntax", - "definition" + "file_id", + "index", + "filename" ], "properties": { "type": { "type": "string", "enum": [ - "grammar" + "file_citation" ], - "description": "Grammar format. Always `grammar`.", + "description": "The type of the file citation. Always `file_citation`.", "x-stainless-const": true, - "default": "grammar" + "default": "file_citation" }, - "syntax": { + "file_id": { + "type": "string", + "description": "The ID of the file." + }, + "index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.GrammarSyntax1" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The syntax of the grammar definition. One of `lark` or `regex`." + "description": "The index of the file in the list of files." }, - "definition": { + "filename": { "type": "string", - "description": "The grammar definition." + "description": "The filename of the file cited." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" + "$ref": "#/components/schemas/OpenAI.Annotation" } ], - "description": "A grammar defined by the user.", - "title": "Grammar format" + "description": "A citation to a file.", + "title": "File citation" }, - "OpenAI.CustomTextFormatParam": { + "OpenAI.FilePath": { "type": "object", "required": [ - "type" + "type", + "file_id", + "index" ], "properties": { "type": { "type": "string", "enum": [ - "text" + "file_path" ], - "description": "Unconstrained text format. Always `text`.", - "x-stainless-const": true, - "default": "text" + "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.CustomToolParamFormat" + "$ref": "#/components/schemas/OpenAI.Annotation" } ], - "description": "Unconstrained free-form text.", - "title": "Text format" + "description": "A path to a file.", + "title": "File path" }, - "OpenAI.CustomToolParam": { + "OpenAI.FileSearchTool": { "type": "object", "required": [ "type", - "name" + "vector_store_ids" ], "properties": { "type": { "type": "string", "enum": [ - "custom" + "file_search" ], - "description": "The type of the custom tool. Always `custom`.", + "description": "The type of the file search tool. Always `file_search`.", "x-stainless-const": true, - "default": "custom" + "default": "file_search" }, - "name": { - "type": "string", - "description": "The name of the custom tool, used to identify it in tool calls." + "vector_store_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The IDs of the vector stores to search." }, - "description": { - "type": "string", - "description": "Optional description of the custom tool, used to provide more context." + "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." }, - "format": { + "ranking_options": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" + "$ref": "#/components/schemas/OpenAI.RankingOptions" } ], - "description": "The input format for the custom tool. Default is unconstrained text." + "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": [ @@ -19708,728 +28651,837 @@ "$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" + "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.CustomToolParamFormat": { + "OpenAI.FileSearchToolCallResults": { "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" + "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" } - }, - "description": "The input format for the custom tool. Default is unconstrained text." + } }, - "OpenAI.CustomToolParamFormatType": { + "OpenAI.Filters": { "anyOf": [ { - "type": "string" + "$ref": "#/components/schemas/OpenAI.ComparisonFilter" }, { - "type": "string", - "enum": [ - "text", - "grammar" - ] + "$ref": "#/components/schemas/OpenAI.CompoundFilter" } ] }, - "OpenAI.DeletedConversationResource": { + "OpenAI.FineTuneDPOHyperparameters": { "type": "object", - "required": [ - "object", - "deleted", - "id" - ], "properties": { - "object": { - "type": "string", - "enum": [ - "conversation.deleted" + "beta": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } ], - "x-stainless-const": true, - "default": "conversation.deleted" - }, - "deleted": { - "type": "boolean" + "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" }, - "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" + "batch_size": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "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" + "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" }, - "x": { - "allOf": [ + "learning_rate_multiplier": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "description": "The x-coordinate where the double click occurred." + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", + "default": "auto" }, - "y": { - "allOf": [ + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The y-coordinate where the double click occurred." + "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", + "default": "auto" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "description": "The hyperparameters used for the DPO fine-tuning job." + }, + "OpenAI.FineTuneDPOMethod": { + "type": "object", + "properties": { + "hyperparameters": { + "$ref": "#/components/schemas/OpenAI.FineTuneDPOHyperparameters" } - ], - "description": "A double click action.", - "title": "DoubleClick" + }, + "description": "Configuration for the DPO fine-tuning method." }, - "OpenAI.DragParam": { + "OpenAI.FineTuneMethod": { "type": "object", "required": [ - "type", - "path" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "drag" + "supervised", + "dpo", + "reinforcement" ], - "description": "Specifies the event type. For a drag action, this property is always set to `drag`.", - "x-stainless-const": true, - "default": "drag" + "description": "The type of method. Is either `supervised`, `dpo`, or `reinforcement`." }, - "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 ```" + "supervised": { + "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedMethod" + }, + "dpo": { + "$ref": "#/components/schemas/OpenAI.FineTuneDPOMethod" + }, + "reinforcement": { + "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementMethod" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A drag action.", - "title": "Drag" + "description": "The method used for fine-tuning." }, - "OpenAI.EasyInputMessage": { + "OpenAI.FineTuneReinforcementHyperparameters": { "type": "object", - "required": [ - "role", - "content", - "type" - ], "properties": { - "role": { - "type": "string", - "enum": [ - "user", - "assistant", - "system", - "developer" + "batch_size": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n `developer`." + "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" }, - "content": { + "learning_rate_multiplier": { "oneOf": [ { - "type": "string" + "type": "string", + "enum": [ + "auto" + ] }, { - "$ref": "#/components/schemas/OpenAI.InputMessageContentList" + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "description": "Text, image, or audio input to the model, used to generate a response.\n Can also contain previous assistant responses." + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", + "default": "auto" }, - "type": { - "type": "string", - "enum": [ - "message" + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The type of the message input. Always `message`.", - "x-stainless-const": true + "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", + "default": "auto" }, - "status": { + "reasoning_effort": { "type": "string", "enum": [ - "in_progress", - "completed", - "incomplete" + "default", + "low", + "medium", + "high" ], - "description": "The status of item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "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" } }, - "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" + "description": "The hyperparameters used for the reinforcement fine-tuning job." }, - "OpenAI.Error": { + "OpenAI.FineTuneReinforcementMethod": { "type": "object", "required": [ - "code", - "message" + "grader" ], "properties": { - "code": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string" - }, - "param": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string" + "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." }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Error" - } + "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" }, - "additionalInfo": { - "type": "object", - "additionalProperties": {} + "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" }, - "debugInfo": { - "type": "object", - "additionalProperties": {} + "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.EvalApiError": { + "OpenAI.FineTuneSupervisedMethod": { "type": "object", - "required": [ - "code", - "message" - ], "properties": { - "code": { - "type": "string", - "description": "The error code." - }, - "message": { - "type": "string", - "description": "The error message." + "hyperparameters": { + "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedHyperparameters" } }, - "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" - } + "description": "Configuration for the supervised fine-tuning method." }, - "OpenAI.EvalGraderLabelModel": { + "OpenAI.FineTuningIntegration": { "type": "object", "required": [ "type", - "name", - "model", - "input", - "labels", - "passing_labels" + "wandb" ], "properties": { "type": { "type": "string", "enum": [ - "label_model" + "wandb" ], - "description": "The object type, which is always `label_model`.", + "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", - "description": "The name of the grader." + "nullable": true }, - "model": { + "entity": { "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." + "nullable": true }, - "passing_labels": { + "tags": { "type": "array", "items": { "type": "string" - }, - "description": "The labels that indicate a passing result. Must be a subset of labels." + } } - }, - "title": "LabelModelGrader" + } }, - "OpenAI.EvalGraderPython": { + "OpenAI.FineTuningJob": { "type": "object", "required": [ - "type", - "name", - "source" + "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": { - "type": { + "id": { "type": "string", - "enum": [ - "python" - ], - "description": "The object type, which is always `python`.", - "x-stainless-const": true + "description": "The object identifier, which can be referenced in the API endpoints." }, - "name": { - "type": "string", - "description": "The name of the grader." + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created." }, - "source": { - "type": "string", - "description": "The source code of the python script." + "error": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FineTuningJobError" + } + ], + "nullable": true }, - "image_tag": { + "fine_tuned_model": { "type": "string", - "description": "The image tag to use for the python script." + "nullable": true }, - "pass_threshold": { + "finished_at": { + "type": "integer", + "format": "unixtime", + "nullable": true + }, + "hyperparameters": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.FineTuningJobHyperparameters" } ], - "description": "The threshold for the score." - } - }, - "title": "PythonGrader" - }, - "OpenAI.EvalGraderScoreModel": { - "type": "object", - "required": [ - "type", - "name", - "model", - "input" - ], - "properties": { - "type": { + "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": [ - "score_model" + "fine_tuning.job" ], - "description": "The object type, which is always `score_model`.", + "description": "The object type, which is always \"fine_tuning.job\".", "x-stainless-const": true }, - "name": { + "organization_id": { "type": "string", - "description": "The name of the grader." + "description": "The organization that owns the fine-tuning job." }, - "model": { + "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", - "description": "The model to use for the evaluation." + "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`." }, - "sampling_params": { + "trained_tokens": { + "type": "integer", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModelSamplingParams" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sampling parameters for the model." + "nullable": true }, - "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." + "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)." }, - "range": { + "validation_file": { + "type": "string", + "nullable": true + }, + "integrations": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.FineTuningIntegration" }, - "description": "The range of the score. Defaults to `[0, 1]`." + "nullable": true }, - "pass_threshold": { + "seed": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The threshold for the score." + "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 } }, - "title": "ScoreModelGrader" + "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.EvalGraderScoreModelSamplingParams": { + "OpenAI.FineTuningJobCheckpoint": { "type": "object", + "required": [ + "id", + "created_at", + "fine_tuned_model_checkpoint", + "step_number", + "metrics", + "fine_tuning_job_id", + "object" + ], "properties": { - "seed": { + "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" } ], - "nullable": true + "description": "The step number that the checkpoint was created at." }, - "top_p": { - "type": "number", + "metrics": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpointMetrics" } ], - "nullable": true, - "default": 1 + "description": "Metrics at the step number during the fine-tuning job." }, - "temperature": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true + "fine_tuning_job_id": { + "type": "string", + "description": "The name of the fine-tuning job that this checkpoint was created from." }, - "max_completions_tokens": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "object": { + "type": "string", + "enum": [ + "fine_tuning.job.checkpoint" ], - "nullable": true + "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" }, - "reasoning_effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" + "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.EvalGraderStringCheck": { + "OpenAI.FineTuningJobError": { "type": "object", "required": [ - "type", - "name", - "input", - "reference", - "operation" + "code", + "message", + "param" ], "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." + "code": { + "type": "string" }, - "reference": { - "type": "string", - "description": "The reference text. This may include template strings." + "message": { + "type": "string" }, - "operation": { + "param": { "type": "string", - "enum": [ - "eq", - "ne", - "like", - "ilike" - ], - "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." + "nullable": true } - }, - "title": "StringCheckGrader" + } }, - "OpenAI.EvalGraderTextSimilarity": { + "OpenAI.FineTuningJobEvent": { "type": "object", "required": [ - "type", - "name", - "input", - "reference", - "evaluation_metric", - "pass_threshold" + "object", + "id", + "created_at", + "level", + "message" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "text_similarity" + "fine_tuning.job.event" ], - "description": "The type of grader.", - "x-stainless-const": true, - "default": "text_similarity" + "description": "The object type, which is always \"fine_tuning.job.event\".", + "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The object identifier." }, - "input": { + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created." + }, + "level": { "type": "string", - "description": "The text being graded." + "enum": [ + "info", + "warn", + "error" + ], + "description": "The log level of the event." }, - "reference": { + "message": { "type": "string", - "description": "The text being graded against." + "description": "The message of the event." }, - "evaluation_metric": { + "type": { "type": "string", "enum": [ - "cosine", - "fuzzy_match", - "bleu", - "gleu", - "meteor", - "rouge_1", - "rouge_2", - "rouge_3", - "rouge_4", - "rouge_5", - "rouge_l" + "message", + "metrics" ], - "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": "The type of event." }, - "pass_threshold": { + "data": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.FineTuningJobEventData" } ], - "description": "The threshold for the score." + "description": "The data associated with the event." } }, - "title": "TextSimilarityGrader" + "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.EvalItem": { + "OpenAI.FineTuningJobEventData": { + "type": "object" + }, + "OpenAI.FineTuningJobHyperparameters": { "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" + "batch_size": { + "anyOf": [ + { + "type": "string", + "enum": [ + "auto" + ], + "nullable": true + }, + { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true + } ], - "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" + "default": "auto" }, - { - "$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" + "learning_rate_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "default": "auto" }, - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "default": "auto" } - ], - "description": "A single content item: input text, output text, input image, or input audio.", - "title": "Eval content item" + } }, - "OpenAI.EvalItemContentItemObject": { + "OpenAI.FunctionAndCustomToolCallOutput": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObjectType" + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputType" } }, "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" + "input_text": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputTextContent", + "input_image": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputImageContent", + "input_file": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputFileContent" } - }, - "description": "A single content item: input text, output text, input image, or input audio.", - "title": "Eval content item" + } }, - "OpenAI.EvalItemContentItemObjectInputTextContent": { + "OpenAI.FunctionAndCustomToolCallOutputInputFileContent": { "type": "object", "required": [ - "type", - "text" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "input_text" + "input_file" ], - "description": "The type of the input item. Always `input_text`.", + "description": "The type of the input item. Always `input_file`.", "x-stainless-const": true, - "default": "input_text" + "default": "input_file" }, - "text": { + "file_id": { "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" + "nullable": true }, - { + "filename": { "type": "string", - "enum": [ - "input_text", - "output_text", - "input_image", - "input_audio" - ] - } - ] - }, - "OpenAI.EvalItemContentOutputText": { - "type": "object", - "required": [ - "type", - "text" - ], - "properties": { - "type": { + "description": "The name of the file to be sent to the model." + }, + "file_url": { "type": "string", - "enum": [ - "output_text" - ], - "description": "The type of the output text. Always `output_text`.", - "x-stainless-const": true + "format": "uri", + "description": "The URL of the file to be sent to the model." }, - "text": { + "file_data": { "type": "string", - "description": "The text output from the model." + "description": "The content of the file to be sent to the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" } ], - "description": "A text output from the model.", - "title": "Output text" - }, - "OpenAI.EvalItemContentText": { - "type": "string", - "description": "A text input to the model.", - "title": "Text input" + "description": "A file input to the model.", + "title": "Input file" }, - "OpenAI.EvalItemInputImage": { + "OpenAI.FunctionAndCustomToolCallOutputInputImageContent": { "type": "object", "required": [ "type", - "image_url" + "detail" ], "properties": { "type": { @@ -20437,119 +29489,131 @@ "enum": [ "input_image" ], - "description": "The type of the image input. Always `input_image`.", - "x-stainless-const": true + "description": "The type of the input item. Always `input_image`.", + "x-stainless-const": true, + "default": "input_image" }, "image_url": { "type": "string", "format": "uri", - "description": "The URL of the image input." + "nullable": true }, - "detail": { + "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.EvalItemContentItemObject" + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" } ], - "description": "An image input block used within EvalItem content arrays.", + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", "title": "Input image" }, - "OpenAI.EvalJsonlFileContentSource": { + "OpenAI.FunctionAndCustomToolCallOutputInputTextContent": { "type": "object", "required": [ "type", - "content" + "text" ], "properties": { "type": { "type": "string", "enum": [ - "file_content" + "input_text" ], - "description": "The type of jsonl source. Always `file_content`.", + "description": "The type of the input item. Always `input_text`.", "x-stainless-const": true, - "default": "file_content" + "default": "input_text" }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSourceContent" - }, - "description": "The content of the jsonl file." + "text": { + "type": "string", + "description": "The text input to the model." } }, - "title": "EvalJsonlFileContentSource" - }, - "OpenAI.EvalJsonlFileContentSourceContent": { - "type": "object", - "required": [ - "item" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } ], - "properties": { - "item": { - "type": "object", - "additionalProperties": {} + "description": "A text input to the model.", + "title": "Input text" + }, + "OpenAI.FunctionAndCustomToolCallOutputType": { + "anyOf": [ + { + "type": "string" }, - "sample": { - "type": "object", - "additionalProperties": {} + { + "type": "string", + "enum": [ + "input_text", + "input_image", + "input_file" + ] } - } + ] }, - "OpenAI.EvalJsonlFileIdSource": { + "OpenAI.FunctionCallItemStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.FunctionObject": { "type": "object", "required": [ - "type", - "id" + "name" ], "properties": { - "type": { + "description": { "type": "string", - "enum": [ - "file_id" - ], - "description": "The type of jsonl source. Always `file_id`.", - "x-stainless-const": true, - "default": "file_id" + "description": "A description of what the function does, used by the model to choose when and how to call the function." }, - "id": { + "name": { "type": "string", - "description": "The identifier of the file." + "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 } - }, - "title": "EvalJsonlFileIdSource" + } }, - "OpenAI.EvalResponsesSource": { + "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": [ - "type" + "commands", + "timeout_ms", + "max_output_length" ], "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 + "commands": { + "type": "array", + "items": { + "type": "string" + } }, - "created_after": { + "timeout_ms": { "type": "integer", "allOf": [ { @@ -20558,7 +29622,7 @@ ], "nullable": true }, - "created_before": { + "max_output_length": { "type": "integer", "allOf": [ { @@ -20566,392 +29630,443 @@ } ], "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." }, - "reasoning_effort": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" - } - ], - "nullable": true - }, - "temperature": { - "type": "number", + "timeout_ms": { + "type": "integer", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], "nullable": true }, - "top_p": { - "type": "number", + "max_output_length": { + "type": "integer", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], "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" - } + "description": "Commands and limits describing how to run the shell tool call.", + "title": "Shell action" }, - "OpenAI.EvalRunOutputItemSample": { + "OpenAI.FunctionShellCallEnvironment": { "type": "object", "required": [ - "input", - "output", - "finish_reason", - "model", - "usage", - "error", - "temperature", - "max_completion_tokens", - "top_p", - "seed" + "type" ], "properties": { - "input": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemSampleInput" - } - }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemSampleOutput" - } - }, - "finish_reason": { - "type": "string" - }, - "model": { + "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" }, - "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" + { + "type": "string", + "enum": [ + "local", + "container_reference" + ] } - } + ] }, - "OpenAI.EvalRunOutputItemSampleUsage": { + "OpenAI.FunctionShellCallItemParamEnvironment": { "type": "object", "required": [ - "total_tokens", - "completion_tokens", - "prompt_tokens", - "cached_tokens" + "type" ], "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" + "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.EvalRunPerModelUsage": { + "OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam": { "type": "object", "required": [ - "model_name", - "invocation_count", - "prompt_tokens", - "completion_tokens", - "total_tokens", - "cached_tokens" + "type", + "container_id" ], "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" + "type": { + "type": "string", + "enum": [ + "container_reference" + ], + "description": "References a container created with the /v1/containers endpoint", + "x-stainless-const": true, + "default": "container_reference" }, - "cached_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" + "container_id": { + "type": "string", + "description": "The ID of the referenced container." } - } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + } + ] }, - "OpenAI.EvalRunPerTestingCriteriaResults": { + "OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam": { "type": "object", "required": [ - "testing_criteria", - "passed", - "failed" + "type" ], "properties": { - "testing_criteria": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "local" + ], + "description": "Use a local computer environment.", + "x-stainless-const": true, + "default": "local" }, - "passed": { - "$ref": "#/components/schemas/OpenAI.integer" + "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" }, - "failed": { - "$ref": "#/components/schemas/OpenAI.integer" + { + "type": "string", + "enum": [ + "local", + "container_reference" + ] } - } + ] }, - "OpenAI.EvalRunResultCounts": { + "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": [ - "total", - "errored", - "failed", - "passed" + "stdout", + "stderr", + "outcome" ], "properties": { - "total": { - "$ref": "#/components/schemas/OpenAI.integer" + "stdout": { + "type": "string", + "description": "The standard output that was captured." }, - "errored": { - "$ref": "#/components/schemas/OpenAI.integer" + "stderr": { + "type": "string", + "description": "The standard error output that was captured." }, - "failed": { - "$ref": "#/components/schemas/OpenAI.integer" + "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" }, - "passed": { - "$ref": "#/components/schemas/OpenAI.integer" + "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.EvalStoredCompletionsSource": { + "OpenAI.FunctionShellCallOutputContentParam": { "type": "object", "required": [ - "type" + "stdout", + "stderr", + "outcome" ], "properties": { - "type": { + "stdout": { "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 + "maxLength": 10485760, + "description": "Captured stdout output for the shell call." }, - "model": { + "stderr": { "type": "string", - "nullable": true + "maxLength": 10485760, + "description": "Captured stderr output for the shell call." }, - "created_after": { - "type": "integer", + "outcome": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" } ], - "nullable": true - }, - "created_before": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "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" ], - "nullable": true + "description": "The outcome type. Always `exit`.", + "x-stainless-const": true, + "default": "exit" }, - "limit": { - "type": "integer", + "exit_code": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "description": "Exit code from the shell process." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" + } + ], + "description": "Indicates that the shell commands finished and returned an exit code.", + "title": "Shell call exit outcome" }, - "OpenAI.FileCitationBody": { + "OpenAI.FunctionShellCallOutputExitOutcomeParam": { "type": "object", "required": [ "type", - "file_id", - "index", - "filename" + "exit_code" ], "properties": { "type": { "type": "string", "enum": [ - "file_citation" + "exit" ], - "description": "The type of the file citation. Always `file_citation`.", + "description": "The outcome type. Always `exit`.", "x-stainless-const": true, - "default": "file_citation" - }, - "file_id": { - "type": "string", - "description": "The ID of the file." + "default": "exit" }, - "index": { + "exit_code": { "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." + "description": "The exit code returned by the shell process." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Annotation" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" } ], - "description": "A citation to a file.", - "title": "File citation" + "description": "Indicates that the shell commands finished and returned an exit code.", + "title": "Shell call exit outcome" }, - "OpenAI.FilePath": { + "OpenAI.FunctionShellCallOutputOutcome": { "type": "object", "required": [ - "type", - "file_id", - "index" + "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": [ - "file_path" - ], - "description": "The type of the file path. Always `file_path`.", - "x-stainless-const": true + "timeout", + "exit" + ] + } + ] + }, + "OpenAI.FunctionShellCallOutputOutcomeType": { + "anyOf": [ + { + "type": "string" }, - "file_id": { + { "type": "string", - "description": "The ID of the file." - }, - "index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "enum": [ + "timeout", + "exit" + ] + } + ] + }, + "OpenAI.FunctionShellCallOutputTimeoutOutcome": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "timeout" ], - "description": "The index of the file in the list of files." + "description": "The outcome type. Always `timeout`.", + "x-stainless-const": true, + "default": "timeout" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Annotation" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" } ], - "description": "A path to a file.", - "title": "File path" + "description": "Indicates that the shell call exceeded its configured time limit.", + "title": "Shell call timeout outcome" }, - "OpenAI.FileSearchTool": { + "OpenAI.FunctionShellCallOutputTimeoutOutcomeParam": { "type": "object", "required": [ - "type", - "vector_store_ids" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "file_search" + "timeout" ], - "description": "The type of the file search tool. Always `file_search`.", + "description": "The outcome type. Always `timeout`.", "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" - } + "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": "Ranking options for search." + "description": "The type of the shell tool. Always `shell`.", + "x-stainless-const": true, + "default": "shell" }, - "filters": { + "environment": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Filters" + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" } ], "nullable": true @@ -20970,262 +30085,279 @@ "$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" + "description": "A tool that allows the model to execute shell commands.", + "title": "Shell tool" }, - "OpenAI.FileSearchToolCallResults": { + "OpenAI.FunctionShellToolParamEnvironment": { "type": "object", + "required": [ + "type" + ], "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" + "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.Filters": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComparisonFilter" + "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.CompoundFilter" + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" } ] }, - "OpenAI.FineTuneDPOHyperparameters": { + "OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam": { "type": "object", + "required": [ + "type" + ], "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" - } + "type": { + "type": "string", + "enum": [ + "local" ], - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", - "default": "auto" + "description": "Use a local computer environment.", + "x-stainless-const": true, + "default": "local" }, - "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" + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LocalSkillParam" + }, + "maxItems": 200, + "description": "An optional list of skills." } }, - "description": "The hyperparameters used for the DPO fine-tuning job." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" + } + ] }, - "OpenAI.FineTuneDPOMethod": { - "type": "object", - "properties": { - "hyperparameters": { - "$ref": "#/components/schemas/OpenAI.FineTuneDPOHyperparameters" + "OpenAI.FunctionShellToolParamEnvironmentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "container_auto", + "local", + "container_reference" + ] } - }, - "description": "Configuration for the DPO fine-tuning method." + ] }, - "OpenAI.FineTuneMethod": { + "OpenAI.FunctionTool": { "type": "object", "required": [ - "type" + "type", + "name", + "parameters", + "strict" ], "properties": { "type": { "type": "string", "enum": [ - "supervised", - "dpo", - "reinforcement" + "function" ], - "description": "The type of method. Is either `supervised`, `dpo`, or `reinforcement`." + "description": "The type of the function tool. Always `function`.", + "x-stainless-const": true, + "default": "function" }, - "supervised": { - "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedMethod" + "name": { + "type": "string", + "description": "The name of the function to call." }, - "dpo": { - "$ref": "#/components/schemas/OpenAI.FineTuneDPOMethod" + "description": { + "type": "string", + "nullable": true }, - "reinforcement": { - "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementMethod" + "parameters": { + "type": "object", + "additionalProperties": {}, + "nullable": true + }, + "strict": { + "type": "boolean", + "nullable": true } }, - "description": "The method used for fine-tuning." + "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.FineTuneReinforcementHyperparameters": { + "OpenAI.FunctionToolCallOutput": { "type": "object", + "required": [ + "type", + "call_id", + "output" + ], "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" + "id": { + "type": "string", + "description": "The unique ID of the function tool call output. Populated when this item\n is returned via API." }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } + "type": { + "type": "string", + "enum": [ + "function_call_output" ], - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", - "default": "auto" + "description": "The type of the function tool call output. Always `function_call_output`.", + "x-stainless-const": true }, - "n_epochs": { + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "output": { "oneOf": [ { - "type": "string", - "enum": [ - "auto" - ] + "type": "string" }, { - "$ref": "#/components/schemas/OpenAI.integer" + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } } ], - "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 output from the function call generated by your code.\n Can be a string or an list of output content." }, - "reasoning_effort": { + "status": { "type": "string", "enum": [ - "default", - "low", - "medium", - "high" + "in_progress", + "completed", + "incomplete" ], - "description": "Level of reasoning effort.", - "default": "default" - }, - "compute_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } + "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": "Multiplier on amount of compute used for exploring search space during training.", - "default": "auto" + "description": "The object type, which is always `label_model`.", + "x-stainless-const": true }, - "eval_interval": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of training steps between evaluation runs.", - "default": "auto" + "name": { + "type": "string", + "description": "The name of the grader." }, - "eval_samples": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "Number of evaluation samples to generate per training step.", - "default": "auto" + "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": "The hyperparameters used for the reinforcement fine-tuning job." + "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.FineTuneReinforcementMethod": { + "OpenAI.GraderMulti": { "type": "object", "required": [ - "grader" + "type", + "name", + "graders", + "calculate_output" ], "properties": { - "grader": { + "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" @@ -21240,522 +30372,590 @@ "$ref": "#/components/schemas/OpenAI.GraderScoreModel" }, { - "$ref": "#/components/schemas/OpenAI.GraderMulti" + "$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 grader used for the fine-tuning job." + "description": "The object type, which is always `python`.", + "x-stainless-const": true }, - "hyperparameters": { - "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementHyperparameters" + "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": "Configuration for the reinforcement fine-tuning method." + "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.FineTuneSupervisedHyperparameters": { + "OpenAI.GraderScoreModel": { "type": "object", + "required": [ + "type", + "name", + "model", + "input" + ], "properties": { - "batch_size": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "type": { + "type": "string", + "enum": [ + "score_model" ], - "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" + "description": "The object type, which is always `score_model`.", + "x-stainless-const": true }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, + "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.numeric" + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModelSamplingParams" } ], - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", - "default": "auto" + "description": "The sampling parameters for the model." }, - "n_epochs": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "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 number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", - "default": "auto" + "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": "The hyperparameters used for the fine-tuning job." + "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.FineTuneSupervisedMethod": { + "OpenAI.GraderTextSimilarity": { "type": "object", + "required": [ + "type", + "name", + "input", + "reference", + "evaluation_metric" + ], "properties": { - "hyperparameters": { - "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedHyperparameters" + "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": "Configuration for the supervised fine-tuning method." + "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.FineTuningIntegration": { + "OpenAI.GrammarSyntax1": { + "type": "string", + "enum": [ + "lark", + "regex" + ] + }, + "OpenAI.HybridSearchOptions": { "type": "object", "required": [ - "type", - "wandb" + "embedding_weight", + "text_weight" ], "properties": { - "type": { - "type": "string", - "enum": [ - "wandb" + "embedding_weight": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } ], - "description": "The type of the integration being enabled for the fine-tuning job", - "x-stainless-const": true + "description": "The weight of the embedding in the reciprocal ranking fusion." }, - "wandb": { + "text_weight": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FineTuningIntegrationWandb" + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "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" - } + "description": "The weight of the text in the reciprocal ranking fusion." } } }, - "OpenAI.FineTuningJob": { + "OpenAI.ImageDetail": { + "type": "string", + "enum": [ + "low", + "high", + "auto" + ] + }, + "OpenAI.ImageGenActionEnum": { + "type": "string", + "enum": [ + "generate", + "edit", + "auto" + ] + }, + "OpenAI.ImageGenTool": { "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" + "type" ], "properties": { - "id": { + "type": { "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" - } + "enum": [ + "image_generation" ], - "nullable": true - }, - "fine_tuned_model": { - "type": "string", - "nullable": true - }, - "finished_at": { - "type": "integer", - "format": "unixtime", - "nullable": true + "description": "The type of the image generation tool. Always `image_generation`.", + "x-stainless-const": true, + "default": "image_generation" }, - "hyperparameters": { - "allOf": [ + "model": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.FineTuningJobHyperparameters" + "type": "string" + }, + { + "type": "string", + "enum": [ + "gpt-image-1", + "gpt-image-1-mini", + "gpt-image-1.5" + ] } ], - "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." + "default": "gpt-image-1" }, - "object": { + "quality": { "type": "string", "enum": [ - "fine_tuning.job" + "low", + "medium", + "high", + "auto" ], - "description": "The object type, which is always \"fine_tuning.job\".", - "x-stainless-const": true + "description": "The quality of the generated image. One of `low`, `medium`, `high`,\n or `auto`. Default: `auto`.", + "default": "auto" }, - "organization_id": { + "size": { "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)." + "enum": [ + "1024x1024", + "1024x1536", + "1536x1024", + "auto" + ], + "description": "The size of the generated image. One of `1024x1024`, `1024x1536`,\n `1536x1024`, or `auto`. Default: `auto`.", + "default": "auto" }, - "status": { + "output_format": { "type": "string", "enum": [ - "validating_files", - "queued", - "running", - "succeeded", - "failed", - "cancelled" + "png", + "webp", + "jpeg" ], - "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`." + "description": "The output format of the generated image. One of `png`, `webp`, or\n `jpeg`. Default: `png`.", + "default": "png" }, - "trained_tokens": { - "type": "integer", + "output_compression": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "minimum": 0, + "maximum": 100, + "description": "Compression level for the output image. Default: 100.", + "default": 100 }, - "training_file": { + "moderation": { "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)." + "enum": [ + "auto", + "low" + ], + "description": "Moderation level for the generated image. Default: `auto`.", + "default": "auto" }, - "validation_file": { + "background": { "type": "string", - "nullable": true - }, - "integrations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FineTuningIntegration" - }, - "nullable": true + "enum": [ + "transparent", + "opaque", + "auto" + ], + "description": "Background type for the generated image. One of `transparent`,\n `opaque`, or `auto`. Default: `auto`.", + "default": "auto" }, - "seed": { + "input_fidelity": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.InputFidelity" } ], - "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", + "input_image_mask": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/OpenAI.ImageGenToolInputImageMask" } ], - "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." + "description": "Optional mask for inpainting. Contains `image_url`\n (string, optional) and `file_id` (string, optional)." }, - "step_number": { + "partial_images": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The step number that the checkpoint was created at." + "minimum": 0, + "maximum": 3, + "description": "Number of partial images to generate in streaming mode, from 0 (default value) to 3." }, - "metrics": { + "action": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpointMetrics" + "$ref": "#/components/schemas/OpenAI.ImageGenActionEnum" } ], - "description": "Metrics at the step number during the fine-tuning job." + "description": "Whether to generate a new image or edit an existing image. Default: `auto`." }, - "fine_tuning_job_id": { + "name": { "type": "string", - "description": "The name of the fine-tuning job that this checkpoint was created from." + "description": "Optional user-defined name for this tool or configuration." }, - "object": { + "description": { "type": "string", - "enum": [ - "fine_tuning.job.checkpoint" - ], - "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", - "x-stainless-const": true + "description": "Optional user-defined description for this tool or configuration." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool that generates images using the GPT image models.", + "title": "Image generation tool" }, - "OpenAI.FineTuningJobCheckpointMetrics": { + "OpenAI.ImageGenToolInputImageMask": { "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" + "image_url": { + "type": "string", + "format": "uri" }, - "full_valid_mean_token_accuracy": { - "$ref": "#/components/schemas/OpenAI.numeric" + "file_id": { + "type": "string" } } }, - "OpenAI.FineTuningJobError": { - "type": "object", - "required": [ - "code", - "message", - "param" - ], - "properties": { - "code": { - "type": "string" - }, - "message": { + "OpenAI.IncludeEnum": { + "anyOf": [ + { "type": "string" }, - "param": { + { "type": "string", - "nullable": true + "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.FineTuningJobEvent": { + "OpenAI.InlineSkillParam": { "type": "object", "required": [ - "object", - "id", - "created_at", - "level", - "message" + "type", + "name", + "description", + "source" ], "properties": { - "object": { + "type": { "type": "string", "enum": [ - "fine_tuning.job.event" + "inline" ], - "description": "The object type, which is always \"fine_tuning.job.event\".", - "x-stainless-const": true + "description": "Defines an inline skill for this request.", + "x-stainless-const": true, + "default": "inline" }, - "id": { + "name": { "type": "string", - "description": "The object identifier." + "description": "The name of the skill." }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created." + "description": { + "type": "string", + "description": "The description of the skill." }, - "level": { + "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": [ - "info", - "warn", - "error" + "base64" ], - "description": "The log level of the event." - }, - "message": { - "type": "string", - "description": "The message of the event." + "description": "The type of the inline skill source. Must be `base64`.", + "x-stainless-const": true, + "default": "base64" }, - "type": { + "media_type": { "type": "string", "enum": [ - "message", - "metrics" + "application/zip" ], - "description": "The type of event." + "description": "The media type of the inline skill payload. Must be `application/zip`.", + "x-stainless-const": true, + "default": "application/zip" }, "data": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FineTuningJobEventData" - } - ], - "description": "The data associated with the event." + "type": "string", + "minLength": 1, + "maxLength": 70254592, + "description": "Base64-encoded skill zip bundle." } }, - "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" + "description": "Inline skill payload" }, - "OpenAI.FineTuningJobHyperparameters": { + "OpenAI.InputAudio": { "type": "object", + "required": [ + "type", + "input_audio" + ], "properties": { - "batch_size": { - "anyOf": [ - { - "type": "string", - "enum": [ - "auto" - ], - "nullable": true - }, - { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - } + "type": { + "type": "string", + "enum": [ + "input_audio" ], - "default": "auto" + "description": "The type of the input item. Always `input_audio`.", + "x-stainless-const": true }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "default": "auto" + "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" }, - "n_epochs": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "default": "auto" + "format": { + "type": "string", + "enum": [ + "mp3", + "wav" + ] } } }, - "OpenAI.FunctionAndCustomToolCallOutput": { + "OpenAI.InputContent": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputType" + "$ref": "#/components/schemas/OpenAI.InputContentType" } }, "discriminator": { "propertyName": "type", "mapping": { - "input_text": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputTextContent", - "input_image": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputImageContent", - "input_file": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputFileContent" + "input_text": "#/components/schemas/OpenAI.InputContentInputTextContent", + "input_image": "#/components/schemas/OpenAI.InputContentInputImageContent", + "input_file": "#/components/schemas/OpenAI.InputContentInputFileContent" } } }, - "OpenAI.FunctionAndCustomToolCallOutputInputFileContent": { + "OpenAI.InputContentInputFileContent": { "type": "object", "required": [ "type" @@ -21790,13 +30990,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + "$ref": "#/components/schemas/OpenAI.InputContent" } ], "description": "A file input to the model.", "title": "Input file" }, - "OpenAI.FunctionAndCustomToolCallOutputInputImageContent": { + "OpenAI.InputContentInputImageContent": { "type": "object", "required": [ "type", @@ -21832,13 +31032,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + "$ref": "#/components/schemas/OpenAI.InputContent" } ], "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", "title": "Input image" }, - "OpenAI.FunctionAndCustomToolCallOutputInputTextContent": { + "OpenAI.InputContentInputTextContent": { "type": "object", "required": [ "type", @@ -21861,13 +31061,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + "$ref": "#/components/schemas/OpenAI.InputContent" } ], "description": "A text input to the model.", "title": "Input text" }, - "OpenAI.FunctionAndCustomToolCallOutputType": { + "OpenAI.InputContentType": { "anyOf": [ { "type": "string" @@ -21882,703 +31082,876 @@ } ] }, - "OpenAI.FunctionCallItemStatus": { + "OpenAI.InputFidelity": { "type": "string", "enum": [ - "in_progress", - "completed", - "incomplete" - ] + "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.FunctionObject": { + "OpenAI.InputFileContent": { "type": "object", "required": [ - "name" + "type" ], "properties": { - "description": { + "type": { "type": "string", - "description": "A description of what the function does, used by the model to choose when and how to call the function." + "enum": [ + "input_file" + ], + "description": "The type of the input item. Always `input_file`.", + "x-stainless-const": true, + "default": "input_file" }, - "name": { + "file_id": { "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." + "nullable": true }, - "parameters": { - "$ref": "#/components/schemas/OpenAI.FunctionParameters" + "filename": { + "type": "string", + "description": "The name of the file to be sent to the model." }, - "strict": { - "type": "boolean", - "nullable": true + "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." } - } - }, - "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." + }, + "description": "A file input to the model.", + "title": "Input file" }, - "OpenAI.FunctionShellAction": { + "OpenAI.InputFileContentParam": { "type": "object", "required": [ - "commands", - "timeout_ms", - "max_output_length" + "type" ], "properties": { - "commands": { - "type": "array", - "items": { - "type": "string" - } - }, - "timeout_ms": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "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 }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], + "filename": { + "type": "string", + "nullable": true + }, + "file_data": { + "type": "string", + "nullable": true + }, + "file_url": { + "type": "string", + "format": "uri", "nullable": true } }, - "description": "Execute a shell command.", - "title": "Shell exec action" + "description": "A file input to the model.", + "title": "Input file" }, - "OpenAI.FunctionShellActionParam": { + "OpenAI.InputImageContent": { "type": "object", "required": [ - "commands" + "type", + "detail" ], "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" - } + "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 }, - "max_output_length": { - "type": "integer", + "file_id": { + "type": "string", + "nullable": true + }, + "detail": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ImageDetail" } ], - "nullable": true + "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." } }, - "description": "Commands and limits describing how to run the shell tool call.", - "title": "Shell action" + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" }, - "OpenAI.FunctionShellCallEnvironment": { + "OpenAI.InputImageContentParamAutoParam": { "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" - ] + "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.FunctionShellCallItemParamEnvironment": { + "OpenAI.InputItem": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentType" + "$ref": "#/components/schemas/OpenAI.InputItemType" } }, "discriminator": { "propertyName": "type", "mapping": { - "local": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam", - "container_reference": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam" + "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": "The environment to execute the shell commands in." + "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.FunctionShellCallItemParamEnvironmentContainerReferenceParam": { + "OpenAI.InputItemApplyPatchToolCallItemParam": { "type": "object", "required": [ "type", - "container_id" + "call_id", + "status", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "container_reference" + "apply_patch_call" ], - "description": "References a container created with the /v1/containers endpoint", + "description": "The type of the item. Always `apply_patch_call`.", "x-stainless-const": true, - "default": "container_reference" + "default": "apply_patch_call" }, - "container_id": { + "id": { "type": "string", - "description": "The ID of the referenced container." + "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.FunctionShellCallItemParamEnvironment" + "$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.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam": { + "OpenAI.InputItemApplyPatchToolCallOutputItemParam": { "type": "object", "required": [ - "type" + "type", + "call_id", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "local" + "apply_patch_call_output" ], - "description": "Use a local computer environment.", + "description": "The type of the item. Always `apply_patch_call_output`.", "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" + "default": "apply_patch_call_output" }, - { - "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": { + "id": { "type": "string", - "description": "The standard output that was captured." + "nullable": true }, - "stderr": { + "call_id": { "type": "string", - "description": "The standard error output that was captured." + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the apply patch tool call generated by the model." }, - "outcome": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatusParam" } ], - "description": "Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.", - "title": "Shell call outcome" + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." }, - "created_by": { + "output": { "type": "string", - "description": "The identifier of the actor that created the item." + "nullable": true } }, - "description": "The content of a shell tool call output that was emitted.", - "title": "Shell call output content" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The streamed output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" }, - "OpenAI.FunctionShellCallOutputContentParam": { + "OpenAI.InputItemCodeInterpreterToolCall": { "type": "object", "required": [ - "stdout", - "stderr", - "outcome" + "type", + "id", + "status", + "container_id", + "code", + "outputs" ], "properties": { - "stdout": { + "type": { "type": "string", - "maxLength": 10485760, - "description": "Captured stdout output for the shell call." + "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" }, - "stderr": { + "id": { "type": "string", - "maxLength": 10485760, - "description": "Captured stderr output for the shell call." + "description": "The unique ID of the code interpreter tool call." }, - "outcome": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" - } + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "interpreting", + "failed" ], - "description": "The exit or timeout outcome associated with this shell call." + "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 } }, - "description": "Captured stdout and stderr for a portion of a shell tool call output.", - "title": "Shell output content" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A tool call to run code.", + "title": "Code interpreter tool call" }, - "OpenAI.FunctionShellCallOutputExitOutcome": { + "OpenAI.InputItemCompactionSummaryItemParam": { "type": "object", "required": [ "type", - "exit_code" + "encrypted_content" ], "properties": { + "id": { + "type": "string", + "nullable": true + }, "type": { "type": "string", "enum": [ - "exit" + "compaction" ], - "description": "The outcome type. Always `exit`.", + "description": "The type of the item. Always `compaction`.", "x-stainless-const": true, - "default": "exit" + "default": "compaction" }, - "exit_code": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "Exit code from the shell process." + "encrypted_content": { + "type": "string", + "maxLength": 10485760, + "description": "The encrypted content of the compaction summary." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "Indicates that the shell commands finished and returned an exit code.", - "title": "Shell call exit outcome" + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" }, - "OpenAI.FunctionShellCallOutputExitOutcomeParam": { + "OpenAI.InputItemComputerCallOutputItemParam": { "type": "object", "required": [ + "call_id", "type", - "exit_code" + "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": [ - "exit" + "computer_call_output" ], - "description": "The outcome type. Always `exit`.", + "description": "The type of the computer tool call output. Always `computer_call_output`.", "x-stainless-const": true, - "default": "exit" + "default": "computer_call_output" }, - "exit_code": { + "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.integer" + "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" } ], - "description": "The exit code returned by the shell process." + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "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" + "description": "The output of a computer tool call.", + "title": "Computer tool call output" }, - "OpenAI.FunctionShellCallOutputOutcomeParam": { + "OpenAI.InputItemComputerToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" ], "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" + "computer_call" + ], + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" }, - { + "id": { "type": "string", - "enum": [ - "timeout", - "exit" - ] - } - ] - }, - "OpenAI.FunctionShellCallOutputTimeoutOutcome": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { + "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": [ - "timeout" + "in_progress", + "completed", + "incomplete" ], - "description": "The outcome type. Always `timeout`.", - "x-stainless-const": true, - "default": "timeout" + "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.FunctionShellCallOutputOutcome" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "Indicates that the shell call exceeded its configured time limit.", - "title": "Shell call timeout outcome" + "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.FunctionShellCallOutputTimeoutOutcomeParam": { + "OpenAI.InputItemCustomToolCall": { "type": "object", "required": [ - "type" + "type", + "call_id", + "name", + "input" ], "properties": { "type": { "type": "string", "enum": [ - "timeout" + "custom_tool_call" ], - "description": "The outcome type. Always `timeout`.", - "x-stainless-const": true, - "default": "timeout" + "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.FunctionShellCallOutputOutcomeParam" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "Indicates that the shell call exceeded its configured time limit.", - "title": "Shell call timeout outcome" + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" }, - "OpenAI.FunctionShellToolParam": { + "OpenAI.InputItemCustomToolCallOutput": { "type": "object", "required": [ - "type" + "type", + "call_id", + "output" ], "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" - } + "custom_tool_call_output" ], - "nullable": true + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "The unique ID of the custom tool call output in the OpenAI platform." }, - "description": { + "call_id": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "A tool that allows the model to execute shell commands.", - "title": "Shell tool" + "description": "The output of a custom tool call from your code, being sent back to the model.", + "title": "Custom tool call output" }, - "OpenAI.FunctionShellToolParamEnvironment": { + "OpenAI.InputItemFileSearchToolCall": { "type": "object", "required": [ - "type" + "id", + "type", + "status", + "queries" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentType" + "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 } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "local": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam", - "container_reference": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam", - "container_auto": "#/components/schemas/OpenAI.ContainerAutoParam" + "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.FunctionShellToolParamEnvironmentContainerReferenceParam": { + "OpenAI.InputItemFunctionCallOutputItemParam": { "type": "object", "required": [ + "call_id", "type", - "container_id" + "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": [ - "container_reference" + "function_call_output" ], - "description": "References a container created with the /v1/containers endpoint", + "description": "The type of the function tool call output. Always `function_call_output`.", "x-stainless-const": true, - "default": "container_reference" + "default": "function_call_output" }, - "container_id": { - "type": "string", - "description": "The ID of the referenced container." + "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.FunctionShellToolParamEnvironment" + "$ref": "#/components/schemas/OpenAI.InputItem" } - ] + ], + "description": "The output of a function tool call.", + "title": "Function tool call output" }, - "OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam": { + "OpenAI.InputItemFunctionShellCallItemParam": { "type": "object", "required": [ - "type" + "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": [ - "local" + "shell_call" ], - "description": "Use a local computer environment.", + "description": "The type of the item. Always `shell_call`.", "x-stainless-const": true, - "default": "local" + "default": "shell_call" }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.LocalSkillParam" - }, - "maxItems": 200, - "description": "An optional list of skills." + "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.FunctionShellToolParamEnvironment" - } - ] - }, - "OpenAI.FunctionShellToolParamEnvironmentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "container_auto", - "local", - "container_reference" - ] + "$ref": "#/components/schemas/OpenAI.InputItem" } - ] + ], + "description": "A tool representing a request to execute one or more shell commands.", + "title": "Shell tool call" }, - "OpenAI.FunctionTool": { + "OpenAI.InputItemFunctionShellCallOutputItemParam": { "type": "object", "required": [ + "call_id", "type", - "name", - "parameters", - "strict" + "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": [ - "function" + "shell_call_output" ], - "description": "The type of the function tool. Always `function`.", + "description": "The type of the item. Always `shell_call_output`.", "x-stainless-const": true, - "default": "function" - }, - "name": { - "type": "string", - "description": "The name of the function to call." + "default": "shell_call_output" }, - "description": { - "type": "string", - "nullable": true + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContentParam" + }, + "description": "Captured chunks of stdout and stderr output, along with their associated outcomes." }, - "parameters": { - "type": "object", - "additionalProperties": {}, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + } + ], "nullable": true }, - "strict": { - "type": "boolean", + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "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" + "description": "The streamed output items emitted by a shell tool call.", + "title": "Shell tool call output" }, - "OpenAI.FunctionToolCallOutput": { + "OpenAI.InputItemFunctionToolCall": { "type": "object", "required": [ "type", "call_id", - "output" + "name", + "arguments" ], "properties": { "id": { "type": "string", - "description": "The unique ID of the function tool call output. Populated when this item\n is returned via API." + "description": "The unique ID of the function tool call." }, "type": { "type": "string", "enum": [ - "function_call_output" + "function_call" ], - "description": "The type of the function tool call output. Always `function_call_output`.", + "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." }, - "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." + "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", @@ -22592,526 +31965,449 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "The output of a function tool call.", - "title": "Function tool call output" + "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.GraderLabelModel": { + "OpenAI.InputItemImageGenToolCall": { "type": "object", "required": [ "type", - "name", - "model", - "input", - "labels", - "passing_labels" + "id", + "status", + "result" ], "properties": { "type": { "type": "string", "enum": [ - "label_model" + "image_generation_call" ], - "description": "The object type, which is always `label_model`.", + "description": "The type of the image generation call. Always `image_generation_call`.", "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the image generation call." }, - "model": { + "status": { "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." + "enum": [ + "in_progress", + "completed", + "generating", + "failed" + ], + "description": "The status of the image generation call." }, - "passing_labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels that indicate a passing result. Must be a subset of labels." + "result": { + "type": "string", + "nullable": true } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "An image generation request made by the model.", + "title": "Image generation call" }, - "OpenAI.GraderMulti": { + "OpenAI.InputItemLocalShellToolCall": { "type": "object", "required": [ "type", - "name", - "graders", - "calculate_output" + "id", + "call_id", + "action", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "multi" + "local_shell_call" ], - "description": "The object type, which is always `multi`.", - "x-stainless-const": true, - "default": "multi" + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the local shell call." }, - "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" - } - ] + "call_id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." }, - "calculate_output": { + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + }, + "status": { "type": "string", - "description": "A formula to calculate the output based on grader results." + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" }, - "OpenAI.GraderPython": { + "OpenAI.InputItemLocalShellToolCallOutput": { "type": "object", "required": [ "type", - "name", - "source" + "id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "python" + "local_shell_call_output" ], - "description": "The object type, which is always `python`.", + "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the local shell tool call generated by the model." }, - "source": { + "output": { "type": "string", - "description": "The source code of the python script." + "description": "A JSON string of the output of the local shell tool call." }, - "image_tag": { + "status": { "type": "string", - "description": "The image tag to use for the python script." + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "nullable": true } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The output of a local shell tool call.", + "title": "Local shell call output" }, - "OpenAI.GraderScoreModel": { + "OpenAI.InputItemMcpApprovalRequest": { "type": "object", "required": [ "type", + "id", + "server_label", "name", - "model", - "input" + "arguments" ], "properties": { "type": { "type": "string", "enum": [ - "score_model" + "mcp_approval_request" ], - "description": "The object type, which is always `score_model`.", + "description": "The type of the item. Always `mcp_approval_request`.", "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the approval request." }, - "model": { + "server_label": { "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." + "description": "The label of the MCP server making the request." }, - "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." + "name": { + "type": "string", + "description": "The name of the tool to run." }, - "range": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "description": "The range of the score. Defaults to `[0, 1]`." + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" }, - "OpenAI.GraderStringCheck": { + "OpenAI.InputItemMcpApprovalResponse": { "type": "object", "required": [ "type", - "name", - "input", - "reference", - "operation" + "approval_request_id", + "approve" ], "properties": { "type": { "type": "string", "enum": [ - "string_check" + "mcp_approval_response" ], - "description": "The object type, which is always `string_check`.", + "description": "The type of the item. Always `mcp_approval_response`.", "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "nullable": true }, - "input": { + "approval_request_id": { "type": "string", - "description": "The input text. This may include template strings." + "description": "The ID of the approval request being answered." }, - "reference": { - "type": "string", - "description": "The reference text. This may include template strings." + "approve": { + "type": "boolean", + "description": "Whether the request was approved." }, - "operation": { + "reason": { "type": "string", - "enum": [ - "eq", - "ne", - "like", - "ilike" - ], - "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." + "nullable": true } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A response to an MCP approval request.", + "title": "MCP approval response" }, - "OpenAI.GraderTextSimilarity": { + "OpenAI.InputItemMcpListTools": { "type": "object", "required": [ "type", - "name", - "input", - "reference", - "evaluation_metric" + "id", + "server_label", + "tools" ], "properties": { "type": { "type": "string", "enum": [ - "text_similarity" + "mcp_list_tools" ], - "description": "The type of grader.", - "x-stainless-const": true, - "default": "text_similarity" + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the list." }, - "input": { + "server_label": { "type": "string", - "description": "The text being graded." + "description": "The label of the MCP server." }, - "reference": { - "type": "string", - "description": "The text being graded against." + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + }, + "description": "The tools available on the server." }, - "evaluation_metric": { + "error": { "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`." + "nullable": true } }, - "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." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" } - } - }, - "OpenAI.ImageDetail": { - "type": "string", - "enum": [ - "low", - "high", - "auto" - ] - }, - "OpenAI.ImageGenActionEnum": { - "type": "string", - "enum": [ - "generate", - "edit", - "auto" - ] + ], + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" }, - "OpenAI.ImageGenTool": { + "OpenAI.InputItemMcpToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "server_label", + "name", + "arguments" ], "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" - ] - } + "mcp_call" ], - "default": "gpt-image-1" + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true }, - "quality": { + "id": { "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" + "description": "The unique ID of the tool call." }, - "size": { + "server_label": { "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" + "description": "The label of the MCP server running the tool." }, - "output_format": { + "name": { "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 + "description": "The name of the tool that was run." }, - "moderation": { + "arguments": { "type": "string", - "enum": [ - "auto", - "low" - ], - "description": "Moderation level for the generated image. Default: `auto`.", - "default": "auto" + "description": "A JSON string of the arguments passed to the tool." }, - "background": { + "output": { "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)." + "nullable": true }, - "partial_images": { + "error": { + "type": "object", + "additionalProperties": {} + }, + "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" } ], - "minimum": 0, - "maximum": 3, - "description": "Number of partial images to generate in streaming mode, from 0 (default value) to 3." + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." }, - "action": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ImageGenActionEnum" - } + "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": "Whether to generate a new image or edit an existing image. Default: `auto`." + "description": "The type of the output message. Always `message`.", + "x-stainless-const": true }, - "name": { + "role": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true }, - "description": { + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" + }, + "description": "The content of the output message." + }, + "status": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "A tool that generates images using the GPT image models.", - "title": "Image generation tool" + "description": "An output message from the model.", + "title": "Output message" }, - "OpenAI.ImageGenToolInputImageMask": { + "OpenAI.InputItemReasoningItem": { "type": "object", + "required": [ + "type", + "id", + "summary" + ], "properties": { - "image_url": { + "type": { "type": "string", - "format": "uri" + "enum": [ + "reasoning" + ], + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true }, - "file_id": { - "type": "string" + "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.IncludeEnum": { + "OpenAI.InputItemType": { "anyOf": [ { "type": "string" @@ -23119,487 +32415,741 @@ { "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" + "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" ] } - ], - "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": { + "OpenAI.InputItemWebSearchToolCall": { "type": "object", "required": [ + "id", "type", - "name", - "description", - "source" + "status", + "action" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, "type": { "type": "string", "enum": [ - "inline" + "web_search_call" ], - "description": "Defines an inline skill for this request.", - "x-stainless-const": true, - "default": "inline" - }, - "name": { - "type": "string", - "description": "The name of the skill." + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true }, - "description": { + "status": { "type": "string", - "description": "The description of the skill." + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." }, - "source": { - "allOf": [ + "action": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.InlineSkillSourceParam" + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" } ], - "description": "Inline skill payload" + "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.ContainerSkill" + "$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.InlineSkillSourceParam": { + "OpenAI.InputMessage": { "type": "object", "required": [ "type", - "media_type", - "data" + "role", + "content" ], "properties": { "type": { "type": "string", "enum": [ - "base64" + "message" ], - "description": "The type of the inline skill source. Must be `base64`.", - "x-stainless-const": true, - "default": "base64" + "description": "The type of the message input. Always set to `message`.", + "x-stainless-const": true }, - "media_type": { + "role": { "type": "string", "enum": [ - "application/zip" + "user", + "system", + "developer" ], - "description": "The media type of the inline skill payload. Must be `application/zip`.", - "x-stainless-const": true, - "default": "application/zip" + "description": "The role of the message input. One of `user`, `system`, or `developer`." }, - "data": { + "status": { "type": "string", - "minLength": 1, - "maxLength": 70254592, - "description": "Base64-encoded skill zip bundle." + "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" } }, - "description": "Inline skill payload" + "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.InputAudio": { + "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", - "input_audio" + "role", + "content", + "id" ], "properties": { "type": { "type": "string", "enum": [ - "input_audio" + "message" ], - "description": "The type of the input item. Always `input_audio`.", + "description": "The type of the message input. Always set to `message`.", "x-stainless-const": true }, - "input_audio": { - "$ref": "#/components/schemas/OpenAI.InputAudioInputAudio" + "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.EvalItemContentItemObject" + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ] + }, + "OpenAI.InputParam": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + } } ], - "description": "An audio input to the model.", - "title": "Input audio" + "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.InputAudioInputAudio": { + "OpenAI.InputTextContent": { "type": "object", "required": [ - "data", - "format" + "type", + "text" ], "properties": { - "data": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" }, - "format": { + "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": [ - "mp3", - "wav" - ] + "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.InputContent": { + "OpenAI.Item": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.InputContentType" + "$ref": "#/components/schemas/OpenAI.ItemType" } }, "discriminator": { "propertyName": "type", "mapping": { - "input_text": "#/components/schemas/OpenAI.InputContentInputTextContent", - "input_image": "#/components/schemas/OpenAI.InputContentInputImageContent", - "input_file": "#/components/schemas/OpenAI.InputContentInputFileContent" + "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.InputContentInputFileContent": { + "OpenAI.ItemApplyPatchToolCallItemParam": { "type": "object", "required": [ - "type" + "type", + "call_id", + "status", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "input_file" + "apply_patch_call" ], - "description": "The type of the input item. Always `input_file`.", + "description": "The type of the item. Always `apply_patch_call`.", "x-stainless-const": true, - "default": "input_file" + "default": "apply_patch_call" }, - "file_id": { + "id": { "type": "string", "nullable": true }, - "filename": { + "call_id": { "type": "string", - "description": "The name of the file to be sent to the model." + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the apply patch tool call generated by the model." }, - "file_url": { + "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", - "format": "uri", - "description": "The URL of the file to be sent to the model." + "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" }, - "file_data": { + "id": { "type": "string", - "description": "The content of the file to be sent to the model." + "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.InputContent" + "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "A file input to the model.", - "title": "Input file" + "description": "The streamed output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" }, - "OpenAI.InputContentInputImageContent": { + "OpenAI.ItemCodeInterpreterToolCall": { "type": "object", "required": [ "type", - "detail" + "id", + "status", + "container_id", + "code", + "outputs" ], "properties": { "type": { "type": "string", "enum": [ - "input_image" + "code_interpreter_call" ], - "description": "The type of the input item. Always `input_image`.", + "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", "x-stainless-const": true, - "default": "input_image" + "default": "code_interpreter_call" }, - "image_url": { + "id": { "type": "string", - "format": "uri", - "nullable": true + "description": "The unique ID of the code interpreter tool call." }, - "file_id": { + "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 }, - "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`." + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" + }, + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" + } + ] + }, + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputContent" + "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" + "description": "A tool call to run code.", + "title": "Code interpreter tool call" }, - "OpenAI.InputContentInputTextContent": { + "OpenAI.ItemCompactionSummaryItemParam": { "type": "object", "required": [ "type", - "text" + "encrypted_content" ], "properties": { + "id": { + "type": "string", + "nullable": true + }, "type": { "type": "string", "enum": [ - "input_text" + "compaction" ], - "description": "The type of the input item. Always `input_text`.", + "description": "The type of the item. Always `compaction`.", "x-stainless-const": true, - "default": "input_text" + "default": "compaction" }, - "text": { + "encrypted_content": { "type": "string", - "description": "The text input to the model." + "maxLength": 10485760, + "description": "The encrypted content of the compaction summary." } }, "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" - ] + "$ref": "#/components/schemas/OpenAI.Item" } - ] - }, - "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`." + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" }, - "OpenAI.InputFileContent": { + "OpenAI.ItemComputerCallOutputItemParam": { "type": "object", "required": [ - "type" + "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": [ - "input_file" + "computer_call_output" ], - "description": "The type of the input item. Always `input_file`.", + "description": "The type of the computer tool call output. Always `computer_call_output`.", "x-stainless-const": true, - "default": "input_file" - }, - "file_id": { - "type": "string", - "nullable": true + "default": "computer_call_output" }, - "filename": { - "type": "string", - "description": "The name of the file to be sent to the model." + "output": { + "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" }, - "file_url": { - "type": "string", - "format": "uri", - "description": "The URL of the file to be sent to the model." + "acknowledged_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "nullable": true }, - "file_data": { - "type": "string", - "description": "The content of the file to be sent to the model." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" + } + ], + "nullable": true } }, - "description": "A file input to the model.", - "title": "Input file" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The output of a computer tool call.", + "title": "Computer tool call output" }, - "OpenAI.InputFileContentParam": { + "OpenAI.ItemComputerToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "input_file" + "computer_call" ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" }, - "file_id": { + "id": { "type": "string", - "nullable": true + "description": "The unique ID of the computer call." }, - "filename": { + "call_id": { "type": "string", - "nullable": true + "description": "An identifier used when responding to the tool call with output." }, - "file_data": { - "type": "string", - "nullable": true + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" }, - "file_url": { + "pending_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The pending safety checks for the computer call." + }, + "status": { "type": "string", - "format": "uri", - "nullable": true + "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." } }, - "description": "A file input to the model.", - "title": "Input file" + "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.InputImageContent": { + "OpenAI.ItemCustomToolCall": { "type": "object", "required": [ "type", - "detail" + "call_id", + "name", + "input" ], "properties": { "type": { "type": "string", "enum": [ - "input_image" + "custom_tool_call" ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" + "description": "The type of the custom tool call. Always `custom_tool_call`.", + "x-stainless-const": true }, - "image_url": { + "id": { "type": "string", - "format": "uri", - "nullable": true + "description": "The unique ID of the custom tool call in the OpenAI platform." }, - "file_id": { + "call_id": { "type": "string", - "nullable": true + "description": "An identifier used to map this custom tool call to a tool call output." }, - "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`." + "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." } }, - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" }, - "OpenAI.InputImageContentParamAutoParam": { + "OpenAI.ItemCustomToolCallOutput": { "type": "object", "required": [ - "type" + "type", + "call_id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "input_image" + "custom_tool_call_output" ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true }, - "image_url": { + "id": { "type": "string", - "format": "uri", - "nullable": true + "description": "The unique ID of the custom tool call output in the OpenAI platform." }, - "file_id": { + "call_id": { "type": "string", - "nullable": true + "description": "The call ID, used to map this custom tool call output to a custom tool call." }, - "detail": { - "allOf": [ + "output": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.DetailEnum" + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } } ], - "nullable": true + "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." } }, - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision)", - "title": "Input image" + "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.InputItem": { + "OpenAI.ItemField": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.InputItemType" + "$ref": "#/components/schemas/OpenAI.ItemFieldType" } }, "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" + "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 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." + "description": "An item representing a message, tool call, tool output, reasoning, or other response element." }, - "OpenAI.InputItemApplyPatchToolCallItemParam": { + "OpenAI.ItemFieldApplyPatchToolCall": { "type": "object", "required": [ "type", + "id", "call_id", "status", "operation" @@ -23616,18 +33166,16 @@ }, "id": { "type": "string", - "nullable": true + "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." }, "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" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" } ], "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." @@ -23635,24 +33183,30 @@ "operation": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" } ], - "description": "The specific create, delete, or update instruction for the apply_patch tool call." + "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.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "A tool call representing a request to create, delete, or update files using diff patches.", + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", "title": "Apply patch tool call" }, - "OpenAI.InputItemApplyPatchToolCallOutputItemParam": { + "OpenAI.ItemFieldApplyPatchToolCallOutput": { "type": "object", "required": [ "type", + "id", "call_id", "status" ], @@ -23668,18 +33222,16 @@ }, "id": { "type": "string", - "nullable": true + "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." }, "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" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" } ], "description": "The status of the apply patch tool call output. One of `completed` or `failed`." @@ -23687,17 +33239,21 @@ "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.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "The streamed output emitted by an apply patch tool call.", + "description": "The output emitted by an apply patch tool call.", "title": "Apply patch tool call output" }, - "OpenAI.InputItemCodeInterpreterToolCall": { + "OpenAI.ItemFieldCodeInterpreterToolCall": { "type": "object", "required": [ "type", @@ -23757,23 +33313,20 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A tool call to run code.", "title": "Code interpreter tool call" }, - "OpenAI.InputItemCompactionSummaryItemParam": { + "OpenAI.ItemFieldCompactionBody": { "type": "object", "required": [ "type", + "id", "encrypted_content" ], "properties": { - "id": { - "type": "string", - "nullable": true - }, "type": { "type": "string", "enum": [ @@ -23783,110 +33336,116 @@ "x-stainless-const": true, "default": "compaction" }, + "id": { + "type": "string", + "description": "The unique ID of the compaction item." + }, "encrypted_content": { "type": "string", - "maxLength": 10485760, - "description": "The encrypted content of the compaction summary." + "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.InputItem" + "$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.InputItemComputerCallOutputItemParam": { + "OpenAI.ItemFieldComputerToolCall": { "type": "object", "required": [ - "call_id", "type", - "output" + "id", + "call_id", + "action", + "pending_safety_checks", + "status" ], "properties": { - "id": { + "type": { "type": "string", - "nullable": true + "enum": [ + "computer_call" + ], + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" }, - "call_id": { + "id": { "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The ID of the computer tool call that produced the output." + "description": "The unique ID of the computer call." }, - "type": { + "call_id": { "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" + "description": "An identifier used when responding to the tool call with output." }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" }, - "acknowledged_safety_checks": { + "pending_safety_checks": { "type": "array", "items": { "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" }, - "nullable": true + "description": "The pending safety checks for the computer call." }, "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" - } + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" ], - "nullable": true + "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" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "The output of a computer tool call.", - "title": "Computer tool call output" + "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.InputItemComputerToolCall": { + "OpenAI.ItemFieldComputerToolCallOutputResource": { "type": "object", "required": [ "type", - "id", "call_id", - "action", - "pending_safety_checks", - "status" + "output" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call" + "computer_call_output" ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" + "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 unique ID of the computer call." + "description": "The ID of the computer tool call output." }, "call_id": { "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "description": "The ID of the computer tool call that produced the output." }, - "pending_safety_checks": { + "acknowledged_safety_checks": { "type": "array", "items": { "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" }, - "description": "The pending safety checks for the computer call." + "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", @@ -23895,18 +33454,16 @@ "completed", "incomplete" ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "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" + "$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.InputItemCustomToolCall": { + "OpenAI.ItemFieldCustomToolCall": { "type": "object", "required": [ "type", @@ -23942,13 +33499,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A call to a custom tool created by the model.", "title": "Custom tool call" }, - "OpenAI.InputItemCustomToolCallOutput": { + "OpenAI.ItemFieldCustomToolCallOutput": { "type": "object", "required": [ "type", @@ -23989,13 +33546,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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.InputItemFileSearchToolCall": { + "OpenAI.ItemFieldFileSearchToolCall": { "type": "object", "required": [ "id", @@ -24044,111 +33601,44 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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.InputItemFunctionCallOutputItemParam": { + "OpenAI.ItemFieldFunctionShellCall": { "type": "object", "required": [ - "call_id", "type", - "output" + "id", + "call_id", + "action", + "status", + "environment" ], "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" + "shell_call" ], - "description": "The type of the function tool call output. Always `function_call_output`.", + "description": "The type of the item. Always `shell_call`.", "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." + "default": "shell_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 + "description": "The unique ID of the shell tool call. Populated when this item is returned via API." }, "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" + "$ref": "#/components/schemas/OpenAI.FunctionShellAction" } ], "description": "The shell commands and limits that describe how to run the tool call." @@ -24156,70 +33646,75 @@ "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" } ], - "nullable": true + "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." }, "environment": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + "$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.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "A tool representing a request to execute one or more shell commands.", + "description": "A tool call that executes one or more shell commands in a managed environment.", "title": "Shell tool call" }, - "OpenAI.InputItemFunctionShellCallOutputItemParam": { + "OpenAI.ItemFieldFunctionShellCallOutput": { "type": "object", "required": [ - "call_id", "type", - "output" + "id", + "call_id", + "status", + "output", + "max_output_length" ], "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`.", + "description": "The type of the shell call output. 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." + "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.FunctionShellCallItemStatus" + "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" } ], - "nullable": true + "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", @@ -24229,17 +33724,21 @@ } ], "nullable": true + }, + "created_by": { + "type": "string", + "description": "The identifier of the actor that created the item." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "The streamed output items emitted by a shell tool call.", - "title": "Shell tool call output" + "description": "The output of a shell tool call that was emitted.", + "title": "Shell call output" }, - "OpenAI.InputItemFunctionToolCall": { + "OpenAI.ItemFieldFunctionToolCall": { "type": "object", "required": [ "type", @@ -24284,13 +33783,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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.InputItemImageGenToolCall": { + "OpenAI.ItemFieldImageGenToolCall": { "type": "object", "required": [ "type", @@ -24328,13 +33827,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "An image generation request made by the model.", "title": "Image generation call" }, - "OpenAI.InputItemLocalShellToolCall": { + "OpenAI.ItemFieldLocalShellToolCall": { "type": "object", "required": [ "type", @@ -24375,13 +33874,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A tool call to run a command on the local shell.", "title": "Local shell call" }, - "OpenAI.InputItemLocalShellToolCallOutput": { + "OpenAI.ItemFieldLocalShellToolCallOutput": { "type": "object", "required": [ "type", @@ -24417,13 +33916,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "The output of a local shell tool call.", "title": "Local shell call output" }, - "OpenAI.InputItemMcpApprovalRequest": { + "OpenAI.ItemFieldMcpApprovalRequest": { "type": "object", "required": [ "type", @@ -24460,16 +33959,17 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A request for human approval of a tool invocation.", "title": "MCP approval request" }, - "OpenAI.InputItemMcpApprovalResponse": { + "OpenAI.ItemFieldMcpApprovalResponseResource": { "type": "object", "required": [ "type", + "id", "approval_request_id", "approve" ], @@ -24484,7 +33984,7 @@ }, "id": { "type": "string", - "nullable": true + "description": "The unique ID of the approval response" }, "approval_request_id": { "type": "string", @@ -24501,13 +34001,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A response to an MCP approval request.", "title": "MCP approval response" }, - "OpenAI.InputItemMcpListTools": { + "OpenAI.ItemFieldMcpListTools": { "type": "object", "required": [ "type", @@ -24546,13 +34046,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A list of tools available on an MCP server.", "title": "MCP list tools" }, - "OpenAI.InputItemMcpToolCall": { + "OpenAI.ItemFieldMcpToolCall": { "type": "object", "required": [ "type", @@ -24609,48 +34109,104 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "An invocation of a tool on an MCP server.", "title": "MCP tool call" }, - "OpenAI.InputItemOutputMessage": { + "OpenAI.ItemFieldMessage": { "type": "object", "required": [ - "id", "type", + "id", + "status", "role", - "content", - "status" + "content" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, "type": { "type": "string", "enum": [ - "output_message" + "message" ], - "description": "The type of the output message. Always `message`.", - "x-stainless-const": true + "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": [ - "assistant" + "reasoning" ], - "description": "The role of the output message. Always `assistant`.", + "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.OutputMessageContent" + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" }, - "description": "The content of the output message." + "description": "Reasoning text content." }, "status": { "type": "string", @@ -24659,188 +34215,382 @@ "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." + "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.InputItem" + "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "An output message from the model.", - "title": "Output message" + "description": "The output of a function tool call.", + "title": "Function tool call output" }, - "OpenAI.InputItemReasoningItem": { + "OpenAI.ItemFunctionShellCallItemParam": { "type": "object", "required": [ + "call_id", "type", - "id", - "summary" + "action" ], "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." + "nullable": true }, - "encrypted_content": { + "call_id": { "type": "string", - "nullable": true + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the shell tool call generated by the model." }, - "summary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.SummaryTextContent" - }, - "description": "Reasoning summary content." + "type": { + "type": "string", + "enum": [ + "shell_call" + ], + "description": "The type of the item. Always `shell_call`.", + "x-stainless-const": true, + "default": "shell_call" }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" - }, - "description": "Reasoning text content." + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellActionParam" + } + ], + "description": "The shell commands and limits that describe how to run the tool call." }, "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + } ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "nullable": true + }, + "environment": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + } + ], + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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.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" - ] - } - ] + "description": "A tool representing a request to execute one or more shell commands.", + "title": "Shell tool call" }, - "OpenAI.InputItemWebSearchToolCall": { + "OpenAI.ItemFunctionShellCallOutputItemParam": { "type": "object", "required": [ - "id", + "call_id", "type", - "status", - "action" + "output" ], "properties": { "id": { "type": "string", - "description": "The unique ID of the web search tool call." + "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": [ - "web_search_call" + "shell_call_output" ], - "description": "The type of the web search tool call. Always `web_search_call`.", - "x-stainless-const": true + "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": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + } ], - "description": "The status of the web search tool call." + "nullable": true }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, + "max_output_length": { + "type": "integer", + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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)." + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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" + "description": "The streamed output items emitted by a shell tool call.", + "title": "Shell tool call output" }, - "OpenAI.InputMessage": { + "OpenAI.ItemFunctionToolCall": { "type": "object", "required": [ "type", - "role", - "content" + "call_id", + "name", + "arguments" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, "type": { "type": "string", "enum": [ - "message" + "function_call" ], - "description": "The type of the message input. Always set to `message`.", + "description": "The type of the function tool call. Always `function_call`.", "x-stainless-const": true }, - "role": { + "call_id": { "type": "string", - "enum": [ - "user", - "system", - "developer" - ], - "description": "The role of the message input. One of `user`, `system`, or `developer`." + "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", @@ -24849,10 +34599,7 @@ "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" + "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." } }, "allOf": [ @@ -24860,214 +34607,132 @@ "$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" + "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.InputMessageResource": { + "OpenAI.ItemImageGenToolCall": { "type": "object", "required": [ "type", - "role", - "content", - "id" + "id", + "status", + "result" ], "properties": { "type": { "type": "string", "enum": [ - "message" + "image_generation_call" ], - "description": "The type of the message input. Always set to `message`.", + "description": "The type of the image generation call. Always `image_generation_call`.", "x-stainless-const": true }, - "role": { + "id": { "type": "string", - "enum": [ - "user", - "system", - "developer" - ], - "description": "The role of the message input. One of `user`, `system`, or `developer`." + "description": "The unique ID of the image generation call." }, "status": { "type": "string", "enum": [ "in_progress", "completed", - "incomplete" + "generating", + "failed" ], - "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" + "description": "The status of the image generation call." }, - "id": { + "result": { "type": "string", - "description": "The unique ID of the message input." + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ] - }, - "OpenAI.InputParam": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - } + "$ref": "#/components/schemas/OpenAI.Item" } ], - "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)" + "description": "An image generation request made by the model.", + "title": "Image generation call" }, - "OpenAI.InputTextContent": { + "OpenAI.ItemLocalShellToolCall": { "type": "object", "required": [ "type", - "text" + "id", + "call_id", + "action", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "input_text" + "local_shell_call" ], - "description": "The type of the input item. Always `input_text`.", - "x-stainless-const": true, - "default": "input_text" + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true }, - "text": { + "id": { "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": { + "description": "The unique ID of the local shell call." + }, + "call_id": { "type": "string", - "enum": [ - "input_text" - ], - "description": "The type of the input item. Always `input_text`.", - "x-stainless-const": true, - "default": "input_text" + "description": "The unique ID of the local shell tool call generated by the model." }, - "text": { + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + }, + "status": { "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" + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." } }, - "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" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" } - }, - "description": "Content item used to generate a response." + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" }, - "OpenAI.ItemApplyPatchToolCallItemParam": { + "OpenAI.ItemLocalShellToolCallOutput": { "type": "object", "required": [ "type", - "call_id", - "status", - "operation" + "id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call" + "local_shell_call_output" ], - "description": "The type of the item. Always `apply_patch_call`.", - "x-stainless-const": true, - "default": "apply_patch_call" + "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", + "x-stainless-const": true }, "id": { "type": "string", - "nullable": true + "description": "The unique ID of the local shell tool call generated by the model." }, - "call_id": { + "output": { "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the apply patch tool call generated by the model." + "description": "A JSON string of the output of the local shell tool call." }, "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" - } + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" ], - "description": "The specific create, delete, or update instruction for the apply_patch tool call." + "nullable": true } }, "allOf": [ @@ -25075,47 +34740,42 @@ "$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" + "description": "The output of a local shell tool call.", + "title": "Local shell call output" }, - "OpenAI.ItemApplyPatchToolCallOutputItemParam": { + "OpenAI.ItemMcpApprovalRequest": { "type": "object", "required": [ "type", - "call_id", - "status" + "id", + "server_label", + "name", + "arguments" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call_output" + "mcp_approval_request" ], - "description": "The type of the item. Always `apply_patch_call_output`.", - "x-stainless-const": true, - "default": "apply_patch_call_output" + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true }, "id": { "type": "string", - "nullable": true + "description": "The unique ID of the approval request." }, - "call_id": { + "server_label": { "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the apply patch tool call generated by the model." + "description": "The label of the MCP server making the request." }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatusParam" - } - ], - "description": "The status of the apply patch tool call output. One of `completed` or `failed`." + "name": { + "type": "string", + "description": "The name of the tool to run." }, - "output": { + "arguments": { "type": "string", - "nullable": true + "description": "A JSON string of arguments for the tool." } }, "allOf": [ @@ -25123,64 +34783,39 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "The streamed output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" }, - "OpenAI.ItemCodeInterpreterToolCall": { + "OpenAI.ItemMcpApprovalResponse": { "type": "object", "required": [ "type", - "id", - "status", - "container_id", - "code", - "outputs" + "approval_request_id", + "approve" ], "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" + "mcp_approval_response" ], - "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." + "description": "The type of the item. Always `mcp_approval_response`.", + "x-stainless-const": true }, - "code": { + "id": { "type": "string", "nullable": true }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, + "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 } }, @@ -25189,33 +34824,44 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" + "description": "A response to an MCP approval request.", + "title": "MCP approval response" }, - "OpenAI.ItemCompactionSummaryItemParam": { + "OpenAI.ItemMcpListTools": { "type": "object", "required": [ "type", - "encrypted_content" + "id", + "server_label", + "tools" ], "properties": { - "id": { - "type": "string", - "nullable": true - }, "type": { "type": "string", "enum": [ - "compaction" + "mcp_list_tools" ], - "description": "The type of the item. Always `compaction`.", - "x-stainless-const": true, - "default": "compaction" + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true }, - "encrypted_content": { + "id": { "type": "string", - "maxLength": 10485760, - "description": "The encrypted content of the compaction summary." + "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": [ @@ -25223,52 +34869,61 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", - "title": "Compaction item" + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" }, - "OpenAI.ItemComputerCallOutputItemParam": { + "OpenAI.ItemMcpToolCall": { "type": "object", "required": [ - "call_id", "type", - "output" + "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", - "nullable": true + "description": "The unique ID of the tool call." }, - "call_id": { + "server_label": { "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The ID of the computer tool call that produced the output." + "description": "The label of the MCP server running the tool." }, - "type": { + "name": { "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" + "description": "The name of the tool that was run." }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + "arguments": { + "type": "string", + "description": "A JSON string of the arguments passed to the tool." }, - "acknowledged_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, + "output": { + "type": "string", "nullable": true }, + "error": { + "type": "object", + "additionalProperties": {} + }, "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" + "$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 } }, @@ -25277,45 +34932,45 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "The output of a computer tool call.", - "title": "Computer tool call output" + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" }, - "OpenAI.ItemComputerToolCall": { + "OpenAI.ItemOutputMessage": { "type": "object", "required": [ - "type", "id", - "call_id", - "action", - "pending_safety_checks", + "type", + "role", + "content", "status" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the output message." + }, "type": { "type": "string", "enum": [ - "computer_call" + "output_message" ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." + "description": "The type of the output message. Always `message`.", + "x-stainless-const": true }, - "call_id": { + "role": { "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true }, - "pending_safety_checks": { + "content": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" }, - "description": "The pending safety checks for the computer call." + "description": "The content of the output message." }, "status": { "type": "string", @@ -25324,7 +34979,7 @@ "completed", "incomplete" ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." } }, "allOf": [ @@ -25332,41 +34987,55 @@ "$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" + "description": "An output message from the model.", + "title": "Output message" }, - "OpenAI.ItemCustomToolCall": { + "OpenAI.ItemReasoningItem": { "type": "object", "required": [ "type", - "call_id", - "name", - "input" + "id", + "summary" ], "properties": { "type": { "type": "string", "enum": [ - "custom_tool_call" + "reasoning" ], - "description": "The type of the custom tool call. Always `custom_tool_call`.", + "description": "The type of the object. Always `reasoning`.", "x-stainless-const": true }, "id": { "type": "string", - "description": "The unique ID of the custom tool call in the OpenAI platform." + "description": "The unique identifier of the reasoning content." }, - "call_id": { + "encrypted_content": { "type": "string", - "description": "An identifier used to map this custom tool call to a tool call output." + "nullable": true }, - "name": { - "type": "string", - "description": "The name of the custom tool being called." + "summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + }, + "description": "Reasoning summary content." }, - "input": { + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + }, + "description": "Reasoning text content." + }, + "status": { "type": "string", - "description": "The input for the custom tool call generated by the model." + "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": [ @@ -25374,97 +35043,76 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" + "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.ItemCustomToolCallOutput": { + "OpenAI.ItemReferenceParam": { "type": "object", "required": [ "type", - "call_id", - "output" + "id" ], "properties": { "type": { "type": "string", "enum": [ - "custom_tool_call_output" + "item_reference" ], - "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", - "x-stainless-const": true + "description": "The type of item to reference. Always `item_reference`.", + "x-stainless-const": true, + "default": "item_reference" }, "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." + "description": "The ID of the item to reference." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Item" + "$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" + "description": "An internal identifier for an item to reference.", + "title": "Item reference" }, - "OpenAI.ItemField": { + "OpenAI.ItemResource": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.ItemFieldType" + "$ref": "#/components/schemas/OpenAI.ItemResourceType" } }, "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" + "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": "An item representing a message, tool call, tool output, reasoning, or other response element." + "description": "Content item used to generate a response." }, - "OpenAI.ItemFieldApplyPatchToolCall": { + "OpenAI.ItemResourceApplyPatchToolCall": { "type": "object", "required": [ "type", @@ -25515,13 +35163,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFieldApplyPatchToolCallOutput": { + "OpenAI.ItemResourceApplyPatchToolCallOutput": { "type": "object", "required": [ "type", @@ -25566,13 +35214,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "The output emitted by an apply patch tool call.", "title": "Apply patch tool call output" }, - "OpenAI.ItemFieldCodeInterpreterToolCall": { + "OpenAI.ItemResourceCodeInterpreterToolCall": { "type": "object", "required": [ "type", @@ -25632,51 +35280,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "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": { + "OpenAI.ItemResourceComputerToolCall": { "type": "object", "required": [ "type", @@ -25725,13 +35335,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFieldComputerToolCallOutputResource": { + "OpenAI.ItemResourceComputerToolCallOutputResource": { "type": "object", "required": [ "type", @@ -25778,100 +35388,11 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ] }, - "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": { + "OpenAI.ItemResourceFileSearchToolCall": { "type": "object", "required": [ "id", @@ -25920,13 +35441,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFieldFunctionShellCall": { + "OpenAI.ItemResourceFunctionShellCall": { "type": "object", "required": [ "type", @@ -25986,13 +35507,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFieldFunctionShellCallOutput": { + "OpenAI.ItemResourceFunctionShellCallOutput": { "type": "object", "required": [ "type", @@ -26042,22 +35563,76 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "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." }, - "created_by": { + "status": { "type": "string", - "description": "The identifier of the actor that created the item." + "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" + "$ref": "#/components/schemas/OpenAI.ItemResource" } - ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" + ] }, - "OpenAI.ItemFieldFunctionToolCall": { + "OpenAI.ItemResourceFunctionToolCallResource": { "type": "object", "required": [ "type", @@ -26102,13 +35677,11 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } - ], - "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": { + "OpenAI.ItemResourceImageGenToolCall": { "type": "object", "required": [ "type", @@ -26146,13 +35719,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "An image generation request made by the model.", "title": "Image generation call" }, - "OpenAI.ItemFieldLocalShellToolCall": { + "OpenAI.ItemResourceLocalShellToolCall": { "type": "object", "required": [ "type", @@ -26193,13 +35766,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "A tool call to run a command on the local shell.", "title": "Local shell call" }, - "OpenAI.ItemFieldLocalShellToolCallOutput": { + "OpenAI.ItemResourceLocalShellToolCallOutput": { "type": "object", "required": [ "type", @@ -26235,13 +35808,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "The output of a local shell tool call.", "title": "Local shell call output" }, - "OpenAI.ItemFieldMcpApprovalRequest": { + "OpenAI.ItemResourceMcpApprovalRequest": { "type": "object", "required": [ "type", @@ -26278,13 +35851,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "A request for human approval of a tool invocation.", "title": "MCP approval request" }, - "OpenAI.ItemFieldMcpApprovalResponseResource": { + "OpenAI.ItemResourceMcpApprovalResponseResource": { "type": "object", "required": [ "type", @@ -26320,13 +35893,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "A response to an MCP approval request.", "title": "MCP approval response" }, - "OpenAI.ItemFieldMcpListTools": { + "OpenAI.ItemResourceMcpListTools": { "type": "object", "required": [ "type", @@ -26365,13 +35938,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "A list of tools available on an MCP server.", "title": "MCP list tools" }, - "OpenAI.ItemFieldMcpToolCall": { + "OpenAI.ItemResourceMcpToolCall": { "type": "object", "required": [ "type", @@ -26428,104 +36001,48 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "An invocation of a tool on an MCP server.", "title": "MCP tool call" }, - "OpenAI.ItemFieldMessage": { + "OpenAI.ItemResourceOutputMessage": { "type": "object", "required": [ - "type", "id", - "status", + "type", "role", - "content" + "content", + "status" ], "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`." + "description": "The unique ID of the output message." }, - "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" + "output_message" ], - "description": "The type of the object. Always `reasoning`.", + "description": "The type of the output message. Always `message`.", "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique identifier of the reasoning content." - }, - "encrypted_content": { + "role": { "type": "string", - "nullable": true - }, - "summary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.SummaryTextContent" - }, - "description": "Reasoning summary content." + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true }, "content": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" }, - "description": "Reasoning text content." + "description": "The content of the output message." }, "status": { "type": "string", @@ -26534,18 +36051,18 @@ "completed", "incomplete" ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "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" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], - "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" + "description": "An output message from the model.", + "title": "Output message" }, - "OpenAI.ItemFieldType": { + "OpenAI.ItemResourceType": { "anyOf": [ { "type": "string" @@ -26554,15 +36071,14 @@ "type": "string", "enum": [ "message", - "function_call", - "function_call_output", + "output_message", "file_search_call", - "web_search_call", - "image_generation_call", "computer_call", "computer_call_output", - "reasoning", - "compaction", + "web_search_call", + "function_call", + "function_call_output", + "image_generation_call", "code_interpreter_call", "local_shell_call", "local_shell_call_output", @@ -26574,13 +36090,33 @@ "mcp_approval_request", "mcp_approval_response", "mcp_call", - "custom_tool_call", - "custom_tool_call_output" + "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.ItemFieldWebSearchToolCall": { + "OpenAI.ItemResourceWebSearchToolCall": { "type": "object", "required": [ "id", @@ -26628,31 +36164,89 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFileSearchToolCall": { + "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", - "queries" + "action" ], "properties": { "id": { "type": "string", - "description": "The unique ID of the file search tool call." + "description": "The unique ID of the web search tool call." }, "type": { "type": "string", "enum": [ - "file_search_call" + "web_search_call" ], - "description": "The type of the file search tool call. Always `file_search_call`.", + "description": "The type of the web search tool call. Always `web_search_call`.", "x-stainless-const": true }, "status": { @@ -26661,264 +36255,23 @@ "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" + "description": "The status of the web search tool call." }, - "output": { + "action": { "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" }, { - "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" + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + } ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "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": [ @@ -26926,1442 +36279,1337 @@ "$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" + "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.ItemImageGenToolCall": { + "OpenAI.KeyPressAction": { "type": "object", "required": [ "type", - "id", - "status", - "result" + "keys" ], "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" + "keypress" ], - "description": "The status of the image generation call." + "description": "Specifies the event type. For a keypress action, this property is always set to `keypress`.", + "x-stainless-const": true, + "default": "keypress" }, - "result": { - "type": "string", - "nullable": true + "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.Item" + "$ref": "#/components/schemas/OpenAI.ComputerAction" } ], - "description": "An image generation request made by the model.", - "title": "Image generation call" + "description": "A collection of keypresses the model would like to perform.", + "title": "KeyPress" }, - "OpenAI.ItemLocalShellToolCall": { + "OpenAI.ListFineTuningJobCheckpointsResponse": { "type": "object", "required": [ - "type", - "id", - "call_id", - "action", - "status" + "data", + "object", + "has_more" ], "properties": { - "type": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpoint" + }, + "x-ms-list-page-items": true + }, + "object": { "type": "string", "enum": [ - "local_shell_call" + "list" ], - "description": "The type of the local shell call. Always `local_shell_call`.", "x-stainless-const": true }, - "id": { + "first_id": { "type": "string", - "description": "The unique ID of the local shell call." + "nullable": true }, - "call_id": { + "last_id": { "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + "nullable": true, + "x-ms-list-continuation-token": true }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" + "has_more": { + "type": "boolean" } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" + } }, - "OpenAI.ItemLocalShellToolCallOutput": { + "OpenAI.ListFineTuningJobEventsResponse": { "type": "object", "required": [ - "type", - "id", - "output" + "data", + "object", + "has_more" ], "properties": { - "type": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FineTuningJobEvent" + }, + "x-ms-list-page-items": true + }, + "object": { "type": "string", "enum": [ - "local_shell_call_output" + "list" ], - "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." + "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 }, - "output": { - "type": "string", - "description": "A JSON string of the output of the local shell tool call." + "has_more": { + "type": "boolean" }, - "status": { + "object": { "type": "string", "enum": [ - "in_progress", - "completed", - "incomplete" + "list" ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" + "x-stainless-const": true } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" + } }, - "OpenAI.ItemMcpApprovalRequest": { + "OpenAI.LocalEnvironmentResource": { "type": "object", "required": [ - "type", - "id", - "server_label", - "name", - "arguments" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_request" + "local" ], - "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." + "description": "The environment type. Always `local`.", + "x-stainless-const": true, + "default": "local" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Item" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" } ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" + "description": "Represents the use of a local environment to perform shell actions.", + "title": "Local Environment" }, - "OpenAI.ItemMcpApprovalResponse": { + "OpenAI.LocalShellCallOutputStatusEnum": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.LocalShellCallStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.LocalShellExecAction": { "type": "object", "required": [ "type", - "approval_request_id", - "approve" + "command", + "env" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_response" + "exec" ], - "description": "The type of the item. Always `mcp_approval_response`.", - "x-stainless-const": true + "description": "The type of the local shell action. Always `exec`.", + "x-stainless-const": true, + "default": "exec" }, - "id": { - "type": "string", + "command": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The command to run." + }, + "timeout_ms": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], "nullable": true }, - "approval_request_id": { + "working_directory": { "type": "string", - "description": "The ID of the approval request being answered." + "nullable": true }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables to set for the command.", + "x-oaiTypeLabel": "map" }, - "reason": { + "user": { "type": "string", "nullable": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" + "description": "Execute a shell command on the server.", + "title": "Local shell exec action" }, - "OpenAI.ItemMcpListTools": { + "OpenAI.LocalShellToolParam": { "type": "object", "required": [ - "type", - "id", - "server_label", - "tools" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_list_tools" + "local_shell" ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the list." + "description": "The type of the local shell tool. Always `local_shell`.", + "x-stainless-const": true, + "default": "local_shell" }, - "server_label": { + "name": { "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." + "description": "Optional user-defined name for this tool or configuration." }, - "error": { + "description": { "type": "string", - "nullable": true + "description": "Optional user-defined description for this tool or configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Item" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" + "description": "A tool that allows the model to execute shell commands in a local environment.", + "title": "Local shell tool" }, - "OpenAI.ItemMcpToolCall": { + "OpenAI.LocalSkillParam": { "type": "object", "required": [ - "type", - "id", - "server_label", "name", - "arguments" + "description", + "path" ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "mcp_call" - ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true + "description": "The name of the skill." }, - "id": { + "description": { "type": "string", - "description": "The unique ID of the tool call." + "description": "The description of the skill." }, - "server_label": { + "path": { "type": "string", - "description": "The label of the MCP server running the tool." + "description": "The path to the directory containing the skill." + } + } + }, + "OpenAI.LogProb": { + "type": "object", + "required": [ + "token", + "logprob", + "bytes", + "top_logprobs" + ], + "properties": { + "token": { + "type": "string" }, - "name": { - "type": "string", - "description": "The name of the tool that was run." + "logprob": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - "arguments": { + "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": "A JSON string of the arguments passed to the tool." + "description": "The name of the tool." }, - "output": { + "description": { "type": "string", "nullable": true }, - "error": { - "type": "object", - "additionalProperties": {} - }, - "status": { + "input_schema": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + "$ref": "#/components/schemas/OpenAI.MCPListToolsToolInputSchema" } ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + "description": "The JSON schema describing the tool's input." }, - "approval_request_id": { - "type": "string", + "annotations": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPListToolsToolAnnotations" + } + ], "nullable": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" + "description": "A tool available on an MCP server.", + "title": "MCP list tools tool" }, - "OpenAI.ItemOutputMessage": { + "OpenAI.MCPListToolsToolAnnotations": { + "type": "object" + }, + "OpenAI.MCPListToolsToolInputSchema": { + "type": "object" + }, + "OpenAI.MCPTool": { "type": "object", "required": [ - "id", "type", - "role", - "content", - "status" + "server_label" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, "type": { "type": "string", "enum": [ - "output_message" + "mcp" ], - "description": "The type of the output message. Always `message`.", + "description": "The type of the MCP tool. Always `mcp`.", "x-stainless-const": true }, - "role": { + "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": [ - "assistant" + "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 + } ], - "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." + "default": "always" }, - "status": { + "project_connection_id": { "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." + "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.Item" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "An output message from the model.", - "title": "Output message" + "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.ItemReasoningItem": { + "OpenAI.MCPToolCallStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "calling", + "failed" + ] + }, + "OpenAI.MCPToolFilter": { "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": { + "tool_names": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + "type": "string" }, - "description": "Reasoning text content." + "description": "List of allowed tool names.", + "title": "MCP allowed tools" }, - "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." + "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." } }, - "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" + "description": "A filter object to specify which tools are allowed.", + "title": "MCP tool filter" }, - "OpenAI.ItemReferenceParam": { + "OpenAI.MCPToolRequireApproval": { "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" + "always": { + "$ref": "#/components/schemas/OpenAI.MCPToolFilter" }, - "id": { - "type": "string", - "description": "The ID of the item to reference." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" + "never": { + "$ref": "#/components/schemas/OpenAI.MCPToolFilter" } - ], - "description": "An internal identifier for an item to reference.", - "title": "Item reference" + } }, - "OpenAI.ItemResource": { + "OpenAI.MessageContent": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.ItemResourceType" + "$ref": "#/components/schemas/OpenAI.MessageContentType" } }, "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" + "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": "Content item used to generate a response." + "description": "A content part that makes up an input or output item." }, - "OpenAI.ItemResourceApplyPatchToolCall": { + "OpenAI.MessageContentInputFileContent": { "type": "object", "required": [ - "type", - "id", - "call_id", - "status", - "operation" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call" + "input_file" ], - "description": "The type of the item. Always `apply_patch_call`.", + "description": "The type of the input item. Always `input_file`.", "x-stainless-const": true, - "default": "apply_patch_call" + "default": "input_file" }, - "id": { + "file_id": { "type": "string", - "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." + "nullable": true }, - "call_id": { + "filename": { "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`." + "description": "The name of the file to be sent to the model." }, - "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" + "file_url": { + "type": "string", + "format": "uri", + "description": "The URL of the file to be sent to the model." }, - "created_by": { + "file_data": { "type": "string", - "description": "The ID of the entity that created this tool call." + "description": "The content of the file to be sent to the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "description": "A tool call that applies file diffs by creating, deleting, or updating files.", - "title": "Apply patch tool call" + "description": "A file input to the model.", + "title": "Input file" }, - "OpenAI.ItemResourceApplyPatchToolCallOutput": { + "OpenAI.MessageContentInputImageContent": { "type": "object", "required": [ "type", - "id", - "call_id", - "status" + "detail" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call_output" + "input_image" ], - "description": "The type of the item. Always `apply_patch_call_output`.", + "description": "The type of the input item. Always `input_image`.", "x-stainless-const": true, - "default": "apply_patch_call_output" + "default": "input_image" }, - "id": { + "image_url": { "type": "string", - "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." + "format": "uri", + "nullable": true }, - "call_id": { + "file_id": { "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." + "nullable": true }, - "status": { + "detail": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + "$ref": "#/components/schemas/OpenAI.ImageDetail" } ], - "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." + "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.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "description": "The output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" }, - "OpenAI.ItemResourceCodeInterpreterToolCall": { + "OpenAI.MessageContentInputTextContent": { "type": "object", "required": [ "type", - "id", - "status", - "container_id", - "code", - "outputs" + "text" ], "properties": { "type": { "type": "string", "enum": [ - "code_interpreter_call" + "input_text" ], - "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", + "description": "The type of the input item. Always `input_text`.", "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." + "default": "input_text" }, - "code": { + "text": { "type": "string", - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true + "description": "The text input to the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" + "description": "A text input to the model.", + "title": "Input text" }, - "OpenAI.ItemResourceComputerToolCall": { + "OpenAI.MessageContentOutputTextContent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" + "text", + "annotations", + "logprobs" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call" + "output_text" ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." + "description": "The type of the output text. Always `output_text`.", + "x-stainless-const": true, + "default": "output_text" }, - "call_id": { + "text": { "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "description": "The text output from the model." }, - "pending_safety_checks": { + "annotations": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + "$ref": "#/components/schemas/OpenAI.Annotation" }, - "description": "The pending safety checks for the computer call." + "description": "The annotations of the text output." }, - "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." + "logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LogProb" + } } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "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" + "description": "A text output from the model.", + "title": "Output text" }, - "OpenAI.ItemResourceComputerToolCallOutputResource": { + "OpenAI.MessageContentReasoningTextContent": { "type": "object", "required": [ "type", - "call_id", - "output" + "text" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call_output" + "reasoning_text" ], - "description": "The type of the computer tool call output. Always `computer_call_output`.", + "description": "The type of the reasoning text. Always `reasoning_text`.", "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" + "default": "reasoning_text" }, - "status": { + "text": { "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." + "description": "The reasoning text from the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } - ] + ], + "description": "Reasoning text from the model.", + "title": "Reasoning text" }, - "OpenAI.ItemResourceFileSearchToolCall": { + "OpenAI.MessageContentRefusalContent": { "type": "object", "required": [ - "id", "type", - "status", - "queries" + "refusal" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, "type": { "type": "string", "enum": [ - "file_search_call" + "refusal" ], - "description": "The type of the file search tool call. Always `file_search_call`.", - "x-stainless-const": true + "description": "The type of the refusal. Always `refusal`.", + "x-stainless-const": true, + "default": "refusal" }, - "status": { + "refusal": { "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 + "description": "The refusal explanation from the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "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" + "description": "A refusal from the model.", + "title": "Refusal" }, - "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." + "OpenAI.MessageContentType": { + "anyOf": [ + { + "type": "string" }, - "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": { + "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.LocalShellCallStatus" + "$ref": "#/components/schemas/OpenAI.ModelIdsResponses" } ], - "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." + "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 }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], + { + "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" }, - "created_by": { + { "type": "string", - "description": "The ID of the entity that created this tool call." + "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" + ] } - }, - "allOf": [ + ] + }, + "OpenAI.ModelIdsShared": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.ChatModel" } - ], - "description": "A tool call that executes one or more shell commands in a managed environment.", - "title": "Shell tool call" + ] }, - "OpenAI.ItemResourceFunctionShellCallOutput": { + "OpenAI.MoveParam": { "type": "object", "required": [ "type", - "id", - "call_id", - "status", - "output", - "max_output_length" + "x", + "y" ], "properties": { "type": { "type": "string", "enum": [ - "shell_call_output" + "move" ], - "description": "The type of the shell call output. Always `shell_call_output`.", + "description": "Specifies the event type. For a move action, this property is always set to `move`.", "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." + "default": "move" }, - "status": { + "x": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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" + "description": "The x-coordinate to move to." }, - "max_output_length": { - "type": "integer", + "y": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." + "description": "The y-coordinate to move to." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.ComputerAction" } ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" + "description": "A mouse move action.", + "title": "Move" }, - "OpenAI.ItemResourceFunctionToolCallOutputResource": { + "OpenAI.OutputContent": { "type": "object", "required": [ - "type", - "call_id", - "output" + "type" ], "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." + "$ref": "#/components/schemas/OpenAI.OutputContentType" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "discriminator": { + "propertyName": "type", + "mapping": { + "output_text": "#/components/schemas/OpenAI.OutputContentOutputTextContent", + "refusal": "#/components/schemas/OpenAI.OutputContentRefusalContent", + "reasoning_text": "#/components/schemas/OpenAI.OutputContentReasoningTextContent" } - ] + } }, - "OpenAI.ItemResourceFunctionToolCallResource": { + "OpenAI.OutputContentOutputTextContent": { "type": "object", "required": [ "type", - "call_id", - "name", - "arguments" + "text", + "annotations", + "logprobs" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, "type": { "type": "string", "enum": [ - "function_call" + "output_text" ], - "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." + "description": "The type of the output text. Always `output_text`.", + "x-stainless-const": true, + "default": "output_text" }, - "name": { + "text": { "type": "string", - "description": "The name of the function to run." + "description": "The text output from the model." }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Annotation" + }, + "description": "The annotations of the text output." }, - "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." + "logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LogProb" + } } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputContent" } - ] + ], + "description": "A text output from the model.", + "title": "Output text" }, - "OpenAI.ItemResourceImageGenToolCall": { + "OpenAI.OutputContentReasoningTextContent": { "type": "object", "required": [ "type", - "id", - "status", - "result" + "text" ], "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" + "reasoning_text" ], - "description": "The status of the image generation call." + "description": "The type of the reasoning text. Always `reasoning_text`.", + "x-stainless-const": true, + "default": "reasoning_text" }, - "result": { + "text": { "type": "string", - "nullable": true + "description": "The reasoning text from the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputContent" } ], - "description": "An image generation request made by the model.", - "title": "Image generation call" + "description": "Reasoning text from the model.", + "title": "Reasoning text" }, - "OpenAI.ItemResourceLocalShellToolCall": { + "OpenAI.OutputContentRefusalContent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status" + "refusal" ], "properties": { "type": { "type": "string", "enum": [ - "local_shell_call" + "refusal" ], - "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" + "description": "The type of the refusal. Always `refusal`.", + "x-stainless-const": true, + "default": "refusal" }, - "status": { + "refusal": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." + "description": "The refusal explanation from the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputContent" } ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" + "description": "A refusal from the model.", + "title": "Refusal" }, - "OpenAI.ItemResourceLocalShellToolCallOutput": { + "OpenAI.OutputContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "output_text", + "refusal", + "reasoning_text" + ] + } + ] + }, + "OpenAI.OutputItem": { "type": "object", "required": [ - "type", - "id", - "output" + "type" ], "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." + "$ref": "#/components/schemas/OpenAI.OutputItemType" }, - "output": { - "type": "string", - "description": "A JSON string of the output of the local shell tool call." + "agent_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentReference" + } + ], + "description": "The agent that created the item." }, - "status": { + "response_id": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "nullable": true + "description": "The response on which the item is created." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "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" } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" + } }, - "OpenAI.ItemResourceMcpApprovalRequest": { + "OpenAI.OutputItemApplyPatchToolCall": { "type": "object", "required": [ "type", "id", - "server_label", - "name", - "arguments" + "call_id", + "status", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_request" + "apply_patch_call" ], - "description": "The type of the item. Always `mcp_approval_request`.", - "x-stainless-const": true + "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 approval request." + "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." }, - "server_label": { + "call_id": { "type": "string", - "description": "The label of the MCP server making the request." + "description": "The unique ID of the apply patch tool call generated by the model." }, - "name": { - "type": "string", - "description": "The name of the tool to run." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" + } + ], + "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." }, - "arguments": { + "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": "A JSON string of arguments for the tool." + "description": "The ID of the entity that created this tool call." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", + "title": "Apply patch tool call" }, - "OpenAI.ItemResourceMcpApprovalResponseResource": { + "OpenAI.OutputItemApplyPatchToolCallOutput": { "type": "object", "required": [ "type", "id", - "approval_request_id", - "approve" + "call_id", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_response" + "apply_patch_call_output" ], - "description": "The type of the item. Always `mcp_approval_response`.", - "x-stainless-const": true + "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 approval response" + "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." }, - "approval_request_id": { + "call_id": { "type": "string", - "description": "The ID of the approval request being answered." + "description": "The unique ID of the apply patch tool call generated by the model." }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + } + ], + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." }, - "reason": { + "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" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" + "description": "The output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" }, - "OpenAI.ItemResourceMcpListTools": { + "OpenAI.OutputItemCodeInterpreterToolCall": { "type": "object", "required": [ "type", "id", - "server_label", - "tools" + "status", + "container_id", + "code", + "outputs" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_list_tools" + "code_interpreter_call" ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true + "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 list." + "description": "The unique ID of the code interpreter tool call." }, - "server_label": { + "status": { "type": "string", - "description": "The label of the MCP server." + "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`." }, - "tools": { + "container_id": { + "type": "string", + "description": "The ID of the container used to run the code." + }, + "code": { + "type": "string", + "nullable": true + }, + "outputs": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" + }, + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" + } + ] }, - "description": "The tools available on the server." - }, - "error": { - "type": "string", "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" + "description": "A tool call to run code.", + "title": "Code interpreter tool call" }, - "OpenAI.ItemResourceMcpToolCall": { + "OpenAI.OutputItemCompactionBody": { "type": "object", "required": [ "type", "id", - "server_label", - "name", - "arguments" + "encrypted_content" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_call" + "compaction" ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true + "description": "The type of the item. Always `compaction`.", + "x-stainless-const": true, + "default": "compaction" }, "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." + "description": "The unique ID of the compaction item." }, - "output": { + "encrypted_content": { "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`." + "description": "The encrypted content that was produced by compaction." }, - "approval_request_id": { + "created_by": { "type": "string", - "nullable": true + "description": "The identifier of the actor that created the item." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" }, - "OpenAI.ItemResourceOutputMessage": { + "OpenAI.OutputItemComputerToolCall": { "type": "object", "required": [ - "id", "type", - "role", - "content", + "id", + "call_id", + "action", + "pending_safety_checks", "status" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, "type": { "type": "string", "enum": [ - "output_message" + "computer_call" ], - "description": "The type of the output message. Always `message`.", - "x-stainless-const": true + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" }, - "role": { + "id": { "type": "string", - "enum": [ - "assistant" - ], - "description": "The role of the output message. Always `assistant`.", - "x-stainless-const": true + "description": "The unique ID of the computer call." }, - "content": { + "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.OutputMessageContent" + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" }, - "description": "The content of the output message." + "description": "The pending safety checks for the computer call." }, "status": { "type": "string", @@ -28370,202 +37618,78 @@ "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." + "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" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "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" - ] - } - ] + "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.ItemResourceWebSearchToolCall": { + "OpenAI.OutputItemCustomToolCall": { "type": "object", "required": [ - "id", "type", - "status", - "action" + "call_id", + "name", + "input" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, "type": { "type": "string", "enum": [ - "web_search_call" + "custom_tool_call" ], - "description": "The type of the web search tool call. Always `web_search_call`.", + "description": "The type of the custom tool call. Always `custom_tool_call`.", "x-stainless-const": true }, - "status": { + "id": { "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" - ], - "description": "The status of the web search tool call." + "description": "The unique ID of the custom tool call in the OpenAI platform." }, - "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)." + "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.ItemResource" + "$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.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" - ] - } - ] + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" }, - "OpenAI.ItemWebSearchToolCall": { + "OpenAI.OutputItemFileSearchToolCall": { "type": "object", "required": [ "id", "type", "status", - "action" + "queries" ], "properties": { "id": { "type": "string", - "description": "The unique ID of the web search tool call." + "description": "The unique ID of the file search tool call." }, "type": { "type": "string", "enum": [ - "web_search_call" + "file_search_call" ], - "description": "The type of the web search tool call. Always `web_search_call`.", + "description": "The type of the file search tool call. Always `file_search_call`.", "x-stainless-const": true }, "status": { @@ -28574,220 +37698,144 @@ "in_progress", "searching", "completed", + "incomplete", "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" + "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," }, - "keys": { + "queries": { "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." + "description": "The queries used to search for files." + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" + }, + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A collection of keypresses the model would like to perform.", - "title": "KeyPress" + "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.ListFineTuningJobCheckpointsResponse": { + "OpenAI.OutputItemFunctionShellCall": { "type": "object", "required": [ - "data", - "object", - "has_more" + "type", + "id", + "call_id", + "action", + "status", + "environment" ], "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpoint" - }, - "x-ms-list-page-items": true - }, - "object": { + "type": { "type": "string", "enum": [ - "list" + "shell_call" ], - "x-stainless-const": true + "description": "The type of the item. Always `shell_call`.", + "x-stainless-const": true, + "default": "shell_call" }, - "first_id": { + "id": { "type": "string", - "nullable": true + "description": "The unique ID of the shell tool call. Populated when this item is returned via API." }, - "last_id": { + "call_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 + "description": "The unique ID of the shell tool call generated by the model." }, - "object": { - "type": "string", - "enum": [ - "list" + "action": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellAction" + } ], - "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" + "description": "The shell commands and limits that describe how to run the tool call." }, - "object": { - "type": "string", - "enum": [ - "list" + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" + } ], - "x-stainless-const": true - } - } - }, - "OpenAI.LocalEnvironmentResource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "local" + "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." + }, + "environment": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + } ], - "description": "The environment type. Always `local`.", - "x-stainless-const": true, - "default": "local" + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "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" - ] + "description": "A tool call that executes one or more shell commands in a managed environment.", + "title": "Shell tool call" }, - "OpenAI.LocalShellExecAction": { + "OpenAI.OutputItemFunctionShellCallOutput": { "type": "object", "required": [ "type", - "command", - "env" + "id", + "call_id", + "status", + "output", + "max_output_length" ], "properties": { "type": { "type": "string", "enum": [ - "exec" + "shell_call_output" ], - "description": "The type of the local shell action. Always `exec`.", + "description": "The type of the shell call output. Always `shell_call_output`.", "x-stainless-const": true, - "default": "exec" + "default": "shell_call_output" }, - "command": { + "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": { - "type": "string" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" }, - "description": "The command to run." + "description": "An array of shell call output contents" }, - "timeout_ms": { + "max_output_length": { "type": "integer", "allOf": [ { @@ -28796,439 +37844,548 @@ ], "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": { + "created_by": { "type": "string", - "nullable": true + "description": "The identifier of the actor that created the item." } }, - "description": "Execute a shell command on the server.", - "title": "Local shell exec action" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output of a shell tool call that was emitted.", + "title": "Shell call output" }, - "OpenAI.LocalShellToolParam": { + "OpenAI.OutputItemFunctionToolCall": { "type": "object", "required": [ - "type" + "type", + "call_id", + "name", + "arguments" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, "type": { "type": "string", "enum": [ - "local_shell" + "function_call" ], - "description": "The type of the local shell tool. Always `local_shell`.", - "x-stainless-const": true, - "default": "local_shell" + "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": "Optional user-defined name for this tool or configuration." + "description": "The name of the function to run." }, - "description": { + "arguments": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A tool that allows the model to execute shell commands in a local environment.", - "title": "Local shell tool" + "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.LocalSkillParam": { + "OpenAI.OutputItemImageGenToolCall": { "type": "object", "required": [ - "name", - "description", - "path" + "type", + "id", + "status", + "result" ], "properties": { - "name": { + "type": { "type": "string", - "description": "The name of the skill." + "enum": [ + "image_generation_call" + ], + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true }, - "description": { + "id": { "type": "string", - "description": "The description of the skill." + "description": "The unique ID of the image generation call." }, - "path": { + "status": { "type": "string", - "description": "The path to the directory containing the skill." + "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.LogProb": { + "OpenAI.OutputItemLocalShellToolCall": { "type": "object", "required": [ - "token", - "logprob", - "bytes", - "top_logprobs" + "type", + "id", + "call_id", + "action", + "status" ], "properties": { - "token": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "local_shell_call" + ], + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true }, - "logprob": { - "$ref": "#/components/schemas/OpenAI.numeric" + "id": { + "type": "string", + "description": "The unique ID of the local shell call." }, - "bytes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.integer" - } + "call_id": { + "type": "string", + "description": "The unique ID of the local shell tool call generated by the model." }, - "top_logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.TopLogProb" - } + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." } }, - "description": "The log probability of a token.", - "title": "Log probability" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" }, - "OpenAI.MCPListToolsTool": { + "OpenAI.OutputItemMcpApprovalRequest": { "type": "object", "required": [ + "type", + "id", + "server_label", "name", - "input_schema" + "arguments" ], "properties": { - "name": { + "type": { "type": "string", - "description": "The name of the tool." + "enum": [ + "mcp_approval_request" + ], + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true }, - "description": { + "id": { "type": "string", - "nullable": true + "description": "The unique ID of the approval request." }, - "input_schema": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPListToolsToolInputSchema" - } - ], - "description": "The JSON schema describing the tool's input." + "server_label": { + "type": "string", + "description": "The label of the MCP server making the request." }, - "annotations": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPListToolsToolAnnotations" - } - ], - "nullable": true + "name": { + "type": "string", + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." } }, - "description": "A tool available on an MCP server.", - "title": "MCP list tools tool" - }, - "OpenAI.MCPListToolsToolAnnotations": { - "type": "object" - }, - "OpenAI.MCPListToolsToolInputSchema": { - "type": "object" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" }, - "OpenAI.MCPTool": { + "OpenAI.OutputItemMcpListTools": { "type": "object", "required": [ "type", - "server_label" + "id", + "server_label", + "tools" ], "properties": { "type": { "type": "string", "enum": [ - "mcp" + "mcp_list_tools" ], - "description": "The type of the MCP tool. Always `mcp`.", + "description": "The type of the item. Always `mcp_list_tools`.", "x-stainless-const": true }, - "server_label": { + "id": { "type": "string", - "description": "A label for this MCP server, used to identify it in tool calls." + "description": "The unique ID of the list." }, - "server_url": { + "server_label": { "type": "string", - "format": "uri", - "description": "The URL for the MCP server. One of `server_url` or `connector_id` must be\n provided." + "description": "The label of the MCP server." }, - "connector_id": { + "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": [ - "connector_dropbox", - "connector_gmail", - "connector_googlecalendar", - "connector_googledrive", - "connector_microsoftteams", - "connector_outlookcalendar", - "connector_outlookemail", - "connector_sharepoint" + "mcp_call" ], - "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`" + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true }, - "authorization": { + "id": { "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." + "description": "The unique ID of the tool call." }, - "server_description": { + "server_label": { "type": "string", - "description": "Optional description of the MCP server, used to provide more context." + "description": "The label of the MCP server running the tool." }, - "headers": { - "type": "object", - "additionalProperties": { - "type": "string" - }, + "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 }, - "allowed_tools": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolFilter" - } - ], - "nullable": true - } - ] + "error": { + "type": "object", + "additionalProperties": {} }, - "require_approval": { - "anyOf": [ - { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolRequireApproval" - } - ], - "nullable": true - }, + "status": { + "allOf": [ { - "type": "string", - "enum": [ - "always", - "never" - ], - "nullable": true + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" } ], - "default": "always" + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." }, - "project_connection_id": { + "approval_request_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." + "nullable": true } }, "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" + "$ref": "#/components/schemas/OpenAI.OutputItem" } - } - }, - "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." + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" }, - "OpenAI.MessageContentInputFileContent": { + "OpenAI.OutputItemOutputMessage": { "type": "object", "required": [ - "type" + "id", + "type", + "role", + "content", + "status" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the output message." + }, "type": { "type": "string", "enum": [ - "input_file" + "output_message" ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" - }, - "file_id": { - "type": "string", - "nullable": true + "description": "The type of the output message. Always `message`.", + "x-stainless-const": true }, - "filename": { + "role": { "type": "string", - "description": "The name of the file to be sent to the model." + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true }, - "file_url": { - "type": "string", - "format": "uri", - "description": "The URL of the file to be sent to the model." + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" + }, + "description": "The content of the output message." }, - "file_data": { + "status": { "type": "string", - "description": "The content of the file to be sent to the model." + "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.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A file input to the model.", - "title": "Input file" + "description": "An output message from the model.", + "title": "Output message" }, - "OpenAI.MessageContentInputImageContent": { + "OpenAI.OutputItemReasoningItem": { "type": "object", "required": [ "type", - "detail" + "id", + "summary" ], "properties": { "type": { "type": "string", "enum": [ - "input_image" + "reasoning" ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true }, - "image_url": { + "id": { "type": "string", - "format": "uri", - "nullable": true + "description": "The unique identifier of the reasoning content." }, - "file_id": { + "encrypted_content": { "type": "string", "nullable": true }, - "detail": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ImageDetail" - } + "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 detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + "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.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" + "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.MessageContentInputTextContent": { + "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", - "text" + "status", + "action" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, "type": { "type": "string", "enum": [ - "input_text" + "web_search_call" ], - "description": "The type of the input item. Always `input_text`.", - "x-stainless-const": true, - "default": "input_text" + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true }, - "text": { + "status": { "type": "string", - "description": "The text input to the model." + "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.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A text input to the model.", - "title": "Input text" + "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.MessageContentOutputTextContent": { + "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", @@ -29266,42 +38423,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" } ], "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": { + "OpenAI.OutputMessageContentRefusalContent": { "type": "object", "required": [ "type", @@ -29324,13 +38452,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" } ], "description": "A refusal from the model.", "title": "Refusal" }, - "OpenAI.MessageContentType": { + "OpenAI.OutputMessageContentType": { "anyOf": [ { "type": "string" @@ -29338,1930 +38466,1996 @@ { "type": "string", "enum": [ - "input_text", "output_text", - "text", - "summary_text", - "reasoning_text", - "refusal", - "input_image", - "computer_screenshot", - "input_file" + "refusal" ] } ] }, - "OpenAI.MessageRole": { + "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": [ - "unknown", - "user", - "assistant", - "system", - "critic", - "discriminator", - "developer", - "tool" + "auto", + "default-2024-11-15" ] }, - "OpenAI.MessageStatus": { + "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": [ - "in_progress", - "completed", - "incomplete" - ] + "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.Metadata": { + "OpenAI.ReasoningTextContent": { "type": "object", - "additionalProperties": { - "type": "string" + "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": "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" + "description": "Reasoning text from the model.", + "title": "Reasoning text" }, - "OpenAI.ModelIdsCompaction": { - "anyOf": [ - { + "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.ModelIdsResponses" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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 }, - { + "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", - "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" + "enum": [ + "auto", + "disabled" + ], + "nullable": true, + "default": "disabled" }, - { + "id": { + "type": "string", + "description": "Unique identifier for this Response." + }, + "object": { "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" + "response" + ], + "description": "The object type of this resource - always set to `response`.", + "x-stainless-const": true }, - { - "$ref": "#/components/schemas/OpenAI.ChatModel" - } - ] - }, - "OpenAI.MoveParam": { - "type": "object", - "required": [ - "type", - "x", - "y" - ], - "properties": { - "type": { + "status": { "type": "string", "enum": [ - "move" + "completed", + "failed", + "in_progress", + "cancelled", + "queued", + "incomplete" ], - "description": "Specifies the event type. For a move action, this property is always set to `move`.", - "x-stainless-const": true, - "default": "move" + "description": "The status of the response generation. One of `completed`, `failed`,\n `in_progress`, `cancelled`, `queued`, or `incomplete`." }, - "x": { + "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.integer" + "$ref": "#/components/schemas/OpenAI.ResponseError" } ], - "description": "The x-coordinate to move to." + "nullable": true }, - "y": { + "incomplete_details": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ResponseIncompleteDetails" } ], - "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." + "nullable": true }, - "annotations": { + "output": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.Annotation" + "$ref": "#/components/schemas/OpenAI.OutputItem" }, - "description": "The annotations of the text output." + "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." }, - "logprobs": { + "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/OpenAI.LogProb" - } + "$ref": "#/components/schemas/ContentFilterResult" + }, + "description": "The content filter evaluation results." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputContent" - } - ], - "description": "A text output from the model.", - "title": "Output text" + "title": "The response object" }, - "OpenAI.OutputContentReasoningTextContent": { + "OpenAI.ResponseAudioDeltaEvent": { "type": "object", "required": [ "type", - "text" + "sequence_number", + "delta" ], "properties": { "type": { "type": "string", "enum": [ - "reasoning_text" + "response.audio.delta" ], - "description": "The type of the reasoning text. Always `reasoning_text`.", - "x-stainless-const": true, - "default": "reasoning_text" + "description": "The type of the event. Always `response.audio.delta`.", + "x-stainless-const": true }, - "text": { + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "A sequence number for this chunk of the stream response." + }, + "delta": { "type": "string", - "description": "The reasoning text from the model." + "format": "base64", + "description": "A chunk of Base64 encoded response audio bytes." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputContent" - } - ], - "description": "Reasoning text from the model.", - "title": "Reasoning text" + "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.OutputContentRefusalContent": { + "OpenAI.ResponseAudioDoneEvent": { "type": "object", "required": [ "type", - "refusal" + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "refusal" + "response.audio.done" ], - "description": "The type of the refusal. Always `refusal`.", - "x-stainless-const": true, - "default": "refusal" + "description": "The type of the event. Always `response.audio.done`.", + "x-stainless-const": true }, - "refusal": { - "type": "string", - "description": "The refusal explanation from the model." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of the delta." } }, - "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" - ] - } - ] + "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.OutputItem": { + "OpenAI.ResponseAudioTranscriptDeltaEvent": { "type": "object", "required": [ - "type" + "type", + "delta", + "sequence_number" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.OutputItemType" + "type": "string", + "enum": [ + "response.audio.transcript.delta" + ], + "description": "The type of the event. Always `response.audio.transcript.delta`.", + "x-stainless-const": true }, - "agent_reference": { + "delta": { + "type": "string", + "description": "The partial transcript of the audio response." + }, + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/AgentReference" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The agent that created the item." - }, - "response_id": { - "type": "string", - "description": "The response on which the item is created." + "description": "The sequence number of this event." } }, - "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" - } + "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.OutputItemApplyPatchToolCall": { + "OpenAI.ResponseAudioTranscriptDoneEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "status", - "operation" + "sequence_number" ], "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" - } + "response.audio.transcript.done" ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + "description": "The type of the event. Always `response.audio.transcript.done`.", + "x-stainless-const": true }, - "operation": { + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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." + "description": "The sequence number of this event." } }, - "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" + "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.OutputItemApplyPatchToolCallOutput": { + "OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "status" + "output_index", + "item_id", + "delta", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call_output" + "response.code_interpreter_call_code.delta" ], - "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." + "description": "The type of the event. Always `response.code_interpreter_call_code.delta`.", + "x-stainless-const": true }, - "status": { + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The status of the apply patch tool call output. One of `completed` or `failed`." + "description": "The index of the output item in the response for which the code is being streamed." }, - "output": { + "item_id": { "type": "string", - "nullable": true + "description": "The unique identifier of the code interpreter tool call item." }, - "created_by": { + "delta": { "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" + "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.OutputItemCodeInterpreterToolCall": { + "OpenAI.ResponseCodeInterpreterCallCodeDoneEvent": { "type": "object", "required": [ "type", - "id", - "status", - "container_id", + "output_index", + "item_id", "code", - "outputs" + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "code_interpreter_call" + "response.code_interpreter_call_code.done" ], - "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." + "description": "The type of the event. Always `response.code_interpreter_call_code.done`.", + "x-stainless-const": true }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "interpreting", - "failed" + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." + "description": "The index of the output item in the response for which the code is finalized." }, - "container_id": { + "item_id": { "type": "string", - "description": "The ID of the container used to run the code." + "description": "The unique identifier of the code interpreter tool call item." }, "code": { "type": "string", - "nullable": true + "description": "The final code snippet output by the code interpreter." }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" + "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.OutputItemCompactionBody": { + "OpenAI.ResponseCodeInterpreterCallCompletedEvent": { "type": "object", "required": [ "type", - "id", - "encrypted_content" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "compaction" + "response.code_interpreter_call.completed" ], - "description": "The type of the item. Always `compaction`.", - "x-stainless-const": true, - "default": "compaction" + "description": "The type of the event. Always `response.code_interpreter_call.completed`.", + "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique ID of the compaction item." + "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." }, - "encrypted_content": { + "item_id": { "type": "string", - "description": "The encrypted content that was produced by compaction." + "description": "The unique identifier of the code interpreter tool call item." }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." } }, - "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" + "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.OutputItemComputerToolCall": { + "OpenAI.ResponseCodeInterpreterCallInProgressEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call" + "response.code_interpreter_call.in_progress" ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" + "description": "The type of the event. Always `response.code_interpreter_call.in_progress`.", + "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." + "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." }, - "call_id": { + "item_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." + "description": "The unique identifier of the code interpreter tool call item." }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "The sequence number of this event, used to order streaming events." } }, - "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" + "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.OutputItemCustomToolCall": { + "OpenAI.ResponseCodeInterpreterCallInterpretingEvent": { "type": "object", "required": [ "type", - "call_id", - "name", - "input" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "custom_tool_call" + "response.code_interpreter_call.interpreting" ], - "description": "The type of the custom tool call. Always `custom_tool_call`.", + "description": "The type of the event. Always `response.code_interpreter_call.interpreting`.", "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." + "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." }, - "name": { + "item_id": { "type": "string", - "description": "The name of the custom tool being called." + "description": "The unique identifier of the code interpreter tool call item." }, - "input": { - "type": "string", - "description": "The input for the custom tool call generated by the model." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" + "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.OutputItemFileSearchToolCall": { + "OpenAI.ResponseCompletedEvent": { "type": "object", "required": [ - "id", "type", - "status", - "queries" + "response", + "sequence_number" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, "type": { "type": "string", "enum": [ - "file_search_call" + "response.completed" ], - "description": "The type of the file search tool call. Always `file_search_call`.", + "description": "The type of the event. Always `response.completed`.", "x-stainless-const": true }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } ], - "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." + "description": "Properties of the completed response." }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" - }, - "nullable": true + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number for this event." } }, - "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" + "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.OutputItemFunctionShellCall": { + "OpenAI.ResponseContentPartAddedEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status", - "environment" + "item_id", + "output_index", + "content_index", + "part", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "shell_call" + "response.content_part.added" ], - "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." + "description": "The type of the event. Always `response.content_part.added`.", + "x-stainless-const": true }, - "call_id": { + "item_id": { "type": "string", - "description": "The unique ID of the shell tool call generated by the model." + "description": "The ID of the output item that the content part was added to." }, - "action": { + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellAction" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The shell commands and limits that describe how to run the tool call." + "description": "The index of the output item that the content part was added to." }, - "status": { + "content_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." + "description": "The index of the content part that was added." }, - "environment": { - "type": "object", + "part": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + "$ref": "#/components/schemas/OpenAI.OutputContent" } ], - "nullable": true + "description": "The content part that was added." }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." } }, - "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" + "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.OutputItemFunctionShellCallOutput": { + "OpenAI.ResponseContentPartDoneEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "status", - "output", - "max_output_length" + "item_id", + "output_index", + "content_index", + "sequence_number", + "part" ], "properties": { "type": { "type": "string", "enum": [ - "shell_call_output" + "response.content_part.done" ], - "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." + "description": "The type of the event. Always `response.content_part.done`.", + "x-stainless-const": true }, - "call_id": { + "item_id": { "type": "string", - "description": "The unique ID of the shell tool call generated by the model." + "description": "The ID of the output item that the content part was added to." }, - "status": { + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`." + "description": "The index of the output item that the content part was added to." }, - "output": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" - }, - "description": "An array of shell call output contents" + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part that is done." }, - "max_output_length": { - "type": "integer", + "sequence_number": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "description": "The sequence number of this event." }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." + "part": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputContent" + } + ], + "description": "The content part that is done." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" + "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.OutputItemFunctionToolCall": { + "OpenAI.ResponseCreatedEvent": { "type": "object", "required": [ "type", - "call_id", - "name", - "arguments" + "response", + "sequence_number" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, "type": { "type": "string", "enum": [ - "function_call" + "response.created" ], - "description": "The type of the function tool call. Always `function_call`.", + "description": "The type of the event. Always `response.created`.", "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." + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "The response that was created." }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "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" + "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.OutputItemImageGenToolCall": { + "OpenAI.ResponseCustomToolCallInputDeltaEvent": { "type": "object", "required": [ "type", - "id", - "status", - "result" + "sequence_number", + "output_index", + "item_id", + "delta" ], "properties": { "type": { "type": "string", "enum": [ - "image_generation_call" + "response.custom_tool_call_input.delta" ], - "description": "The type of the image generation call. Always `image_generation_call`.", + "description": "The event type identifier.", "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique ID of the image generation call." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "generating", - "failed" + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the image generation call." + "description": "The index of the output this delta applies to." }, - "result": { + "item_id": { "type": "string", - "nullable": true + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "An image generation request made by the model.", - "title": "Image generation 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.OutputItemLocalShellToolCall": { + "OpenAI.ResponseCustomToolCallInputDoneEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status" + "sequence_number", + "output_index", + "item_id", + "input" ], "properties": { "type": { "type": "string", "enum": [ - "local_shell_call" + "response.custom_tool_call_input.done" ], - "description": "The type of the local shell call. Always `local_shell_call`.", + "description": "The event type identifier.", "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique ID of the local shell call." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." }, - "call_id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output this event applies to." }, - "action": { - "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + "item_id": { + "type": "string", + "description": "Unique identifier for the API item associated with this event." }, - "status": { + "input": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." + "description": "The complete input data for the custom tool call." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "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": "A tool call to run a command on the local shell.", - "title": "Local shell call" + "description": "The error code for the response." }, - "OpenAI.OutputItemMcpApprovalRequest": { + "OpenAI.ResponseErrorEvent": { "type": "object", "required": [ "type", - "id", - "server_label", - "name", - "arguments" + "code", + "message", + "param", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_request" + "error" ], - "description": "The type of the item. Always `mcp_approval_request`.", + "description": "The type of the event. Always `error`.", "x-stainless-const": true }, - "id": { + "code": { "type": "string", - "description": "The unique ID of the approval request." + "nullable": true }, - "server_label": { + "message": { "type": "string", - "description": "The label of the MCP server making the request." + "description": "The error message." }, - "name": { + "param": { "type": "string", - "description": "The name of the tool to run." + "nullable": true }, - "arguments": { - "type": "string", - "description": "A JSON string of arguments for the tool." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" + "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.OutputItemMcpListTools": { + "OpenAI.ResponseFailedEvent": { "type": "object", "required": [ "type", - "id", - "server_label", - "tools" + "sequence_number", + "response" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_list_tools" + "response.failed" ], - "description": "The type of the item. Always `mcp_list_tools`.", + "description": "The type of the event. Always `response.failed`.", "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." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." }, - "error": { - "type": "string", - "nullable": true + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "The response that failed." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" + "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.OutputItemMcpToolCall": { + "OpenAI.ResponseFileSearchCallCompletedEvent": { "type": "object", "required": [ "type", - "id", - "server_label", - "name", - "arguments" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_call" + "response.file_search_call.completed" ], - "description": "The type of the item. Always `mcp_call`.", + "description": "The type of the event. Always `response.file_search_call.completed`.", "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_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the file search call is initiated." }, - "output": { + "item_id": { "type": "string", - "nullable": true - }, - "error": { - "type": "object", - "additionalProperties": {} + "description": "The ID of the output item that the file search call is initiated." }, - "status": { + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." - }, - "approval_request_id": { - "type": "string", - "nullable": true + "description": "The sequence number of this event." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" + "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.OutputItemOutputMessage": { + "OpenAI.ResponseFileSearchCallInProgressEvent": { "type": "object", "required": [ - "id", "type", - "role", - "content", - "status" + "output_index", + "item_id", + "sequence_number" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, "type": { "type": "string", "enum": [ - "output_message" + "response.file_search_call.in_progress" ], - "description": "The type of the output message. Always `message`.", + "description": "The type of the event. Always `response.file_search_call.in_progress`.", "x-stainless-const": true }, - "role": { - "type": "string", - "enum": [ - "assistant" + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "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." + "description": "The index of the output item that the file search call is initiated." }, - "status": { + "item_id": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "description": "The ID of the output item that the file search call is initiated." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." + "description": "The sequence number of this event." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "An output message from the model.", - "title": "Output message" + "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.OutputItemReasoningItem": { + "OpenAI.ResponseFileSearchCallSearchingEvent": { "type": "object", "required": [ "type", - "id", - "summary" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "reasoning" + "response.file_search_call.searching" ], - "description": "The type of the object. Always `reasoning`.", + "description": "The type of the event. Always `response.file_search_call.searching`.", "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" + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "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" + "description": "The index of the output item that the file search call is searching." }, - { + "item_id": { "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" - ] + "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.OutputItemWebSearchToolCall": { + "OpenAI.ResponseFormatJsonObject": { "type": "object", "required": [ - "id", - "type", - "status", - "action" + "type" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, "type": { "type": "string", "enum": [ - "web_search_call" + "json_object" ], - "description": "The type of the web search tool call. Always `web_search_call`.", + "description": "The type of response format being defined. Always `json_object`.", "x-stainless-const": true - }, - "status": { + } + }, + "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": [ - "in_progress", - "searching", - "completed", - "failed" + "json_schema" ], - "description": "The status of the web search tool call." + "description": "The type of response format being defined. Always `json_schema`.", + "x-stainless-const": true }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, + "json_schema": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaJsonSchema" } ], - "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)." + "description": "Structured Outputs configuration options, including a JSON Schema.", + "title": "JSON schema" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" } ], - "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" + "description": "JSON Schema response format. Used to generate structured JSON responses.\nLearn more about [Structured Outputs](/docs/guides/structured-outputs).", + "title": "JSON schema" }, - "OpenAI.OutputMessageContent": { + "OpenAI.ResponseFormatJsonSchemaJsonSchema": { "type": "object", "required": [ - "type" + "name" ], "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.OutputMessageContentType" - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "output_text": "#/components/schemas/OpenAI.OutputMessageContentOutputTextContent", - "refusal": "#/components/schemas/OpenAI.OutputMessageContentRefusalContent" + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "schema": { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaSchema" + }, + "strict": { + "type": "boolean", + "nullable": true } } }, - "OpenAI.OutputMessageContentOutputTextContent": { + "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", - "text", - "annotations", - "logprobs" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "output_text" + "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" - } + "description": "The type of response format being defined. Always `text`.", + "x-stainless-const": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputMessageContent" - } - ], - "description": "A text output from the model.", - "title": "Output text" + "description": "Default response format. Used to generate text responses.", + "title": "Text" }, - "OpenAI.OutputMessageContentRefusalContent": { + "OpenAI.ResponseFunctionCallArgumentsDeltaEvent": { "type": "object", "required": [ "type", - "refusal" + "item_id", + "output_index", + "sequence_number", + "delta" ], "properties": { "type": { "type": "string", "enum": [ - "refusal" + "response.function_call_arguments.delta" ], - "description": "The type of the refusal. Always `refusal`.", - "x-stainless-const": true, - "default": "refusal" + "description": "The type of the event. Always `response.function_call_arguments.delta`.", + "x-stainless-const": true }, - "refusal": { + "item_id": { "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" + "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", - "enum": [ - "output_text", - "refusal" - ] + "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.Prompt": { + "OpenAI.ResponseFunctionCallArgumentsDoneEvent": { "type": "object", "required": [ - "id" + "type", + "item_id", + "name", + "output_index", + "sequence_number", + "arguments" ], "properties": { - "id": { + "type": { "type": "string", - "description": "The unique identifier of the prompt template to use." + "enum": [ + "response.function_call_arguments.done" + ], + "x-stainless-const": true }, - "version": { + "item_id": { "type": "string", - "nullable": true + "description": "The ID of the item." }, - "variables": { - "type": "object", + "name": { + "type": "string", + "description": "The name of the function that was called." + }, + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponsePromptVariables" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "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": "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" - ] + "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.RankingOptions": { + "OpenAI.ResponseImageGenCallCompletedEvent": { "type": "object", + "required": [ + "type", + "output_index", + "sequence_number", + "item_id" + ], "properties": { - "ranker": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.RankerVersionType" - } + "type": { + "type": "string", + "enum": [ + "response.image_generation_call.completed" ], - "description": "The ranker to use for the file search." + "description": "The type of the event. Always 'response.image_generation_call.completed'.", + "x-stainless-const": true }, - "score_threshold": { + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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." + "description": "The index of the output item in the response's output array." }, - "hybrid_search": { + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.HybridSearchOptions" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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 + "description": "The sequence number of this event." }, - "generate_summary": { + "item_id": { "type": "string", - "enum": [ - "auto", - "concise", - "detailed" - ], - "nullable": true + "description": "The unique identifier of the image generation item being processed." } }, - "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 + "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.ReasoningTextContent": { + "OpenAI.ResponseImageGenCallGeneratingEvent": { "type": "object", "required": [ "type", - "text" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "reasoning_text" + "response.image_generation_call.generating" ], - "description": "The type of the reasoning text. Always `reasoning_text`.", - "x-stainless-const": true, - "default": "reasoning_text" + "description": "The type of the event. Always 'response.image_generation_call.generating'.", + "x-stainless-const": true }, - "text": { + "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 reasoning text from the model." + "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": "Reasoning text from the model.", - "title": "Reasoning text" + "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.Response": { + "OpenAI.ResponseImageGenCallInProgressEvent": { "type": "object", "required": [ - "id", - "object", - "created_at", - "error", - "incomplete_details", - "output", - "instructions", - "parallel_tool_calls", - "agent_reference" + "type", + "output_index", + "item_id", + "sequence_number" ], "properties": { - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } + "type": { + "type": "string", + "enum": [ + "response.image_generation_call.in_progress" ], - "nullable": true + "description": "The type of the event. Always 'response.image_generation_call.in_progress'.", + "x-stainless-const": true }, - "top_logprobs": { - "type": "integer", + "output_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "description": "The index of the output item in the response's output array." }, - "temperature": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true, - "default": 1 + "item_id": { + "type": "string", + "description": "The unique identifier of the image generation item being processed." }, - "top_p": { - "type": "number", + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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": { + "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": [ - "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" - } + "response.image_generation_call.partial_image" ], - "nullable": true - }, - "background": { - "type": "boolean", - "nullable": true + "description": "The type of the event. Always 'response.image_generation_call.partial_image'.", + "x-stainless-const": true }, - "max_output_tokens": { - "type": "integer", + "output_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "description": "The index of the output item in the response's output array." }, - "max_tool_calls": { - "type": "integer", + "item_id": { + "type": "string", + "description": "The unique identifier of the image generation item being processed." + }, + "sequence_number": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true - }, - "text": { - "$ref": "#/components/schemas/OpenAI.ResponseTextParam" - }, - "tools": { - "$ref": "#/components/schemas/OpenAI.ToolsArray" + "description": "The sequence number of the image generation item being processed." }, - "tool_choice": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceOptions" - }, + "partial_image_index": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/OpenAI.integer" } - ] - }, - "prompt": { - "$ref": "#/components/schemas/OpenAI.Prompt" - }, - "truncation": { - "type": "string", - "enum": [ - "auto", - "disabled" ], - "nullable": true, - "default": "disabled" + "description": "0-based index for the partial image (backend is 1-based, but this is 0-based for the user)." }, - "id": { + "partial_image_b64": { "type": "string", - "description": "Unique identifier for this Response." - }, - "object": { + "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" + "response.in_progress" ], - "description": "The object type of this resource - always set to `response`.", + "description": "The type of the event. Always `response.in_progress`.", "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", + "response": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponseError" + "$ref": "#/components/schemas/OpenAI.Response" } ], - "nullable": true + "description": "The response that is in progress." }, - "incomplete_details": { - "type": "object", + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponseIncompleteDetails" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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." + "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 }, - "instructions": { - "anyOf": [ - { - "type": "string" - }, + "response": { + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - } + "$ref": "#/components/schemas/OpenAI.Response" } ], - "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 + "description": "The response that was incomplete." }, - "conversation": { - "type": "object", + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationReference" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "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." }, - "agent_reference": { - "type": "object", + "logprob": { "allOf": [ { - "$ref": "#/components/schemas/AgentReference" + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "nullable": true, - "description": "The agent used for this response" + "description": "The log probability of this token." }, - "content_filters": { + "top_logprobs": { "type": "array", "items": { - "$ref": "#/components/schemas/ContentFilterResult" + "$ref": "#/components/schemas/OpenAI.ResponseLogProbTopLogprobs" }, - "description": "The content filter evaluation results." + "description": "The log probability of the top 20 most likely tokens." } }, - "title": "The response object" + "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.ResponseAudioDeltaEvent": { + "OpenAI.ResponseLogProbTopLogprobs": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "logprob": { + "$ref": "#/components/schemas/OpenAI.numeric" + } + } + }, + "OpenAI.ResponseMCPCallArgumentsDeltaEvent": { "type": "object", "required": [ "type", - "sequence_number", - "delta" + "output_index", + "item_id", + "delta", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.audio.delta" + "response.mcp_call_arguments.delta" ], - "description": "The type of the event. Always `response.audio.delta`.", + "description": "The type of the event. Always 'response.mcp_call_arguments.delta'.", "x-stainless-const": true }, - "sequence_number": { + "output_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "A sequence number for this chunk of the stream response." + "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", - "format": "base64", - "description": "A chunk of Base64 encoded response audio bytes." + "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 partial audio response.", + "description": "Emitted when there is a delta (partial update) to the arguments of an MCP tool call.", + "title": "ResponseMCPCallArgumentsDeltaEvent", "x-oaiMeta": { - "name": "response.audio.delta", + "name": "response.mcp_call_arguments.delta", "group": "responses", - "example": "{\n \"type\": \"response.audio.delta\",\n \"response_id\": \"resp_123\",\n \"delta\": \"base64encoded...\",\n \"sequence_number\": 1\n}\n" + "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.ResponseAudioDoneEvent": { + "OpenAI.ResponseMCPCallArgumentsDoneEvent": { "type": "object", "required": [ "type", + "output_index", + "item_id", + "arguments", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.audio.done" + "response.mcp_call_arguments.done" ], - "description": "The type of the event. Always `response.audio.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 the delta." + "description": "The sequence number of this event." } }, - "description": "Emitted when the audio response is complete.", + "description": "Emitted when the arguments for an MCP tool call are finalized.", + "title": "ResponseMCPCallArgumentsDoneEvent", "x-oaiMeta": { - "name": "response.audio.done", + "name": "response.mcp_call_arguments.done", "group": "responses", - "example": "{\n \"type\": \"response.audio.done\",\n \"response_id\": \"resp-123\",\n \"sequence_number\": 1\n}\n" + "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.ResponseAudioTranscriptDeltaEvent": { + "OpenAI.ResponseMCPCallCompletedEvent": { "type": "object", "required": [ "type", - "delta", + "item_id", + "output_index", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.audio.transcript.delta" + "response.mcp_call.completed" ], - "description": "The type of the event. Always `response.audio.transcript.delta`.", + "description": "The type of the event. Always 'response.mcp_call.completed'.", "x-stainless-const": true }, - "delta": { + "item_id": { "type": "string", - "description": "The partial transcript of the audio response." + "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": [ @@ -31272,28 +40466,43 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when there is a partial transcript of audio.", + "description": "Emitted when an MCP tool call has completed successfully.", + "title": "ResponseMCPCallCompletedEvent", "x-oaiMeta": { - "name": "response.audio.transcript.delta", + "name": "response.mcp_call.completed", "group": "responses", - "example": "{\n \"type\": \"response.audio.transcript.delta\",\n \"response_id\": \"resp_123\",\n \"delta\": \" ... partial transcript ... \",\n \"sequence_number\": 1\n}\n" + "example": "{\n \"type\": \"response.mcp_call.completed\",\n \"sequence_number\": 1,\n \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n \"output_index\": 0\n}\n" } }, - "OpenAI.ResponseAudioTranscriptDoneEvent": { + "OpenAI.ResponseMCPCallFailedEvent": { "type": "object", "required": [ "type", + "item_id", + "output_index", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.audio.transcript.done" + "response.mcp_call.failed" ], - "description": "The type of the event. Always `response.audio.transcript.done`.", + "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": [ { @@ -31303,46 +40512,88 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when the full audio transcript is completed.", + "description": "Emitted when an MCP tool call has failed.", + "title": "ResponseMCPCallFailedEvent", "x-oaiMeta": { - "name": "response.audio.transcript.done", + "name": "response.mcp_call.failed", "group": "responses", - "example": "{\n \"type\": \"response.audio.transcript.done\",\n \"response_id\": \"resp_123\",\n \"sequence_number\": 1\n}\n" + "example": "{\n \"type\": \"response.mcp_call.failed\",\n \"sequence_number\": 1,\n \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n \"output_index\": 0\n}\n" } }, - "OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent": { + "OpenAI.ResponseMCPCallInProgressEvent": { "type": "object", "required": [ "type", + "sequence_number", "output_index", - "item_id", - "delta", - "sequence_number" + "item_id" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call_code.delta" + "response.mcp_call.in_progress" ], - "description": "The type of the event. Always `response.code_interpreter_call_code.delta`.", + "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 for which the code is being streamed." + "description": "The index of the output item in the response's output array." }, "item_id": { "type": "string", - "description": "The unique identifier of the code interpreter tool call item." + "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 }, - "delta": { + "item_id": { "type": "string", - "description": "The partial code snippet being streamed by the code interpreter." + "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": [ @@ -31350,49 +40601,91 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "description": "The sequence number of this event." } }, - "description": "Emitted when a partial code snippet is streamed by the code interpreter.", + "description": "Emitted when the list of available MCP tools has been successfully retrieved.", + "title": "ResponseMCPListToolsCompletedEvent", "x-oaiMeta": { - "name": "response.code_interpreter_call_code.delta", + "name": "response.mcp_list_tools.completed", "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" + "example": "{\n \"type\": \"response.mcp_list_tools.completed\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n" } }, - "OpenAI.ResponseCodeInterpreterCallCodeDoneEvent": { + "OpenAI.ResponseMCPListToolsFailedEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", - "code", + "output_index", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call_code.done" + "response.mcp_list_tools.failed" ], - "description": "The type of the event. Always `response.code_interpreter_call_code.done`.", + "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 in the response for which the code is finalized." + "description": "The index of the output item that failed." }, - "item_id": { + "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", - "description": "The unique identifier of the code interpreter tool call item." + "enum": [ + "response.mcp_list_tools.in_progress" + ], + "description": "The type of the event. Always 'response.mcp_list_tools.in_progress'.", + "x-stainless-const": true }, - "code": { + "item_id": { "type": "string", - "description": "The final code snippet output by the code interpreter." + "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": [ @@ -31400,31 +40693,32 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "description": "The sequence number of this event." } }, - "description": "Emitted when the code snippet is finalized by the code interpreter.", + "description": "Emitted when the system is in the process of retrieving the list of available MCP tools.", + "title": "ResponseMCPListToolsInProgressEvent", "x-oaiMeta": { - "name": "response.code_interpreter_call_code.done", + "name": "response.mcp_list_tools.in_progress", "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" + "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.ResponseCodeInterpreterCallCompletedEvent": { + "OpenAI.ResponseOutputItemAddedEvent": { "type": "object", "required": [ "type", "output_index", - "item_id", - "sequence_number" + "sequence_number", + "item" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call.completed" + "response.output_item.added" ], - "description": "The type of the event. Always `response.code_interpreter_call.completed`.", + "description": "The type of the event. Always `response.output_item.added`.", "x-stainless-const": true }, "output_index": { @@ -31433,11 +40727,7 @@ "$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." + "description": "The index of the output item that was added." }, "sequence_number": { "allOf": [ @@ -31445,31 +40735,39 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "description": "The sequence number of this event." + }, + "item": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output item that was added." } }, - "description": "Emitted when the code interpreter call is completed.", + "description": "Emitted when a new output item is added.", "x-oaiMeta": { - "name": "response.code_interpreter_call.completed", + "name": "response.output_item.added", "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" + "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.ResponseCodeInterpreterCallInProgressEvent": { + "OpenAI.ResponseOutputItemDoneEvent": { "type": "object", "required": [ "type", "output_index", - "item_id", - "sequence_number" + "sequence_number", + "item" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call.in_progress" + "response.output_item.done" ], - "description": "The type of the event. Always `response.code_interpreter_call.in_progress`.", + "description": "The type of the event. Always `response.output_item.done`.", "x-stainless-const": true }, "output_index": { @@ -31478,11 +40776,7 @@ "$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." + "description": "The index of the output item that was marked done." }, "sequence_number": { "allOf": [ @@ -31490,44 +40784,71 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "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 a code interpreter call is in progress.", + "description": "Emitted when an output item is marked done.", "x-oaiMeta": { - "name": "response.code_interpreter_call.in_progress", + "name": "response.output_item.done", "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" + "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.ResponseCodeInterpreterCallInterpretingEvent": { + "OpenAI.ResponseOutputTextAnnotationAddedEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", - "sequence_number" + "output_index", + "content_index", + "annotation_index", + "sequence_number", + "annotation" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call.interpreting" + "response.output_text.annotation.added" ], - "description": "The type of the event. Always `response.code_interpreter_call.interpreting`.", + "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 for which the code interpreter is interpreting code." + "description": "The index of the output item in the response's output array." }, - "item_id": { - "type": "string", - "description": "The unique identifier of the code interpreter tool call item." + "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": [ @@ -31535,17 +40856,49 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "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 the code interpreter is actively interpreting the code snippet.", + "description": "Emitted when an annotation is added to output text content.", + "title": "ResponseOutputTextAnnotationAddedEvent", "x-oaiMeta": { - "name": "response.code_interpreter_call.interpreting", + "name": "response.output_text.annotation.added", "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" + "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.ResponseCompletedEvent": { + "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", @@ -31556,9 +40909,9 @@ "type": { "type": "string", "enum": [ - "response.completed" + "response.queued" ], - "description": "The type of the event. Always `response.completed`.", + "description": "The type of the event. Always 'response.queued'.", "x-stainless-const": true }, "response": { @@ -31567,7 +40920,7 @@ "$ref": "#/components/schemas/OpenAI.Response" } ], - "description": "Properties of the completed response." + "description": "The full response object that is queued." }, "sequence_number": { "allOf": [ @@ -31578,35 +40931,36 @@ "description": "The sequence number for this event." } }, - "description": "Emitted when the model response is complete.", + "description": "Emitted when a response is queued and waiting to be processed.", + "title": "ResponseQueuedEvent", "x-oaiMeta": { - "name": "response.completed", + "name": "response.queued", "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" + "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.ResponseContentPartAddedEvent": { + "OpenAI.ResponseReasoningSummaryPartAddedEvent": { "type": "object", "required": [ "type", "item_id", "output_index", - "content_index", - "part", - "sequence_number" + "summary_index", + "sequence_number", + "part" ], "properties": { "type": { "type": "string", "enum": [ - "response.content_part.added" + "response.reasoning_summary_part.added" ], - "description": "The type of the event. Always `response.content_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 output item that the content part was added to." + "description": "The ID of the item this summary part is associated with." }, "output_index": { "allOf": [ @@ -31614,47 +40968,66 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item that the content part was added to." + "description": "The index of the output item this summary part is associated with." }, - "content_index": { + "summary_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the content part that was added." + "description": "The index of the summary part within the reasoning summary." }, - "part": { + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputContent" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The content part that was added." + "description": "The sequence number of this event." }, - "sequence_number": { + "part": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartAddedEventPart" } ], - "description": "The sequence number of this event." + "description": "The summary part that was added." } }, - "description": "Emitted when a new content part is added.", + "description": "Emitted when a new reasoning summary part is added.", "x-oaiMeta": { - "name": "response.content_part.added", + "name": "response.reasoning_summary_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" + "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.ResponseContentPartDoneEvent": { + "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", - "content_index", + "summary_index", "sequence_number", "part" ], @@ -31662,14 +41035,14 @@ "type": { "type": "string", "enum": [ - "response.content_part.done" + "response.reasoning_summary_part.done" ], - "description": "The type of the event. Always `response.content_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 output item that the content part was added to." + "description": "The ID of the item this summary part is associated with." }, "output_index": { "allOf": [ @@ -31677,15 +41050,15 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item that the content part was added to." + "description": "The index of the output item this summary part is associated with." }, - "content_index": { + "summary_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the content part that is done." + "description": "The index of the summary part within the reasoning summary." }, "sequence_number": { "allOf": [ @@ -31698,316 +41071,257 @@ "part": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputContent" + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEventPart" } ], - "description": "The content part that is done." + "description": "The completed summary part." } }, - "description": "Emitted when a content part is done.", + "description": "Emitted when a reasoning summary part is completed.", "x-oaiMeta": { - "name": "response.content_part.done", + "name": "response.reasoning_summary_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" + "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.ResponseCreatedEvent": { + "OpenAI.ResponseReasoningSummaryPartDoneEventPart": { "type": "object", "required": [ "type", - "response", - "sequence_number" + "text" ], "properties": { "type": { "type": "string", "enum": [ - "response.created" + "summary_text" ], - "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." + "text": { + "type": "string" } - }, - "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": { + "OpenAI.ResponseReasoningSummaryTextDeltaEvent": { "type": "object", "required": [ "type", - "sequence_number", - "output_index", "item_id", - "delta" + "output_index", + "summary_index", + "delta", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.custom_tool_call_input.delta" + "response.reasoning_summary_text.delta" ], - "description": "The event type identifier.", + "description": "The type of the event. Always `response.reasoning_summary_text.delta`.", "x-stainless-const": true }, - "sequence_number": { + "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 sequence number of this event." + "description": "The index of the output item this summary text delta is associated with." }, - "output_index": { + "summary_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." + "description": "The index of the summary part within the reasoning summary." }, "delta": { "type": "string", - "description": "The incremental input data (delta) for the custom tool call." + "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": "Event representing a delta (partial update) to the input of a custom tool call.", - "title": "ResponseCustomToolCallInputDelta", + "description": "Emitted when a delta is added to a reasoning summary text.", "x-oaiMeta": { - "name": "response.custom_tool_call_input.delta", + "name": "response.reasoning_summary_text.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" + "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.ResponseCustomToolCallInputDoneEvent": { + "OpenAI.ResponseReasoningSummaryTextDoneEvent": { "type": "object", "required": [ "type", - "sequence_number", - "output_index", "item_id", - "input" + "output_index", + "summary_index", + "text", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.custom_tool_call_input.done" + "response.reasoning_summary_text.done" ], - "description": "The event type identifier.", + "description": "The type of the event. Always `response.reasoning_summary_text.done`.", "x-stainless-const": true }, - "sequence_number": { + "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 sequence number of this event." + "description": "The index of the output item this summary text is associated with." }, - "output_index": { + "summary_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output this event applies to." + "description": "The index of the summary part within the reasoning summary." }, - "item_id": { + "text": { "type": "string", - "description": "Unique identifier for the API item associated with this event." + "description": "The full text of the completed reasoning summary." }, - "input": { - "type": "string", - "description": "The complete input data for the custom tool call." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." } }, - "description": "Event indicating that input for a custom tool call is complete.", - "title": "ResponseCustomToolCallInputDone", + "description": "Emitted when a reasoning summary text is completed.", "x-oaiMeta": { - "name": "response.custom_tool_call_input.done", + "name": "response.reasoning_summary_text.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" + "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.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": { + "OpenAI.ResponseReasoningTextDeltaEvent": { "type": "object", "required": [ "type", - "code", - "message", - "param", + "item_id", + "output_index", + "content_index", + "delta", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "error" + "response.reasoning_text.delta" ], - "description": "The type of the event. Always `error`.", + "description": "The type of the event. Always `response.reasoning_text.delta`.", "x-stainless-const": true }, - "code": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string", - "description": "The error message." - }, - "param": { + "item_id": { "type": "string", - "nullable": true + "description": "The ID of the item this reasoning text delta is associated with." }, - "sequence_number": { + "output_index": { "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 + "description": "The index of the output item this reasoning text delta is associated with." }, - "sequence_number": { + "content_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event." + "description": "The index of the reasoning content part this delta is associated with." }, - "response": { + "delta": { + "type": "string", + "description": "The text delta that was added to the reasoning content." + }, + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Response" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The response that failed." + "description": "The sequence number of this event." } }, - "description": "An event that is emitted when a response fails.", + "description": "Emitted when a delta is added to a reasoning text.", "x-oaiMeta": { - "name": "response.failed", + "name": "response.reasoning_text.delta", "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" + "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.ResponseFileSearchCallCompletedEvent": { + "OpenAI.ResponseReasoningTextDoneEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", + "output_index", + "content_index", + "text", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.file_search_call.completed" + "response.reasoning_text.done" ], - "description": "The type of the event. Always `response.file_search_call.completed`.", + "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 that the file search call is initiated." + "description": "The index of the output item this reasoning text is associated with." }, - "item_id": { + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the reasoning content part." + }, + "text": { "type": "string", - "description": "The ID of the output item that the file search call is initiated." + "description": "The full text of the completed reasoning content." }, "sequence_number": { "allOf": [ @@ -32018,41 +41332,55 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when a file search call is completed (results found).", + "description": "Emitted when a reasoning text is completed.", "x-oaiMeta": { - "name": "response.file_search_call.completed", + "name": "response.reasoning_text.done", "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" + "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.ResponseFileSearchCallInProgressEvent": { + "OpenAI.ResponseRefusalDeltaEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", + "output_index", + "content_index", + "delta", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.file_search_call.in_progress" + "response.refusal.delta" ], - "description": "The type of the event. Always `response.file_search_call.in_progress`.", + "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 file search call is initiated." + "description": "The index of the output item that the refusal text is added to." }, - "item_id": { + "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 ID of the output item that the file search call is initiated." + "description": "The refusal text that is added." }, "sequence_number": { "allOf": [ @@ -32063,41 +41391,55 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when a file search call is initiated.", + "description": "Emitted when there is a partial refusal text.", "x-oaiMeta": { - "name": "response.file_search_call.in_progress", + "name": "response.refusal.delta", "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" + "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.ResponseFileSearchCallSearchingEvent": { + "OpenAI.ResponseRefusalDoneEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", + "output_index", + "content_index", + "refusal", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.file_search_call.searching" + "response.refusal.done" ], - "description": "The type of the event. Always `response.file_search_call.searching`.", + "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 file search call is searching." + "description": "The index of the output item that the refusal text is finalized." }, - "item_id": { + "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 ID of the output item that the file search call is initiated." + "description": "The refusal text that is finalized." }, "sequence_number": { "allOf": [ @@ -32108,130 +41450,113 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when a file search is currently searching.", + "description": "Emitted when refusal text is finalized.", "x-oaiMeta": { - "name": "response.file_search_call.searching", + "name": "response.refusal.done", "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" + "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.ResponseFormatJsonObject": { + "OpenAI.ResponseStreamOptions": { "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 + "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": "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" + "description": "Options for streaming responses. Only set this when you set `stream: true`." }, - "OpenAI.ResponseFormatJsonSchema": { + "OpenAI.ResponseTextDeltaEvent": { "type": "object", "required": [ "type", - "json_schema" + "item_id", + "output_index", + "content_index", + "delta", + "sequence_number", + "logprobs" ], "properties": { "type": { "type": "string", "enum": [ - "json_schema" + "response.output_text.delta" ], - "description": "The type of response format being defined. Always `json_schema`.", + "description": "The type of the event. Always `response.output_text.delta`.", "x-stainless-const": true }, - "json_schema": { + "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.ResponseFormatJsonSchemaJsonSchema" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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" + "description": "The index of the output item that the text delta was added to." }, - "schema": { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaSchema" + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part that the text delta was added to." }, - "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": { + "delta": { "type": "string", - "enum": [ - "text" + "description": "The text delta that was added." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The type of response format being defined. Always `text`.", - "x-stainless-const": true + "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": "Default response format. Used to generate text responses.", - "title": "Text" + "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.ResponseFunctionCallArgumentsDeltaEvent": { + "OpenAI.ResponseTextDoneEvent": { "type": "object", "required": [ "type", "item_id", "output_index", + "content_index", + "text", "sequence_number", - "delta" + "logprobs" ], "properties": { "type": { "type": "string", "enum": [ - "response.function_call_arguments.delta" + "response.output_text.done" ], - "description": "The type of the event. Always `response.function_call_arguments.delta`.", + "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 function-call arguments delta is added to." + "description": "The ID of the output item that the text content is finalized." }, "output_index": { "allOf": [ @@ -32239,97 +41564,145 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item that the function-call arguments delta is added to." + "description": "The index of the output item that the text content is finalized." }, - "sequence_number": { + "content_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event." + "description": "The index of the content part that the text content is finalized." }, - "delta": { + "text": { "type": "string", - "description": "The function-call arguments delta that is added." + "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 there is a partial function-call arguments delta.", + "description": "Emitted when text content is finalized.", "x-oaiMeta": { - "name": "response.function_call_arguments.delta", + "name": "response.output_text.done", "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" + "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.ResponseFunctionCallArgumentsDoneEvent": { + "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": [ - "type", - "item_id", - "name", - "output_index", - "sequence_number", - "arguments" + "input_tokens", + "input_tokens_details", + "output_tokens", + "output_tokens_details", + "total_tokens" ], "properties": { - "type": { - "type": "string", - "enum": [ - "response.function_call_arguments.done" + "input_tokens": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "x-stainless-const": true - }, - "item_id": { - "type": "string", - "description": "The ID of the item." + "description": "The number of input tokens." }, - "name": { - "type": "string", - "description": "The name of the function that was called." + "input_tokens_details": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" + } + ], + "description": "A detailed breakdown of the input tokens." }, - "output_index": { + "output_tokens": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item." + "description": "The number of output tokens." }, - "sequence_number": { + "output_tokens_details": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" } ], - "description": "The sequence number of this event." + "description": "A detailed breakdown of the output tokens." }, - "arguments": { - "type": "string", - "description": "The function-call arguments." + "total_tokens": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The total number of tokens used." } }, - "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" + "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.ResponseImageGenCallCompletedEvent": { + "OpenAI.ResponseUsageOutputTokensDetails": { + "type": "object", + "required": [ + "reasoning_tokens" + ], + "properties": { + "reasoning_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + } + } + }, + "OpenAI.ResponseWebSearchCallCompletedEvent": { "type": "object", "required": [ "type", "output_index", - "sequence_number", - "item_id" + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.image_generation_call.completed" + "response.web_search_call.completed" ], - "description": "The type of the event. Always 'response.image_generation_call.completed'.", + "description": "The type of the event. Always `response.web_search_call.completed`.", "x-stainless-const": true }, "output_index": { @@ -32338,7 +41711,11 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item in the response's output array." + "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": [ @@ -32346,22 +41723,17 @@ "$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": "The sequence number of the web search call being processed." } }, - "description": "Emitted when an image generation tool call has completed and the final image is available.", - "title": "ResponseImageGenCallCompletedEvent", + "description": "Emitted when a web search call is completed.", "x-oaiMeta": { - "name": "response.image_generation_call.completed", + "name": "response.web_search_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" + "example": "{\n \"type\": \"response.web_search_call.completed\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" } }, - "OpenAI.ResponseImageGenCallGeneratingEvent": { + "OpenAI.ResponseWebSearchCallInProgressEvent": { "type": "object", "required": [ "type", @@ -32373,9 +41745,9 @@ "type": { "type": "string", "enum": [ - "response.image_generation_call.generating" + "response.web_search_call.in_progress" ], - "description": "The type of the event. Always 'response.image_generation_call.generating'.", + "description": "The type of the event. Always `response.web_search_call.in_progress`.", "x-stainless-const": true }, "output_index": { @@ -32384,11 +41756,11 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item in the response's output array." + "description": "The index of the output item that the web search call is associated with." }, "item_id": { "type": "string", - "description": "The unique identifier of the image generation item being processed." + "description": "Unique ID for the output item associated with the web search call." }, "sequence_number": { "allOf": [ @@ -32396,18 +41768,17 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of the image generation item being processed." + "description": "The sequence number of the web search call being processed." } }, - "description": "Emitted when an image generation tool call is actively generating an image (intermediate state).", - "title": "ResponseImageGenCallGeneratingEvent", + "description": "Emitted when a web search call is initiated.", "x-oaiMeta": { - "name": "response.image_generation_call.generating", + "name": "response.web_search_call.in_progress", "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" + "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.ResponseImageGenCallInProgressEvent": { + "OpenAI.ResponseWebSearchCallSearchingEvent": { "type": "object", "required": [ "type", @@ -32419,9 +41790,9 @@ "type": { "type": "string", "enum": [ - "response.image_generation_call.in_progress" + "response.web_search_call.searching" ], - "description": "The type of the event. Always 'response.image_generation_call.in_progress'.", + "description": "The type of the event. Always `response.web_search_call.searching`.", "x-stainless-const": true }, "output_index": { @@ -32430,11 +41801,11 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item in the response's output array." + "description": "The index of the output item that the web search call is associated with." }, "item_id": { "type": "string", - "description": "The unique identifier of the image generation item being processed." + "description": "Unique ID for the output item associated with the web search call." }, "sequence_number": { "allOf": [ @@ -32442,968 +41813,799 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of the image generation item being processed." + "description": "The sequence number of the web search call being processed." } }, - "description": "Emitted when an image generation tool call is in progress.", - "title": "ResponseImageGenCallInProgressEvent", + "description": "Emitted when a web search call is executing.", "x-oaiMeta": { - "name": "response.image_generation_call.in_progress", + "name": "response.web_search_call.searching", "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" + "example": "{\n \"type\": \"response.web_search_call.searching\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" } }, - "OpenAI.ResponseImageGenCallPartialImageEvent": { + "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", - "output_index", - "item_id", - "sequence_number", - "partial_image_index", - "partial_image_b64" + "x", + "y", + "scroll_x", + "scroll_y" ], "properties": { "type": { "type": "string", "enum": [ - "response.image_generation_call.partial_image" + "scroll" ], - "description": "The type of the event. Always 'response.image_generation_call.partial_image'.", - "x-stainless-const": true + "description": "Specifies the event type. For a scroll action, this property is always set to `scroll`.", + "x-stainless-const": true, + "default": "scroll" }, - "output_index": { + "x": { "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." + "description": "The x-coordinate where the scroll occurred." }, - "sequence_number": { + "y": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of the image generation item being processed." + "description": "The y-coordinate where the scroll occurred." }, - "partial_image_index": { + "scroll_x": { "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)." + "description": "The horizontal scroll distance." }, - "partial_image_b64": { - "type": "string", - "description": "Base64-encoded partial image data, suitable for rendering as an image." + "scroll_y": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The vertical scroll distance." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A scroll action.", + "title": "Scroll" }, - "OpenAI.ResponseInProgressEvent": { + "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", - "response", - "sequence_number" + "skill_id" ], "properties": { "type": { "type": "string", "enum": [ - "response.in_progress" + "skill_reference" ], - "description": "The type of the event. Always `response.in_progress`.", - "x-stainless-const": true + "description": "References a skill created with the /v1/skills endpoint.", + "x-stainless-const": true, + "default": "skill_reference" }, - "response": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Response" - } - ], - "description": "The response that is in progress." + "skill_id": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "description": "The ID of the referenced skill." }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "version": { + "type": "string", + "description": "Optional skill version. Use a positive integer or 'latest'. Omit for default." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ContainerSkill" + } + ] }, - "OpenAI.ResponseIncompleteDetails": { + "OpenAI.SpecificApplyPatchParam": { "type": "object", + "required": [ + "type" + ], "properties": { - "reason": { + "type": { "type": "string", "enum": [ - "max_output_tokens", - "content_filter" - ] + "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.ResponseIncompleteEvent": { + "OpenAI.SpecificFunctionShellParam": { "type": "object", "required": [ - "type", - "response", - "sequence_number" + "type" ], "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" - } + "shell" ], - "description": "The sequence number of this event." + "description": "The tool to call. Always `shell`.", + "x-stainless-const": true, + "default": "shell" } }, - "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" - } + "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.ResponseLogProb": { + "OpenAI.SummaryTextContent": { "type": "object", "required": [ - "token", - "logprob" + "type", + "text" ], "properties": { - "token": { + "type": { "type": "string", - "description": "A possible text token." - }, - "logprob": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } + "enum": [ + "summary_text" ], - "description": "The log probability of this token." + "description": "The type of the object. Always `summary_text`.", + "x-stainless-const": true, + "default": "summary_text" }, - "top_logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ResponseLogProbTopLogprobs" - }, - "description": "The log probability of the top 20 most likely tokens." + "text": { + "type": "string", + "description": "A summary of the reasoning output from the model so far." } }, - "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" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" } - } + ], + "description": "A summary text from the model.", + "title": "Summary text" }, - "OpenAI.ResponseMCPCallArgumentsDeltaEvent": { + "OpenAI.TextContent": { "type": "object", "required": [ "type", - "output_index", - "item_id", - "delta", - "sequence_number" + "text" ], "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" - } + "text" ], - "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." + "x-stainless-const": true, + "default": "text" }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "text": { + "type": "string" } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A text content.", + "title": "Text Content" }, - "OpenAI.ResponseMCPCallArgumentsDoneEvent": { + "OpenAI.TextResponseFormatConfiguration": { "type": "object", "required": [ - "type", - "output_index", - "item_id", - "arguments", - "sequence_number" + "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": [ - "response.mcp_call_arguments.done" + "json_object" ], - "description": "The type of the event. Always 'response.mcp_call_arguments.done'.", + "description": "The type of response format being defined. Always `json_object`.", "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" - } + "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.ResponseMCPCallCompletedEvent": { + "OpenAI.TextResponseFormatConfigurationResponseFormatText": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "sequence_number" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "response.mcp_call.completed" + "text" ], - "description": "The type of the event. Always 'response.mcp_call.completed'.", + "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" }, - "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." + "enum": [ + "text", + "json_schema", + "json_object" + ] } - }, - "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": { + "OpenAI.TextResponseFormatJsonSchema": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "sequence_number" + "name", + "schema" ], "properties": { "type": { "type": "string", "enum": [ - "response.mcp_call.failed" + "json_schema" ], - "description": "The type of the event. Always 'response.mcp_call.failed'.", + "description": "The type of response format being defined. Always `json_schema`.", "x-stainless-const": true }, - "item_id": { + "description": { "type": "string", - "description": "The ID of the MCP tool call item that failed." + "description": "A description of what the response format is for, used by the model to\n determine how to respond in the format." }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that failed." + "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." }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "schema": { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaSchema" + }, + "strict": { + "type": "boolean", + "nullable": true } }, - "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" - } + "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.ResponseMCPCallInProgressEvent": { + "OpenAI.Tool": { "type": "object", "required": [ - "type", - "sequence_number", - "output_index", - "item_id" + "type" ], "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." + "$ref": "#/components/schemas/OpenAI.ToolType" } }, - "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" - } + "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", + "memory_search_preview": "#/components/schemas/MemorySearchPreviewTool", + "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.ResponseMCPListToolsCompletedEvent": { + "OpenAI.ToolChoiceAllowed": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "sequence_number" + "mode", + "tools" ], "properties": { "type": { "type": "string", "enum": [ - "response.mcp_list_tools.completed" + "allowed_tools" ], - "description": "The type of the event. Always 'response.mcp_list_tools.completed'.", + "description": "Allowed tool configuration type. Always `allowed_tools`.", "x-stainless-const": true }, - "item_id": { + "mode": { "type": "string", - "description": "The ID of the MCP tool call item that produced this output." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "enum": [ + "auto", + "required" ], - "description": "The index of the output item that was processed." + "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." }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "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 ```" } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Constrains the tools available to the model to a pre-defined set.", + "title": "Allowed tools" }, - "OpenAI.ResponseMCPListToolsFailedEvent": { + "OpenAI.ToolChoiceCodeInterpreter": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "sequence_number" + "type" ], "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." + "code_interpreter" + ] } }, - "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" - } + "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.ResponseMCPListToolsInProgressEvent": { + "OpenAI.ToolChoiceComputerUsePreview": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "sequence_number" + "type" ], "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." + "computer_use_preview" + ] } }, - "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" - } + "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.ResponseOutputItemAddedEvent": { + "OpenAI.ToolChoiceCustom": { "type": "object", "required": [ "type", - "output_index", - "sequence_number", - "item" + "name" ], "properties": { "type": { "type": "string", "enum": [ - "response.output_item.added" + "custom" ], - "description": "The type of the event. Always `response.output_item.added`.", + "description": "For custom tool calling, the type is always `custom`.", "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." + "name": { + "type": "string", + "description": "The name of the custom tool to call." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Use this option to force the model to call a specific custom tool.", + "title": "Custom tool" }, - "OpenAI.ResponseOutputItemDoneEvent": { + "OpenAI.ToolChoiceFileSearch": { "type": "object", "required": [ - "type", - "output_index", - "sequence_number", - "item" + "type" ], "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." + "file_search" + ] } }, - "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" - } + "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.ResponseOutputTextAnnotationAddedEvent": { + "OpenAI.ToolChoiceFunction": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "content_index", - "annotation_index", - "sequence_number", - "annotation" + "name" ], "properties": { "type": { "type": "string", "enum": [ - "response.output_text.annotation.added" + "function" ], - "description": "The type of the event. Always 'response.output_text.annotation.added'.", + "description": "For function calling, the type is always `function`.", "x-stainless-const": true }, - "item_id": { + "name": { "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": "The name of the function to call." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Use this option to force the model to call a specific function.", + "title": "Function tool" }, - "OpenAI.ResponsePromptVariables": { + "OpenAI.ToolChoiceImageGeneration": { "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.InputTextContent" - }, - { - "$ref": "#/components/schemas/OpenAI.InputImageContent" - }, - { - "$ref": "#/components/schemas/OpenAI.InputFileContent" - } - ] + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation" + ] + } }, - "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" + "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.ResponseQueuedEvent": { + "OpenAI.ToolChoiceMCP": { "type": "object", "required": [ "type", - "response", - "sequence_number" + "server_label" ], "properties": { "type": { "type": "string", "enum": [ - "response.queued" + "mcp" ], - "description": "The type of the event. Always 'response.queued'.", + "description": "For MCP tools, the type is always `mcp`.", "x-stainless-const": true }, - "response": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Response" - } - ], - "description": "The full response object that is queued." + "server_label": { + "type": "string", + "description": "The label of the MCP server to use." }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number for this event." + "name": { + "type": "string", + "nullable": true } }, - "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" - } + "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.ResponseReasoningSummaryPartAddedEvent": { + "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", - "item_id", - "output_index", - "summary_index", - "sequence_number", - "part" + "type" ], "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 + "$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" }, - "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." + "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" + ] } - }, - "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": { + "OpenAI.ToolChoiceWebSearchPreview": { "type": "object", "required": [ - "type", - "text" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "summary_text" - ], - "x-stainless-const": true - }, - "text": { - "type": "string" + "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.ResponseReasoningSummaryPartDoneEvent": { + "OpenAI.ToolChoiceWebSearchPreview20250311": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "summary_index", - "sequence_number", - "part" + "type" ], "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 + "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" }, - "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." + "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", + "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" }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "logprob": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - "part": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEventPart" - } - ], - "description": "The completed summary part." + "bytes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.integer" + } } }, - "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" - } + "description": "The top log probability of a token.", + "title": "Top log probability" }, - "OpenAI.ResponseReasoningSummaryPartDoneEventPart": { + "OpenAI.TypeParam": { "type": "object", "required": [ "type", @@ -33413,2901 +42615,3417 @@ "type": { "type": "string", "enum": [ - "summary_text" + "type" ], - "x-stainless-const": true + "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" + "type": "string", + "description": "The text to type." } - } + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "An action to type in text.", + "title": "Type" }, - "OpenAI.ResponseReasoningSummaryTextDeltaEvent": { + "OpenAI.UpdateConversationBody": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "summary_index", - "delta", - "sequence_number" + "metadata" ], "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": { + "metadata": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "description": "The sequence number of this event." + "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." } - }, - "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": { + "OpenAI.UrlCitationBody": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "summary_index", - "text", - "sequence_number" + "url", + "start_index", + "end_index", + "title" ], "properties": { "type": { "type": "string", "enum": [ - "response.reasoning_summary_text.done" + "url_citation" ], - "description": "The type of the event. Always `response.reasoning_summary_text.done`.", - "x-stainless-const": true + "description": "The type of the URL citation. Always `url_citation`.", + "x-stainless-const": true, + "default": "url_citation" }, - "item_id": { + "url": { "type": "string", - "description": "The ID of the item this summary text is associated with." + "format": "uri", + "description": "The URL of the web resource." }, - "output_index": { + "start_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item this summary text is associated with." + "description": "The index of the first character of the URL citation in the message." }, - "summary_index": { + "end_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the summary part within the reasoning summary." + "description": "The index of the last character of the URL citation in the message." }, - "text": { + "title": { "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": "The title of the web resource." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Annotation" + } + ], + "description": "A citation for a web resource used to generate a model response.", + "title": "URL citation" }, - "OpenAI.ResponseReasoningTextDeltaEvent": { + "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", - "item_id", - "output_index", - "content_index", - "delta", - "sequence_number" + "type" ], "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" - } + "wait" ], - "description": "The sequence number of this event." + "description": "Specifies the event type. For a wait action, this property is always set to `wait`.", + "x-stainless-const": true, + "default": "wait" } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A wait action.", + "title": "Wait" }, - "OpenAI.ResponseReasoningTextDoneEvent": { + "OpenAI.WebSearchActionFind": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "content_index", - "text", - "sequence_number" + "url", + "pattern" ], "properties": { "type": { "type": "string", "enum": [ - "response.reasoning_text.done" + "find_in_page" ], - "description": "The type of the event. Always `response.reasoning_text.done`.", + "description": "The action type.", "x-stainless-const": true }, - "item_id": { + "url": { "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." + "format": "uri", + "description": "The URL of the page searched for the pattern." }, - "text": { + "pattern": { "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": "The pattern or text to search for within the page." } }, - "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" - } + "description": "Action type \"find_in_page\": Searches for a pattern within a loaded page.", + "title": "Find action" }, - "OpenAI.ResponseRefusalDeltaEvent": { + "OpenAI.WebSearchActionOpenPage": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "content_index", - "delta", - "sequence_number" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "response.refusal.delta" + "open_page" ], - "description": "The type of the event. Always `response.refusal.delta`.", + "description": "The action type.", "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": { + "url": { "type": "string", - "description": "The refusal text that is added." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "format": "uri", + "nullable": true, + "description": "The URL opened by the model." } }, - "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" - } + "description": "Action type \"open_page\" - Opens a specific URL from search results.", + "title": "Open page action" }, - "OpenAI.ResponseRefusalDoneEvent": { + "OpenAI.WebSearchActionSearch": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "content_index", - "refusal", - "sequence_number" + "query" ], "properties": { "type": { "type": "string", "enum": [ - "response.refusal.done" + "search" ], - "description": "The type of the event. Always `response.refusal.done`.", + "description": "The action type.", "x-stainless-const": true }, - "item_id": { + "query": { "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." + "description": "[DEPRECATED] The search query.", + "deprecated": true }, - "refusal": { - "type": "string", - "description": "The refusal text that is finalized." + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The search queries.", + "title": "Search queries" }, - "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." + "sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearchSources" + }, + "description": "The sources used in the search.", + "title": "Web search sources" } }, - "description": "Options for streaming responses. Only set this when you set `stream: true`." + "description": "Action type \"search\" - Performs a web search query.", + "title": "Search action" }, - "OpenAI.ResponseTextDeltaEvent": { + "OpenAI.WebSearchActionSearchSources": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "content_index", - "delta", - "sequence_number", - "logprobs" + "url" ], "properties": { "type": { "type": "string", "enum": [ - "response.output_text.delta" + "url" ], - "description": "The type of the event. Always `response.output_text.delta`.", "x-stainless-const": true }, - "item_id": { + "url": { + "type": "string" + } + } + }, + "OpenAI.WebSearchApproximateLocation": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { "type": "string", - "description": "The ID of the output item that the text delta was added to." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "enum": [ + "approximate" ], - "description": "The index of the output item that the text delta was added to." + "description": "The type of location approximation. Always `approximate`.", + "x-stainless-const": true, + "default": "approximate" }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the content part that the text delta was added to." + "country": { + "type": "string", + "nullable": true }, - "delta": { + "region": { "type": "string", - "description": "The text delta that was added." + "nullable": true }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number for this event." + "city": { + "type": "string", + "nullable": true }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ResponseLogProb" - }, - "description": "The log probabilities of the tokens in the delta." + "timezone": { + "type": "string", + "nullable": true } }, - "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" - } + "description": "The approximate location of the user.", + "title": "Web search approximate location" }, - "OpenAI.ResponseTextDoneEvent": { + "OpenAI.WebSearchPreviewTool": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "content_index", - "text", - "sequence_number", - "logprobs" + "type" ], "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" - } + "web_search_preview" ], - "description": "The index of the output item that the text content is finalized." + "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" }, - "content_index": { + "user_location": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ApproximateLocation" } ], - "description": "The index of the content part that the text content is finalized." - }, - "text": { - "type": "string", - "description": "The text content that is finalized." + "nullable": true }, - "sequence_number": { + "search_context_size": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.SearchContextSize" } ], - "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": "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." } }, - "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" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" } - }, - "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)" + ], + "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.ResponseUsage": { + "OpenAI.WebSearchTool": { "type": "object", "required": [ - "input_tokens", - "input_tokens_details", - "output_tokens", - "output_tokens_details", - "total_tokens" + "type" ], "properties": { - "input_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "type": { + "type": "string", + "enum": [ + "web_search" ], - "description": "The number of input tokens." + "description": "The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.", + "default": "web_search" }, - "input_tokens_details": { + "filters": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" + "$ref": "#/components/schemas/OpenAI.WebSearchToolFilters" } ], - "description": "A detailed breakdown of the input tokens." + "nullable": true }, - "output_tokens": { + "user_location": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.WebSearchApproximateLocation" } ], - "description": "The number of output tokens." + "nullable": true }, - "output_tokens_details": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" - } + "search_context_size": { + "type": "string", + "enum": [ + "low", + "medium", + "high" ], - "description": "A detailed breakdown of the output tokens." + "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" }, - "total_tokens": { + "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/OpenAI.integer" + "$ref": "#/components/schemas/WebSearchConfiguration" } ], - "description": "The total number of tokens used." + "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." } }, - "description": "Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used." + "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.ResponseUsageInputTokensDetails": { + "OpenAI.WebSearchToolFilters": { "type": "object", - "required": [ - "cached_tokens" - ], "properties": { - "cached_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" + "allowed_domains": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true } } }, - "OpenAI.ResponseUsageOutputTokensDetails": { + "OpenAI.integer": { + "type": "integer", + "format": "int64" + }, + "OpenAI.numeric": { + "type": "number", + "format": "double" + }, + "OpenApiAnonymousAuthDetails": { "type": "object", "required": [ - "reasoning_tokens" + "type" ], "properties": { - "reasoning_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" + "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" }, - "OpenAI.ResponseWebSearchCallCompletedEvent": { + "OpenApiAuthDetails": { "type": "object", "required": [ - "type", - "output_index", - "item_id", - "sequence_number" + "type" ], "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" + "$ref": "#/components/schemas/OpenApiAuthType" } ], - "description": "The index of the output item that the web search call is associated with." - }, - "item_id": { + "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", - "description": "Unique ID for the output item associated with the web search call." + "enum": [ + "anonymous", + "project_connection", + "managed_identity" + ] }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of the web search call being processed." + { + "type": "string" } - }, - "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" - } + ], + "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)" }, - "OpenAI.ResponseWebSearchCallInProgressEvent": { + "OpenApiFunctionDefinition": { "type": "object", "required": [ - "type", - "output_index", - "item_id", - "sequence_number" + "name", + "spec", + "auth" ], "properties": { - "type": { + "name": { "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." + "description": "The name of the function to be called." }, - "item_id": { + "description": { "type": "string", - "description": "Unique ID for the output item associated with the web search call." + "description": "A description of what the function does, used by the model to choose when and how to call the function." }, - "sequence_number": { + "spec": { + "type": "object", + "additionalProperties": {}, + "description": "The openapi function shape, described as a JSON Schema object." + }, + "auth": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenApiAuthDetails" } ], - "description": "The sequence number of the web search call being processed." + "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": "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" - } + "description": "The input definition information for an openapi function." }, - "OpenAI.ResponseWebSearchCallSearchingEvent": { + "OpenApiManagedAuthDetails": { "type": "object", "required": [ "type", - "output_index", - "item_id", - "sequence_number" + "security_scheme" ], "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" - } + "managed_identity" ], - "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." + "description": "The object type, which is always 'managed_identity'." }, - "sequence_number": { + "security_scheme": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenApiManagedSecurityScheme" } ], - "description": "The sequence number of the web search call being processed." + "description": "Connection auth security details" } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiAuthDetails" + } + ], + "description": "Security details for OpenApi managed_identity authentication" }, - "OpenAI.ScreenshotParam": { + "OpenApiManagedSecurityScheme": { "type": "object", "required": [ - "type" + "audience" ], "properties": { - "type": { + "audience": { "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" + "description": "Authentication scope for managed_identity auth type" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A screenshot action.", - "title": "Screenshot" + "description": "Security scheme for OpenApi managed_identity authentication" }, - "OpenAI.ScrollParam": { + "OpenApiProjectConnectionAuthDetails": { "type": "object", "required": [ "type", - "x", - "y", - "scroll_x", - "scroll_y" + "security_scheme" ], "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" - } + "project_connection" ], - "description": "The horizontal scroll distance." + "description": "The object type, which is always 'project_connection'." }, - "scroll_y": { + "security_scheme": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenApiProjectConnectionSecurityScheme" } ], - "description": "The vertical scroll distance." + "description": "Project connection auth security details" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "$ref": "#/components/schemas/OpenApiAuthDetails" } ], - "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 + "description": "Security details for OpenApi project connection authentication" }, - "OpenAI.SkillReferenceParam": { + "OpenApiProjectConnectionSecurityScheme": { "type": "object", "required": [ - "type", - "skill_id" + "project_connection_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": { + "project_connection_id": { "type": "string", - "description": "Optional skill version. Use a positive integer or 'latest'. Omit for default." + "description": "Project connection id for Project Connection auth type" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerSkill" - } - ] + "description": "Security scheme for OpenApi managed_identity authentication" }, - "OpenAI.SpecificApplyPatchParam": { + "OpenApiTool": { "type": "object", "required": [ - "type" + "type", + "openapi" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch" + "openapi" + ], + "description": "The object type, which is always 'openapi'." + }, + "openapi": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiFunctionDefinition" + } ], - "description": "The tool to call. Always `apply_patch`.", - "x-stainless-const": true, - "default": "apply_patch" + "description": "The openapi function definition." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "Forces the model to call the apply_patch tool when executing a tool call.", - "title": "Specific apply patch tool choice" + "description": "The input definition information for an OpenAPI tool as used to configure an agent." }, - "OpenAI.SpecificFunctionShellParam": { + "OpenApiToolCall": { "type": "object", "required": [ - "type" + "type", + "call_id", + "name", + "arguments", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "shell" + "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 tool to call. Always `shell`.", - "x-stainless-const": true, - "default": "shell" + "description": "The status of the tool call." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "Forces the model to call the shell tool when a tool call is required.", - "title": "Specific shell tool choice" + "description": "An OpenAPI tool call." }, - "OpenAI.SummaryTextContent": { + "OpenApiToolCallOutput": { "type": "object", "required": [ "type", - "text" + "call_id", + "name", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "summary_text" - ], - "description": "The type of the object. Always `summary_text`.", - "x-stainless-const": true, - "default": "summary_text" + "openapi_call_output" + ] }, - "text": { + "call_id": { "type": "string", - "description": "A summary of the reasoning output from the model so far." + "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.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A summary text from the model.", - "title": "Summary text" + "description": "The output of an OpenAPI tool call." }, - "OpenAI.TextContent": { + "OrpoTrainingConfiguration": { "type": "object", "required": [ - "type", - "text" + "algorithm" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "text" + "orpo" ], - "x-stainless-const": true, - "default": "text" + "description": "Training algorithm, always 'orpo'." }, - "text": { - "type": "string" + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MessageContent" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "A text content.", - "title": "Text Content" + "description": "Odds ratio preference optimization training recipe." }, - "OpenAI.TextResponseFormatConfiguration": { + "Output": { "type": "object", "required": [ - "type" + "job_output_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" + "job_output_type": { + "allOf": [ + { + "$ref": "#/components/schemas/AssetTypes" + } + ], + "description": "Specifies the type of job output." + }, + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/InputOutputModes" + } + ], + "description": "Output Asset Delivery Mode." + }, + "asset_name": { + "type": "string", + "description": "Name of the output data asset to register." + }, + "asset_version": { + "type": "string", + "description": "Version of the output data asset to register." + }, + "uri": { + "type": "string", + "description": "Output Asset URI." + }, + "base_model_id": { + "type": "string", + "description": "Base model ID. Applies to safetensors_model outputs." + }, + "description": { + "type": "string", + "description": "Description for the output." } }, - "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." + "description": "Job output definition." }, - "OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject": { + "PageOrder": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "PagedConnection": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Connection" + }, + "description": "The Connection items on this page" + }, + "nextLink": { "type": "string", - "enum": [ - "json_object" - ], - "description": "The type of response format being defined. Always `json_object`.", - "x-stainless-const": true + "format": "uri", + "description": "The link to the next page of items" } }, - "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" + "description": "Paged collection of Connection items" }, - "OpenAI.TextResponseFormatConfigurationResponseFormatText": { + "PagedDatasetVersion": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetVersion" + }, + "description": "The DatasetVersion items on this page" + }, + "nextLink": { "type": "string", - "enum": [ - "text" - ], - "description": "The type of response format being defined. Always `text`.", - "x-stainless-const": true + "format": "uri", + "description": "The link to the next page of items" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" - } - ], - "description": "Default response format. Used to generate text responses.", - "title": "Text" + "description": "Paged collection of DatasetVersion items" }, - "OpenAI.TextResponseFormatConfigurationType": { - "anyOf": [ - { - "type": "string" + "PagedDeployment": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Deployment" + }, + "description": "The Deployment items on this page" }, - { + "nextLink": { "type": "string", - "enum": [ - "text", - "json_schema", - "json_object" - ] + "format": "uri", + "description": "The link to the next page of items" } - ] + }, + "description": "Paged collection of Deployment items" }, - "OpenAI.TextResponseFormatJsonSchema": { + "PagedEvaluationRule": { "type": "object", "required": [ - "type", - "name", - "schema" + "value" ], "properties": { - "type": { - "type": "string", - "enum": [ - "json_schema" - ], - "description": "The type of response format being defined. Always `json_schema`.", - "x-stainless-const": true + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationRule" + }, + "description": "The EvaluationRule items on this page" }, - "description": { + "nextLink": { "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." + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of EvaluationRule items" + }, + "PagedEvaluationTaxonomy": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationTaxonomy" + }, + "description": "The EvaluationTaxonomy items on this page" }, - "name": { + "nextLink": { "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 + "format": "uri", + "description": "The link to the next page of items" } }, - "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" + "description": "Paged collection of EvaluationTaxonomy items" }, - "OpenAI.Tool": { + "PagedEvaluatorVersion": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.ToolType" + "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" } }, - "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", - "memory_search_preview": "#/components/schemas/MemorySearchPreviewTool", - "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": "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": "A tool that can be used to generate a response." + "description": "Paged collection of Index items" }, - "OpenAI.ToolChoiceAllowed": { + "PagedInsight": { "type": "object", "required": [ - "type", - "mode", - "tools" + "value" ], "properties": { - "type": { - "type": "string", - "enum": [ - "allowed_tools" - ], - "description": "Allowed tool configuration type. Always `allowed_tools`.", - "x-stainless-const": true + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Insight" + }, + "description": "The Insight items on this page" }, - "mode": { + "nextLink": { "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": { + "format": "uri", + "description": "The link to the next page of items" + } + }, + "description": "Paged collection of Insight items" + }, + "PagedRedTeam": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { "type": "array", "items": { - "type": "object", - "additionalProperties": {} + "$ref": "#/components/schemas/RedTeam" }, - "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 ```" + "description": "The RedTeam items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Constrains the tools available to the model to a pre-defined set.", - "title": "Allowed tools" + "description": "Paged collection of RedTeam items" }, - "OpenAI.ToolChoiceCodeInterpreter": { + "PagedSchedule": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schedule" + }, + "description": "The Schedule items on this page" + }, + "nextLink": { "type": "string", - "enum": [ - "code_interpreter" - ] + "format": "uri", + "description": "The link to the next page of items" } }, - "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)." + "description": "Paged collection of Schedule items" }, - "OpenAI.ToolChoiceComputerUsePreview": { + "PagedScheduleRun": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRun" + }, + "description": "The ScheduleRun items on this page" + }, + "nextLink": { "type": "string", - "enum": [ - "computer_use_preview" - ] + "format": "uri", + "description": "The link to the next page of items" } }, - "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)." + "description": "Paged collection of ScheduleRun items" }, - "OpenAI.ToolChoiceCustom": { + "PairwisePreferenceColumnMapping": { "type": "object", "required": [ - "type", - "name" + "prompt", + "chosen", + "rejected" ], "properties": { - "type": { + "prompt": { "type": "string", - "enum": [ - "custom" - ], - "description": "For custom tool calling, the type is always `custom`.", - "x-stainless-const": true + "description": "Actual dataset column name containing prompts, for example 'prompt' or 'question'." }, - "name": { + "chosen": { "type": "string", - "description": "The name of the custom tool to call." + "description": "Actual dataset column name containing the preferred response, for example 'chosen', 'accepted_answer', or 'good_response'." + }, + "rejected": { + "type": "string", + "description": "Actual dataset column name containing the rejected response, for example 'rejected', 'rejected_answer', or 'bad_response'." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Use this option to force the model to call a specific custom tool.", - "title": "Custom tool" + "description": "Column mapping for pairwise preference datasets. Keys are logical fields expected by preference training; values are the exact column names in the referenced dataset asset." }, - "OpenAI.ToolChoiceFileSearch": { + "PairwisePreferenceDatasetConfiguration": { "type": "object", "required": [ - "type" + "train", + "columns" ], "properties": { - "type": { + "train": { "type": "string", - "enum": [ - "file_search" - ] - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "description": "Training dataset asset reference." + }, + "eval": { + "type": "string", + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ + { + "$ref": "#/components/schemas/PairwisePreferenceColumnMapping" + } + ], + "description": "Mapping from pairwise preference logical fields to actual dataset column names. DPO, ORPO, CPO, and SimPO require 'prompt', 'chosen', and 'rejected'." + }, + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } + ], + "description": "Conversational data formatting options." } - ], - "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)." + }, + "description": "Dataset configuration for managed pairwise preference training." }, - "OpenAI.ToolChoiceFunction": { + "PairwiseRewardModelTrainingDatasetConfiguration": { "type": "object", "required": [ - "type", - "name" + "kind", + "train", + "columns" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "function" + "pairwise" ], - "description": "For function calling, the type is always `function`.", - "x-stainless-const": true + "description": "Reward-model dataset kind, always 'pairwise'." }, - "name": { + "train": { "type": "string", - "description": "The name of the function to call." + "description": "Training dataset asset reference." + }, + "eval": { + "type": "string", + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ + { + "$ref": "#/components/schemas/PairwisePreferenceColumnMapping" + } + ], + "description": "Mapping from pairwise reward-model logical fields to actual dataset column names. Pairwise reward-model training requires 'prompt', 'chosen', and 'rejected'." + }, + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } + ], + "description": "Conversational data formatting options." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/RewardModelTrainingDatasetConfiguration" } ], - "description": "Use this option to force the model to call a specific function.", - "title": "Function tool" + "description": "Pairwise preference dataset for managed reward-model training." }, - "OpenAI.ToolChoiceImageGeneration": { + "PendingUploadRequest": { "type": "object", "required": [ - "type" + "pendingUploadType" ], "properties": { - "type": { + "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": [ - "image_generation" - ] + "BlobReference" + ], + "description": "BlobReference is the only supported type." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "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": "BlobReference is the only supported type" } + }, + "description": "Represents the response for a pending upload request" + }, + "PolicyGradientTrainingAlgorithm": { + "type": "string", + "enum": [ + "rloo", + "reinforce_pp" ], - "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)." + "description": "Policy-gradient algorithm used by managed online reinforcement training." }, - "OpenAI.ToolChoiceMCP": { + "PolicyGradientTrainingJob": { "type": "object", "required": [ "type", - "server_label" + "algorithm", + "dataset", + "runtime" ], "properties": { "type": { "type": "string", "enum": [ - "mcp" + "policy_gradient" ], - "description": "For MCP tools, the type is always `mcp`.", - "x-stainless-const": true + "description": "Managed training job type, always 'policy_gradient'." }, - "server_label": { - "type": "string", - "description": "The label of the MCP server to use." + "algorithm": { + "allOf": [ + { + "$ref": "#/components/schemas/PolicyGradientTrainingAlgorithm" + } + ], + "description": "Policy-gradient algorithm to run." }, - "name": { - "type": "string", - "nullable": true + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/GrpoTrainingDatasetConfiguration" + } + ], + "description": "Training and optional evaluation datasets." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/PolicyGradientTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed online policy-gradient training." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "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" + "description": "Request body for creating a managed online policy-gradient training job from a base model." }, - "OpenAI.ToolChoiceParam": { + "PolicyGradientTrainingRuntimeConfiguration": { "type": "object", "required": [ - "type" + "judge", + "rollout" ], "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" + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." + }, + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." + }, + "judge": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Judge used to score generated completions during online policy-gradient training. Required for RLOO and REINFORCE++." + }, + "reference": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Reference policy used for KL anchoring." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration. Required for RLOO and REINFORCE++." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "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." + "description": "Runtime options for managed online policy-gradient training." }, - "OpenAI.ToolChoiceParamType": { - "anyOf": [ - { - "type": "string" - }, - { + "PpoCriticConfiguration": { + "type": "object", + "properties": { + "model": { "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" - ] + "description": "Optional critic model asset reference. If omitted, the service initializes the critic from the policy model." + }, + "value_loss_coefficient": { + "type": "number", + "format": "double", + "description": "Value loss coefficient." + }, + "gamma": { + "type": "number", + "format": "double", + "description": "GAE discount factor." + }, + "lambda": { + "type": "number", + "format": "double", + "description": "GAE lambda." } - ] + }, + "description": "Critic or value model configuration for managed PPO training." }, - "OpenAI.ToolChoiceWebSearchPreview": { + "PpoTrainingConfiguration": { "type": "object", "required": [ - "type" + "algorithm", + "reward" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "web_search_preview" - ] + "ppo" + ], + "description": "Training algorithm, always 'ppo'." + }, + "reward": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Reward signal configuration." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "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)." + "description": "Proximal policy optimization training recipe." }, - "OpenAI.ToolChoiceWebSearchPreview20250311": { + "PpoTrainingJob": { "type": "object", "required": [ - "type" + "type", + "dataset", + "runtime" ], "properties": { "type": { "type": "string", "enum": [ - "web_search_preview_2025_03_11" - ] + "ppo" + ], + "description": "Managed training job type, always 'ppo'." + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/GrpoTrainingDatasetConfiguration" + } + ], + "description": "Training and optional evaluation datasets." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/PpoTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed PPO." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "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", - "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." + "description": "Request body for creating a managed PPO training job from a base model." }, - "OpenAI.TopLogProb": { + "PpoTrainingRuntimeConfiguration": { "type": "object", "required": [ - "token", - "logprob", - "bytes" + "judge", + "rollout" ], "properties": { - "token": { - "type": "string" + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." }, - "logprob": { - "$ref": "#/components/schemas/OpenAI.numeric" + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." }, - "bytes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.integer" - } + "judge": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Judge used to score generated completions during PPO training. Required for PPO." + }, + "reference": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Reference policy used for KL anchoring." + }, + "critic": { + "allOf": [ + { + "$ref": "#/components/schemas/PpoCriticConfiguration" + } + ], + "description": "Critic or value model configuration." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration. Required for PPO." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "description": "The top log probability of a token.", - "title": "Top log probability" + "description": "Runtime options for managed PPO training." }, - "OpenAI.TypeParam": { + "PreferenceTrainingAlgorithm": { + "type": "string", + "enum": [ + "dpo", + "orpo", + "cpo", + "simpo" + ], + "description": "Preference optimization algorithm used by managed pairwise preference training." + }, + "PreferenceTrainingJob": { "type": "object", "required": [ "type", - "text" + "algorithm", + "dataset" ], "properties": { "type": { "type": "string", "enum": [ - "type" + "preference" ], - "description": "Specifies the event type. For a type action, this property is always set to `type`.", - "x-stainless-const": true, - "default": "type" + "description": "Managed training job type, always 'preference'." }, - "text": { - "type": "string", - "description": "The text to type." + "algorithm": { + "allOf": [ + { + "$ref": "#/components/schemas/PreferenceTrainingAlgorithm" + } + ], + "description": "Preference optimization algorithm to run." + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/PairwisePreferenceDatasetConfiguration" + } + ], + "description": "Training and optional evaluation datasets." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/PreferenceTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed pairwise preference training." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "description": "An action to type in text.", - "title": "Type" + "description": "Request body for creating a managed pairwise preference training job from a base model." }, - "OpenAI.UpdateConversationBody": { + "PreferenceTrainingRuntimeConfiguration": { "type": "object", - "required": [ - "metadata" - ], "properties": { - "metadata": { + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." + }, + "hyperparameters": { "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." + }, + "reference": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" } ], - "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." + "description": "Reference policy used by algorithms that require KL anchoring or a reference model." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } - } + }, + "description": "Runtime options for managed pairwise preference training." }, - "OpenAI.UrlCitationBody": { + "PromptAgentDefinition": { "type": "object", "required": [ - "type", - "url", - "start_index", - "end_index", - "title" + "kind", + "model" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "url_citation" - ], - "description": "The type of the URL citation. Always `url_citation`.", - "x-stainless-const": true, - "default": "url_citation" + "prompt" + ] }, - "url": { + "model": { "type": "string", - "format": "uri", - "description": "The URL of the web resource." + "description": "The model deployment to use for this agent." }, - "start_index": { + "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.integer" + "$ref": "#/components/schemas/OpenAI.Reasoning" } ], - "description": "The index of the first character of the URL citation in the message." + "nullable": true }, - "end_index": { + "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/OpenAI.integer" + "$ref": "#/components/schemas/PromptAgentDefinitionTextOptions" } ], - "description": "The index of the last character of the URL citation in the message." + "description": "Configuration options for a text response from the model. Can be plain text or structured JSON data." }, - "title": { - "type": "string", - "description": "The title of the web resource." + "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/OpenAI.Annotation" + "$ref": "#/components/schemas/AgentDefinition" } ], - "description": "A citation for a web resource used to generate a model response.", - "title": "URL citation" + "description": "The prompt agent definition" }, - "OpenAI.VectorStoreFileAttributes": { + "PromptAgentDefinitionTextOptions": { "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - { - "type": "boolean" - } - ] + "properties": { + "format": { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + } }, - "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 + "description": "Configuration options for a text response from the model. Can be plain text or structured JSON data." }, - "OpenAI.WaitParam": { + "PromptBasedEvaluatorDefinition": { "type": "object", "required": [ - "type" + "type", + "prompt_text" ], "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" + "prompt" + ] + }, + "prompt_text": { + "type": "string", + "description": "The prompt text used for evaluation" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "$ref": "#/components/schemas/EvaluatorDefinition" } ], - "description": "A wait action.", - "title": "Wait" + "description": "Prompt-based evaluator" }, - "OpenAI.WebSearchActionFind": { + "ProtocolVersionRecord": { "type": "object", "required": [ - "type", - "url", - "pattern" + "protocol", + "version" ], "properties": { - "type": { - "type": "string", - "enum": [ - "find_in_page" + "protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentProtocol" + } ], - "description": "The action type.", - "x-stainless-const": true - }, - "url": { - "type": "string", - "format": "uri", - "description": "The URL of the page searched for the pattern." + "description": "The protocol type." }, - "pattern": { + "version": { "type": "string", - "description": "The pattern or text to search for within the page." + "description": "The version string for the protocol, e.g. 'v0.1.1'." } }, - "description": "Action type \"find_in_page\": Searches for a pattern within a loaded page.", - "title": "Find action" + "description": "A record mapping for a single protocol and its version." }, - "OpenAI.WebSearchActionOpenPage": { + "PyTorchDistribution": { "type": "object", "required": [ - "type" + "distribution_type" ], "properties": { - "type": { + "distribution_type": { "type": "string", "enum": [ - "open_page" + "pytorch" ], - "description": "The action type.", - "x-stainless-const": true + "description": "Specifies the type of distribution framework." }, - "url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL opened by the model." + "process_count_per_instance": { + "type": "integer", + "format": "int32", + "description": "Number of processes per node." } }, - "description": "Action type \"open_page\" - Opens a specific URL from search results.", - "title": "Open page action" + "allOf": [ + { + "$ref": "#/components/schemas/DistributionConfiguration" + } + ], + "description": "PyTorch distribution configuration." }, - "OpenAI.WebSearchActionSearch": { + "QueueSettings": { "type": "object", - "required": [ - "type", - "query" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "search" - ], - "description": "The action type.", - "x-stainless-const": true - }, - "query": { + "job_tier": { "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": "Controls the compute job tier." } }, - "description": "Action type \"search\" - Performs a web search query.", - "title": "Search action" + "description": "Queue settings for the job." }, - "OpenAI.WebSearchActionSearchSources": { + "RaiConfig": { "type": "object", "required": [ - "type", - "url" + "rai_policy_name" ], "properties": { - "type": { + "rai_policy_name": { "type": "string", - "enum": [ - "url" - ], - "x-stainless-const": true - }, - "url": { - "type": "string" + "description": "The name of the RAI policy to apply." } - } + }, + "description": "Configuration for Responsible AI (RAI) content filtering and safety features." }, - "OpenAI.WebSearchApproximateLocation": { + "RayDistribution": { "type": "object", "required": [ - "type" + "distribution_type" ], "properties": { - "type": { + "distribution_type": { "type": "string", "enum": [ - "approximate" + "ray" ], - "description": "The type of location approximation. Always `approximate`.", - "x-stainless-const": true, - "default": "approximate" + "description": "Specifies the type of distribution framework." }, - "country": { - "type": "string", - "nullable": true + "port": { + "type": "integer", + "format": "int32", + "description": "The port of the head Ray process." }, - "region": { + "address": { "type": "string", - "nullable": true + "description": "The address of the Ray head node." }, - "city": { + "include_dashboard": { + "type": "boolean", + "description": "Whether to start the Ray dashboard GUI." + }, + "dashboard_port": { + "type": "integer", + "format": "int32", + "description": "The port to bind the dashboard server to." + }, + "head_node_additional_args": { "type": "string", - "nullable": true + "description": "Additional arguments passed to ray start on the head node." }, - "timezone": { + "worker_node_additional_args": { "type": "string", - "nullable": true + "description": "Additional arguments passed to ray start on worker nodes." + }, + "enable_remote_access_client_server": { + "type": "boolean", + "description": "Whether to expose the Ray Client server port through the AML proxy for remote access. When true, the Ray Client port is registered as an interactive endpoint, enabling remote ray.init() connections via the WebSocket-TCP bridge. When false or omitted, the Ray Client port is not accessible externally." + }, + "client_server_port": { + "type": "integer", + "format": "int32", + "description": "The port for the Ray Client server. Defaults to 10001. Only relevant when enable_remote_access_client_server is true." } }, - "description": "The approximate location of the user.", - "title": "Web search approximate location" + "allOf": [ + { + "$ref": "#/components/schemas/DistributionConfiguration" + } + ], + "description": "Ray distribution configuration." }, - "OpenAI.WebSearchPreviewTool": { + "RecurrenceSchedule": { "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" + "$ref": "#/components/schemas/RecurrenceType" } ], - "nullable": true + "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." }, - "search_context_size": { + "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/OpenAI.SearchContextSize" + "$ref": "#/components/schemas/RecurrenceSchedule" } ], - "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." + "description": "Recurrence schedule for the recurrence trigger." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/Trigger" } ], - "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" + "description": "Recurrence based trigger." }, - "OpenAI.WebSearchTool": { + "RecurrenceType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Hourly", + "Daily", + "Weekly", + "Monthly" + ] + } + ], + "description": "Recurrence type." + }, + "RedTeam": { "type": "object", "required": [ - "type" + "id", + "target" ], "properties": { - "type": { + "id": { "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" + "description": "Identifier of the red team run.", + "readOnly": true }, - "filters": { + "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", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchToolFilters" - } - ], - "nullable": true + "additionalProperties": { + "type": "string" + }, + "description": "Red team's tags. Unlike properties, tags are fully mutable." }, - "user_location": { + "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/OpenAI.WebSearchApproximateLocation" + "$ref": "#/components/schemas/TargetConfig" } ], - "nullable": true - }, - "search_context_size": { + "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": [ - "low", - "medium", - "high" + "azure_ai_red_team" ], - "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": "The type of data source. Always `azure_ai_red_team`." }, - "description": { - "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "item_generation_params": { + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "The parameters for item generation." }, - "custom_search_configuration": { + "target": { "allOf": [ { - "$ref": "#/components/schemas/WebSearchConfiguration" + "$ref": "#/components/schemas/Target" } ], - "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." + "description": "The target configuration for the evaluation." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/EvalRunDataSource" } - ], - "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": { + "RedTeamItemGenerationParams": { "type": "object", + "required": [ + "type", + "attack_strategies", + "num_turns" + ], "properties": { - "allowed_domains": { + "type": { + "type": "string", + "enum": [ + "red_team" + ], + "description": "The type of item generation parameters." + }, + "attack_strategies": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/AttackStrategy" }, - "nullable": true + "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 } - } - }, - "OpenAI.integer": { - "type": "integer", - "format": "int64" - }, - "OpenAI.numeric": { - "type": "number", - "format": "double" + }, + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ] }, - "OpenApiAnonymousAuthDetails": { + "RedTeamSeedPromptsItemGenerationParams": { "type": "object", "required": [ - "type" + "type", + "attack_strategies", + "num_turns", + "source" ], "properties": { "type": { "type": "string", "enum": [ - "anonymous" + "red_team_seed_prompts" ], - "description": "The object type, which is always 'anonymous'." + "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/OpenApiAuthDetails" + "$ref": "#/components/schemas/ItemGenerationParams" } ], - "description": "Security details for OpenApi anonymous authentication" + "description": "Represents the parameters for red team seed prompts item generation." }, - "OpenApiAuthDetails": { + "RedTeamTaxonomyItemGenerationParams": { "type": "object", "required": [ - "type" + "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/OpenApiAuthType" + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" } ], - "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": "The source from which JSONL content is read." } }, - "description": "authentication details for OpenApiFunctionDefinition" - }, - "OpenApiAuthType": { - "anyOf": [ - { - "type": "string", - "enum": [ - "anonymous", - "project_connection", - "managed_identity" - ] - }, + "allOf": [ { - "type": "string" + "$ref": "#/components/schemas/ItemGenerationParams" } ], - "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)" + "description": "Represents the parameters for red team taxonomy item generation." }, - "OpenApiFunctionDefinition": { + "ReinforcePpTrainingConfiguration": { "type": "object", "required": [ - "name", - "spec", - "auth" + "algorithm", + "reward" ], "properties": { - "name": { - "type": "string", - "description": "The name of the function to be called." - }, - "description": { + "algorithm": { "type": "string", - "description": "A description of what the function does, used by the model to choose when and how to call the function." + "enum": [ + "reinforce_pp" + ], + "description": "Training algorithm, always 'reinforce_pp'." }, - "spec": { - "type": "object", - "additionalProperties": {}, - "description": "The openapi function shape, described as a JSON Schema object." + "reward": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Reward signal configuration." }, - "auth": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/OpenApiAuthDetails" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "Open API authentication details" + "description": "LoRA adapter configuration." }, - "default_params": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of OpenAPI spec parameters that will use user-provided defaults" + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration." }, - "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 + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, - "description": "The input definition information for an openapi function." + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" + } + ], + "description": "REINFORCE++ training recipe." }, - "OpenApiManagedAuthDetails": { + "ResponseRetrievalItemGenerationParams": { "type": "object", "required": [ "type", - "security_scheme" + "max_num_turns", + "data_mapping", + "source" ], "properties": { "type": { "type": "string", "enum": [ - "managed_identity" + "response_retrieval" ], - "description": "The object type, which is always 'managed_identity'." + "description": "The type of item generation parameters, always `response_retrieval`." }, - "security_scheme": { - "allOf": [ + "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/OpenApiManagedSecurityScheme" + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" } ], - "description": "Connection auth security details" + "description": "The source from which JSONL content is read." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenApiAuthDetails" + "$ref": "#/components/schemas/ItemGenerationParams" } ], - "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" + "description": "Represents the parameters for response retrieval item generation." }, - "OpenApiProjectConnectionAuthDetails": { + "RewardModelTrainingConfiguration": { "type": "object", "required": [ - "type", - "security_scheme" + "algorithm" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "project_connection" + "reward_model" ], - "description": "The object type, which is always 'project_connection'." + "description": "Training algorithm, always 'reward_model'." }, - "security_scheme": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/OpenApiProjectConnectionSecurityScheme" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "Project connection auth security details" + "description": "LoRA adapter configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenApiAuthDetails" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "Security details for OpenApi project connection authentication" + "description": "Reward model training recipe." }, - "OpenApiProjectConnectionSecurityScheme": { + "RewardModelTrainingDatasetConfiguration": { "type": "object", "required": [ - "project_connection_id" + "kind" ], "properties": { - "project_connection_id": { + "kind": { "type": "string", - "description": "Project connection id for Project Connection auth type" + "description": "Reward-model dataset kind." } }, - "description": "Security scheme for OpenApi managed_identity authentication" + "discriminator": { + "propertyName": "kind", + "mapping": { + "pairwise": "#/components/schemas/PairwiseRewardModelTrainingDatasetConfiguration", + "scored": "#/components/schemas/ScoredRewardModelTrainingDatasetConfiguration" + } + }, + "description": "Dataset configuration for managed reward-model training." }, - "OpenApiTool": { + "RewardModelTrainingJob": { "type": "object", "required": [ "type", - "openapi" + "dataset" ], "properties": { "type": { "type": "string", "enum": [ - "openapi" + "reward_model" ], - "description": "The object type, which is always 'openapi'." + "description": "Managed training job type, always 'reward_model'." }, - "openapi": { + "dataset": { "allOf": [ { - "$ref": "#/components/schemas/OpenApiFunctionDefinition" + "$ref": "#/components/schemas/RewardModelTrainingDatasetConfiguration" } ], - "description": "The openapi function definition." + "description": "Training and optional evaluation datasets." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/RewardModelTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed reward-model training." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "description": "The input definition information for an OpenAPI tool as used to configure an agent." + "description": "Request body for creating a managed reward-model training job from a base model." }, - "OpenApiToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments", - "status" - ], - "properties": { - "type": { + "RewardModelTrainingLoss": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", "enum": [ - "openapi_call" + "bradley_terry", + "regression" ] + } + ], + "description": "Loss function used for reward-model training." + }, + "RewardModelTrainingRuntimeConfiguration": { + "type": "object", + "properties": { + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." }, - "name": { - "type": "string", - "description": "The name of the OpenAPI operation being called." + "loss": { + "allOf": [ + { + "$ref": "#/components/schemas/RewardModelTrainingLoss" + } + ], + "description": "Loss function used for reward-model training." }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the tool." + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." }, - "status": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "The status of the tool call." + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "allOf": [ + "description": "Runtime options for managed reward-model training." + }, + "RiskCategory": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "type": "string" + }, + { + "type": "string", + "enum": [ + "HateUnfairness", + "Violence", + "Sexual", + "SelfHarm", + "ProtectedMaterial", + "CodeVulnerability", + "UngroundedAttributes", + "ProhibitedActions", + "SensitiveDataLeakage", + "TaskAdherence" + ] } ], - "description": "An OpenAPI tool call." + "description": "Risk category for the attack objective." }, - "OpenApiToolCallOutput": { + "RlooTrainingConfiguration": { "type": "object", "required": [ - "type", - "call_id", - "name", - "status" + "algorithm", + "reward" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "openapi_call_output" - ] + "rloo" + ], + "description": "Training algorithm, always 'rloo'." }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." + "reward": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Reward signal configuration." }, - "name": { - "type": "string", - "description": "The name of the OpenAPI operation that was called." + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." }, - "output": { + "rollout": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallOutputContent" + "$ref": "#/components/schemas/TrainingRolloutConfiguration" } ], - "description": "The output from the OpenAPI tool call." + "description": "Rollout generation configuration." }, - "status": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "The status of the tool call." + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "The output of an OpenAPI tool call." - }, - "PageOrder": { - "type": "string", - "enum": [ - "asc", - "desc" - ] + "description": "REINFORCE leave-one-out training recipe." }, - "PagedConnection": { + "SASCredentials": { "type": "object", "required": [ - "value" + "type" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Connection" - }, - "description": "The Connection items on this page" + "type": { + "type": "string", + "enum": [ + "SAS" + ], + "description": "The credential type", + "readOnly": true }, - "nextLink": { + "SAS": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "SAS token", + "readOnly": true } }, - "description": "Paged collection of Connection items" + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "Shared Access Signature (SAS) credential definition" }, - "PagedDatasetVersion": { + "SampleType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "EvaluationResultSample" + ] + }, + { + "type": "string" + } + ], + "description": "The type of sample used in the analysis." + }, + "SasCredential": { "type": "object", "required": [ - "value" + "sasUri", + "type" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetVersion" - }, - "description": "The DatasetVersion items on this page" + "sasUri": { + "type": "string", + "description": "SAS uri", + "readOnly": true }, - "nextLink": { + "type": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "enum": [ + "SAS" + ], + "description": "Type of credential", + "readOnly": true } }, - "description": "Paged collection of DatasetVersion items" + "description": "SAS Credential definition" }, - "PagedDeployment": { + "Schedule": { "type": "object", "required": [ - "value" + "id", + "enabled", + "trigger", + "task", + "systemData" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Deployment" - }, - "description": "The Deployment items on this page" + "id": { + "type": "string", + "description": "Identifier of the schedule.", + "readOnly": true }, - "nextLink": { + "displayName": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "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": "Paged collection of Deployment items" + "description": "Schedule model." }, - "PagedEvaluationRule": { + "ScheduleProvisioningStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed" + ] + } + ], + "description": "Schedule provisioning status." + }, + "ScheduleRun": { "type": "object", "required": [ - "value" + "id", + "scheduleId", + "success", + "properties" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationRule" - }, - "description": "The EvaluationRule items on this page" + "id": { + "type": "string", + "description": "Identifier of the schedule run.", + "readOnly": true }, - "nextLink": { + "scheduleId": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "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": "Paged collection of EvaluationRule items" + "description": "Schedule run model." }, - "PagedEvaluationTaxonomy": { + "ScheduleTask": { "type": "object", "required": [ - "value" + "type" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationTaxonomy" - }, - "description": "The EvaluationTaxonomy items on this page" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleTaskType" + } + ], + "description": "Type of the task." }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "configuration": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Configuration for the task." } }, - "description": "Paged collection of EvaluationTaxonomy items" + "discriminator": { + "propertyName": "type", + "mapping": { + "Evaluation": "#/components/schemas/EvaluationScheduleTask", + "Insight": "#/components/schemas/InsightScheduleTask" + } + }, + "description": "Schedule task model." }, - "PagedEvaluatorVersion": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorVersion" - }, - "description": "The EvaluatorVersion items on this page" + "ScheduleTaskType": { + "anyOf": [ + { + "type": "string" }, - "nextLink": { + { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "enum": [ + "Evaluation", + "Insight" + ] } - }, - "description": "Paged collection of EvaluatorVersion items" + ], + "description": "Type of the task." }, - "PagedIndex": { + "ScoredRewardModelColumnMapping": { "type": "object", "required": [ - "value" + "prompt", + "response", + "score" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Index" - }, - "description": "The Index items on this page" + "prompt": { + "type": "string", + "description": "Actual dataset column name containing prompts, for example 'prompt' or 'question'." }, - "nextLink": { + "response": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "Actual dataset column name containing responses, for example 'response' or 'completion'." + }, + "score": { + "type": "string", + "description": "Actual dataset column name containing numeric reward scores, for example 'score' or 'reward'." } }, - "description": "Paged collection of Index items" + "description": "Column mapping for scored reward-model datasets. Keys are logical fields expected by scored reward-model training; values are the exact column names in the referenced dataset asset." }, - "PagedInsight": { + "ScoredRewardModelTrainingDatasetConfiguration": { "type": "object", "required": [ - "value" + "kind", + "train", + "columns" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Insight" - }, - "description": "The Insight items on this page" + "kind": { + "type": "string", + "enum": [ + "scored" + ], + "description": "Reward-model dataset kind, always 'scored'." }, - "nextLink": { + "train": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "Training dataset asset reference." + }, + "eval": { + "type": "string", + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ + { + "$ref": "#/components/schemas/ScoredRewardModelColumnMapping" + } + ], + "description": "Mapping from scored reward-model logical fields to actual dataset column names. Scored reward-model training requires 'prompt', 'response', and 'score'." + }, + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } + ], + "description": "Conversational data formatting options." } }, - "description": "Paged collection of Insight items" + "allOf": [ + { + "$ref": "#/components/schemas/RewardModelTrainingDatasetConfiguration" + } + ], + "description": "Scored response dataset for managed reward-model training." }, - "PagedRedTeam": { + "SftTrainingColumnMapping": { "type": "object", "required": [ - "value" + "messages" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RedTeam" - }, - "description": "The RedTeam items on this page" - }, - "nextLink": { + "messages": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "Actual dataset column name containing chat messages used for supervised fine tuning, for example 'messages' or 'conversation_json'." } }, - "description": "Paged collection of RedTeam items" + "description": "Column mapping for managed SFT datasets. Keys are logical fields expected by SFT; values are the exact column names in the referenced dataset asset. The training dataset must contain chat messages for each training example." }, - "PagedSchedule": { + "SftTrainingConfiguration": { "type": "object", "required": [ - "value" + "algorithm" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schedule" - }, - "description": "The Schedule items on this page" - }, - "nextLink": { + "algorithm": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "enum": [ + "sft" + ], + "description": "Training algorithm, always 'sft'." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, - "description": "Paged collection of Schedule items" + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" + } + ], + "description": "Supervised fine-tuning recipe." }, - "PagedScheduleRun": { + "SftTrainingDatasetConfiguration": { "type": "object", "required": [ - "value" + "train", + "columns" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduleRun" - }, - "description": "The ScheduleRun items on this page" + "train": { + "type": "string", + "description": "Training dataset asset reference." }, - "nextLink": { + "eval": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ + { + "$ref": "#/components/schemas/SftTrainingColumnMapping" + } + ], + "description": "Mapping from SFT logical fields to actual dataset column names. SFT requires the 'messages' logical field." + }, + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } + ], + "description": "Conversational data formatting options." } }, - "description": "Paged collection of ScheduleRun items" + "description": "Dataset configuration for managed supervised fine tuning." }, - "PendingUploadRequest": { + "SftTrainingJob": { "type": "object", "required": [ - "pendingUploadType" + "type", + "dataset" ], "properties": { - "pendingUploadId": { + "type": { "type": "string", - "description": "If PendingUploadId is not provided, a random GUID will be used." + "enum": [ + "sft" + ], + "description": "Managed training job type, always 'sft'." }, - "connectionName": { - "type": "string", - "description": "Azure Storage Account connection name to use for generating temporary SAS token" + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/SftTrainingDatasetConfiguration" + } + ], + "description": "Training and optional evaluation datasets." }, - "pendingUploadType": { - "type": "string", - "enum": [ - "BlobReference" + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/SftTrainingRuntimeConfiguration" + } ], - "description": "BlobReference is the only supported type." + "description": "Runtime options for managed SFT." } }, - "description": "Represents a request for a pending upload." + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingJobCreate" + } + ], + "description": "Request body for creating a managed SFT training job from a base model." }, - "PendingUploadResponse": { + "SftTrainingRuntimeConfiguration": { "type": "object", - "required": [ - "blobReference", - "pendingUploadId", - "pendingUploadType" - ], "properties": { - "blobReference": { + "framework": { "allOf": [ { - "$ref": "#/components/schemas/BlobReference" + "$ref": "#/components/schemas/TrainingFramework" } ], - "description": "Container-level read, write, list SAS." + "description": "Training framework implementation. If omitted, the service selects a compatible framework." }, - "pendingUploadId": { - "type": "string", - "description": "ID for this upload request." + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." }, - "version": { - "type": "string", - "description": "Version of asset to be created if user did not specify version when initially creating upload" + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." }, - "pendingUploadType": { - "type": "string", - "enum": [ - "BlobReference" + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } ], - "description": "BlobReference is the only supported type" + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "description": "Represents the response for a pending upload request" + "description": "Runtime options for managed supervised fine tuning." }, - "PromptAgentDefinition": { + "SharepointGroundingToolCall": { "type": "object", "required": [ - "kind", - "model" + "type", + "call_id", + "arguments", + "status" ], "properties": { - "kind": { + "type": { "type": "string", "enum": [ - "prompt" + "sharepoint_grounding_preview_call" ] }, - "model": { + "call_id": { "type": "string", - "description": "The model deployment to use for this agent." + "description": "The unique ID of the tool call generated by the model." }, - "instructions": { + "arguments": { "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 + "description": "A JSON string of the arguments to pass to the tool." }, - "reasoning": { - "type": "object", + "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Reasoning" + "$ref": "#/components/schemas/ToolCallStatus" } ], - "nullable": true + "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" + ] }, - "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." + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." }, - "tool_choice": { - "anyOf": [ - { - "type": "string" - }, + "output": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/ToolCallOutputContent" } ], - "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." + "description": "The output from the SharePoint grounding tool call." }, - "text": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/PromptAgentDefinitionTextOptions" + "$ref": "#/components/schemas/ToolCallStatus" } ], - "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." + "description": "The status of the tool call." } }, "allOf": [ { - "$ref": "#/components/schemas/AgentDefinition" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "The prompt agent definition" + "description": "The output of a SharePoint grounding tool call." }, - "PromptAgentDefinitionTextOptions": { + "SharepointGroundingToolParameters": { "type": "object", "properties": { - "format": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + "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." + }, + "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": "Configuration options for a text response from the model. Can be plain text or structured JSON data." + "description": "The sharepoint grounding tool parameters." }, - "PromptBasedEvaluatorDefinition": { + "SharepointPreviewTool": { "type": "object", "required": [ "type", - "prompt_text" + "sharepoint_grounding_preview" ], "properties": { "type": { "type": "string", "enum": [ - "prompt" - ] + "sharepoint_grounding_preview" + ], + "description": "The object type, which is always 'sharepoint_grounding_preview'." }, - "prompt_text": { + "name": { "type": "string", - "description": "The prompt text used for evaluation" + "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/EvaluatorDefinition" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "Prompt-based evaluator" + "description": "The input definition information for a sharepoint tool as used to configure an agent." }, - "ProtocolVersionRecord": { + "SimPoTrainingConfiguration": { "type": "object", "required": [ - "protocol", - "version" + "algorithm" ], "properties": { - "protocol": { + "algorithm": { + "type": "string", + "enum": [ + "simpo" + ], + "description": "Training algorithm, always 'simpo'." + }, + "lora": { "allOf": [ { - "$ref": "#/components/schemas/AgentProtocol" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "The protocol type." + "description": "LoRA adapter configuration." }, - "version": { - "type": "string", - "description": "The version string for the protocol, e.g. 'v0.1.1'." + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, - "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." + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" } - }, - "description": "Configuration for Responsible AI (RAI) content filtering and safety features." + ], + "description": "Simple preference optimization training recipe." }, - "RecurrenceSchedule": { + "SkillObject": { "type": "object", "required": [ - "type" + "object", + "skill_id", + "has_blob", + "name" ], "properties": { - "type": { + "object": { "allOf": [ { - "$ref": "#/components/schemas/RecurrenceType" + "$ref": "#/components/schemas/SkillObjectType" } ], - "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": "The object type, which is always 'skill'.", + "default": "skill" + }, + "skill_id": { + "type": "string", + "description": "The unique identifier of the skill." + }, + "has_blob": { + "type": "boolean", + "description": "Whether the skill was created from a GZip 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 key-value pairs associated with the skill." } }, - "description": "Recurrence schedule model." + "description": "A skill object." }, - "RecurrenceTrigger": { + "SkillObjectType": { + "type": "string", + "enum": [ + "skill", + "skill.deleted" + ], + "description": "The object type of a skill resource." + }, + "Sku": { "type": "object", "required": [ - "type", - "interval", - "schedule" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "Recurrence" - ], - "description": "Type of the trigger." + "capacity", + "family", + "name", + "size", + "tier" + ], + "properties": { + "capacity": { + "type": "integer", + "format": "int64", + "description": "Sku capacity" }, - "startTime": { + "family": { "type": "string", - "description": "Start time for the recurrence schedule in ISO 8601 format." + "description": "Sku family" }, - "endTime": { + "name": { "type": "string", - "description": "End time for the recurrence schedule in ISO 8601 format." + "description": "Sku name" }, - "timeZone": { + "size": { "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" + "description": "Sku size" }, - { + "tier": { "type": "string", - "enum": [ - "Hourly", - "Daily", - "Weekly", - "Monthly" - ] + "description": "Sku tier" } - ], - "description": "Recurrence type." + }, + "description": "Sku information" }, - "RedTeam": { + "StructuredInputDefinition": { "type": "object", - "required": [ - "id", - "target" - ], "properties": { - "id": { - "type": "string", - "description": "Identifier of the red team run.", - "readOnly": true - }, - "displayName": { + "description": { "type": "string", - "description": "Name of the red-team run." + "description": "A human-readable description of the input." }, - "numTurns": { - "type": "integer", - "format": "int32", - "description": "Number of simulation rounds." + "default_value": { + "description": "The default value for the input if no run-time value is provided." }, - "attackStrategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttackStrategy" - }, - "description": "List of attack strategies or nested lists of attack strategies." + "schema": { + "type": "object", + "additionalProperties": {}, + "description": "The JSON schema for the structured input (optional)." }, - "simulationOnly": { + "required": { "type": "boolean", - "description": "Simulation-only or Simulation + Evaluation. Default false, if true the scan outputs conversation not evaluation result.", + "description": "Whether the input property is required when the agent is invoked.", "default": false - }, - "riskCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RiskCategory" - }, - "description": "List of risk categories to generate attack objectives for." - }, - "applicationScenario": { + } + }, + "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": "Application scenario for the red team operation, to generate scenario specific attacks." + "description": "The name of the structured output." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Red team's tags. Unlike properties, tags are fully mutable." + "description": { + "type": "string", + "description": "A description of the output to emit. Used by the model to determine when to emit the output." }, - "properties": { + "schema": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Red team's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed." + "additionalProperties": {}, + "description": "The JSON schema for the structured output." }, - "status": { + "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", - "description": "Status of the red-team. It is set by service and is read-only.", - "readOnly": true + "enum": [ + "structured_outputs" + ] }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/TargetConfig" - } - ], - "description": "Target configuration for the red-team run." + "output": { + "description": "The structured output captured during the response." } }, - "description": "Red team details." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ] }, - "RedTeamEvalRunDataSource": { + "SyntheticDataGenerationPreviewEvalRunDataSource": { "type": "object", "required": [ "type", @@ -36318,14 +46036,14 @@ "type": { "type": "string", "enum": [ - "azure_ai_red_team" + "azure_ai_synthetic_data_gen_preview" ], - "description": "The type of data source. Always `azure_ai_red_team`." + "description": "The type of data source, always `azure_ai_synthetic_data_gen_preview`." }, "item_generation_params": { "allOf": [ { - "$ref": "#/components/schemas/ItemGenerationParams" + "$ref": "#/components/schemas/SyntheticDataGenerationPreviewItemGenerationParams" } ], "description": "The parameters for item generation." @@ -36337,41 +46055,67 @@ } ], "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." }, - "RedTeamItemGenerationParams": { + "SyntheticDataGenerationPreviewItemGenerationParams": { "type": "object", "required": [ "type", - "attack_strategies", - "num_turns" + "samples_count", + "model_deployment_name", + "sources" ], "properties": { "type": { "type": "string", "enum": [ - "red_team" + "synthetic_data_gen_preview" ], "description": "The type of item generation parameters." }, - "attack_strategies": { + "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/AttackStrategy" + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" }, - "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 + "description": "The optional seed data content source files for data generation." } }, "allOf": [ @@ -36380,123 +46124,92 @@ } ] }, - "RedTeamSeedPromptsItemGenerationParams": { + "SystemData": { "type": "object", - "required": [ - "type", - "attack_strategies", - "num_turns", - "source" - ], "properties": { - "type": { + "created_by": { "type": "string", - "enum": [ - "red_team_seed_prompts" + "description": "The identity that created the resource.", + "readOnly": true + }, + "created_by_type": { + "type": "string", + "description": "The type of identity that created the resource.", + "readOnly": true + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } ], - "description": "The type of item generation parameters, always `red_team_seed_prompts`." + "description": "The timestamp of resource creation (UTC).", + "readOnly": true }, - "attack_strategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttackStrategy" - }, - "description": "The collection of attack strategies to be used." + "last_modified_by": { + "type": "string", + "description": "The identity that last modified the resource.", + "readOnly": true }, - "num_turns": { - "type": "integer", - "format": "int32", - "description": "The number of turns allowed in the game.", - "default": 20 + "last_modified_by_type": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "readOnly": true }, - "source": { + "last_modified_at": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "The source of JSONL content to be processed." + "description": "The timestamp of resource last modification (UTC).", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ], - "description": "Represents the parameters for red team seed prompts item generation." + "description": "Metadata pertaining to creation and last modification of the resource." }, - "RedTeamTaxonomyItemGenerationParams": { + "Target": { "type": "object", "required": [ - "type", - "attack_strategies", - "num_turns", - "source" + "type" ], "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." + "description": "The type of target." } }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" + "discriminator": { + "propertyName": "type", + "mapping": { + "azure_ai_model": "#/components/schemas/AzureAIModelTarget", + "azure_ai_agent": "#/components/schemas/AzureAIAgentTarget" } - ], - "description": "Represents the parameters for red team taxonomy item generation." + }, + "description": "Base class for targets with discriminator support." }, - "ResponseRetrievalItemGenerationParams": { + "TargetCompletionEvalRunDataSource": { "type": "object", "required": [ "type", - "max_num_turns", - "data_mapping", - "source" + "source", + "target" ], "properties": { "type": { "type": "string", "enum": [ - "response_retrieval" + "azure_ai_target_completions" ], - "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." + "description": "The type of data source, always `azure_ai_target_completions`." }, - "data_mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Mapping from source fields to response_id field, required for retrieving chat history." + "input_messages": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "Input messages configuration." }, "source": { "anyOf": [ @@ -36507,40 +46220,25 @@ "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" } ], - "description": "The source from which JSONL content is read." + "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/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" - ] + "$ref": "#/components/schemas/EvalRunDataSource" } ], - "description": "Risk category for the attack objective." + "description": "Represents a data source for target-based completion evaluation configuration." }, - "SASCredentials": { + "TargetConfig": { "type": "object", "required": [ "type" @@ -36548,1017 +46246,1134 @@ "properties": { "type": { "type": "string", - "enum": [ - "SAS" - ], - "description": "The credential type", - "readOnly": true - }, - "SAS": { - "type": "string", - "description": "SAS token", - "readOnly": true + "description": "Type of the model configuration." } }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "Shared Access Signature (SAS) credential definition" - }, - "SampleType": { - "anyOf": [ - { - "type": "string", - "enum": [ - "EvaluationResultSample" - ] - }, - { - "type": "string" + "discriminator": { + "propertyName": "type", + "mapping": { + "AzureOpenAIModel": "#/components/schemas/AzureOpenAIModelConfiguration" } - ], - "description": "The type of sample used in the analysis." + }, + "description": "Abstract class for target configuration." }, - "SasCredential": { + "TargetUpdate": { "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": "The type of target." } }, - "description": "SAS Credential definition" + "discriminator": { + "propertyName": "type", + "mapping": { + "azure_ai_model": "#/components/schemas/AzureAIModelTargetUpdate", + "azure_ai_agent": "#/components/schemas/AzureAIAgentTargetUpdate" + } + }, + "description": "Base class for targets with discriminator support." }, - "Schedule": { + "TaxonomyCategory": { "type": "object", "required": [ "id", - "enabled", - "trigger", - "task", - "systemData" + "name", + "riskCategory", + "subCategories" ], "properties": { "id": { "type": "string", - "description": "Identifier of the schedule.", - "readOnly": true + "description": "Unique identifier of the taxonomy category." }, - "displayName": { + "name": { "type": "string", - "description": "Name of the schedule." + "description": "Name of the taxonomy category." }, "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." + "description": "Description of the taxonomy category." }, - "task": { + "riskCategory": { "allOf": [ { - "$ref": "#/components/schemas/ScheduleTask" + "$ref": "#/components/schemas/RiskCategory" } ], - "description": "Task for the schedule." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Schedule's tags. Unlike properties, tags are fully mutable." + "description": "Risk category associated with this taxonomy category." }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" + "subCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomySubCategory" }, - "description": "Schedule's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed." + "description": "List of taxonomy sub categories." }, - "systemData": { + "properties": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "System metadata for the resource.", - "readOnly": true + "description": "Additional properties for the taxonomy category." } }, - "description": "Schedule model." - }, - "ScheduleProvisioningStatus": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "Creating", - "Updating", - "Deleting", - "Succeeded", - "Failed" - ] - } - ], - "description": "Schedule provisioning status." + "description": "Taxonomy category definition." }, - "ScheduleRun": { + "TaxonomySubCategory": { "type": "object", "required": [ "id", - "scheduleId", - "success", - "properties" + "name", + "enabled" ], "properties": { "id": { "type": "string", - "description": "Identifier of the schedule run.", - "readOnly": true + "description": "Unique identifier of the taxonomy sub-category." }, - "scheduleId": { + "name": { "type": "string", - "description": "Identifier of the schedule." - }, - "success": { - "type": "boolean", - "description": "Trigger success status of the schedule run.", - "readOnly": true + "description": "Name of the taxonomy sub-category." }, - "triggerTime": { + "description": { "type": "string", - "description": "Trigger time of the schedule run." + "description": "Description of the taxonomy sub-category." }, - "error": { - "type": "string", - "description": "Error information for the schedule run.", - "readOnly": true + "enabled": { + "type": "boolean", + "description": "List of taxonomy items under this sub-category." }, "properties": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Properties of the schedule run.", - "readOnly": true + "description": "Additional properties for the taxonomy sub-category." } }, - "description": "Schedule run model." + "description": "Taxonomy sub-category definition." }, - "ScheduleTask": { + "TensorFlowDistribution": { "type": "object", "required": [ - "type" + "distribution_type" ], "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleTaskType" - } + "distribution_type": { + "type": "string", + "enum": [ + "tensorflow" ], - "description": "Type of the task." + "description": "Specifies the type of distribution framework." }, - "configuration": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Configuration for the task." + "worker_count": { + "type": "integer", + "format": "int32", + "description": "Number of workers. If not specified, will default to the instance count." + }, + "parameter_server_count": { + "type": "integer", + "format": "int32", + "description": "Number of parameter server tasks." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "Evaluation": "#/components/schemas/EvaluationScheduleTask", - "Insight": "#/components/schemas/InsightScheduleTask" + "allOf": [ + { + "$ref": "#/components/schemas/DistributionConfiguration" } - }, - "description": "Schedule task model." + ], + "description": "TensorFlow distribution configuration." }, - "ScheduleTaskType": { + "ToolCallOutputContent": { "anyOf": [ + { + "type": "object", + "additionalProperties": {} + }, { "type": "string" }, { - "type": "string", - "enum": [ - "Evaluation", - "Insight" - ] + "type": "array", + "items": {} } ], - "description": "Type of the task." + "description": "The output content from a tool call, which can be a dictionary, string, or array." }, - "SharepointGroundingToolCall": { + "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": [ - "type", - "call_id", - "arguments", - "status" + "project_connection_id" ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "sharepoint_grounding_preview_call" - ] + "description": "Optional user-defined name for this tool or configuration." }, - "call_id": { + "description": { "type": "string", - "description": "The unique ID of the tool call generated by the model." + "description": "Optional user-defined description for this tool or configuration." }, - "arguments": { + "project_connection_id": { "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." + "description": "A project connection in a ToolProjectConnectionList attached to this tool." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A SharePoint grounding tool call." + "description": "A project connection resource." }, - "SharepointGroundingToolCallOutput": { + "ToolsetObject": { "type": "object", "required": [ - "type", - "call_id", - "status" + "object", + "id", + "created_at", + "updated_at", + "name", + "tools" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "sharepoint_grounding_preview_call_output" - ] + "toolset" + ], + "description": "The object type, which is always 'toolset'." }, - "call_id": { + "id": { "type": "string", - "description": "The unique ID of the tool call generated by the model." + "description": "The unique identifier of the toolset." }, - "output": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallOutputContent" - } - ], - "description": "The output from the SharePoint grounding tool call." + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (seconds) when the toolset was created." + }, + "updated_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (seconds) when the toolset was last updated." }, - "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": { "name": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "maxLength": 256, + "description": "The name of the toolset." }, "description": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "maxLength": 512, + "description": "A human-readable description of the toolset." }, - "project_connections": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the toolset." + }, + "tools": { "type": "array", "items": { - "$ref": "#/components/schemas/ToolProjectConnection" + "$ref": "#/components/schemas/OpenAI.Tool" }, - "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 list of tools contained in this toolset." } }, - "description": "The sharepoint grounding tool parameters." + "description": "A toolset that stores reusable tool definitions for agents." }, - "SharepointPreviewTool": { + "TracesPreviewEvalRunDataSource": { "type": "object", "required": [ - "type", - "sharepoint_grounding_preview" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "sharepoint_grounding_preview" + "azure_ai_traces_preview" ], - "description": "The object type, which is always 'sharepoint_grounding_preview'." + "description": "The type of data source, always `azure_ai_traces_preview`." }, - "name": { + "trace_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Collection of Agent trace identifiers that should be evaluated." + }, + "agent_id": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "The agent ID used to filter traces for evaluation." }, - "description": { + "agent_name": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "description": "The agent name used to filter traces for evaluation." }, - "sharepoint_grounding_preview": { - "allOf": [ - { - "$ref": "#/components/schemas/SharepointGroundingToolParameters" - } - ], - "description": "The sharepoint grounding tool parameters." + "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": { + "type": "integer", + "format": "unixtime", + "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/OpenAI.Tool" + "$ref": "#/components/schemas/EvalRunDataSource" } ], - "description": "The input definition information for a sharepoint tool as used to configure an agent." + "description": "Represents a data source for evaluation runs that operate over Agent traces stored in Application Insights." }, - "SkillObject": { + "TrainingAlgorithm": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "sft", + "dpo", + "kto", + "orpo", + "cpo", + "simpo", + "grpo", + "ppo", + "rloo", + "reinforce_pp", + "reward_model" + ] + } + ], + "description": "Training algorithm used by a declarative training job." + }, + "TrainingBuiltinRewardConfiguration": { "type": "object", "required": [ - "object", - "skill_id", - "has_blob", - "name" + "kind", + "type" ], "properties": { - "object": { + "kind": { + "type": "string", + "enum": [ + "builtin" + ], + "description": "Reward or judge signal kind, always 'builtin'." + }, + "type": { "allOf": [ { - "$ref": "#/components/schemas/SkillObjectType" + "$ref": "#/components/schemas/TrainingBuiltinRewardType" } ], - "description": "The object type, which is always 'skill'.", - "default": "skill" - }, - "skill_id": { - "type": "string", - "description": "The unique identifier of the skill." - }, - "has_blob": { - "type": "boolean", - "description": "Whether the skill was created from a GZip 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." + "description": "Built-in reward or verifier type." }, - "metadata": { + "configuration": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Set of key-value pairs associated with the skill." + "additionalProperties": {}, + "description": "Optional verifier configuration." } }, - "description": "A skill object." + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Built-in reward or verifier used as a judge." }, - "SkillObjectType": { - "type": "string", - "enum": [ - "skill", - "skill.deleted" + "TrainingBuiltinRewardType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "exact_match", + "regex", + "math_equivalence", + "unit_tests" + ] + } ], - "description": "The object type of a skill resource." + "description": "Built-in reward or verifier type." }, - "Sku": { + "TrainingColumnMapping": { "type": "object", - "required": [ - "capacity", - "family", - "name", - "size", - "tier" - ], "properties": { - "capacity": { - "type": "integer", - "format": "int64", - "description": "Sku capacity" + "prompt": { + "type": "string", + "description": "Column containing prompts." }, - "family": { + "chosen": { "type": "string", - "description": "Sku family" + "description": "Column containing chosen responses for preference training." }, - "name": { + "rejected": { "type": "string", - "description": "Sku name" + "description": "Column containing rejected responses for preference training." }, - "size": { + "reference": { "type": "string", - "description": "Sku size" + "description": "Column containing reference answers or reward context." }, - "tier": { + "messages": { "type": "string", - "description": "Sku tier" + "description": "Column containing chat messages." + }, + "response": { + "type": "string", + "description": "Column containing responses for KTO or scored reward-model training." + }, + "label": { + "type": "string", + "description": "Column containing binary desirability labels for KTO training." + }, + "score": { + "type": "string", + "description": "Column containing numeric reward scores for scored reward-model training." } }, - "description": "Sku information" + "description": "Mapping from logical training fields to columns in the dataset." }, - "StructuredInputDefinition": { + "TrainingCompositeRewardConfiguration": { "type": "object", + "required": [ + "kind", + "rewards" + ], "properties": { - "description": { + "kind": { "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)." + "enum": [ + "composite" + ], + "description": "Reward or judge signal kind, always 'composite'." }, - "required": { - "type": "boolean", - "description": "Whether the input property is required when the agent is invoked.", - "default": false + "rewards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrainingWeightedRewardConfiguration" + }, + "description": "Weighted reward signals to combine." } }, - "description": "An structured input that can participate in prompt template substitutions and tool argument binding." + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Composite reward or judge made from multiple weighted reward signals." }, - "StructuredOutputDefinition": { + "TrainingConfiguration": { "type": "object", "required": [ - "name", - "description", - "schema", - "strict" + "algorithm", + "model", + "dataset" ], "properties": { - "name": { + "algorithm": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingAlgorithm" + } + ], + "description": "Training algorithm." + }, + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework for the algorithm and records the resolved framework on the job." + }, + "resolved_framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework resolved by the service.", + "readOnly": true + }, + "framework_version": { "type": "string", - "description": "The name of the structured output." + "description": "Version of the resolved training framework used by the service.", + "readOnly": true }, - "description": { + "model": { "type": "string", - "description": "A description of the output to emit. Used by the model to determine when to emit the output." + "description": "Base model asset reference." }, - "schema": { + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDatasetConfiguration" + } + ], + "description": "Training and optional evaluation datasets." + }, + "hyperparameters": { "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": "Algorithm-specific hyperparameters. Strongly typed SDK helpers may project common hyperparameters into richer language-specific types." } }, - "description": "A structured output that can be produced by the agent." + "discriminator": { + "propertyName": "algorithm", + "mapping": { + "sft": "#/components/schemas/SftTrainingConfiguration", + "dpo": "#/components/schemas/DpoTrainingConfiguration", + "kto": "#/components/schemas/KtoTrainingConfiguration", + "orpo": "#/components/schemas/OrpoTrainingConfiguration", + "cpo": "#/components/schemas/CpoTrainingConfiguration", + "simpo": "#/components/schemas/SimPoTrainingConfiguration", + "grpo": "#/components/schemas/GrpoTrainingConfiguration", + "ppo": "#/components/schemas/PpoTrainingConfiguration", + "rloo": "#/components/schemas/RlooTrainingConfiguration", + "reinforce_pp": "#/components/schemas/ReinforcePpTrainingConfiguration", + "reward_model": "#/components/schemas/RewardModelTrainingConfiguration" + } + }, + "description": "Declarative training recipe. When specified, command must be omitted and environment_image_reference is optional." }, - "StructuredOutputsOutputItem": { + "TrainingDataFormatConfiguration": { "type": "object", - "required": [ - "type", - "output" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "structured_outputs" - ] + "chat_template": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatTemplate" + } + ], + "description": "Built-in chat template to apply to the dataset." }, - "output": { - "description": "The structured output captured during the response." + "chat_template_path": { + "type": "string", + "description": "Path to a custom chat template relative to the job's code directory." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ] + "description": "Formatting options for conversational training data." }, - "SyntheticDataGenerationPreviewEvalRunDataSource": { + "TrainingDatasetConfiguration": { "type": "object", "required": [ - "type", - "item_generation_params", - "target" + "train" ], "properties": { - "type": { + "train": { "type": "string", - "enum": [ - "azure_ai_synthetic_data_gen_preview" - ], - "description": "The type of data source, always `azure_ai_synthetic_data_gen_preview`." + "description": "Training dataset asset reference." }, - "item_generation_params": { - "allOf": [ - { - "$ref": "#/components/schemas/SyntheticDataGenerationPreviewItemGenerationParams" - } - ], - "description": "The parameters for item generation." + "eval": { + "type": "string", + "description": "Optional evaluation dataset asset reference." }, - "target": { + "columns": { "allOf": [ { - "$ref": "#/components/schemas/Target" + "$ref": "#/components/schemas/TrainingColumnMapping" } ], - "description": "The target configuration for the evaluation." + "description": "Mapping from training fields to dataset columns." }, - "input_messages": { + "data_format": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" } ], - "description": "Input messages template configuration applicable only if target is of type 'azure_ai_model'" + "description": "Conversational data formatting options." } }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a data source for evaluation runs that evaluates based on generated synthetic data for testing purposes." + "description": "Dataset configuration for a declarative training job." }, - "SyntheticDataGenerationPreviewItemGenerationParams": { + "TrainingDeploymentRewardConfiguration": { "type": "object", "required": [ - "type", - "samples_count", - "model_deployment_name", - "sources" + "kind", + "deployment" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "synthetic_data_gen_preview" + "deployment" ], - "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." + "description": "Reward or judge signal kind, always 'deployment'." }, - "model_deployment_name": { - "type": "string", - "description": "The name of the model deployment to use for generating synthetic data." - }, - "output_dataset_name": { + "deployment": { "type": "string", - "description": "The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically." + "description": "Model deployment name or resource reference used as the judge." }, - "output_dataset_id": { + "rubric": { "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." + "description": "Rubric or scoring instruction for the judge deployment." } }, "allOf": [ { - "$ref": "#/components/schemas/ItemGenerationParams" + "$ref": "#/components/schemas/TrainingRewardConfiguration" } - ] + ], + "description": "Model deployment used as an LLM judge." }, - "Target": { + "TrainingEntryPointReference": { "type": "object", "required": [ - "type" + "entry_point" ], "properties": { - "type": { + "entry_point": { "type": "string", - "description": "The type of target." + "description": "Path to the Python callable in module/file.py:function format." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "azure_ai_model": "#/components/schemas/AzureAIModelTarget", - "azure_ai_agent": "#/components/schemas/AzureAIAgentTarget" + "description": "Reference to a Python callable relative to the job's code directory." + }, + "TrainingEvalBenchmark": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "gsm8k", + "mmlu", + "humaneval", + "mbpp", + "arc", + "hellaswag" + ] + } + ], + "description": "Built-in evaluation benchmark." + }, + "TrainingEvalConfiguration": { + "type": "object", + "properties": { + "benchmark": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalBenchmark" + } + ], + "description": "Named built-in benchmark. Mutually exclusive with dataset." + }, + "dataset": { + "type": "string", + "description": "Custom evaluation dataset asset reference. Mutually exclusive with benchmark." + }, + "every_n_steps": { + "type": "integer", + "format": "int32", + "description": "Evaluation frequency in training steps. Omit for end-of-training only." } }, - "description": "Base class for targets with discriminator support." + "description": "Evaluation configuration for a declarative training job." }, - "TargetCompletionEvalRunDataSource": { + "TrainingEvaluatorRewardConfiguration": { "type": "object", "required": [ - "type", - "source", - "target" + "kind", + "evaluator" ], "properties": { - "type": { + "kind": { "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" - } + "evaluator" ], - "description": "Input messages configuration." + "description": "Reward or judge signal kind, always 'evaluator'." }, - "source": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - } - ], - "description": "The source configuration for inline or file data." + "evaluator": { + "type": "string", + "description": "Evaluator asset reference." }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "The target configuration for the evaluation." + "input_mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Optional evaluator input mapping." } }, "allOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "$ref": "#/components/schemas/TrainingRewardConfiguration" } ], - "description": "Represents a data source for target-based completion evaluation configuration." + "description": "Foundry evaluator used as a judge." }, - "TargetConfig": { + "TrainingFramework": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "trl", + "verl", + "open_rlhf", + "nemo_rl", + "slime", + "torch_forge" + ] + } + ], + "description": "Training framework used to lower a declarative training job into an execution command." + }, + "TrainingFunctionRewardConfiguration": { "type": "object", "required": [ - "type" + "kind", + "function" ], "properties": { - "type": { + "kind": { "type": "string", - "description": "Type of the model configuration." + "enum": [ + "function" + ], + "description": "Reward or judge signal kind, always 'function'." + }, + "function": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEntryPointReference" + } + ], + "description": "Python callable used to compute reward scores." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "AzureOpenAIModel": "#/components/schemas/AzureOpenAIModelConfiguration" + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" } - }, - "description": "Abstract class for target configuration." + ], + "description": "Python callable used as a judge." }, - "TargetUpdate": { + "TrainingInlineFunctionConfiguration": { "type": "object", "required": [ - "type" + "def" ], "properties": { - "type": { + "def": { "type": "string", - "description": "The type of target." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "azure_ai_model": "#/components/schemas/AzureAIModelTargetUpdate", - "azure_ai_agent": "#/components/schemas/AzureAIAgentTargetUpdate" + "description": "Python function definition." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingInlineFunctionRuntime" + } + ], + "description": "Runtime dependencies for the inline function." } }, - "description": "Base class for targets with discriminator support." + "description": "Inline Python function definition for custom training logic." }, - "TaxonomyCategory": { + "TrainingInlineFunctionRewardConfiguration": { "type": "object", "required": [ - "id", - "name", - "riskCategory", - "subCategories" + "kind", + "inline_function" ], "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the taxonomy category." - }, - "name": { - "type": "string", - "description": "Name of the taxonomy category." - }, - "description": { + "kind": { "type": "string", - "description": "Description of the taxonomy category." + "enum": [ + "inline_function" + ], + "description": "Reward or judge signal kind, always 'inline_function'." }, - "riskCategory": { + "inline_function": { "allOf": [ { - "$ref": "#/components/schemas/RiskCategory" + "$ref": "#/components/schemas/TrainingInlineFunctionConfiguration" } ], - "description": "Risk category associated with this taxonomy category." - }, - "subCategories": { + "description": "Inline Python function used to compute reward scores." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Inline Python function used as a judge." + }, + "TrainingInlineFunctionRuntime": { + "type": "object", + "properties": { + "pip": { "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": "Pip packages to install before invoking the inline function." } }, - "description": "Taxonomy category definition." + "description": "Python runtime dependencies for an inline function." }, - "TaxonomySubCategory": { - "type": "object", - "required": [ - "id", - "name", - "enabled" + "TrainingJobInclude": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "latest_attempt", + "input_datasets", + "output_datasets", + "execution_definition", + "resolved_specification", + "parameters", + "settings", + "services", + "log_files", + "job_cost", + "compute_request", + "compute" + ] + } ], + "description": "Optional related training job data to include in a get response." + }, + "TrainingJobService": { + "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the taxonomy sub-category." + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/JobServiceType" + } + ], + "description": "Service type.", + "readOnly": true }, - "name": { - "type": "string", - "description": "Name of the taxonomy sub-category." + "port": { + "type": "integer", + "format": "int32", + "description": "Service port.", + "readOnly": true }, - "description": { + "status": { "type": "string", - "description": "Description of the taxonomy sub-category." + "description": "Service status.", + "readOnly": true }, - "enabled": { - "type": "boolean", - "description": "List of taxonomy items under this sub-category." + "error": { + "type": "object", + "additionalProperties": {}, + "description": "Terminal error for the service, if any.", + "readOnly": true + }, + "endpoint": { + "type": "string", + "format": "uri", + "description": "Service endpoint URI.", + "readOnly": true }, "properties": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Additional properties for the taxonomy sub-category." + "description": "Additional service properties.", + "readOnly": true } }, - "description": "Taxonomy sub-category definition." + "description": "Service endpoint details for a training job." }, - "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": { + "TrainingJobServiceCollection": { "type": "object", + "required": [ + "services" + ], "properties": { - "name": { - "type": "string", - "description": "The name of the tool." - }, - "description": { - "type": "string", - "description": "A brief description of the tool's purpose." + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TrainingJobService" + }, + "description": "Services keyed by service name.", + "readOnly": true } }, - "description": "Description of a tool that can be used by an agent." + "description": "Services exposed by a training job." }, - "ToolProjectConnection": { + "TrainingLoraConfiguration": { "type": "object", "required": [ - "project_connection_id" + "rank" ], "properties": { - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "rank": { + "type": "integer", + "format": "int32", + "description": "Low-rank dimension." }, - "description": { - "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "alpha": { + "type": "integer", + "format": "int32", + "description": "LoRA scaling factor.", + "default": 16 }, - "project_connection_id": { + "dropout": { + "type": "number", + "format": "double", + "description": "Dropout applied to adapter inputs.", + "default": 0.05 + }, + "target_modules": { "type": "string", - "description": "A project connection in a ToolProjectConnectionList attached to this tool." + "description": "Linear layers that receive adapters. Use 'auto' to let the framework choose defaults.", + "default": "auto" + }, + "quantize": { + "type": "boolean", + "description": "Whether to enable QLoRA 4-bit base weight loading.", + "default": false } }, - "description": "A project connection resource." + "description": "LoRA adapter configuration for parameter-efficient fine tuning." }, - "ToolsetObject": { + "TrainingModelRewardConfiguration": { "type": "object", "required": [ - "object", - "id", - "created_at", - "updated_at", - "name", - "tools" + "kind", + "model" ], "properties": { - "object": { + "kind": { "type": "string", "enum": [ - "toolset" + "model" ], - "description": "The object type, which is always 'toolset'." - }, - "id": { - "type": "string", - "description": "The unique identifier of the toolset." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (seconds) when the toolset was created." - }, - "updated_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (seconds) when the toolset was last updated." - }, - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the toolset." + "description": "Reward or judge signal kind, always 'model'." }, - "description": { + "model": { "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolset." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the toolset." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools contained in this toolset." + "description": "Reward model asset reference used to compute scores." } }, - "description": "A toolset that stores reusable tool definitions for agents." + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Learned reward model used as a judge." }, - "TracesPreviewEvalRunDataSource": { + "TrainingRewardConfiguration": { "type": "object", "required": [ - "type" + "kind" ], "properties": { - "type": { + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardKind" + } + ], + "description": "Reward or judge signal kind." + } + }, + "discriminator": { + "propertyName": "kind", + "mapping": { + "model": "#/components/schemas/TrainingModelRewardConfiguration", + "function": "#/components/schemas/TrainingFunctionRewardConfiguration", + "inline_function": "#/components/schemas/TrainingInlineFunctionRewardConfiguration", + "builtin": "#/components/schemas/TrainingBuiltinRewardConfiguration", + "evaluator": "#/components/schemas/TrainingEvaluatorRewardConfiguration", + "deployment": "#/components/schemas/TrainingDeploymentRewardConfiguration", + "composite": "#/components/schemas/TrainingCompositeRewardConfiguration" + } + }, + "description": "Reward or judge signal configuration for reinforcement or reward model training." + }, + "TrainingRewardKind": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", "enum": [ - "azure_ai_traces_preview" + "model", + "function", + "inline_function", + "builtin", + "evaluator", + "deployment", + "composite" + ] + } + ], + "description": "Reward or judge signal kind." + }, + "TrainingRolloutConfiguration": { + "type": "object", + "required": [ + "engine" + ], + "properties": { + "engine": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutEngine" + } ], - "description": "The type of data source, always `azure_ai_traces_preview`." + "description": "Rollout inference engine." }, - "trace_ids": { + "num_generations": { + "type": "integer", + "format": "int32", + "description": "Number of completions to generate for each prompt." + }, + "max_prompt_length": { + "type": "integer", + "format": "int32", + "description": "Maximum prompt length in tokens." + }, + "max_completion_length": { + "type": "integer", + "format": "int32", + "description": "Maximum completion length in tokens." + }, + "temperature": { + "type": "number", + "format": "double", + "description": "Sampling temperature for rollout generation." + }, + "top_p": { + "type": "number", + "format": "double", + "description": "Nucleus sampling probability for rollout generation." + }, + "stop": { "type": "array", "items": { "type": "string" }, - "description": "Collection of Agent trace identifiers that should be evaluated." - }, - "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." + "description": "Stop sequences for rollout generation." }, - "lookback_hours": { + "batch_size": { "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": { - "type": "integer", - "format": "unixtime", - "description": "Unix timestamp (in seconds) marking the end of the trace query window. Defaults to the current time." + "description": "Rollout batch size." }, - "max_traces": { + "seed": { "type": "integer", "format": "int32", - "description": "Sampling limit applied to traces retrieved for evaluation.", - "default": 1000 + "description": "Random seed for rollout generation." }, - "ingestion_delay_seconds": { + "tensor_parallel_size": { "type": "integer", "format": "int32", - "description": "The delay to apply for ingestion when querying traces.", - "default": 300 + "description": "Tensor parallel size used by the rollout engine.", + "default": 1 + }, + "gpu_memory_utilization": { + "type": "number", + "format": "double", + "description": "GPU memory utilization target for the rollout engine, between 0.0 and 1.0." } }, - "allOf": [ + "description": "Rollout generation configuration for online reinforcement learning." + }, + "TrainingRolloutEngine": { + "anyOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "type": "string" + }, + { + "type": "string", + "enum": [ + "vllm", + "sglang", + "hf", + "megatron_inference" + ] } ], - "description": "Represents a data source for evaluation runs that operate over Agent traces stored in Application Insights." + "description": "Inference engine used for rollout generation during online reinforcement learning." + }, + "TrainingWeightedRewardConfiguration": { + "type": "object", + "required": [ + "reward" + ], + "properties": { + "reward": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Reward signal." + }, + "weight": { + "type": "number", + "format": "double", + "description": "Weight applied to this reward signal.", + "default": 1 + } + }, + "description": "Weighted reward signal used in a composite judge." }, "TreatmentEffectType": { "anyOf": [ 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 4d2fd9278d8d..5191ef0fe4aa 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 @@ -5,6 +5,24 @@ "version": "virtual-public-preview" }, "tags": [ + { + "name": "MLflow Experiments" + }, + { + "name": "MLflow Runs" + }, + { + "name": "MLflow Metrics" + }, + { + "name": "MLflow Artifacts" + }, + { + "name": "MLflow Registered Models" + }, + { + "name": "MLflow Model Versions" + }, { "name": "Agents" }, @@ -44,6 +62,9 @@ { "name": "Memory Stores" }, + { + "name": "Models" + }, { "name": "Conversations" }, @@ -67,6 +88,9 @@ }, { "name": "Toolsets" + }, + { + "name": "TrainingJobs" } ], "paths": { @@ -7105,108 +7129,46 @@ } } }, - "/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" - } - } - } - } - }, + "/mlflow/api/2.0/mlflow/artifacts/list": { "get": { - "operationId": "listConversations", - "description": "Returns the list of all conversations.", + "operationId": "Artifacts_list", + "description": "List MLflow artifacts.", "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", + "name": "run_id", "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": "MLflow run identifier.", "schema": { "type": "string" }, "explode": false }, { - "name": "before", + "name": "run_uuid", "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.", + "description": "MLflow run UUID.", "schema": { "type": "string" }, "explode": false }, { - "name": "agent_name", + "name": "path", "in": "query", "required": false, - "description": "Filter by agent name. If provided, only items associated with the specified agent will be returned.", + "description": "Artifact path to list.", "schema": { "type": "string" }, "explode": false }, { - "name": "agent_id", + "name": "api-version", "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.", + "required": true, + "description": "The API version to use for this operation.", "schema": { "type": "string" }, @@ -7219,33 +7181,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7262,23 +7198,24 @@ } }, "tags": [ - "Conversations" + "MLflow Artifacts" ] } }, - "/openai/v1/conversations/{conversation_id}": { + "/mlflow/api/2.0/mlflow/experiments/create": { "post": { - "operationId": "updateConversation", - "description": "Update a conversation.", + "operationId": "Experiments_create", + "description": "Create an MLflow experiment.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation to update.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7287,7 +7224,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7304,31 +7241,34 @@ } }, "tags": [ - "Conversations" + "MLflow Experiments" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.UpdateConversationBody" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } - }, - "get": { - "operationId": "getConversation", - "description": "Retrieves a conversation.", + } + }, + "/mlflow/api/2.0/mlflow/experiments/delete": { + "post": { + "operationId": "Experiments_delete", + "description": "Delete an MLflow experiment.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7337,7 +7277,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7354,21 +7294,54 @@ } }, "tags": [ - "Conversations" - ] - }, - "delete": { - "operationId": "deleteConversation", - "description": "Deletes a conversation.", + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/experiments/get": { + "get": { + "operationId": "Experiments_get", + "description": "Get an MLflow experiment by ID.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "experiment_id", + "in": "query", + "required": false, + "description": "MLflow experiment identifier.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "experiment_name", + "in": "query", + "required": false, + "description": "MLflow experiment name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7377,7 +7350,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.DeletedConversationResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7394,34 +7367,42 @@ } }, "tags": [ - "Conversations" + "MLflow Experiments" ] } }, - "/openai/v1/conversations/{conversation_id}/items": { - "post": { - "operationId": "createConversationItems", - "description": "Create items in a conversation with the given ID.", + "/mlflow/api/2.0/mlflow/experiments/get-by-name": { + "get": { + "operationId": "Experiments_getByName", + "description": "Get an MLflow experiment by name.", "parameters": [ { - "name": "conversation_id", - "in": "path", - "required": true, - "description": "The id of the conversation on which the item needs to be created.", + "name": "experiment_id", + "in": "query", + "required": false, + "description": "MLflow experiment identifier.", "schema": { "type": "string" - } + }, + "explode": false }, { - "name": "include", + "name": "experiment_name", "in": "query", "required": false, - "description": "Additional fields to include in the response.\nSee the `include` parameter for listing Conversation items for more information.", + "description": "MLflow experiment name.", "schema": { - "type": "array", - "items": { - "type": "string" - } + "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 } @@ -7432,7 +7413,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationItemList" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7449,94 +7430,53 @@ } }, "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" - ] - } - } - } - } - }, + "MLflow Experiments" + ] + } + }, + "/mlflow/api/2.0/mlflow/experiments/list": { "get": { - "operationId": "listConversationItems", - "description": "List all items for a conversation with the given ID.", + "operationId": "Experiments_list", + "description": "List MLflow experiments.", "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", + "name": "max_results", "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.", + "description": "Maximum number of items to return.", "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" + "format": "int32" }, "explode": false }, { - "name": "after", + "name": "page_token", "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": "Token used to retrieve the next page of results.", "schema": { "type": "string" }, "explode": false }, { - "name": "before", + "name": "view_type", "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.", + "description": "Experiment lifecycle stage filter.", "schema": { "type": "string" }, "explode": false }, { - "name": "item_type", + "name": "api-version", "in": "query", - "required": false, - "description": "Filter by item type. If provided, only items of the specified type will be returned.", + "required": true, + "description": "The API version to use for this operation.", "schema": { - "$ref": "#/components/schemas/OpenAI.ItemType" + "type": "string" }, "explode": false } @@ -7547,33 +7487,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7590,32 +7504,77 @@ } }, "tags": [ - "Conversations" + "MLflow Experiments" ] } }, - "/openai/v1/conversations/{conversation_id}/items/{item_id}": { - "get": { - "operationId": "getConversationItem", - "description": "Get a single item from a conversation with the given IDs.", + "/mlflow/api/2.0/mlflow/experiments/restore": { + "post": { + "operationId": "Experiments_restore", + "description": "Restore a deleted MLflow experiment.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the conversation that contains the item.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/experiments/search": { + "post": { + "operationId": "Experiments_search", + "description": "Search MLflow experiments.", + "parameters": [ { - "name": "item_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation item to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7624,7 +7583,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7641,30 +7600,87 @@ } }, "tags": [ - "Conversations" - ] - }, - "delete": { - "operationId": "deleteConversationItem", - "description": "Delete an item from a conversation with the given IDs.", + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/experiments/set-experiment-tag": { + "post": { + "operationId": "Experiments_setTag", + "description": "Set an MLflow experiment tag.", "parameters": [ { - "name": "conversation_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation on which the item needs to be deleted from.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/experiments/update": { + "post": { + "operationId": "Experiments_update", + "description": "Update MLflow experiment metadata.", + "parameters": [ { - "name": "item_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The id of the conversation item to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7673,7 +7689,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ConversationResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7690,104 +7706,94 @@ } }, "tags": [ - "Conversations" - ] + "MLflow Experiments" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/evals": { + "/mlflow/api/2.0/mlflow/metrics/get-history": { "get": { - "operationId": "Evals_listEvals", - "summary": "List all evaluations", - "description": "List evaluations for a project.", + "operationId": "Metrics_getHistory", + "description": "Get MLflow metric history.", "parameters": [ { - "name": "after", + "name": "run_id", "in": "query", "required": false, - "description": "Identifier for the last run from the previous pagination request.", + "description": "MLflow run identifier.", "schema": { "type": "string" }, "explode": false }, { - "name": "limit", + "name": "run_uuid", "in": "query", "required": false, - "description": "Number of runs to retrieve.", + "description": "MLflow run UUID.", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "default": 20 + "type": "string" }, "explode": false }, { - "name": "order", + "name": "metric_key", "in": "query", "required": false, - "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "description": "Metric key.", "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "asc" + "type": "string" }, "explode": false }, { - "name": "order_by", + "name": "max_results", "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.", + "description": "Maximum number of metric points to return.", "schema": { - "type": "string", - "enum": [ - "created_at", - "updated_at" - ], - "default": "created_at" - } - } - ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { + "type": "integer", + "format": "int32" + }, + "explode": false + }, + { + "name": "page_token", + "in": "query", + "required": false, + "description": "Token used to retrieve the next page of metric points.", + "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/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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7804,21 +7810,33 @@ } }, "tags": [ - "Evals" + "MLflow Metrics" ] - }, + } + }, + "/mlflow/api/2.0/mlflow/model-versions/create": { "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": [], + "operationId": "ModelVersions_create", + "description": "Create an MLflow model version.", + "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/Eval" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7835,34 +7853,34 @@ } }, "tags": [ - "Evals" + "MLflow Model Versions" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEvalRequest" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } } }, - "/openai/v1/evals/{eval_id}": { + "/mlflow/api/2.0/mlflow/model-versions/delete": { "delete": { - "operationId": "Evals_deleteEval", - "summary": "Delete an evaluation", - "description": "Delete an evaluation.", + "operationId": "ModelVersions_delete", + "description": "Delete an MLflow model version.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7871,7 +7889,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteEvalResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7888,22 +7906,34 @@ } }, "tags": [ - "Evals" - ] - }, - "get": { - "operationId": "Evals_getEval", - "summary": "Get an evaluation", - "description": "Get an evaluation by ID.", + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/model-versions/delete-tag": { + "delete": { + "operationId": "ModelVersions_deleteTag", + "description": "Delete an MLflow model-version tag.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7912,7 +7942,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Eval" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7929,22 +7959,54 @@ } }, "tags": [ - "Evals" - ] - }, - "post": { - "operationId": "Evals_updateEval", - "summary": "Update an evaluation", - "description": "Update certain properties of an evaluation.", + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/model-versions/get": { + "get": { + "operationId": "ModelVersions_get", + "description": "Get an MLflow model version.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "name", + "in": "query", + "required": false, + "description": "Registered model name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "version", + "in": "query", + "required": false, + "description": "Model version.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to update.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -7953,7 +8015,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Eval" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -7970,89 +8032,189 @@ } }, "tags": [ - "Evals" + "MLflow Model Versions" + ] + } + }, + "/mlflow/api/2.0/mlflow/model-versions/get-download-uri": { + "get": { + "operationId": "ModelVersions_getDownloadUri", + "description": "Get an MLflow model version download URI.", + "parameters": [ + { + "name": "name", + "in": "query", + "required": false, + "description": "Registered model name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "version", + "in": "query", + "required": false, + "description": "Model version.", + "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 + } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateEvalParametersBody" + "responses": { + "200": { + "description": "The request has succeeded.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } } } } - } + }, + "tags": [ + "MLflow Model Versions" + ] } }, - "/openai/v1/evals/{eval_id}/runs": { + "/mlflow/api/2.0/mlflow/model-versions/get-storage-location-uri": { "get": { - "operationId": "Evals_listRuns", - "summary": "Get a list of runs for an evaluation", - "description": "Get a list of runs for an evaluation.", + "operationId": "ModelVersions_getStorageLocationUri", + "description": "Get an MLflow model version storage location URI.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "name", + "in": "query", + "required": false, + "description": "Registered model name.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "version", + "in": "query", + "required": false, + "description": "Model version.", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to retrieve runs for.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Model Versions" + ] + } + }, + "/mlflow/api/2.0/mlflow/model-versions/search": { + "get": { + "operationId": "ModelVersions_search", + "description": "Search MLflow model versions.", + "parameters": [ { - "name": "after", + "name": "max_results", "in": "query", "required": false, - "description": "Identifier for the last run from the previous pagination request.", + "description": "Maximum number of items to return.", "schema": { - "type": "string" + "type": "integer", + "format": "int32" }, "explode": false }, { - "name": "limit", + "name": "page_token", "in": "query", "required": false, - "description": "Number of runs to retrieve.", + "description": "Token used to retrieve the next page of results.", "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "default": 20 + "type": "string" }, "explode": false }, { - "name": "order", + "name": "filter", "in": "query", "required": false, - "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", + "description": "Model version search filter.", "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "asc" + "type": "string" }, "explode": false }, { - "name": "status", + "name": "order_by", "in": "query", "required": false, - "description": "Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` | `canceled`.", + "description": "Model version ordering expression.", "schema": { - "type": "string", - "enum": [ - "queued", - "in_progress", - "completed", - "canceled", - "failed" - ] + "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 } @@ -8063,33 +8225,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8106,21 +8242,22 @@ } }, "tags": [ - "Evals" + "MLflow Model Versions" ] }, "post": { - "operationId": "Evals_createEvalRun", - "summary": "Create evaluation run", + "operationId": "ModelVersions_searchWithFilter", + "description": "Search MLflow model versions with search options in the request body.", "parameters": [ { - "name": "eval_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the evaluation to create a run for.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -8129,7 +8266,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalRun" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8146,43 +8283,34 @@ } }, "tags": [ - "Evals" + "MLflow Model Versions" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEvalRunRequest" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } } }, - "/openai/v1/evals/{eval_id}/runs/{run_id}": { - "delete": { - "operationId": "Evals_deleteEvalRun", - "summary": "Delete evaluation run", - "description": "Delete an eval run.", + "/mlflow/api/2.0/mlflow/model-versions/set-tag": { + "post": { + "operationId": "ModelVersions_setTag", + "description": "Set an MLflow model-version tag.", "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", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the run to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -8191,7 +8319,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteEvalRunResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8208,31 +8336,34 @@ } }, "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" + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } } - }, + } + } + } + }, + "/mlflow/api/2.0/mlflow/model-versions/transition-stage": { + "post": { + "operationId": "ModelVersions_transitionStage", + "description": "Transition an MLflow model version stage.", + "parameters": [ { - "name": "run_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the run to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -8241,7 +8372,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalRun" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8258,31 +8389,34 @@ } }, "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" + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } } - }, + } + } + } + }, + "/mlflow/api/2.0/mlflow/model-versions/update": { + "patch": { + "operationId": "ModelVersions_update", + "description": "Update an MLflow model version.", + "parameters": [ { - "name": "run_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the run to cancel.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -8291,7 +8425,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalRun" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8308,85 +8442,34 @@ } }, "tags": [ - "Evals" - ] + "MLflow Model Versions" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/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.", + "/mlflow/api/2.0/mlflow/registered-models/create": { + "post": { + "operationId": "RegisteredModels_create", + "description": "Create an MLflow registered model.", "parameters": [ { - "name": "eval_id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "run_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the run to retrieve output items for.", + "description": "The API version to use for this operation.", "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": { @@ -8395,33 +8478,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8438,42 +8495,34 @@ } }, "tags": [ - "Evals" - ] + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/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.", + "/mlflow/api/2.0/mlflow/registered-models/delete": { + "delete": { + "operationId": "RegisteredModels_delete", + "description": "Delete an MLflow registered model.", "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", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the output item to retrieve.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -8482,7 +8531,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalRunOutputItem" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8499,14 +8548,24 @@ } }, "tags": [ - "Evals" - ] + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/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)", + "/mlflow/api/2.0/mlflow/registered-models/delete-tag": { + "delete": { + "operationId": "RegisteredModels_deleteTag", + "description": "Delete an MLflow registered-model tag.", "parameters": [ { "name": "api-version", @@ -8525,7 +8584,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8542,45 +8601,35 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequest" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } - }, + } + }, + "/mlflow/api/2.0/mlflow/registered-models/get": { "get": { - "operationId": "listPaginatedFineTuningJobs", - "description": "List your organization's fine-tuning jobs", + "operationId": "RegisteredModels_get", + "description": "Get an MLflow registered model.", "parameters": [ { - "name": "after", + "name": "name", "in": "query", "required": false, - "description": "Identifier for the last job from the previous pagination request.", + "description": "Registered model name.", "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", @@ -8598,7 +8647,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ListPaginatedFineTuningJobsResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8615,23 +8664,37 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ] } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}": { + "/mlflow/api/2.0/mlflow/registered-models/get-latest-versions": { "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)", + "operationId": "RegisteredModels_getLatestVersions", + "description": "Get latest versions for an MLflow registered model.", "parameters": [ { - "name": "fine_tuning_job_id", - "in": "path", - "required": true, - "description": "The ID of the fine-tuning job.", + "name": "name", + "in": "query", + "required": false, + "description": "Registered model name.", "schema": { "type": "string" - } + }, + "explode": false + }, + { + "name": "stages", + "in": "query", + "required": false, + "description": "Model version stages to include.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "explode": false }, { "name": "api-version", @@ -8650,7 +8713,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8667,24 +8730,13 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ] - } - }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel": { + }, "post": { - "operationId": "cancelFineTuningJob", - "description": "Immediately cancel a fine-tune job.", + "operationId": "RegisteredModels_getLatestVersionsNameInBody", + "description": "Get latest versions for an MLflow registered model with the model name in the request body.", "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", @@ -8702,7 +8754,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8719,43 +8771,43 @@ } }, "tags": [ - "Fine-Tuning" - ] + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints": { + "/mlflow/api/2.0/mlflow/registered-models/list": { "get": { - "operationId": "listFineTuningJobCheckpoints", - "description": "List checkpoints for a fine-tuning job.", + "operationId": "RegisteredModels_list", + "description": "List MLflow registered models.", "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", + "name": "max_results", "in": "query", "required": false, - "description": "Identifier for the last checkpoint ID from the previous pagination request.", + "description": "Maximum number of items to return.", "schema": { - "type": "string" + "type": "integer", + "format": "int32" }, "explode": false }, { - "name": "limit", + "name": "page_token", "in": "query", "required": false, - "description": "Number of checkpoints to retrieve.", + "description": "Token used to retrieve the next page of results.", "schema": { - "type": "integer", - "format": "int32", - "default": 10 + "type": "string" }, "explode": false }, @@ -8776,7 +8828,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ListFineTuningJobCheckpointsResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8793,43 +8845,96 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ] } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/events": { - "get": { - "operationId": "listFineTuningJobEvents", - "description": "Get fine-grained status updates for a fine-tuning job.", + "/mlflow/api/2.0/mlflow/registered-models/rename": { + "post": { + "operationId": "RegisteredModels_rename", + "description": "Rename an MLflow registered model.", "parameters": [ { - "name": "fine_tuning_job_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the fine-tuning job to get events for.", + "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/Mlflow.MlflowResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } } + } + } + } + }, + "/mlflow/api/2.0/mlflow/registered-models/search": { + "get": { + "operationId": "RegisteredModels_search", + "description": "Search MLflow registered models.", + "parameters": [ + { + "name": "max_results", + "in": "query", + "required": false, + "description": "Maximum number of items to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "explode": false }, { - "name": "after", + "name": "page_token", "in": "query", "required": false, - "description": "Identifier for the last event from the previous pagination request.", + "description": "Token used to retrieve the next page of results.", "schema": { "type": "string" }, "explode": false }, { - "name": "limit", + "name": "filter", "in": "query", "required": false, - "description": "Number of events to retrieve.", + "description": "Registered model search filter.", "schema": { - "type": "integer", - "format": "int32", - "default": 20 + "type": "string" }, "explode": false }, @@ -8850,7 +8955,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.ListFineTuningJobEventsResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8867,24 +8972,68 @@ } }, "tags": [ - "Fine-Tuning" + "MLflow Registered Models" ] } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/pause": { + "/mlflow/api/2.0/mlflow/registered-models/set-tag": { "post": { - "operationId": "pauseFineTuningJob", - "description": "Pause a running fine-tune job.", + "operationId": "RegisteredModels_setTag", + "description": "Set an MLflow registered-model tag.", "parameters": [ { - "name": "fine_tuning_job_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the fine-tuning job to pause.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/registered-models/update": { + "patch": { + "operationId": "RegisteredModels_update", + "description": "Update an MLflow registered model.", + "parameters": [ { "name": "api-version", "in": "query", @@ -8902,7 +9051,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8919,24 +9068,78 @@ } }, "tags": [ - "Fine-Tuning" - ] + "MLflow Registered Models" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/resume": { + "/mlflow/api/2.0/mlflow/runs/create": { "post": { - "operationId": "resumeFineTuningJob", - "description": "Resume a paused fine-tune job.", + "operationId": "Runs_create", + "description": "Create an MLflow run.", "parameters": [ { - "name": "fine_tuning_job_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the fine-tuning job to resume.", + "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/Mlflow.MlflowResponse" + } + } } }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/runs/delete": { + "post": { + "operationId": "Runs_delete", + "description": "Delete an MLflow run.", + "parameters": [ { "name": "api-version", "in": "query", @@ -8954,7 +9157,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -8971,27 +9174,43 @@ } }, "tags": [ - "Fine-Tuning" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/responses": { + "/mlflow/api/2.0/mlflow/runs/delete-tag": { "post": { - "operationId": "createResponse_createResponseStream", - "parameters": [], - "description": "Creates a model response. Creates a model response (streaming response).", + "operationId": "Runs_deleteTag", + "description": "Delete an MLflow run tag.", + "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.Response" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CreateResponseStreamingResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -9008,515 +9227,50 @@ } }, "tags": [ - "Responses" + "MLflow Runs" ], "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": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentReference" - } - ], - "description": "(Deprecated) Use agent_reference instead.\nThe agent to use for generating the response." - }, - "agent_session_id": { - "type": "string", - "description": "Optional session identifier for sandbox affinity. Currently only relevant for hosted agents.\nWhen provided, the request is routed to the same sandbox. When omitted, auto-derived from\nconversation_id/prev_response_id or a new UUID is generated." - }, - "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": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentReference" - } - ], - "description": "(Deprecated) Use agent_reference instead.\nThe agent to use for generating the response." - }, - "agent_session_id": { - "type": "string", - "description": "Optional session identifier for sandbox affinity. Currently only relevant for hosted agents.\nWhen provided, the request is routed to the same sandbox. When omitted, auto-derived from\nconversation_id/prev_response_id or a new UUID is generated." - }, - "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." - } - } - } - ] + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } - }, + } + }, + "/mlflow/api/2.0/mlflow/runs/get": { "get": { - "operationId": "listResponses", - "description": "Returns the list of all responses.", + "operationId": "Runs_get", + "description": "Get an MLflow run.", "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", + "name": "run_id", "in": "query", "required": false, - "description": "Filter by agent name. If provided, only items associated with the specified agent will be returned.", + "description": "MLflow run identifier.", "schema": { "type": "string" }, "explode": false }, { - "name": "agent_id", + "name": "run_uuid", "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.", + "description": "MLflow run UUID.", "schema": { "type": "string" }, "explode": false }, { - "name": "conversation_id", + "name": "api-version", "in": "query", - "required": false, - "description": "Filter by conversation ID. If provided, only responses associated with the specified conversation will be returned.", + "required": true, + "description": "The API version to use for this operation.", "schema": { "type": "string" }, @@ -9529,33 +9283,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -9572,22 +9300,33 @@ } }, "tags": [ - "Responses" + "MLflow Runs" ] } }, - "/openai/v1/responses/compact": { + "/mlflow/api/2.0/mlflow/runs/log-batch": { "post": { - "operationId": "compactResponseConversation", - "description": "Produces a compaction of a responses conversation.", - "parameters": [], + "operationId": "Runs_logBatch", + "description": "Log a batch of metrics, parameters, and tags to an MLflow run.", + "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.CompactResource" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -9604,89 +9343,43 @@ } }, "tags": [ - "Responses" + "MLflow Runs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.CompactResponseMethodPublicBody" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } } } } }, - "/openai/v1/responses/{response_id}": { - "get": { - "operationId": "getResponse_getResponseStream", + "/mlflow/api/2.0/mlflow/runs/log-inputs": { + "post": { + "operationId": "Runs_logInputs", + "description": "Log MLflow run input relationships.", "parameters": [ { - "name": "response_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, + "description": "The API version to use for this operation.", "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.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.Response" - } - }, - "text/event-stream": { - "schema": { - "$ref": "#/components/schemas/OpenAI.CreateResponseStreamingResponse" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -9703,21 +9396,34 @@ } }, "tags": [ - "Responses" - ] - }, - "delete": { - "operationId": "deleteResponse", - "description": "Deletes a model response.", + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } + } + }, + "/mlflow/api/2.0/mlflow/runs/log-metric": { + "post": { + "operationId": "Runs_logMetric", + "description": "Log one metric to an MLflow run.", "parameters": [ { - "name": "response_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the response to delete.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -9726,7 +9432,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteResponseResult" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -9743,23 +9449,34 @@ } }, "tags": [ - "Responses" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/responses/{response_id}/cancel": { + "/mlflow/api/2.0/mlflow/runs/log-model": { "post": { - "operationId": "cancelResponse", - "description": "Cancels a model response.", + "operationId": "Runs_logModel", + "description": "Log MLflow model metadata.", "parameters": [ { - "name": "response_id", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "The ID of the response to cancel.", + "description": "The API version to use for this operation.", "schema": { "type": "string" - } + }, + "explode": false } ], "responses": { @@ -9768,7 +9485,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OpenAI.Response" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -9785,60 +9502,30 @@ } }, "tags": [ - "Responses" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/openai/v1/responses/{response_id}/input_items": { - "get": { - "operationId": "listInputItems", - "description": "Returns a list of input items for a given response.", + "/mlflow/api/2.0/mlflow/runs/log-parameter": { + "post": { + "operationId": "Runs_logParameter", + "description": "Log one parameter to an MLflow run.", "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", + "name": "api-version", "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.", + "required": true, + "description": "The API version to use for this operation.", "schema": { "type": "string" }, @@ -9851,33 +9538,7 @@ "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." + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -9894,29 +9555,34 @@ } }, "tags": [ - "Responses" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/redTeams/runs": { - "get": { - "operationId": "RedTeams_list", - "description": "List a redteam by name.", + "/mlflow/api/2.0/mlflow/runs/restore": { + "post": { + "operationId": "Runs_restore", + "description": "Restore a deleted MLflow run.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "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": [ - "RedTeams=V1Preview" - ] - } + "type": "string" + }, + "explode": false } ], "responses": { @@ -9925,64 +9591,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedRedTeam" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } }, "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": [ - "Redteams" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/redTeams/runs/{name}": { - "get": { - "operationId": "RedTeams_get", - "description": "Get a redteam by name.", + "/mlflow/api/2.0/mlflow/runs/search": { + "post": { + "operationId": "Runs_search", + "description": "Search MLflow runs.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" - }, - { - "name": "name", - "in": "path", + "name": "api-version", + "in": "query", "required": true, - "description": "Identifier of the red team run.", + "description": "The API version to use for this operation.", "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" - ] - } + }, + "explode": false } ], "responses": { @@ -9991,53 +9644,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RedTeam" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } }, "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": [ - "Redteams" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/redTeams/runs:run": { + "/mlflow/api/2.0/mlflow/runs/set-tag": { "post": { - "operationId": "RedTeams_create", - "description": "Creates a redteam run.", + "operationId": "Runs_setTag", + "description": "Set an MLflow run tag.", "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", @@ -10050,12 +9692,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/RedTeam" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } @@ -10072,60 +9714,34 @@ } }, "tags": [ - "Redteams" + "MLflow Runs" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RedTeam" + "$ref": "#/components/schemas/Mlflow.MlflowPayload" } } - }, - "description": "Redteam to be run" + } } } }, - "/schedules": { - "get": { - "operationId": "Schedules_list", - "description": "List all schedules.", + "/mlflow/api/2.0/mlflow/runs/update": { + "post": { + "operationId": "Runs_update", + "description": "Update MLflow run metadata or status.", "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", + "name": "api-version", "in": "query", - "required": false, - "description": "Filter by the enabled status.", + "required": true, + "description": "The API version to use for this operation.", "schema": { - "type": "boolean" + "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": [ - "Schedules=V1Preview" - ] - } } ], "responses": { @@ -10134,53 +9750,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedSchedule" + "$ref": "#/components/schemas/Mlflow.MlflowResponse" } } } }, "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": [ - "Schedules" - ] + "MLflow Runs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Mlflow.MlflowPayload" + } + } + } + } } }, - "/schedules/{id}": { - "delete": { - "operationId": "Schedules_delete", - "description": "Delete a schedule.", + "/models/operations/{operation_id}/result": { + "get": { + "operationId": "Models_getTrainingOperationResult", + "description": "Poll the result of a managed model training operation.", "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", @@ -10189,66 +9794,28 @@ "schema": { "type": "string", "enum": [ - "Schedules=V1Preview" + "TrainingJobs=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", + "name": "operation_id", "in": "path", "required": true, - "description": "Identifier of the schedule.", + "description": "The managed model training operation identifier.", "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": [ - "Schedules=V1Preview" - ] - } + "type": "string" + }, + "explode": false } ], "responses": { @@ -10257,51 +9824,32 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Schedule" + "$ref": "#/components/schemas/ModelTrainingOperation" } } } }, "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": [ - "Schedules" + "Models" ] - }, - "put": { - "operationId": "Schedules_createOrUpdate", - "description": "Create or update operation template.", + } + }, + "/models:create_training_job": { + "post": { + "operationId": "Models_createTrainingJob", + "description": "Create a model by running managed model training.", "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", @@ -10310,116 +9858,184 @@ "schema": { "type": "string", "enum": [ - "Schedules=V1Preview" + "TrainingJobs=V1Preview" ] } + }, + { + "name": "Operation-Id", + "in": "header", + "required": false, + "description": "Idempotency key used to safely retry managed model training.", + "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": { + "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": { - "$ref": "#/components/schemas/Schedule" + "type": "string", + "format": "uri" } } - } - }, - "201": { - "description": "The request has succeeded and a new resource has been created as a result.", + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Schedule" + "$ref": "#/components/schemas/ModelTrainingOperation" } } } }, "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": [ - "Schedules" + "Models" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Schedule" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } } }, - "description": "The resource instance." + "description": "The managed model training job to create." } } }, - "/schedules/{id}/runs": { + "/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": "Schedules_listRuns", - "description": "List all schedule runs.", + "operationId": "listConversations", + "description": "Returns the list of all conversations.", "parameters": [ { - "$ref": "#/components/parameters/Azure.Core.Foundations.ApiVersionParameter" + "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": "id", - "in": "path", - "required": true, - "description": "Identifier of the schedule.", + "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": "type", + "name": "before", "in": "query", "required": false, - "description": "Filter by the type of schedule.", + "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": { - "$ref": "#/components/schemas/ScheduleTaskType" + "type": "string" }, "explode": false }, { - "name": "enabled", + "name": "agent_name", "in": "query", "required": false, - "description": "Filter by the enabled status.", + "description": "Filter by agent name. If provided, only items associated with the specified agent will be returned.", "schema": { - "type": "boolean" + "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.", + "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", - "enum": [ - "Schedules=V1Preview" - ] - } + "type": "string" + }, + "explode": false } ], "responses": { @@ -10428,80 +10044,156 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PagedScheduleRun" + "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.", - "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": [ - "Schedules" + "Conversations" ] } }, - "/schedules/{schedule_id}/runs/{run_id}": { - "get": { - "operationId": "Schedules_getRun", - "description": "Get a schedule run by id.", + "/openai/v1/conversations/{conversation_id}": { + "post": { + "operationId": "updateConversation", + "description": "Update a conversation.", "parameters": [ { - "name": "schedule_id", + "name": "conversation_id", "in": "path", "required": true, - "description": "The unique identifier of the schedule.", + "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": "run_id", + "name": "conversation_id", "in": "path", "required": true, - "description": "The unique identifier of the schedule run.", + "description": "The id of the conversation 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": [ - "Schedules=V1Preview" - ] + } + ], + "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": "api-version", - "in": "query", + "name": "conversation_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The id of the conversation to delete.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -10510,7 +10202,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ScheduleRun" + "$ref": "#/components/schemas/OpenAI.DeletedConversationResource" } } } @@ -10527,34 +10219,34 @@ } }, "tags": [ - "Schedules" + "Conversations" ] } }, - "/skills": { + "/openai/v1/conversations/{conversation_id}/items": { "post": { - "operationId": "Skills_createSkill", - "description": "Creates a skill.", + "operationId": "createConversationItems", + "description": "Create items in a conversation with the given ID.", "parameters": [ { - "name": "Foundry-Features", - "in": "header", + "name": "conversation_id", + "in": "path", "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "description": "The id of the conversation on which the item needs to be created.", "schema": { - "type": "string", - "enum": [ - "Skills=V1Preview" - ] + "type": "string" } }, { - "name": "api-version", + "name": "include", "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "required": false, + "description": "Additional fields to include in the response.\nSee the `include` parameter for listing Conversation items for more information.", "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } }, "explode": false } @@ -10565,7 +10257,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/OpenAI.ConversationItemList" } } } @@ -10582,7 +10274,7 @@ } }, "tags": [ - "Skills" + "Conversations" ], "requestBody": { "required": true, @@ -10591,46 +10283,36 @@ "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" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Item" }, - "description": "Set of key-value pairs associated with the skill." + "maxItems": 20, + "description": "The items to add to the conversation. You may add up to 20 items at a time." } }, "required": [ - "name" + "items" ] } } } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] } }, "get": { - "operationId": "Skills_listSkills", - "description": "Returns the list of all skills.", + "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", @@ -10674,24 +10356,12 @@ "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", + "name": "item_type", "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "required": false, + "description": "Filter by item type. If provided, only items of the specified type will be returned.", "schema": { - "type": "string" + "$ref": "#/components/schemas/OpenAI.ItemType" }, "explode": false } @@ -10711,7 +10381,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/OpenAI.OutputItem" }, "description": "The requested list of items." }, @@ -10745,50 +10415,32 @@ } }, "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } + "Conversations" + ] } }, - "/skills/{skill_name}": { + "/openai/v1/conversations/{conversation_id}/items/{item_id}": { "get": { - "operationId": "Skills_getSkill", - "description": "Retrieves a skill.", + "operationId": "getConversationItem", + "description": "Get a single item from a conversation with the given IDs.", "parameters": [ { - "name": "skill_name", + "name": "conversation_id", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The ID of the conversation that contains the item.", "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", + "name": "item_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The id of the conversation item to retrieve.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -10797,7 +10449,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/OpenAI.OutputItem" } } } @@ -10814,48 +10466,30 @@ } }, "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } + "Conversations" + ] }, - "post": { - "operationId": "Skills_updateSkill", - "description": "Updates an existing skill.", + "delete": { + "operationId": "deleteConversationItem", + "description": "Delete an item from a conversation with the given IDs.", "parameters": [ { - "name": "skill_name", + "name": "conversation_id", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The id of the conversation on which the item needs to be deleted from.", "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", + "name": "item_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The id of the conversation item to delete.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -10864,7 +10498,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/OpenAI.ConversationResource" } } } @@ -10881,77 +10515,69 @@ } }, "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 key-value pairs associated with the skill." - } - } - } - } - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - }, - "delete": { - "operationId": "Skills_deleteSkill", - "description": "Deletes a skill.", + "Conversations" + ] + } + }, + "/openai/v1/evals": { + "get": { + "operationId": "Evals_listEvals", + "summary": "List all evaluations", + "description": "List evaluations for a project.", "parameters": [ { - "name": "skill_name", - "in": "path", - "required": true, - "description": "The unique name of the skill.", + "name": "after", + "in": "query", + "required": false, + "description": "Identifier for the last run from the previous pagination request.", "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": "limit", + "in": "query", + "required": false, + "description": "Number of runs to retrieve.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "default": 20 + }, + "explode": false }, { - "name": "api-version", + "name": "order", "in": "query", - "required": true, - "description": "The API version to use for this operation.", + "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" + "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": { @@ -10960,7 +10586,33 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteSkillResponse" + "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." } } } @@ -10977,60 +10629,74 @@ } }, "tags": [ - "Skills" + "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" ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEvalRequest" + } + } + } } } }, - "/skills/{skill_name}:download": { - "get": { - "operationId": "Skills_downloadSkill", - "description": "Downloads a skill package.", + "/openai/v1/evals/{eval_id}": { + "delete": { + "operationId": "Evals_deleteEval", + "summary": "Delete an evaluation", + "description": "Delete an evaluation.", "parameters": [ { - "name": "skill_name", + "name": "eval_id", "in": "path", "required": true, - "description": "The unique name of the skill.", + "description": "The ID of the evaluation 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 response body for downloading a skill package.", + "description": "The request has succeeded.", "content": { - "application/gzip": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/DeleteEvalResponse" } } } @@ -11047,41 +10713,22 @@ } }, "tags": [ - "Skills" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/skills:import": { - "post": { - "operationId": "Skills_createSkillFromPackage", - "description": "Creates a skill from a GZip package.", + "Evals" + ] + }, + "get": { + "operationId": "Evals_getEval", + "summary": "Get an evaluation", + "description": "Get an evaluation by ID.", "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", + "name": "eval_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The ID of the evaluation to retrieve.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -11090,7 +10737,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SkillObject" + "$ref": "#/components/schemas/Eval" } } } @@ -11107,53 +10754,22 @@ } }, "tags": [ - "Skills" - ], - "requestBody": { - "required": true, - "content": { - "application/gzip": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "description": "The GZip package used to create the skill." - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Skills=V1Preview" - ] - } - } - }, - "/toolsets": { + "Evals" + ] + }, "post": { - "operationId": "createToolset", - "description": "Create a toolset.", + "operationId": "Evals_updateEval", + "summary": "Update an evaluation", + "description": "Update certain properties of an evaluation.", "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": [ - "Toolsets=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", + "name": "eval_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The ID of the evaluation to update.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -11162,7 +10778,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolsetObject" + "$ref": "#/components/schemas/Eval" } } } @@ -11179,119 +10795,89 @@ } }, "tags": [ - "Toolsets" + "Evals" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the toolset." - }, - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolset." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the toolset." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools to include in the toolset." - } - }, - "required": [ - "name", - "tools" - ] + "$ref": "#/components/schemas/UpdateEvalParametersBody" } } } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" - ] } - }, + } + }, + "/openai/v1/evals/{eval_id}/runs": { "get": { - "operationId": "listToolsets", - "description": "List all toolsets.", + "operationId": "Evals_listRuns", + "summary": "Get a list of runs for an evaluation", + "description": "Get a list of runs for an evaluation.", "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.", + "name": "eval_id", + "in": "path", + "required": true, + "description": "The ID of the evaluation to retrieve runs for.", "schema": { - "type": "integer", - "format": "int32", - "default": 20 - }, - "explode": false + "type": "string" + } }, { - "name": "order", + "name": "after", "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": "Identifier for the last run from the previous pagination request.", "schema": { - "$ref": "#/components/schemas/PageOrder" + "type": "string" }, "explode": false }, { - "name": "after", + "name": "limit", "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": "Number of runs to retrieve.", "schema": { - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/integer" + } + ], + "default": 20 }, "explode": false }, { - "name": "before", + "name": "order", "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.", + "description": "Sort order for runs by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.", "schema": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "asc" }, "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.", + "name": "status", + "in": "query", + "required": false, + "description": "Filter runs by status. One of `queued` | `in_progress` | `failed` | `completed` | `canceled`.", "schema": { "type": "string", "enum": [ - "Toolsets=V1Preview" + "queued", + "in_progress", + "completed", + "canceled", + "failed" ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" }, "explode": false } @@ -11311,7 +10897,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ToolsetObject" + "$ref": "#/components/schemas/EvalRun" }, "description": "The requested list of items." }, @@ -11345,50 +10931,21 @@ } }, "tags": [ - "Toolsets" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" - ] - } - } - }, - "/toolsets/{tool_set_name}": { + "Evals" + ] + }, "post": { - "operationId": "updateToolset", - "description": "Update a toolset.", + "operationId": "Evals_createEvalRun", + "summary": "Create evaluation run", "parameters": [ { - "name": "tool_set_name", + "name": "eval_id", "in": "path", "required": true, - "description": "The name of the toolset to update.", + "description": "The ID of the evaluation to create a run 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": [ - "Toolsets=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false } ], "responses": { @@ -11397,7 +10954,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolsetObject" + "$ref": "#/components/schemas/EvalRun" } } } @@ -11414,82 +10971,43 @@ } }, "tags": [ - "Toolsets" + "Evals" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "description": { - "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolset." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the toolset." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools to include in the toolset." - } - }, - "required": [ - "tools" - ] + "$ref": "#/components/schemas/CreateEvalRunRequest" } } } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" - ] } - }, - "get": { - "operationId": "getToolset", - "description": "Retrieve a toolset.", + } + }, + "/openai/v1/evals/{eval_id}/runs/{run_id}": { + "delete": { + "operationId": "Evals_deleteEvalRun", + "summary": "Delete evaluation run", + "description": "Delete an eval run.", "parameters": [ { - "name": "tool_set_name", + "name": "eval_id", "in": "path", "required": true, - "description": "The name of the toolset to retrieve.", + "description": "The ID of the evaluation to delete the run from.", "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": [ - "Toolsets=V1Preview" - ] - } - }, - { - "name": "api-version", - "in": "query", + "name": "run_id", + "in": "path", "required": true, - "description": "The API version to use for this operation.", + "description": "The ID of the run to delete.", "schema": { "type": "string" - }, - "explode": false + } } ], "responses": { @@ -11498,7 +11016,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ToolsetObject" + "$ref": "#/components/schemas/DeleteEvalRunResponse" } } } @@ -11515,118 +11033,9303 @@ } }, "tags": [ - "Toolsets" - ], - "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" - ] - } + "Evals" + ] }, - "delete": { - "operationId": "deleteToolset", - "description": "Delete a toolset.", + "get": { + "operationId": "Evals_getEvalRun", + "summary": "Get an evaluation run", + "description": "Get an evaluation run by ID.", "parameters": [ { - "name": "tool_set_name", + "name": "eval_id", "in": "path", "required": true, - "description": "The name of the toolset to delete.", + "description": "The ID of the evaluation to retrieve runs for.", "schema": { "type": "string" } }, { - "name": "Foundry-Features", - "in": "header", + "name": "run_id", + "in": "path", "required": true, - "description": "A feature flag opt-in required when using preview operations or modifying persisted preview resources.", + "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": [ - "Toolsets=V1Preview" + "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.", + "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": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentReference" + } + ], + "description": "(Deprecated) Use agent_reference instead.\nThe agent to use for generating the response." + }, + "agent_session_id": { + "type": "string", + "description": "Optional session identifier for sandbox affinity. Currently only relevant for hosted agents.\nWhen provided, the request is routed to the same sandbox. When omitted, auto-derived from\nconversation_id/prev_response_id or a new UUID is generated." + }, + "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": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentReference" + } + ], + "description": "(Deprecated) Use agent_reference instead.\nThe agent to use for generating the response." + }, + "agent_session_id": { + "type": "string", + "description": "Optional session identifier for sandbox affinity. Currently only relevant for hosted agents.\nWhen provided, the request is routed to the same sandbox. When omitted, auto-derived from\nconversation_id/prev_response_id or a new UUID is generated." + }, + "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.", + "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.", + "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.", + "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.", + "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": { + "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": { + "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 key-value pairs associated with the skill." + } + }, + "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/{skill_name}": { + "get": { + "operationId": "Skills_getSkill", + "description": "Retrieves a skill.", + "parameters": [ + { + "name": "skill_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": "skill_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 key-value pairs associated with the skill." + } + } + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + }, + "delete": { + "operationId": "Skills_deleteSkill", + "description": "Deletes a skill.", + "parameters": [ + { + "name": "skill_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/{skill_name}:download": { + "get": { + "operationId": "Skills_downloadSkill", + "description": "Downloads a skill package.", + "parameters": [ + { + "name": "skill_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/gzip": { + "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 GZip 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": { + "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/gzip": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "description": "The GZip package used to create the skill." + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Skills=V1Preview" + ] + } + } + }, + "/toolsets": { + "post": { + "operationId": "createToolset", + "description": "Create a toolset.", + "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": [ + "Toolsets=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/ToolsetObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolsets" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "description": "The name of the toolset." + }, + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the toolset." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the toolset." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "The list of tools to include in the toolset." + } + }, + "required": [ + "name", + "tools" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + }, + "get": { + "operationId": "listToolsets", + "description": "List all toolsets.", + "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": [ + "Toolsets=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/ToolsetObject" + }, + "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": [ + "Toolsets" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + } + }, + "/toolsets/{tool_set_name}": { + "post": { + "operationId": "updateToolset", + "description": "Update a toolset.", + "parameters": [ + { + "name": "tool_set_name", + "in": "path", + "required": true, + "description": "The name of the toolset to 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": [ + "Toolsets=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/ToolsetObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolsets" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the toolset." + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Arbitrary key-value metadata to associate with the toolset." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "The list of tools to include in the toolset." + } + }, + "required": [ + "tools" + ] + } + } + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + }, + "get": { + "operationId": "getToolset", + "description": "Retrieve a toolset.", + "parameters": [ + { + "name": "tool_set_name", + "in": "path", + "required": true, + "description": "The name of the toolset 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": [ + "Toolsets=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/ToolsetObject" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolsets" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + }, + "delete": { + "operationId": "deleteToolset", + "description": "Delete a toolset.", + "parameters": [ + { + "name": "tool_set_name", + "in": "path", + "required": true, + "description": "The name of the toolset 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": [ + "Toolsets=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/DeleteToolsetResponse" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "Toolsets" + ], + "x-ms-foundry-meta": { + "conditional_previews": [ + "Toolsets=V1Preview" + ] + } + } + }, + "/training_jobs": { + "get": { + "operationId": "TrainingJobs_list", + "description": "List training jobs.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_type", + "in": "query", + "required": false, + "description": "Filter by job type (e.g. 'Command').", + "schema": { + "$ref": "#/components/schemas/JobType" + }, + "explode": false + }, + { + "name": "tag", + "in": "query", + "required": false, + "description": "Filter jobs by tag in the format 'key=value' (e.g., 'framework=pytorch').", + "schema": { + "type": "string" + }, + "explode": false + }, + { + "name": "list_view_type", + "in": "query", + "required": false, + "description": "Specifies which view type to apply when listing jobs.", + "schema": { + "$ref": "#/components/schemas/ListViewType" + }, + "explode": false + }, + { + "name": "properties", + "in": "query", + "required": false, + "description": "Comma-separated user property names and optionally values. Example: prop1,prop2=value2.", + "schema": { + "type": "string" + }, + "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": "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": "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": "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/Job" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + }, + "post": { + "operationId": "TrainingJobs_create", + "description": "Create and execute a model training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "Operation-Id", + "in": "header", + "required": false, + "description": "Idempotency key used to safely retry job creation.", + "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/Job" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobCreate" + } + } + }, + "description": "The training job to create." + } + } + }, + "/training_jobs/operations/{operation_id}/result": { + "get": { + "operationId": "TrainingJobOperations_getOperationResult", + "description": "Poll the result of an asynchronous training job operation.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "operation_id", + "in": "path", + "required": true, + "description": "The operation identifier returned by a training job create, cancel, or delete request.", + "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/JobOperationResource" + } + } + } + }, + "202": { + "description": "Response returned when a training job operation is still in progress.", + "headers": { + "Location": { + "required": false, + "description": "URL to poll for the operation result.", + "schema": { + "type": "string" + } + }, + "Operation-Location": { + "required": false, + "description": "URL to poll for the operation status.", + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/operations/{operation_id}/status": { + "get": { + "operationId": "TrainingJobOperations_getOperationStatus", + "description": "Poll the status of an asynchronous training job operation.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "operation_id", + "in": "path", + "required": true, + "description": "The operation identifier returned by a training job create, cancel, or delete request.", + "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/JobOperationResource" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}": { + "get": { + "operationId": "TrainingJobs_get", + "description": "Get a training job by name.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "include", + "in": "query", + "required": false, + "description": "Additional related data to include in the response. Values are comma-separated expansion names such as latest_attempt, input_datasets, output_datasets, execution_definition, services, log_files, and job_cost.", + "schema": { + "$ref": "#/components/schemas/TrainingJobInclude" + }, + "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/Job" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + }, + "delete": { + "operationId": "TrainingJobs_beginDelete", + "description": "Delete a training job by name. Returns 202 Accepted with Location and Operation-Location headers to poll for completion, or 204 if the job does not exist.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "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": "Response returned when a job delete operation is accepted asynchronously.", + "headers": { + "Location": { + "required": true, + "description": "URL to poll for the final result of the delete operation.", + "schema": { + "type": "string" + } + }, + "Operation-Location": { + "required": false, + "description": "URL to poll for the status of the delete operation.", + "schema": { + "type": "string" + } + }, + "Retry-After": { + "required": false, + "description": "Suggested delay in seconds before polling.", + "schema": { + "type": "integer", + "format": "int32" + } + } + } + }, + "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": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts": { + "get": { + "operationId": "TrainingJobAttempts_listAttempts", + "description": "List attempts for a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "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": "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/JobAttempt" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}": { + "get": { + "operationId": "TrainingJobAttempts_getAttempt", + "description": "Get one attempt for a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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/JobAttempt" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_listAttemptArtifacts", + "description": "List artifacts for a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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": "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": "path_prefix", + "in": "query", + "required": false, + "description": "Artifact path prefix to 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/JobArtifact" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/content": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_downloadAttemptArtifact", + "description": "Download artifact content from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The artifact path.", + "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": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/content_info": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_getAttemptArtifactContentInfo", + "description": "Get download information for an artifact from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The artifact path.", + "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/JobArtifactContentInfo" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/content_info_by_prefix": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_getAttemptArtifactContentInfoByPrefix", + "description": "List download information for artifacts under a path prefix from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "path_prefix", + "in": "query", + "required": false, + "description": "Artifact path prefix to list download information for. If omitted, download information is returned for the artifact root.", + "schema": { + "type": "string" + }, + "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": "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/JobArtifactContentInfo" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/metadata": { + "get": { + "operationId": "TrainingJobAttemptArtifacts_getAttemptArtifactMetadata", + "description": "Get metadata for an artifact from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "description": "The artifact path.", + "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/JobArtifact" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics": { + "get": { + "operationId": "TrainingJobAttemptMetrics_listAttemptMetrics", + "description": "List metrics emitted by a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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": "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": "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/JobMetric" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/last_values": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetricLastValues", + "description": "Get latest metric values for a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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/JobMetricLastValue" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetric", + "description": "Get the full history for a metric from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "metric_name", + "in": "path", + "required": true, + "description": "The metric name.", + "schema": { + "type": "string" + } + }, + { + "name": "started_at", + "in": "query", + "required": false, + "description": "Start of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "ended_at", + "in": "query", + "required": false, + "description": "End of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "min_step", + "in": "query", + "required": false, + "description": "Minimum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "max_step", + "in": "query", + "required": false, + "description": "Maximum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Maximum number of metric points to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/JobMetricPoint" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}/aggregates": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetricAggregates", + "description": "Get aggregate metric values from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "metric_name", + "in": "path", + "required": true, + "description": "The metric name.", + "schema": { + "type": "string" + } + }, + { + "name": "started_at", + "in": "query", + "required": false, + "description": "Start of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "ended_at", + "in": "query", + "required": false, + "description": "End of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "min_step", + "in": "query", + "required": false, + "description": "Minimum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "max_step", + "in": "query", + "required": false, + "description": "Maximum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Maximum number of metric points to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/JobMetricAggregate" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}/sample": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetricSample", + "description": "Get one sampled value or window from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "metric_name", + "in": "path", + "required": true, + "description": "The metric name.", + "schema": { + "type": "string" + } + }, + { + "name": "started_at", + "in": "query", + "required": false, + "description": "Start of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "ended_at", + "in": "query", + "required": false, + "description": "End of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "min_step", + "in": "query", + "required": false, + "description": "Minimum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "max_step", + "in": "query", + "required": false, + "description": "Maximum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Maximum number of metric points to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/JobMetricSample" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}/samples": { + "get": { + "operationId": "TrainingJobAttemptMetrics_getAttemptMetricSamples", + "description": "Get sampled metric values from a training job attempt. Use 'latest' for the latest attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "metric_name", + "in": "path", + "required": true, + "description": "The metric name.", + "schema": { + "type": "string" + } + }, + { + "name": "started_at", + "in": "query", + "required": false, + "description": "Start of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "ended_at", + "in": "query", + "required": false, + "description": "End of the metric time range.", + "schema": { + "$ref": "#/components/schemas/FoundryTimestamp" + }, + "explode": false + }, + { + "name": "min_step", + "in": "query", + "required": false, + "description": "Minimum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "max_step", + "in": "query", + "required": false, + "description": "Maximum metric step to include.", + "schema": { + "type": "integer", + "format": "int64" + }, + "explode": false + }, + { + "name": "limit", + "in": "query", + "required": false, + "description": "Maximum number of metric points to return.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/JobMetricSample" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/outputs": { + "get": { + "operationId": "TrainingJobAttemptOutputs_listAttemptOutputs", + "description": "List outputs produced by a specific training job attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "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/JobOutputReference" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/attempts/{attempt_id}/outputs/{output_name}": { + "get": { + "operationId": "TrainingJobAttemptOutputs_getAttemptOutput", + "description": "Get one output produced by a specific training job attempt.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "attempt_id", + "in": "path", + "required": true, + "description": "The attempt identifier, or 'latest' for the latest attempt.", + "schema": { + "$ref": "#/components/schemas/JobAttemptIdentifier" + } + }, + { + "name": "output_name", + "in": "path", + "required": true, + "description": "The output name.", + "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/JobOutputReference" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/outputs": { + "get": { + "operationId": "TrainingJobOutputs_listOutputs", + "description": "List outputs produced by a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "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": { + "type": "object", + "required": [ + "data", + "has_more" + ], + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobOutputReference" + }, + "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." + }, + "next_after": { + "type": "string", + "description": "Opaque cursor to pass as the next request's after value when has_more is true.", + "readOnly": true + } + }, + "description": "The response data for a requested list of training job items." + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/outputs/{output_name}": { + "get": { + "operationId": "TrainingJobOutputs_getOutput", + "description": "Get one output produced by a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "output_name", + "in": "path", + "required": true, + "description": "The output name.", + "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/JobOutputReference" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}/services": { + "get": { + "operationId": "TrainingJobs_showServices", + "description": "List service endpoints for the current view of a training job.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "schema": { + "type": "string" + } + }, + { + "name": "node_id", + "in": "query", + "required": false, + "description": "Node identifier whose service endpoints should be returned. If omitted, leader-node services are returned.", + "schema": { + "type": "integer", + "format": "int32" + }, + "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/TrainingJobServiceCollection" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + }, + "/training_jobs/{job_name}:cancel": { + "post": { + "operationId": "TrainingJobs_beginCancel", + "description": "Cancel a training job by name. Returns 200 if cancelled immediately, or 202 Accepted with Location and Operation-Location headers to poll for completion.", + "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": [ + "TrainingJobs=V1Preview" + ] + } + }, + { + "name": "job_name", + "in": "path", + "required": true, + "description": "The training job name.", + "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." + }, + "202": { + "description": "Response returned when a job cancel operation is accepted asynchronously.", + "headers": { + "Location": { + "required": true, + "description": "URL to poll for the final result of the cancel operation.", + "schema": { + "type": "string" + } + }, + "Operation-Location": { + "required": false, + "description": "URL to poll for the status of the cancel operation.", + "schema": { + "type": "string" + } + }, + "Retry-After": { + "required": false, + "description": "Suggested delay in seconds before polling.", + "schema": { + "type": "integer", + "format": "int32" + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "tags": [ + "TrainingJobs" + ] + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "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 + } + }, + "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." + }, + "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." + }, + "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." + }, + "AgentContainerObject": { + "type": "object", + "required": [ + "object", + "status", + "created_at", + "updated_at" + ], + "properties": { + "object": { + "type": "string", + "enum": [ + "agent.container" + ], + "description": "The object type, which is always 'agent.container'.", + "readOnly": true + }, + "id": { + "type": "string", + "description": "The identifier of the container.", + "readOnly": true + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentContainerStatus" + } + ], + "description": "The status of the container of a specific version of an agent.", + "readOnly": true + }, + "max_replicas": { + "type": "integer", + "format": "int32", + "description": "The maximum number of replicas for the container. Default is 1.", + "example": 10 + }, + "min_replicas": { + "type": "integer", + "format": "int32", + "description": "The minimum number of replicas for the container. Default is 1.", + "example": 1 + }, + "error_message": { + "type": "string", + "description": "The error message if the container failed to operate, if any.", + "readOnly": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The creation time of the container.", + "readOnly": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The last update time of the container.", + "readOnly": true + }, + "container": { + "allOf": [ + { + "$ref": "#/components/schemas/ContainerDetails" + } + ], + "description": "The detailed container information.", + "readOnly": true + } + }, + "description": "The details of the container of a specific version of an agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "ContainerAgents=V1Preview" + ] + } + }, + "AgentContainerOperationError": { + "type": "object", + "required": [ + "code", + "type", + "message" + ], + "properties": { + "code": { + "type": "string", + "description": "The error code of the container operation." + }, + "type": { + "type": "string", + "description": "The error type of the container operation." + }, + "message": { + "type": "string", + "description": "The error message of the container operation." + } + }, + "description": "The error details of the container operation, if any.", + "x-ms-foundry-meta": { + "required_previews": [ + "ContainerAgents=V1Preview" + ] + } + }, + "AgentContainerOperationObject": { + "type": "object", + "required": [ + "id", + "agent_id", + "agent_version_id", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "The ID of the container operation. This id is a globally unique identifier." + }, + "agent_id": { + "type": "string", + "description": "The ID of the agent." + }, + "agent_version_id": { + "type": "string", + "description": "The ID of the agent version." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentContainerOperationStatus" + } + ], + "description": "The status of the container operation." + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentContainerOperationError" + } + ], + "description": "The error of the container operation, if any." + }, + "container": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentContainerObject" + } + ], + "description": "The container of the specific version of an agent." + } + }, + "description": "The container operation for a specific version of an agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "ContainerAgents=V1Preview" + ] + } + }, + "AgentContainerOperationStatus": { + "type": "string", + "enum": [ + "NotStarted", + "InProgress", + "Succeeded", + "Failed" + ], + "description": "Status of the container operation for a specific version of an agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "ContainerAgents=V1Preview" + ] + } + }, + "AgentContainerStatus": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Starting", + "Running", + "Stopping", + "Stopped", + "Failed", + "Deleting", + "Deleted", + "Updating" + ] + } + ], + "description": "Status of the container of a specific version of an agent.", + "x-ms-foundry-meta": { + "required_previews": [ + "ContainerAgents=V1Preview" + ] + } + }, + "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": { + "prompt": "#/components/schemas/PromptAgentDefinition", + "workflow": "#/components/schemas/WorkflowAgentDefinition", + "hosted": "#/components/schemas/HostedAgentDefinition", + "container_app": "#/components/schemas/ContainerAppAgentDefinition" + } + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview" + ] + } + }, + "AgentDefinitionOptInKeys": { + "type": "string", + "enum": [ + "HostedAgents=V1Preview", + "WorkflowAgents=V1Preview", + "ContainerAgents=V1Preview" + ], + "description": "Opt-in keys for defining preview Hosted or Workflow Agents." + }, + "AgentEndpoint": { + "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" + ] + } + }, + "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" + ] + } + }, + "AgentEndpointProtocol": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "activity", + "responses", + "a2a", + "invocations" + ] + } + ] + }, + "AgentEndpointUpdate": { + "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" + ] + } + }, + "AgentEvaluation": { + "type": "object", + "required": [ + "id", + "status" + ], + "properties": { + "id": { + "type": "string", + "description": "Identifier of the agent evaluation run." + }, + "status": { + "type": "string", + "description": "Status of the agent evaluation. Options: Running, Completed, Failed." + }, + "error": { + "type": "string", + "description": "The reason of the request failure for the long running process, if applicable." + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AgentEvaluationResult" + }, + "description": "The agent evaluation result." + } + }, + "description": "Evaluation response for agent evaluation run." + }, + "AgentEvaluationRedactionConfiguration": { + "type": "object", + "properties": { + "redactScoreProperties": { + "type": "boolean", + "description": "Redact score properties. If not specified, the default is to redact in production." + } + }, + "description": "The redaction configuration will allow the user to control what is redacted." + }, + "AgentEvaluationRequest": { + "type": "object", + "required": [ + "runId", + "evaluators", + "appInsightsConnectionString" + ], + "properties": { + "runId": { + "type": "string", + "description": "Identifier of the agent run." + }, + "threadId": { + "type": "string", + "description": "Identifier of the agent thread. This field is mandatory currently, but it will be optional in the future." + }, + "evaluators": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EvaluatorConfiguration" + }, + "description": "Evaluators to be used for the evaluation." + }, + "samplingConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentEvaluationSamplingConfiguration" + } + ], + "description": "Sampling configuration for the evaluation." + }, + "redactionConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentEvaluationRedactionConfiguration" + } + ], + "description": "Redaction configuration for the evaluation." + }, + "appInsightsConnectionString": { + "type": "string", + "description": "Pass the AppInsights connection string to the agent evaluation for the evaluation results and the errors logs." + } + }, + "description": "Evaluation request for agent run." + }, + "AgentEvaluationResult": { + "type": "object", + "required": [ + "evaluator", + "evaluatorId", + "score", + "status", + "runId" + ], + "properties": { + "evaluator": { + "type": "string", + "description": "Evaluator's name. This is the name of the evaluator that was used to evaluate the agent's completion." + }, + "evaluatorId": { + "type": "string", + "description": "Identifier of the evaluator." + }, + "score": { + "type": "number", + "format": "float", + "description": "Score of the given evaluator. No restriction on range." + }, + "status": { + "type": "string", + "description": "Status of the evaluator result. Options: Running, Completed, Failed, NotApplicable." + }, + "reason": { + "type": "string", + "description": "Reasoning for the evaluation result." + }, + "version": { + "type": "string", + "description": "Version of the evaluator that was used to evaluate the agent's completion." + }, + "threadId": { + "type": "string", + "description": "The unique identifier of the thread." + }, + "runId": { + "type": "string", + "description": "The unique identifier of the run." + }, + "error": { + "type": "string", + "description": "A string explaining why there was an error, if applicable." + }, + "additionalDetails": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional properties relevant to the evaluator. These will differ between evaluators." + } + }, + "description": "Result for the agent evaluation evaluator run." + }, + "AgentEvaluationSamplingConfiguration": { + "type": "object", + "required": [ + "name", + "samplingPercent", + "maxRequestRate" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the sampling strategy." + }, + "samplingPercent": { + "type": "number", + "format": "float", + "description": "Percentage of sampling per hour (0-100)." + }, + "maxRequestRate": { + "type": "number", + "format": "float", + "description": "Maximum request rate per hour (0 to 1000)." + } + }, + "description": "Definition for sampling strategy." + }, + "AgentId": { + "type": "object", + "required": [ + "type", + "name", + "version" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "agent_id" + ] + }, + "name": { + "type": "string", + "maxLength": 256, + "description": "The name of the agent." + }, + "version": { + "type": "string", + "description": "The version identifier of the agent." + } + } + }, + "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", + "container_app" + ] + } + ] + }, + "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/AgentEndpoint" + } + ], + "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" + ] + } + }, + "blueprint": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentIdentity" + } + ], + "description": "The blueprint for the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "blueprint_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentBlueprintReference" + } + ], + "description": "The blueprint for the agent", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "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", + "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" + ] + } + }, + "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", + "status" + ], + "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": { + "type": "integer", + "format": "unixtime", + "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.", + "default": "active" + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Error" + } + ], + "description": "Error details if the agent version provisioning failed." + }, + "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" + }, + "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." + }, + "AssetTypes": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "uri_file", + "uri_folder", + "safetensors_model", + "literal" + ] + } + ], + "description": "Type of job input/output asset." + }, + "AssistantMessage": { + "type": "object", + "required": [ + "role", + "content" + ], + "properties": { + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "Indicates this is an assistant message." + }, + "content": { + "type": "string", + "description": "Response content generated by the assistant." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Message" + } + ], + "description": "A message generated by the assistant in response to previous messages." + }, + "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": { + "allOf": [ + { + "$ref": "#/components/schemas/BenchmarkName" + } + ], + "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" + } + ] + }, + "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/ModelSamplingParamsUpdate" + } + ], + "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": { + "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." + }, + "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." + }, + "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/TargetConfig" + } + ], + "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" + }, + "BaseModelReferenceConfiguration": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "base_model" + ], + "description": "Reference policy kind, always 'base_model'." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Use the submitted base model as the reference policy." + }, + "BenchmarkName": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "builtin.gpqa_diamond", + "builtin.bbeh", + "builtin.bigbenchhard", + "builtin.frontierscience", + "builtin.musr", + "builtin.truthful_qa", + "builtin.inspect_ai.gpqa_diamond", + "builtin.inspect_ai.chembench", + "builtin.inspect_ai.aime_2025", + "builtin.inspect_ai.musr" + ] + } + ], + "description": "The set of available benchmark specifications." + }, + "BingCustomSearchConfiguration": { + "type": "object", + "required": [ + "project_connection_id", + "instance_name" + ], + "properties": { + "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." + }, + "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": { + "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." + }, + "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": { + "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." + }, + "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": { + "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." + }, + "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": [ { - "name": "api-version", - "in": "query", - "required": true, - "description": "The API version to use for this operation.", - "schema": { - "type": "string" - }, - "explode": false + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "responses": { - "200": { - "description": "The request has succeeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteToolsetResponse" - } - } - } + "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`" }, - "default": { - "description": "An unexpected error response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiErrorResponse" - } + "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." } }, - "tags": [ - "Toolsets" + "description": "Blob reference details." + }, + "BotServiceAuthorizationScheme": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "BotService" + ] + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + } ], "x-ms-foundry-meta": { - "conditional_previews": [ - "Toolsets=V1Preview" + "required_previews": [ + "AgentEndpoints=V1Preview" ] } - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "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 - } - }, - "schemas": { - "A2APreviewTool": { + "BotServiceRbacAuthorizationScheme": { "type": "object", "required": [ "type" @@ -11635,9 +20338,34 @@ "type": { "type": "string", "enum": [ - "a2a_preview" + "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 type of the tool. Always `\"a2a_preview`." + "description": "The object type, which is always 'browser_automation_preview'." }, "name": { "type": "string", @@ -11647,18 +20375,13 @@ "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." + "browser_automation_preview": { + "allOf": [ + { + "$ref": "#/components/schemas/BrowserAutomationToolParameters" + } + ], + "description": "The Browser Automation Tool parameters." } }, "allOf": [ @@ -11666,14 +20389,13 @@ "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "An agent implementing the A2A protocol." + "description": "The input definition information for a Browser Automation Tool, as used to configure an Agent." }, - "A2AToolCall": { + "BrowserAutomationToolCall": { "type": "object", "required": [ "type", "call_id", - "name", "arguments", "status" ], @@ -11681,17 +20403,13 @@ "type": { "type": "string", "enum": [ - "a2a_preview_call" + "browser_automation_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." @@ -11710,38 +20428,33 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "An A2A (Agent-to-Agent) tool call." + "description": "A browser automation tool call." }, - "A2AToolCallOutput": { + "BrowserAutomationToolCallOutput": { "type": "object", "required": [ "type", "call_id", - "name", "status" ], "properties": { "type": { "type": "string", "enum": [ - "a2a_preview_call_output" + "browser_automation_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." + "description": "The output from the browser automation tool call." }, "status": { "allOf": [ @@ -11757,19 +20470,35 @@ "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "The output of an A2A (Agent-to-Agent) tool call." + "description": "The output of a browser automation tool call." }, - "AISearchIndexResource": { + "BrowserAutomationToolConnectionParameters": { "type": "object", + "required": [ + "project_connection_id" + ], "properties": { - "project_connection_id": { + "name": { "type": "string", - "description": "An index connection ID in an IndexResource attached to this agent." + "description": "Optional user-defined name for this tool or configuration." }, - "index_name": { + "description": { "type": "string", - "description": "The name of an index in an IndexResource attached to this agent." + "description": "Optional user-defined description for this tool or configuration." }, + "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": { "name": { "type": "string", "description": "Optional user-defined name for this tool or configuration." @@ -11778,53 +20507,100 @@ "type": "string", "description": "Optional user-defined description for this tool or configuration." }, - "query_type": { + "connection": { "allOf": [ { - "$ref": "#/components/schemas/AzureAISearchQueryType" + "$ref": "#/components/schemas/BrowserAutomationToolConnectionParameters" } ], - "description": "Type of query in an AIIndexResource attached to this agent." + "description": "The project connection parameters associated with the Browser Automation Tool." + } + }, + "description": "Definition of input parameters for the Browser Automation Tool." + }, + "CaptureStructuredOutputsTool": { + "type": "object", + "required": [ + "type", + "outputs" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "capture_structured_outputs" + ], + "description": "The type of the tool. Always `capture_structured_outputs`." }, - "top_k": { + "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": "Number of documents to retrieve from search and present to the model." + "description": "X-axis coordinate." }, - "filter": { - "type": "string", - "description": "filter string for search resource. [Learn more here](https://learn.microsoft.com/azure/search/search-filters)." + "y": { + "type": "integer", + "format": "int32", + "description": "Y-axis coordinate." }, - "index_asset_id": { - "type": "string", - "description": "Index asset id for search resource." + "size": { + "type": "integer", + "format": "int32", + "description": "Size of the chart element." } }, - "description": "A AI Search Index resource." + "description": "Coordinates for the analysis chart." }, - "AgentBlueprintReference": { + "ChatSummaryMemoryItem": { "type": "object", "required": [ - "type" + "kind" ], "properties": { - "type": { - "$ref": "#/components/schemas/AgentBlueprintReferenceType" + "kind": { + "type": "string", + "enum": [ + "chat_summary" + ], + "description": "The kind of the memory item." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "ManagedAgentIdentityBlueprint": "#/components/schemas/ManagedAgentIdentityBlueprintReference" + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItem" } - }, + ], + "description": "A memory item containing a summary extracted from conversations.", "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" + "conditional_previews": [ + "MemoryStores=V1Preview" ] } }, - "AgentBlueprintReferenceType": { + "ChatTemplate": { "anyOf": [ { "type": "string" @@ -11832,904 +20608,924 @@ { "type": "string", "enum": [ - "ManagedAgentIdentityBlueprint" + "chatml", + "llama_3", + "zephyr", + "gemma", + "phi_3" ] } ], - "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" - ] - } + "description": "Chat template used to format conversational training data." }, - "AgentCardSkill": { + "ClusterInsightResult": { "type": "object", "required": [ - "id", - "name" + "summary", + "clusters" ], "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" + "summary": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightSummary" + } + ], + "description": "Summary of the insights report." }, - "tags": { + "clusters": { "type": "array", "items": { - "$ref": "#/components/schemas/AgentCardSkillTag" + "$ref": "#/components/schemas/InsightCluster" }, - "maxItems": 5, - "description": "set of tagwords describing classes of capabilities for the skill" + "description": "List of clusters identified in the insights." }, - "examples": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentCardSkillExample" + "coordinates": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ChartCoordinate" }, - "maxItems": 5, - "description": "A list of example scenarios that the skill can perform." + "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." } }, - "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" - ] - } + "description": "Insights from the cluster analysis." }, - "AgentCardUpdate": { + "ClusterTokenUsage": { "type": "object", + "required": [ + "inputTokenUsage", + "outputTokenUsage", + "totalTokenUsage" + ], "properties": { - "version": { - "type": "string", - "minLength": 1, - "maxLength": 32, - "description": "The version of the agent card." + "inputTokenUsage": { + "type": "integer", + "format": "int32", + "description": "input token usage" }, - "description": { - "type": "string", - "maxLength": 2048, - "description": "The description of the agent card." + "outputTokenUsage": { + "type": "integer", + "format": "int32", + "description": "output token usage" }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentCardSkill" - }, - "maxItems": 16, - "description": "The set of skills that an agent can perform." + "totalTokenUsage": { + "type": "integer", + "format": "int32", + "description": "total token usage" } }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "Token usage for cluster analysis" }, - "AgentClusterInsightRequest": { + "CodeBasedEvaluatorDefinition": { "type": "object", "required": [ - "type", - "agentName" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "AgentClusterInsight" - ], - "description": "The type of request." + "code" + ] }, - "agentName": { + "code_text": { "type": "string", - "description": "Identifier for the agent." + "description": "Inline code text for the evaluator" }, - "modelConfiguration": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightModelConfiguration" - } - ], - "description": "Configuration of the model used in the insight generation." + "entry_point": { + "type": "string", + "description": "The entry point Python file name for the uploaded evaluator code (e.g. 'answer_length_evaluator.py')" + }, + "image_tag": { + "type": "string", + "description": "The container image tag to use for evaluator code execution" + }, + "blob_uri": { + "type": "string", + "description": "The blob URI for the evaluator storage" } }, "allOf": [ { - "$ref": "#/components/schemas/InsightRequest" + "$ref": "#/components/schemas/EvaluatorDefinition" } ], - "description": "Insights on set of Agent Evaluation Results" + "description": "Code-based evaluator definition using python code" }, - "AgentClusterInsightResult": { + "CommandJobLimits": { "type": "object", "required": [ - "type", - "clusterInsight" + "job_limits_type" ], "properties": { - "type": { + "job_limits_type": { "type": "string", "enum": [ - "AgentClusterInsight" + "command" ], - "description": "The type of insights result." + "description": "JobLimit type." }, - "clusterInsight": { - "$ref": "#/components/schemas/ClusterInsightResult" + "timeout": { + "type": "string", + "format": "duration", + "description": "The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds." } }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "Insights from the agent cluster analysis." + "description": "Command Job limit class." }, - "AgentContainerObject": { + "CompletionMessageToolCallChunk": { "type": "object", "required": [ - "object", - "status", - "created_at", - "updated_at" + "id", + "type" ], "properties": { - "object": { + "id": { + "type": "string", + "description": "The Id for the tool call." + }, + "type": { "type": "string", "enum": [ - "agent.container" + "function" ], - "description": "The object type, which is always 'agent.container'.", + "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": "The identifier of the container.", + "description": "A unique identifier for the connection, generated by the service", "readOnly": true }, - "status": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/AgentContainerStatus" + "$ref": "#/components/schemas/ConnectionType" } ], - "description": "The status of the container of a specific version of an agent.", - "readOnly": true - }, - "max_replicas": { - "type": "integer", - "format": "int32", - "description": "The maximum number of replicas for the container. Default is 1.", - "example": 10 - }, - "min_replicas": { - "type": "integer", - "format": "int32", - "description": "The minimum number of replicas for the container. Default is 1.", - "example": 1 - }, - "error_message": { - "type": "string", - "description": "The error message if the container failed to operate, if any.", + "description": "Category of the connection", "readOnly": true }, - "created_at": { + "target": { "type": "string", - "format": "date-time", - "description": "The creation time of the container.", + "description": "The connection URL to be used for this service", "readOnly": true }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "The last update time of the container.", + "isDefault": { + "type": "boolean", + "description": "Whether the connection is tagged as the default connection of its type", "readOnly": true }, - "container": { + "credentials": { "allOf": [ { - "$ref": "#/components/schemas/ContainerDetails" + "$ref": "#/components/schemas/BaseCredentials" } ], - "description": "The detailed container information.", + "description": "The credentials used by the connection", + "readOnly": true + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata of the connection", "readOnly": true } }, - "description": "The details of the container of a specific version of an agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "ContainerAgents=V1Preview" - ] - } + "description": "Response from the list and get connections operations" }, - "AgentContainerOperationError": { + "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" + }, + "ContainerAppAgentDefinition": { "type": "object", "required": [ - "code", - "type", - "message" + "kind", + "container_protocol_versions", + "container_app_resource_id", + "ingress_subdomain_suffix" ], "properties": { - "code": { + "kind": { "type": "string", - "description": "The error code of the container operation." + "enum": [ + "container_app" + ] }, - "type": { + "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": "a2a", + "version": "v0.3.0" + } + ] + }, + "container_app_resource_id": { "type": "string", - "description": "The error type of the container operation." + "description": "The resource ID of the Azure Container App that hosts this agent. Not mutable across versions." }, - "message": { + "ingress_subdomain_suffix": { "type": "string", - "description": "The error message of the container operation." + "description": "The suffix to apply to the app subdomain when sending ingress to the agent. This can be a label (e.g., '---current'), a specific revision (e.g., '--0000001'), or empty to use the default endpoint for the container app.", + "example": "--0000001" } }, - "description": "The error details of the container operation, if any.", + "allOf": [ + { + "$ref": "#/components/schemas/AgentDefinition" + } + ], + "description": "The container app agent definition.", "x-ms-foundry-meta": { "required_previews": [ "ContainerAgents=V1Preview" ] } }, - "AgentContainerOperationObject": { + "ContainerDetails": { "type": "object", "required": [ - "id", - "agent_id", - "agent_version_id", - "status" + "provisioning_state", + "state", + "health_state", + "replicas", + "updated_on" ], "properties": { - "id": { + "provisioning_state": { "type": "string", - "description": "The ID of the container operation. This id is a globally unique identifier." + "description": "The provisioning state of the container." }, - "agent_id": { + "provisioning_error": { "type": "string", - "description": "The ID of the agent." + "description": "The provisioning error of the container, if any." }, - "agent_version_id": { + "state": { "type": "string", - "description": "The ID of the agent version." + "description": "The state of the container." }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentContainerOperationStatus" - } - ], - "description": "The status of the container operation." + "health_state": { + "type": "string", + "description": "The health state of the container." }, - "error": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentContainerOperationError" - } - ], - "description": "The error of the container operation, if any." + "replicas": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContainerReplica" + }, + "description": "The list of replicas in the container." }, - "container": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentContainerObject" - } - ], - "description": "The container of the specific version of an agent." + "updated_on": { + "type": "string", + "format": "date-time", + "description": "The last update time of the container." } }, - "description": "The container operation for a specific version of an agent.", + "description": "Detailed information about the container.", "x-ms-foundry-meta": { "required_previews": [ "ContainerAgents=V1Preview" ] } }, - "AgentContainerOperationStatus": { + "ContainerLogKind": { "type": "string", "enum": [ - "NotStarted", - "InProgress", - "Succeeded", - "Failed" + "console", + "system" ], - "description": "Status of the container operation for a specific version of an agent.", + "description": "The type of logs to stream from a container.", "x-ms-foundry-meta": { "required_previews": [ "ContainerAgents=V1Preview" ] } }, - "AgentContainerStatus": { - "anyOf": [ - { - "type": "string" + "ContainerReplica": { + "type": "object", + "required": [ + "name", + "state", + "container_state" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the replica." }, - { + "state": { "type": "string", - "enum": [ - "Starting", - "Running", - "Stopping", - "Stopped", - "Failed", - "Deleting", - "Deleted", - "Updating" - ] + "description": "The state of the replica." + }, + "container_state": { + "type": "string", + "description": "The container state of the replica." } - ], - "description": "Status of the container of a specific version of an agent.", + }, + "description": "Information about a container replica.", "x-ms-foundry-meta": { "required_previews": [ "ContainerAgents=V1Preview" ] } }, - "AgentDefinition": { + "ContentFilterResult": { "type": "object", "required": [ - "kind" + "blocked", + "source_type", + "content_filter_results" ], "properties": { - "kind": { - "$ref": "#/components/schemas/AgentKind" + "blocked": { + "type": "boolean", + "description": "Whether the content was blocked by the content filter." }, - "rai_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RaiConfig" - } - ], - "description": "Configuration for Responsible AI (RAI) content filtering and safety features." - } - }, - "discriminator": { - "propertyName": "kind", - "mapping": { - "prompt": "#/components/schemas/PromptAgentDefinition", - "workflow": "#/components/schemas/WorkflowAgentDefinition", - "hosted": "#/components/schemas/HostedAgentDefinition", - "container_app": "#/components/schemas/ContainerAppAgentDefinition" - } - }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview" - ] - } - }, - "AgentDefinitionOptInKeys": { - "type": "string", - "enum": [ - "HostedAgents=V1Preview", - "WorkflowAgents=V1Preview", - "ContainerAgents=V1Preview" - ], - "description": "Opt-in keys for defining preview Hosted or Workflow Agents." - }, - "AgentEndpoint": { - "type": "object", - "properties": { - "version_selector": { + "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/VersionSelector" + "$ref": "#/components/schemas/AzureContentFilterResultsForResponses" } ], - "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" + "description": "The content filter results for this evaluation." }, - "authorization_schemes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" - }, - "description": "The authorization schemes supported by the agent endpoint" + "tool_call_id": { + "type": "string", + "description": "The ID of the tool call associated with this content filter result, if applicable." } }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "A content filter evaluation result for a specific source in the response." }, - "AgentEndpointAuthorizationScheme": { + "ContinuousEvaluationRuleAction": { "type": "object", "required": [ - "type" + "type", + "evalId" ], "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" + "continuousEvaluation" ] - } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } - }, - "AgentEndpointProtocol": { - "anyOf": [ - { - "type": "string" }, - { + "evalId": { "type": "string", - "enum": [ - "activity", - "responses", - "a2a", - "invocations" - ] - } - ] - }, - "AgentEndpointUpdate": { - "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" + "description": "Eval Id to add continuous evaluation runs to." }, - "authorization_schemes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" - }, - "description": "The authorization schemes supported by the agent endpoint" + "maxHourlyRuns": { + "type": "integer", + "format": "int32", + "description": "Maximum number of evaluation runs allowed per hour." } }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationRuleAction" + } + ], + "description": "Evaluation rule action for continuous evaluation." }, - "AgentEvaluation": { + "CosmosDBIndex": { "type": "object", "required": [ - "id", - "status" + "type" ], "properties": { - "id": { - "type": "string", - "description": "Identifier of the agent evaluation run." - }, - "status": { - "type": "string", - "description": "Status of the agent evaluation. Options: Running, Completed, Failed." - }, - "error": { + "type": { "type": "string", - "description": "The reason of the request failure for the long running process, if applicable." - }, - "result": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentEvaluationResult" - }, - "description": "The agent evaluation result." + "enum": [ + "CosmosDBNoSqlVectorStore" + ], + "description": "Type of index" } }, - "description": "Evaluation response for agent evaluation run." + "allOf": [ + { + "$ref": "#/components/schemas/Index" + } + ], + "description": "CosmosDB Vector Store Index Definition" }, - "AgentEvaluationRedactionConfiguration": { + "CosmosDBIndexUpdate": { "type": "object", + "required": [ + "type" + ], "properties": { - "redactScoreProperties": { - "type": "boolean", - "description": "Redact score properties. If not specified, the default is to redact in production." + "type": { + "type": "string", + "enum": [ + "CosmosDBNoSqlVectorStore" + ], + "description": "Type of index" } }, - "description": "The redaction configuration will allow the user to control what is redacted." + "allOf": [ + { + "$ref": "#/components/schemas/IndexUpdate" + } + ], + "description": "CosmosDB Vector Store Index Definition" }, - "AgentEvaluationRequest": { + "CpoTrainingConfiguration": { "type": "object", "required": [ - "runId", - "evaluators", - "appInsightsConnectionString" + "algorithm" ], "properties": { - "runId": { - "type": "string", - "description": "Identifier of the agent run." - }, - "threadId": { + "algorithm": { "type": "string", - "description": "Identifier of the agent thread. This field is mandatory currently, but it will be optional in the future." - }, - "evaluators": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EvaluatorConfiguration" - }, - "description": "Evaluators to be used for the evaluation." + "enum": [ + "cpo" + ], + "description": "Training algorithm, always 'cpo'." }, - "samplingConfiguration": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/AgentEvaluationSamplingConfiguration" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "Sampling configuration for the evaluation." + "description": "LoRA adapter configuration." }, - "redactionConfiguration": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/AgentEvaluationRedactionConfiguration" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "Redaction configuration for the evaluation." - }, - "appInsightsConnectionString": { - "type": "string", - "description": "Pass the AppInsights connection string to the agent evaluation for the evaluation results and the errors logs." + "description": "Evaluation configuration." } }, - "description": "Evaluation request for agent run." + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" + } + ], + "description": "Contrastive preference optimization training recipe." }, - "AgentEvaluationResult": { + "CreateAgentFromManifestRequest": { "type": "object", "required": [ - "evaluator", - "evaluatorId", - "score", - "status", - "runId" + "name", + "manifest_id", + "parameter_values" ], "properties": { - "evaluator": { - "type": "string", - "description": "Evaluator's name. This is the name of the evaluator that was used to evaluate the agent's completion." - }, - "evaluatorId": { - "type": "string", - "description": "Identifier of the evaluator." - }, - "score": { - "type": "number", - "format": "float", - "description": "Score of the given evaluator. No restriction on range." - }, - "status": { - "type": "string", - "description": "Status of the evaluator result. Options: Running, Completed, Failed, NotApplicable." - }, - "reason": { - "type": "string", - "description": "Reasoning for the evaluation result." - }, - "version": { + "name": { "type": "string", - "description": "Version of the evaluator that was used to evaluate the agent's completion." + "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." }, - "threadId": { - "type": "string", - "description": "The unique identifier of the thread." + "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" }, - "runId": { + "description": { "type": "string", - "description": "The unique identifier of the run." + "maxLength": 512, + "description": "A human-readable description of the agent." }, - "error": { + "manifest_id": { "type": "string", - "description": "A string explaining why there was an error, if applicable." + "description": "The manifest ID to import the agent version from." }, - "additionalDetails": { + "parameter_values": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties relevant to the evaluator. These will differ between evaluators." + "additionalProperties": {}, + "description": "The inputs to the manifest that will result in a fully materialized Agent." } - }, - "description": "Result for the agent evaluation evaluator run." + } }, - "AgentEvaluationSamplingConfiguration": { + "CreateAgentRequest": { "type": "object", "required": [ "name", - "samplingPercent", - "maxRequestRate" + "definition" ], "properties": { "name": { "type": "string", - "description": "Name of the sampling strategy." + "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." }, - "samplingPercent": { - "type": "number", - "format": "float", - "description": "Percentage of sampling per hour (0-100)." + "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" }, - "maxRequestRate": { - "type": "number", - "format": "float", - "description": "Maximum request rate per hour (0 to 1000)." - } - }, - "description": "Definition for sampling strategy." - }, - "AgentId": { - "type": "object", - "required": [ - "type", - "name", - "version" - ], - "properties": { - "type": { + "description": { "type": "string", - "enum": [ - "agent_id" - ] + "maxLength": 512, + "description": "A human-readable description of the agent." }, - "name": { - "type": "string", - "maxLength": 256, - "description": "The name 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" + ] + } }, - "version": { - "type": "string", - "description": "The version identifier of the agent." + "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/AgentEndpoint" + } + ], + "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" + ] } }, - "AgentIdentity": { + "CreateAgentSessionRequest": { "type": "object", "required": [ - "principal_id", - "client_id" + "version_indicator" ], "properties": { - "principal_id": { + "agent_session_id": { "type": "string", - "description": "The principal ID of the agent instance" + "description": "Optional caller-provided session ID. If specified, it must be unique within the agent endpoint. Auto-generated if omitted." }, - "client_id": { - "type": "string", - "description": "The client ID of the agent instance. Also referred to as the instance ID" + "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" ] } }, - "AgentKind": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "prompt", - "hosted", - "workflow", - "container_app" - ] - } - ] - }, - "AgentObject": { + "CreateAgentVersionFromManifestRequest": { "type": "object", "required": [ - "object", - "id", - "name", - "versions" + "manifest_id", + "parameter_values" ], "properties": { - "object": { - "type": "string", - "enum": [ - "agent" - ], - "description": "The object type, which is always '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" }, - "id": { + "description": { "type": "string", - "description": "The unique identifier of the agent." + "maxLength": 512, + "description": "A human-readable description of the agent." }, - "name": { + "manifest_id": { "type": "string", - "maxLength": 63, - "description": "The name of the agent." + "description": "The manifest ID to import the agent version from." }, - "versions": { + "parameter_values": { "type": "object", - "properties": { - "latest": { - "$ref": "#/components/schemas/AgentVersionObject" - } + "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" }, - "required": [ - "latest" - ], - "description": "The latest version of the agent." + "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" }, - "agent_endpoint": { + "description": { + "type": "string", + "maxLength": 512, + "description": "A human-readable description of the agent." + }, + "definition": { "allOf": [ { - "$ref": "#/components/schemas/AgentEndpoint" + "$ref": "#/components/schemas/AgentDefinition" } ], - "description": "The endpoint configuration for the agent", + "description": "The agent definition. This can be a workflow, hosted agent, or a simple agent definition.", "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" + "conditional_previews": [ + "HostedAgents=V1Preview", + "ContainerAgents=V1Preview", + "WorkflowAgents=V1Preview" ] } }, - "instance_identity": { + "blueprint_reference": { "allOf": [ { - "$ref": "#/components/schemas/AgentIdentity" + "$ref": "#/components/schemas/AgentBlueprintReference" } ], - "description": "The instance identity of the agent", + "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" + ] + } + }, + "CreateEvalRequest": { + "type": "object", + "required": [ + "data_source_config", + "testing_criteria" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of the evaluation." }, - "blueprint": { + "metadata": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/AgentIdentity" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "description": "The blueprint for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" + "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/EvalGraderAzureAIEvaluator" + }, + { + "$ref": "#/components/schemas/EvalGraderInspectAI" + } ] - } + }, + "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}}`)." }, - "blueprint_reference": { + "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/AgentBlueprintReference" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "description": "The blueprint for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "nullable": true }, - "agent_card": { + "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." + } + }, + "title": "CreateEvalRunRequest" + }, + "CreateOrUpdateManagedAgentIdentityBlueprintRequest": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "maxLength": 63, + "description": "The unique name that identifies the managed agent identity blueprint.\nName can be used to retrieve/update/delete the managed agent identity blueprint.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters." + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "CreatedBy": { + "type": "object", + "properties": { + "agent": { "allOf": [ { - "$ref": "#/components/schemas/AgentCard" + "$ref": "#/components/schemas/AgentId" } ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "The agent that created the item." + }, + "response_id": { + "type": "string", + "description": "The response on which the item is created." } } }, - "AgentProtocol": { + "CredentialType": { "anyOf": [ { "type": "string" @@ -12737,854 +21533,840 @@ { "type": "string", "enum": [ - "activity_protocol", - "responses", - "invocations" + "ApiKey", + "AAD", + "SAS", + "CustomKeys", + "None", + "AgenticIdentityToken_Preview" ] } - ] + ], + "description": "The credential type used by the connection" }, - "AgentReference": { + "CronTrigger": { "type": "object", "required": [ "type", - "name" + "expression" ], "properties": { "type": { "type": "string", "enum": [ - "agent_reference" + "Cron" ] }, - "name": { + "expression": { "type": "string", - "maxLength": 256, - "description": "The name of the agent." + "description": "Cron expression that defines the schedule frequency." }, - "version": { + "timeZone": { "type": "string", - "description": "The version identifier of the agent." + "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." }, - "AgentSessionResource": { + "CustomCredential": { "type": "object", "required": [ - "agent_session_id", - "version_indicator", - "status", - "created_at", - "last_accessed_at", - "expires_at" + "type" ], "properties": { - "agent_session_id": { + "type": { "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" - } + "enum": [ + "CustomKeys" ], - "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).", + "description": "The credential type", "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" - }, + "additionalProperties": { + "type": "string" + }, + "allOf": [ { - "type": "string", - "enum": [ - "creating", - "active", - "idle", - "updating", - "failed", - "deleting", - "deleted", - "expired" - ] + "$ref": "#/components/schemas/BaseCredentials" } ], - "description": "The status of an agent session.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "Custom credential definition" }, - "AgentTaxonomyInput": { + "DailyRecurrenceSchedule": { "type": "object", "required": [ "type", - "target", - "riskCategories" + "hours" ], "properties": { "type": { "type": "string", "enum": [ - "agent" - ], - "description": "Input type of the evaluation taxonomy." - }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } + "Daily" ], - "description": "Target configuration for the agent." + "description": "Daily recurrence type." }, - "riskCategories": { + "hours": { "type": "array", "items": { - "$ref": "#/components/schemas/RiskCategory" + "type": "integer", + "format": "int32" }, - "description": "List of risk categories to evaluate against." + "description": "Hours for the recurrence schedule." } }, "allOf": [ { - "$ref": "#/components/schemas/EvaluationTaxonomyInput" + "$ref": "#/components/schemas/RecurrenceSchedule" } ], - "description": "Input configuration for the evaluation taxonomy when the input type is agent." + "description": "Daily recurrence schedule." }, - "AgentTaxonomyInputUpdate": { + "DataSourceConfig": { "type": "object", + "required": [ + "type", + "schema" + ], "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." + "description": "The data source type discriminator." }, - "riskCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RiskCategory" - }, - "description": "List of risk categories to evaluate against." + "schema": { + "type": "object", + "additionalProperties": {}, + "description": "The overall object JSON schema for the run data source items." } }, - "allOf": [ + "discriminator": { + "propertyName": "type", + "mapping": {} + }, + "description": "Base class for run data sources with discriminator support." + }, + "DatasetType": { + "anyOf": [ { - "$ref": "#/components/schemas/EvaluationTaxonomyInputUpdate" + "type": "string" + }, + { + "type": "string", + "enum": [ + "uri_file", + "uri_folder" + ] } ], - "description": "Input configuration for the evaluation taxonomy when the input type is agent." + "description": "Enum to determine the type of data." }, - "AgentVersionObject": { + "DatasetVersion": { "type": "object", "required": [ - "metadata", - "object", - "id", + "dataUri", + "type", "name", - "version", - "created_at", - "definition", - "status" + "version" ], "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": { + "dataUri": { "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (seconds) when the agent was created." - }, - "definition": { - "$ref": "#/components/schemas/AgentDefinition" + "minLength": 1, + "pattern": "[a-zA-Z0-9_]", + "description": "URI of the data ([example](https://go.microsoft.com/fwlink/?linkid=2202330))" }, - "status": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/AgentVersionStatus" + "$ref": "#/components/schemas/DatasetType" } ], - "description": "The provisioning status of the agent version. Defaults to 'active' for non-hosted agents. For hosted agents, reflects infrastructure readiness.", - "default": "active" + "description": "Dataset type" }, - "error": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Error" - } - ], - "description": "Error details if the agent version provisioning failed." + "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 }, - "instance_identity": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentIdentity" - } - ], - "description": "The instance identity of the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, + "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 }, - "blueprint": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentIdentity" - } - ], - "description": "The blueprint for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, + "name": { + "type": "string", + "description": "The name of the resource", "readOnly": true }, - "blueprint_reference": { + "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/AgentBlueprintReference" + "$ref": "#/components/schemas/DatasetType" } ], - "description": "The blueprint for the agent", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - }, - "readOnly": true + "description": "Dataset type" }, - "agent_guid": { + "description": { "type": "string", - "description": "The unique GUID identifier of the agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" }, - "readOnly": true + "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" }, - "AgentVersionStatus": { - "type": "string", - "enum": [ - "creating", - "active", - "failed", - "deleting", - "deleted" + "DayOfWeek": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ] + } ], - "description": "The provisioning status of an agent version." + "description": "Days of the week for recurrence schedule." }, - "AgenticIdentityPreviewCredentials": { + "DeleteAgentResponse": { "type": "object", "required": [ - "type" + "object", + "name", + "deleted" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "AgenticIdentityToken_Preview" + "agent.deleted" ], - "description": "The credential type", - "readOnly": true + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "Agentic identity credential definition" + "description": "A deleted agent Object" }, - "ApiErrorResponse": { + "DeleteAgentVersionResponse": { "type": "object", "required": [ - "error" + "object", + "name", + "version", + "deleted" ], "properties": { - "error": { - "$ref": "#/components/schemas/OpenAI.Error" + "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": "Error response for API failures." + "description": "A deleted agent version Object" }, - "ApiKeyCredentials": { + "DeleteEvalResponse": { "type": "object", "required": [ - "type" + "object", + "eval_id", + "deleted" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "ApiKey" + "eval.deleted" ], - "description": "The credential type", - "readOnly": true + "description": "The object type. Always 'eval.deleted'." }, - "key": { + "eval_id": { "type": "string", - "description": "API Key", - "readOnly": true + "description": "id of the eval." + }, + "deleted": { + "type": "boolean", + "description": "Whether the eval was successfully deleted." } }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "API Key Credential definition" + "description": "A deleted evaluation Object" }, - "AssetCredentialResponse": { + "DeleteEvalRunResponse": { "type": "object", - "required": [ - "blobReference" - ], "properties": { - "blobReference": { - "allOf": [ - { - "$ref": "#/components/schemas/BlobReference" - } + "object": { + "type": "string", + "enum": [ + "eval.deleted" ], - "description": "Credential info to access the storage account." + "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": "Represents a reference to a blob for consumption" - }, - "AssetId": { - "type": "string", - "description": "Identifier of a saved asset." + "description": "A deleted evaluation run Object." }, - "AssistantMessage": { + "DeleteMemoryStoreResponse": { "type": "object", "required": [ - "role", - "content" + "object", + "name", + "deleted" ], "properties": { - "role": { + "object": { "type": "string", "enum": [ - "assistant" + "memory_store.deleted" ], - "description": "Indicates this is an assistant message." + "description": "The object type. Always 'memory_store.deleted'." }, - "content": { + "name": { "type": "string", - "description": "Response content generated by the assistant." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Message" - } - ], - "description": "A message generated by the assistant in response to previous messages." - }, - "AttackStrategy": { - "anyOf": [ - { - "type": "string" + "description": "The name of the memory store." }, - { - "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" - ] + "deleted": { + "type": "boolean", + "description": "Whether the memory store was successfully deleted." } - ], - "description": "Strategies for attacks." + }, + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "Azure.Core.Foundations.Error": { + "DeleteResponseResult": { "type": "object", "required": [ - "code", - "message" + "id", + "object", + "deleted" ], "properties": { - "code": { - "type": "string", - "description": "One of a server-defined set of error codes." - }, - "message": { + "id": { "type": "string", - "description": "A human-readable representation of the error." + "description": "The operation ID." }, - "target": { + "object": { "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." + "enum": [ + "response" + ], + "description": "Always return 'response'." }, - "innererror": { - "allOf": [ - { - "$ref": "#/components/schemas/Azure.Core.Foundations.InnerError" - } + "deleted": { + "type": "boolean", + "enum": [ + true ], - "description": "An object containing more specific information than the current object about the error." + "description": "Always return true" } }, - "description": "The error object." + "description": "The result of a delete response operation." }, - "Azure.Core.Foundations.ErrorResponse": { + "DeleteSkillResponse": { "type": "object", "required": [ - "error" + "object", + "name", + "deleted" ], "properties": { - "error": { + "object": { "allOf": [ { - "$ref": "#/components/schemas/Azure.Core.Foundations.Error" + "$ref": "#/components/schemas/SkillObjectType" } ], - "description": "The error object." + "description": "The object type. Always 'skill.deleted'.", + "default": "skill.deleted" + }, + "name": { + "type": "string", + "description": "The unique name of the skill." + }, + "deleted": { + "type": "boolean", + "description": "Whether the skill was successfully deleted." } }, - "description": "A response containing error details." + "description": "A deleted skill Object" }, - "Azure.Core.Foundations.InnerError": { + "DeleteToolsetResponse": { "type": "object", + "required": [ + "object", + "name", + "deleted" + ], "properties": { - "code": { + "object": { "type": "string", - "description": "One of a server-defined set of error codes." + "enum": [ + "toolset.deleted" + ], + "description": "The object type. Always 'toolset.deleted'." }, - "innererror": { + "name": { + "type": "string", + "description": "The name of the toolset." + }, + "deleted": { + "type": "boolean", + "description": "Whether the toolset was successfully deleted." + } + }, + "description": "Response returned when a toolset is deleted." + }, + "Deployment": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/Azure.Core.Foundations.InnerError" + "$ref": "#/components/schemas/DeploymentType" } ], - "description": "Inner error." + "description": "The type of the deployment" + }, + "name": { + "type": "string", + "description": "Name of the deployment", + "readOnly": true } }, - "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors." + "discriminator": { + "propertyName": "type", + "mapping": { + "ModelDeployment": "#/components/schemas/ModelDeployment" + } + }, + "description": "Model Deployment Definition" }, - "Azure.Core.Foundations.OperationState": { + "DeploymentType": { "anyOf": [ + { + "type": "string" + }, { "type": "string", "enum": [ - "NotStarted", - "Running", - "Succeeded", - "Failed", - "Canceled" + "ModelDeployment" ] - }, - { - "type": "string" } - ], - "description": "Enum describing allowed operation states." - }, - "Azure.Core.uuid": { - "type": "string", - "format": "uuid", - "description": "Universally Unique Identifier" + ] }, - "AzureAIAgentTarget": { + "DeveloperMessage": { "type": "object", "required": [ - "type", - "name" + "role", + "content" ], "properties": { - "type": { + "role": { "type": "string", "enum": [ - "azure_ai_agent" + "developer" ], - "description": "The type of target, always `azure_ai_agent`." - }, - "name": { - "type": "string", - "description": "The unique identifier of the Azure AI agent." + "description": "Indicates this is a developer message." }, - "version": { + "content": { "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." + "description": "Content provided by a developer to guide model behavior in an evaluation context." } }, "allOf": [ { - "$ref": "#/components/schemas/Target" + "$ref": "#/components/schemas/Message" } ], - "description": "Represents a target specifying an Azure AI agent." + "description": "A message authored by a developer to guide the model during evaluation." }, - "AzureAIAgentTargetUpdate": { + "DistributionConfiguration": { "type": "object", + "required": [ + "distribution_type" + ], "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": { + "distribution_type": { "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." + "description": "Specifies the type of distribution framework." } }, - "allOf": [ - { - "$ref": "#/components/schemas/TargetUpdate" + "discriminator": { + "propertyName": "distribution_type", + "mapping": { + "pytorch": "#/components/schemas/PyTorchDistribution", + "mpi": "#/components/schemas/MpiDistribution", + "tensorflow": "#/components/schemas/TensorFlowDistribution", + "ray": "#/components/schemas/RayDistribution" } - ], - "description": "Represents a target specifying an Azure AI agent." + }, + "description": "Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null." }, - "AzureAIBenchmarkDataSourceConfig": { + "DpoTrainingConfiguration": { "type": "object", "required": [ - "scenario", - "benchmark_name" + "algorithm" ], "properties": { - "scenario": { + "algorithm": { "type": "string", "enum": [ - "benchmark_preview" + "dpo" ], - "description": "Data schema scenario, always `benchmark` for benchmark evaluations." + "description": "Training algorithm, always 'dpo'." }, - "benchmark_name": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/BenchmarkName" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "The name of the benchmark specification." + "description": "LoRA adapter configuration." }, - "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." + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/AzureAIDataSourceConfig" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "Data source configuration for benchmark evaluations." + "description": "Direct preference optimization training recipe." }, - "AzureAIBenchmarkPreviewEvalRunDataSource": { + "EntraAuthorizationScheme": { "type": "object", "required": [ "type", - "target" + "isolation_key_source" ], "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." + "Entra" + ] }, - "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." + "isolation_key_source": { + "$ref": "#/components/schemas/IsolationKeySource" } }, "allOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" } ], - "description": "Represents a data source for benchmark evaluation runs." + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } }, - "AzureAIDataSourceConfig": { + "EntraIDCredentials": { "type": "object", "required": [ - "type", - "scenario" + "type" ], "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" + "AAD" ], - "description": "Data schema scenario." + "description": "The credential type", + "readOnly": true } }, - "discriminator": { - "propertyName": "scenario", - "mapping": { - "benchmark_preview": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "Entra ID credential definition" + }, + "EntraIsolationKeySource": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "Entra" + ] } }, "allOf": [ { - "$ref": "#/components/schemas/DataSourceConfig" + "$ref": "#/components/schemas/IsolationKeySource" } - ] + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } }, - "AzureAIModelTarget": { + "Eval": { "type": "object", "required": [ - "type" + "object", + "id", + "name", + "data_source_config", + "testing_criteria", + "created_at", + "metadata" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "azure_ai_model" + "eval" ], - "description": "The type of target, always `azure_ai_model`." + "description": "The object type.", + "x-stainless-const": true, + "default": "eval" }, - "model": { + "id": { "type": "string", - "description": "The unique identifier of the Azure AI model." + "description": "Unique identifier for the evaluation." }, - "sampling_params": { + "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/EvalGraderAzureAIEvaluator" + }, + { + "$ref": "#/components/schemas/EvalGraderInspectAI" + } + ] + }, + "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/ModelSamplingParams" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "description": "The parameters used to control the sampling behavior of the model during text generation." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/Target" - } - ], - "description": "Represents a target specifying an Azure AI model for operations requiring model selection." + "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" + } }, - "AzureAIModelTargetUpdate": { + "EvalCsvFileIdSource": { "type": "object", + "required": [ + "type", + "id" + ], "properties": { "type": { "type": "string", "enum": [ - "azure_ai_model" + "file_id" ], - "description": "The type of target, always `azure_ai_model`." + "description": "The type of source, always `file_id`." }, - "model": { + "id": { "type": "string", - "description": "The unique identifier of the Azure AI model." - }, - "sampling_params": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelSamplingParamsUpdate" - } - ], - "description": "The parameters used to control the sampling behavior of the model during text generation." + "description": "The identifier of the uploaded CSV file." } }, - "allOf": [ - { - "$ref": "#/components/schemas/TargetUpdate" - } - ], - "description": "Represents a target specifying an Azure AI model for operations requiring model selection." + "description": "Represents a reference to an uploaded CSV file used as a source for evaluation data." }, - "AzureAIResponsesEvalRunDataSource": { + "EvalCsvRunDataSource": { "type": "object", "required": [ "type", - "item_generation_params", - "max_runs_hourly", - "event_configuration_id" + "source" ], "properties": { "type": { "type": "string", "enum": [ - "azure_ai_responses" + "csv" ], - "description": "The type of data source, always `azure_ai_responses`." + "description": "The type of data source, always `csv`." }, - "item_generation_params": { + "source": { "allOf": [ { - "$ref": "#/components/schemas/ResponseRetrievalItemGenerationParams" + "$ref": "#/components/schemas/EvalCsvFileIdSource" } ], - "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." + "description": "The source of the CSV data, either inline content or a file reference." } }, "allOf": [ @@ -13592,841 +22374,809 @@ "$ref": "#/components/schemas/EvalRunDataSource" } ], - "description": "Represents a data source for evaluation runs that are specific to Continuous Evaluation scenarios." + "description": "Represents a CSV data source for evaluation runs." }, - "AzureAISearchIndex": { + "EvalGraderAzureAIEvaluator": { "type": "object", "required": [ - "type" + "type", + "name", + "evaluator_name" ], "properties": { "type": { "type": "string", "enum": [ - "AzureSearch" + "azure_ai_evaluator" ], - "description": "Type of index" + "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", + "additionalProperties": {}, + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/Index" - } - ], - "description": "Azure AI Search Index Definition" + "title": "AzureAIEvaluatorGrader" }, - "AzureAISearchIndexUpdate": { + "EvalGraderInspectAI": { "type": "object", "required": [ - "type" + "type", + "name", + "task_name" ], "properties": { "type": { "type": "string", "enum": [ - "AzureSearch" + "inspect_ai" ], - "description": "Type of index" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/IndexUpdate" - } - ], - "description": "Azure AI Search Index Definition" - }, - "AzureAISearchQueryType": { - "anyOf": [ - { - "type": "string" + "description": "The object type, which is always `inspect_ai`." }, - { + "name": { "type": "string", - "enum": [ - "simple", - "semantic", - "vector", - "vector_simple_hybrid", - "vector_semantic_hybrid" - ] + "description": "The display name of the benchmark." + }, + "task_name": { + "type": "string", + "description": "The inspect_ai task module path (e.g., `inspect_evals/gpqa_diamond`)." } - ], - "description": "Available query types for Azure AI Search tool." + }, + "description": "Grader inspect_ai definition for inspect_ai benchmark evaluators." }, - "AzureAISearchTool": { + "EvalResult": { "type": "object", "required": [ + "name", "type", - "azure_ai_search" + "score", + "passed" ], "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": "name of the check" }, - "description": { + "type": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "description": "type of the check" }, - "azure_ai_search": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureAISearchToolResource" - } - ], - "description": "The azure ai search index resource." + "score": { + "type": "number", + "format": "float", + "description": "score" + }, + "passed": { + "type": "boolean", + "description": "indicates if the check passed or failed" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for an Azure AI search tool as used to configure an agent." + "description": "Result of the evaluation." }, - "AzureAISearchToolCall": { + "EvalRun": { "type": "object", "required": [ - "type", - "call_id", - "arguments", - "status" + "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": { - "type": { + "object": { "type": "string", "enum": [ - "azure_ai_search_call" - ] + "eval.run" + ], + "description": "The type of the object. Always \"eval.run\".", + "x-stainless-const": true, + "default": "eval.run" }, - "call_id": { + "id": { "type": "string", - "description": "The unique ID of the tool call generated by the model." + "description": "Unique identifier for the evaluation run." }, - "arguments": { + "eval_id": { "type": "string", - "description": "A JSON string of the arguments to pass to the tool." + "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/ToolCallStatus" + "$ref": "#/components/schemas/OpenAI.EvalRunResultCounts" } ], - "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" - ] + "description": "Counters summarizing the outcomes of the evaluation run." }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." + "per_model_usage": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalRunPerModelUsage" + }, + "description": "Usage statistics for each model during the evaluation run." }, - "output": { + "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/ToolCallOutputContent" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "description": "The output from the Azure AI Search tool call." + "nullable": true }, - "status": { + "error": { + "$ref": "#/components/schemas/OpenAI.EvalApiError" + }, + "modified_at": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/integer" } ], - "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": { - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "Unix timestamp (in seconds) when the evaluation run was last modified." }, - "description": { + "created_by": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "description": "the name of the person who created the run." }, - "indexes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AISearchIndexResource" + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" }, - "maxItems": 1, - "description": "The indices attached to this agent. There can be a maximum of 1 index\nresource attached to the agent." + "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": "A set of index resources used by the `azure_ai_search` tool." + "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" + } }, - "AzureContentFilterBlocklistIdResult": { + "EvalRunDataSource": { "type": "object", "required": [ - "id", - "filtered" + "type" ], "properties": { - "id": { + "type": { "type": "string", - "description": "The ID of the custom blocklist." - }, - "filtered": { - "type": "boolean", - "description": "Whether the blocklist resulted in filtering." + "description": "The data source type discriminator." } }, - "description": "A content filter blocklist ID result." + "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_benchmark_preview": "#/components/schemas/AzureAIBenchmarkPreviewEvalRunDataSource" + } + }, + "description": "Base class for run data sources with discriminator support." }, - "AzureContentFilterBlocklistResult": { + "EvalRunOutputItem": { "type": "object", "required": [ - "filtered" + "object", + "id", + "run_id", + "eval_id", + "created_at", + "status", + "datasource_item_id", + "datasource_item", + "results", + "sample" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether any blocklist resulted in filtering." + "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" }, - "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": { + "id": { "type": "string", - "description": "The license associated with the detection." + "description": "Unique identifier for the evaluation run output item." }, - "url": { + "run_id": { "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." + "description": "The identifier of the evaluation run associated with this output item." }, - "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." + "eval_id": { + "type": "string", + "description": "The identifier of the evaluation group." }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "Unix timestamp (in seconds) when the evaluation run was created." }, - "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." + "status": { + "type": "string", + "description": "The status of the evaluation run." }, - "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." + "datasource_item_id": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The identifier for the data source item." }, - "detected": { - "type": "boolean", - "description": "Whether the content category was detected." + "datasource_item": { + "type": "object", + "additionalProperties": {}, + "description": "Details of the input data source item." }, - "citation": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunOutputItemResult" + }, + "description": "A list of grader results for this output item." + }, + "sample": { "allOf": [ { - "$ref": "#/components/schemas/AzureContentFilterCitation" + "$ref": "#/components/schemas/OpenAI.EvalRunOutputItemSample" } ], - "description": "Citation details describing the associated license and its location." + "description": "A sample containing the input and output of the evaluation run." } }, - "description": "A content filter detection result that includes citation information for protected material." + "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" + } }, - "AzureContentFilterDetectionWithReasonResult": { + "EvalRunOutputItemResult": { "type": "object", "required": [ - "filtered", - "detected" + "name", + "score", + "passed" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." + "name": { + "type": "string", + "description": "The name of the grader." }, - "detected": { + "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 content category was detected." + "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." + }, + "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": "A human-readable explanation of why the detection result was produced." + "description": "The reason for the test criteria metric." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional details about the test criteria metric." } }, - "description": "A content filter detection result that includes a reason description." + "additionalProperties": {}, + "description": "A single grader result for an evaluation run output item.", + "title": "EvalRunOutputItemResult" }, - "AzureContentFilterError": { + "EvalRunOutputItemSampleInput": { "type": "object", "required": [ - "code", - "message" + "role", + "content", + "tool_calls" ], "properties": { - "code": { - "type": "integer", - "format": "int32", - "description": "A machine-readable error code." + "role": { + "type": "string" }, - "message": { - "type": "string", - "description": "A human-readable error message." + "content": { + "type": "string" + }, + "tool_calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CompletionMessageToolCallChunk" + }, + "description": "Tool calls made within the message, if any." } }, - "description": "Error details from the content filtering system." + "description": "A message in the evaluation run." }, - "AzureContentFilterPersonallyIdentifiableInformationResult": { + "EvalRunOutputItemSampleOutput": { "type": "object", "required": [ - "filtered", - "detected" + "tool_calls" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." + "role": { + "type": "string" }, - "detected": { - "type": "boolean", - "description": "Whether PII was detected in the content." + "content": { + "type": "string" }, - "sub_categories": { + "tool_calls": { "type": "array", "items": { - "$ref": "#/components/schemas/AzureContentFilterPiiSubCategoryResult" + "$ref": "#/components/schemas/CompletionMessageToolCallChunk" }, - "description": "Detailed results for individual PII subcategories." + "description": "Tool calls made within the message, if any." } }, - "description": "A content filter detection result for Personally Identifiable Information." + "description": "A message in the evaluation run." }, - "AzureContentFilterPiiSubCategoryResult": { + "EvalRunResultCompareItem": { "type": "object", "required": [ - "sub_category", - "filtered", - "detected" + "treatmentRunId", + "treatmentRunSummary", + "deltaEstimate", + "pValue", + "treatmentEffect" ], "properties": { - "sub_category": { + "treatmentRunId": { "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." + "description": "The treatment run ID." }, - "ungrounded_material": { + "treatmentRunSummary": { "allOf": [ { - "$ref": "#/components/schemas/AzureContentFilterCompletionTextSpanDetectionResult" + "$ref": "#/components/schemas/EvalRunResultSummary" } ], - "description": "Detection result for ungrounded material with completion text span details." + "description": "Summary statistics of the treatment run." }, - "personally_identifiable_information": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterPersonallyIdentifiableInformationResult" - } - ], - "description": "Detection result for Personally Identifiable Information." + "deltaEstimate": { + "type": "number", + "format": "float", + "description": "Estimated difference between treatment and baseline." }, - "indirect_attack": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureContentFilterDetectionResult" - } - ], - "description": "Detection result for indirect attacks." + "pValue": { + "type": "number", + "format": "float", + "description": "P-value for the treatment effect." }, - "error": { + "treatmentEffect": { "allOf": [ { - "$ref": "#/components/schemas/AzureContentFilterError" + "$ref": "#/components/schemas/TreatmentEffectType" } ], - "description": "Error details if content filtering evaluation failed." + "description": "Type of treatment effect." } }, - "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." + "description": "Metric comparison for a treatment against the baseline." }, - "AzureContentFilterSeverityResult": { + "EvalRunResultComparison": { "type": "object", "required": [ - "filtered", - "severity" + "testingCriteria", + "metric", + "evaluator", + "baselineRunSummary", + "compareItems" ], "properties": { - "filtered": { - "type": "boolean", - "description": "Whether the content was filtered." + "testingCriteria": { + "type": "string", + "description": "Name of the testing criteria." }, - "severity": { + "metric": { + "type": "string", + "description": "Metric being evaluated." + }, + "evaluator": { + "type": "string", + "description": "Name of the evaluator for this testing criteria." + }, + "baselineRunSummary": { "allOf": [ { - "$ref": "#/components/schemas/AzureContentFilterSeverity" + "$ref": "#/components/schemas/EvalRunResultSummary" } ], - "description": "The severity level of the content." + "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": "A content filter result indicating severity level and whether content was filtered." + "description": "Comparison results for treatment runs against the baseline." }, - "AzureFunctionBinding": { + "EvalRunResultSummary": { "type": "object", "required": [ - "type", - "storage_queue" + "runId", + "sampleCount", + "average", + "standardDeviation" ], "properties": { - "type": { + "runId": { "type": "string", - "enum": [ - "storage_queue" - ], - "description": "The type of binding, which is always 'storage_queue'." + "description": "The evaluation run ID." }, - "storage_queue": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureFunctionStorageQueue" - } - ], - "description": "Storage queue." + "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": "The structure for keeping storage queue name and URI." + "description": "Summary statistics of a metric in an evaluation run." }, - "AzureFunctionDefinition": { + "Evaluation": { "type": "object", "required": [ - "function", - "input_binding", - "output_binding" + "id", + "data", + "evaluators" ], "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." + "id": { + "type": "string", + "description": "Identifier of the evaluation.", + "readOnly": true }, - "input_binding": { + "data": { "allOf": [ { - "$ref": "#/components/schemas/AzureFunctionBinding" + "$ref": "#/components/schemas/InputData" } ], - "description": "Input storage queue. The queue storage trigger runs a function as messages are added to it." + "description": "Data for evaluation." }, - "output_binding": { + "displayName": { + "type": "string", + "description": "Display Name for evaluation. It helps to find the evaluation easily in AI Foundry. It does not need to be unique." + }, + "description": { + "type": "string", + "description": "Description of the evaluation. It can be used to store additional information about the evaluation and is mutable." + }, + "status": { + "type": "string", + "description": "Status of the evaluation. It is set by service and is read-only.", + "readOnly": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Evaluation's tags. Unlike properties, tags are fully mutable." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed." + }, + "evaluators": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EvaluatorConfiguration" + }, + "description": "Evaluators to be used for the evaluation." + }, + "target": { "allOf": [ { - "$ref": "#/components/schemas/AzureFunctionBinding" + "$ref": "#/components/schemas/EvaluationTarget" } ], - "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": "Specifies the type and configuration of the entity used for this evaluation." } }, - "description": "The structure for keeping storage queue name and URI." + "description": "Evaluation Definition" }, - "AzureFunctionTool": { + "EvaluationComparisonInsightRequest": { "type": "object", "required": [ "type", - "azure_function" + "evalId", + "baselineRunId", + "treatmentRunIds" ], "properties": { "type": { "type": "string", "enum": [ - "azure_function" + "EvaluationComparison" ], - "description": "The object type, which is always 'browser_automation'." + "description": "The type of request." }, - "azure_function": { - "allOf": [ - { - "$ref": "#/components/schemas/AzureFunctionDefinition" - } - ], - "description": "The Azure Function Tool definition." + "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/OpenAI.Tool" + "$ref": "#/components/schemas/InsightRequest" } ], - "description": "The input definition information for an Azure Function Tool, as used to configure an Agent." + "description": "Evaluation Comparison Request" }, - "AzureFunctionToolCall": { + "EvaluationComparisonInsightResult": { "type": "object", "required": [ "type", - "call_id", - "name", - "arguments", - "status" + "comparisons", + "method" ], "properties": { "type": { "type": "string", "enum": [ - "azure_function_call" - ] - }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." + "EvaluationComparison" + ], + "description": "The type of insights result." }, - "name": { - "type": "string", - "description": "The name of the Azure Function being called." + "comparisons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunResultComparison" + }, + "description": "Comparison results for each treatment run against the baseline." }, - "arguments": { + "method": { "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." + "description": "The statistical method used for comparison." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/InsightResult" } ], - "description": "An Azure Function tool call." + "description": "Insights from the evaluation comparison." }, - "AzureFunctionToolCallOutput": { + "EvaluationResultSample": { "type": "object", "required": [ "type", - "call_id", - "name", - "status" + "evaluationResult" ], "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" - } + "EvaluationResultSample" ], - "description": "The output from the Azure Function tool call." + "description": "Evaluation Result Sample Type" }, - "status": { + "evaluationResult": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/EvalResult" } ], - "description": "The status of the tool call." + "description": "Evaluation result for the analysis sample." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/InsightSample" } ], - "description": "The output of an Azure Function tool call." + "description": "A sample from the evaluation result." }, - "AzureOpenAIModelConfiguration": { + "EvaluationRule": { "type": "object", "required": [ - "type", - "modelDeploymentName" + "id", + "action", + "eventType", + "enabled", + "systemData" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "AzureOpenAIModel" - ] + "description": "Unique identifier for the evaluation rule.", + "readOnly": true }, - "modelDeploymentName": { + "displayName": { "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`)." + "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 } }, - "allOf": [ - { - "$ref": "#/components/schemas/TargetConfig" - } - ], - "description": "Azure OpenAI model configuration. The API version would be selected by the service for querying the model." + "description": "Evaluation rule model." }, - "BaseCredentials": { + "EvaluationRuleAction": { "type": "object", "required": [ "type" @@ -14435,27 +23185,23 @@ "type": { "allOf": [ { - "$ref": "#/components/schemas/CredentialType" + "$ref": "#/components/schemas/EvaluationRuleActionType" } ], - "description": "The type of credential used by the connection", - "readOnly": true + "description": "Type of the evaluation action." } }, "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" + "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", + "humanEvaluation": "#/components/schemas/HumanEvaluationRuleAction", + "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" } }, - "description": "A base class for connection credentials" + "description": "Evaluation action model." }, - "BenchmarkName": { + "EvaluationRuleActionType": { "anyOf": [ { "type": "string" @@ -14463,1123 +23209,943 @@ { "type": "string", "enum": [ - "builtin.gpqa_diamond", - "builtin.bbeh", - "builtin.bigbenchhard", - "builtin.frontierscience", - "builtin.musr", - "builtin.truthful_qa", - "builtin.inspect_ai.gpqa_diamond", - "builtin.inspect_ai.chembench", - "builtin.inspect_ai.aime_2025", - "builtin.inspect_ai.musr" + "continuousEvaluation", + "humanEvaluation", + "humanEvaluationPreview" ] } ], - "description": "The set of available benchmark specifications." + "description": "Type of the evaluation action." }, - "BingCustomSearchConfiguration": { + "EvaluationRuleEventType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "responseCompleted", + "manual" + ] + } + ], + "description": "Type of the evaluation rule event." + }, + "EvaluationRuleFilter": { "type": "object", "required": [ - "project_connection_id", - "instance_name" + "agentName" ], "properties": { - "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." - }, - "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": { + "agentName": { "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": "Filter by agent name." } }, - "description": "A bing custom search configuration." + "description": "Evaluation filter model." }, - "BingCustomSearchPreviewTool": { + "EvaluationRunClusterInsightRequest": { "type": "object", "required": [ "type", - "bing_custom_search_preview" + "evalId", + "runIds" ], "properties": { "type": { "type": "string", "enum": [ - "bing_custom_search_preview" + "EvaluationRunClusterInsight" ], - "description": "The object type, which is always 'bing_custom_search_preview'." + "description": "The type of insights request." }, - "name": { + "evalId": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "Evaluation Id for the insights." }, - "description": { - "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "runIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of evaluation run IDs for the insights." }, - "bing_custom_search_preview": { + "modelConfiguration": { "allOf": [ { - "$ref": "#/components/schemas/BingCustomSearchToolParameters" + "$ref": "#/components/schemas/InsightModelConfiguration" } ], - "description": "The bing custom search tool parameters." + "description": "Configuration of the model used in the insight generation." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/InsightRequest" } ], - "description": "The input definition information for a Bing custom search tool as used to configure an agent." + "description": "Insights on set of Evaluation Results" }, - "BingCustomSearchToolCall": { + "EvaluationRunClusterInsightResult": { "type": "object", "required": [ "type", - "call_id", - "arguments", - "status" + "clusterInsight" ], "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" - } + "EvaluationRunClusterInsight" ], - "description": "The status of the tool call." + "description": "The type of insights result." + }, + "clusterInsight": { + "$ref": "#/components/schemas/ClusterInsightResult" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/InsightResult" } ], - "description": "A Bing custom search tool call." + "description": "Insights from the evaluation run cluster analysis." }, - "BingCustomSearchToolCallOutput": { + "EvaluationScheduleTask": { "type": "object", "required": [ "type", - "call_id", - "status" + "evalId", + "evalRun" ], "properties": { "type": { "type": "string", "enum": [ - "bing_custom_search_preview_call_output" + "Evaluation" ] }, - "call_id": { + "evalId": { "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." + "description": "Identifier of the evaluation group." }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallStatus" - } - ], - "description": "The status of the tool call." + "evalRun": { + "type": "object", + "description": "The evaluation run payload." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of a Bing custom search tool call." - }, - "BingCustomSearchToolParameters": { - "type": "object", - "required": [ - "search_configurations" - ], - "properties": { - "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." - }, - "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": { - "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." - }, - "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)." + "$ref": "#/components/schemas/ScheduleTask" } - }, - "description": "Search configuration for Bing Grounding" - }, - "BingGroundingSearchToolParameters": { - "type": "object", - "required": [ - "search_configurations" ], - "properties": { - "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." - }, - "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." + "description": "Evaluation task for the schedule." }, - "BingGroundingTool": { + "EvaluationTarget": { "type": "object", "required": [ - "type", - "bing_grounding" + "type" ], "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" + "$ref": "#/components/schemas/EvaluationTargetType" } ], - "description": "The bing grounding search tool parameters." + "description": "Discriminator that defines the type of the evaluation target." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" + "discriminator": { + "propertyName": "type", + "mapping": { + "modelResponseGeneration": "#/components/schemas/modelResponseGenerationTarget" } - ], - "description": "The input definition information for a bing grounding search tool as used to configure an agent." + }, + "description": "Abstract base model for defining evaluation targets." }, - "BingGroundingToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { + "EvaluationTargetType": { + "anyOf": [ + { "type": "string", "enum": [ - "bing_grounding_call" + "modelResponseGeneration" ] }, - "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" + "type": "string" } ], - "description": "A Bing grounding tool call." + "description": "Allowed types of evaluation targets." }, - "BingGroundingToolCallOutput": { + "EvaluationTaxonomy": { "type": "object", "required": [ - "type", - "call_id", - "status" + "name", + "version", + "taxonomyInput" ], "properties": { - "type": { + "id": { + "type": "string", + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true + }, + "name": { "type": "string", - "enum": [ - "bing_grounding_call_output" - ] + "description": "The name of the resource", + "readOnly": true }, - "call_id": { + "version": { "type": "string", - "description": "The unique ID of the tool call generated by the model." + "description": "The version of the resource", + "readOnly": true }, - "output": { + "taxonomyInput": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallOutputContent" + "$ref": "#/components/schemas/EvaluationTaxonomyInput" } ], - "description": "The output from the Bing grounding tool call." + "description": "Input configuration for the evaluation taxonomy." }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallStatus" - } - ], - "description": "The status of the tool call." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of a Bing grounding tool call." + "description": "Evaluation Taxonomy Definition" }, - "BlobReference": { + "EvaluationTaxonomyCreateOrUpdate": { "type": "object", "required": [ - "blobUri", - "storageAccountArmId", - "credential" + "taxonomyInput" ], "properties": { - "blobUri": { + "description": { "type": "string", - "format": "uri", - "description": "Blob URI path for client to upload data. Example: `https://blob.windows.core.net/Container/Path`" + "description": "The asset description text." }, - "storageAccountArmId": { - "type": "string", - "description": "ARM ID of the storage account to use." + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." }, - "credential": { + "taxonomyInput": { "allOf": [ { - "$ref": "#/components/schemas/SasCredential" + "$ref": "#/components/schemas/EvaluationTaxonomyInput" } ], - "description": "Credential info to access the storage account." + "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": "Blob reference details." + "description": "Evaluation Taxonomy Definition" }, - "BotServiceAuthorizationScheme": { + "EvaluationTaxonomyInput": { "type": "object", "required": [ "type" ], "properties": { "type": { - "type": "string", - "enum": [ - "BotService" - ] + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationTaxonomyInputType" + } + ], + "description": "Input type of the evaluation taxonomy." } }, - "allOf": [ + "discriminator": { + "propertyName": "type", + "mapping": { + "agent": "#/components/schemas/AgentTaxonomyInput" + } + }, + "description": "Input configuration for the evaluation taxonomy." + }, + "EvaluationTaxonomyInputType": { + "anyOf": [ { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + "type": "string" + }, + { + "type": "string", + "enum": [ + "agent", + "policy" + ] } ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "Type of the evaluation taxonomy input." }, - "BotServiceRbacAuthorizationScheme": { + "EvaluationTaxonomyInputUpdate": { "type": "object", "required": [ "type" ], "properties": { "type": { - "type": "string", - "enum": [ - "BotServiceRbac" - ] + "allOf": [ + { + "$ref": "#/components/schemas/EvaluationTaxonomyInputType" + } + ], + "description": "Input type of the evaluation taxonomy." } }, - "allOf": [ - { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + "discriminator": { + "propertyName": "type", + "mapping": { + "agent": "#/components/schemas/AgentTaxonomyInputUpdate" } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + }, + "description": "Input configuration for the evaluation taxonomy." }, - "BrowserAutomationPreviewTool": { + "EvaluationTaxonomyUpdate": { "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." + "description": "The asset description text." }, - "browser_automation_preview": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + }, + "taxonomyInput": { "allOf": [ { - "$ref": "#/components/schemas/BrowserAutomationToolParameters" + "$ref": "#/components/schemas/EvaluationTaxonomyInputUpdate" } ], - "description": "The Browser Automation Tool parameters." + "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." } }, - "allOf": [ + "description": "Evaluation Taxonomy Definition" + }, + "EvaluatorCategory": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "type": "string" + }, + { + "type": "string", + "enum": [ + "quality", + "safety", + "agents" + ] } ], - "description": "The input definition information for a Browser Automation Tool, as used to configure an Agent." + "description": "The category of the evaluator" }, - "BrowserAutomationToolCall": { + "EvaluatorConfiguration": { "type": "object", "required": [ - "type", - "call_id", - "arguments", - "status" + "id" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "browser_automation_preview_call" - ] + "description": "Identifier of the evaluator." }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." + "initParams": { + "type": "object", + "additionalProperties": {}, + "description": "Initialization parameters of the evaluator." }, - "arguments": { + "dataMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Data parameters of the evaluator." + } + }, + "description": "Evaluator Configuration" + }, + "EvaluatorCredentialRequest": { + "type": "object", + "required": [ + "blobUri" + ], + "properties": { + "blobUri": { "type": "string", - "description": "A JSON string of the arguments to pass to the tool." - }, - "status": { + "format": "uri", + "description": "The blob URI for the evaluator storage. Example: `https://account.blob.core.windows.net:443/container`" + } + }, + "description": "Request body for getting evaluator credentials" + }, + "EvaluatorDefinition": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/EvaluatorDefinitionType" } ], - "description": "The status of the tool call." + "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" } }, - "allOf": [ + "discriminator": { + "propertyName": "type", + "mapping": { + "code": "#/components/schemas/CodeBasedEvaluatorDefinition", + "prompt": "#/components/schemas/PromptBasedEvaluatorDefinition" + } + }, + "description": "Base evaluator configuration with discriminator" + }, + "EvaluatorDefinitionType": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "type": "string" + }, + { + "type": "string", + "enum": [ + "prompt", + "code", + "prompt_and_code", + "service", + "openai_graders" + ] } ], - "description": "A browser automation tool call." + "description": "The type of evaluator definition" }, - "BrowserAutomationToolCallOutput": { + "EvaluatorMetric": { "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" + "$ref": "#/components/schemas/EvaluatorMetricType" } ], - "description": "The output from the browser automation tool call." + "description": "Type of the metric." }, - "status": { + "desirable_direction": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/EvaluatorMetricDirection" } ], - "description": "The status of the tool call." + "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." } }, - "allOf": [ + "description": "Evaluator Metric" + }, + "EvaluatorMetricDirection": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "type": "string" + }, + { + "type": "string", + "enum": [ + "increase", + "decrease", + "neutral" + ] } ], - "description": "The output of a browser automation tool call." + "description": "The direction of the metric indicating whether a higher value is better, a lower value is better, or neutral" }, - "BrowserAutomationToolConnectionParameters": { - "type": "object", - "required": [ - "project_connection_id" - ], - "properties": { - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "EvaluatorMetricType": { + "anyOf": [ + { + "type": "string" }, - "description": { + { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "enum": [ + "ordinal", + "continuous", + "boolean" + ] + } + ], + "description": "The type of the evaluator" + }, + "EvaluatorType": { + "anyOf": [ + { + "type": "string" }, - "project_connection_id": { + { "type": "string", - "description": "The ID of the project connection to your Azure Playwright resource." + "enum": [ + "builtin", + "custom" + ] } - }, - "description": "Definition of input parameters for the connection used by the Browser Automation Tool." + ], + "description": "The type of the evaluator" }, - "BrowserAutomationToolParameters": { + "EvaluatorVersion": { "type": "object", "required": [ - "connection" + "evaluator_type", + "categories", + "definition", + "created_by", + "created_at", + "modified_at", + "name", + "version" ], "properties": { - "name": { + "display_name": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." }, - "description": { - "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata about the evaluator" }, - "connection": { + "evaluator_type": { "allOf": [ { - "$ref": "#/components/schemas/BrowserAutomationToolConnectionParameters" + "$ref": "#/components/schemas/EvaluatorType" } ], - "description": "The project connection parameters associated with the Browser Automation Tool." - } - }, - "description": "Definition of input parameters for the Browser Automation Tool." - }, - "CaptureStructuredOutputsTool": { - "type": "object", - "required": [ - "type", - "outputs" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "capture_structured_outputs" - ], - "description": "The type of the tool. Always `capture_structured_outputs`." + "description": "The type of the evaluator" }, - "outputs": { + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorCategory" + }, + "description": "The categories of the evaluator" + }, + "definition": { "allOf": [ { - "$ref": "#/components/schemas/StructuredOutputDefinition" + "$ref": "#/components/schemas/EvaluatorDefinition" } ], - "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." + "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 }, - "y": { - "type": "integer", - "format": "int32", - "description": "Y-axis coordinate." + "id": { + "type": "string", + "description": "Asset ID, a unique identifier for the asset", + "readOnly": true }, - "size": { - "type": "integer", - "format": "int32", - "description": "Size of the chart element." - } - }, - "description": "Coordinates for the analysis chart." - }, - "ChatSummaryMemoryItem": { - "type": "object", - "required": [ - "kind" - ], - "properties": { - "kind": { + "name": { "type": "string", - "enum": [ - "chat_summary" - ], - "description": "The kind of the memory item." + "description": "The name of the resource", + "readOnly": true + }, + "version": { + "type": "string", + "description": "The version of the resource", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/MemoryItem" - } - ], - "description": "A memory item containing a summary extracted from conversations.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "description": "Evaluator Definition" }, - "ClusterInsightResult": { + "EvaluatorVersionCreate": { "type": "object", "required": [ - "summary", - "clusters" + "evaluator_type", + "categories", + "definition" ], "properties": { - "summary": { + "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/InsightSummary" + "$ref": "#/components/schemas/EvaluatorType" } ], - "description": "Summary of the insights report." + "description": "The type of the evaluator" }, - "clusters": { + "categories": { "type": "array", "items": { - "$ref": "#/components/schemas/InsightCluster" + "$ref": "#/components/schemas/EvaluatorCategory" }, - "description": "List of clusters identified in the insights." + "description": "The categories of the evaluator" }, - "coordinates": { + "definition": { + "allOf": [ + { + "$ref": "#/components/schemas/EvaluatorDefinition" + } + ], + "description": "Definition of the evaluator" + }, + "description": { + "type": "string", + "description": "The asset description text." + }, + "tags": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/ChartCoordinate" + "type": "string" }, - "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": "Tag dictionary. Tags can be added, removed, and updated." } }, - "description": "Insights from the cluster analysis." + "description": "Evaluator Definition" }, - "ClusterTokenUsage": { + "EvaluatorVersionUpdate": { "type": "object", - "required": [ - "inputTokenUsage", - "outputTokenUsage", - "totalTokenUsage" - ], "properties": { - "inputTokenUsage": { - "type": "integer", - "format": "int32", - "description": "input token usage" + "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." }, - "outputTokenUsage": { - "type": "integer", - "format": "int32", - "description": "output token usage" + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Metadata about the evaluator" }, - "totalTokenUsage": { - "type": "integer", - "format": "int32", - "description": "total token usage" + "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": "Token usage for cluster analysis" + "description": "Evaluator Definition" }, - "CodeBasedEvaluatorDefinition": { + "ExplicitModelReferenceConfiguration": { "type": "object", "required": [ - "type" + "kind", + "model" ], "properties": { - "type": { + "kind": { "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')" - }, - "image_tag": { - "type": "string", - "description": "The container image tag to use for evaluator code execution" + "model" + ], + "description": "Reference policy kind, always 'model'." }, - "blob_uri": { + "model": { "type": "string", - "description": "The blob URI for the evaluator storage" + "description": "Reference model asset URI." } }, "allOf": [ { - "$ref": "#/components/schemas/EvaluatorDefinition" + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" } ], - "description": "Code-based evaluator definition using python code" + "description": "Use an explicit model as the reference policy." }, - "CompletionMessageToolCallChunk": { + "FabricDataAgentToolCall": { "type": "object", "required": [ - "id", - "type" + "type", + "call_id", + "arguments", + "status" ], "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 + "fabric_dataagent_preview_call" + ] }, - "id": { + "call_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 + "description": "The unique ID of the tool call generated by the model." }, - "target": { + "arguments": { "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 + "description": "A JSON string of the arguments to pass to the tool." }, - "credentials": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/BaseCredentials" + "$ref": "#/components/schemas/ToolCallStatus" } ], - "description": "The credentials used by the connection", - "readOnly": true - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Metadata of the connection", - "readOnly": true + "description": "The status of the tool call." } }, - "description": "Response from the list and get connections operations" - }, - "ConnectionType": { - "anyOf": [ - { - "type": "string" - }, + "allOf": [ { - "type": "string", - "enum": [ - "AzureOpenAI", - "AzureBlob", - "AzureStorageAccount", - "CognitiveSearch", - "CosmosDB", - "ApiKey", - "AppConfig", - "AppInsights", - "CustomKeys", - "RemoteTool_Preview" - ] + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "The Type (or category) of the connection" + "description": "A Fabric data agent tool call." }, - "ContainerAppAgentDefinition": { + "FabricDataAgentToolCallOutput": { "type": "object", "required": [ - "kind", - "container_protocol_versions", - "container_app_resource_id", - "ingress_subdomain_suffix" + "type", + "call_id", + "status" ], "properties": { - "kind": { + "type": { "type": "string", "enum": [ - "container_app" + "fabric_dataagent_preview_call_output" ] }, - "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" - }, + "call_id": { + "type": "string", + "description": "The unique ID of the tool call generated by the model." + }, + "output": { + "allOf": [ { - "protocol": "a2a", - "version": "v0.3.0" + "$ref": "#/components/schemas/ToolCallOutputContent" } - ] - }, - "container_app_resource_id": { - "type": "string", - "description": "The resource ID of the Azure Container App that hosts this agent. Not mutable across versions." + ], + "description": "The output from the Fabric data agent tool call." }, - "ingress_subdomain_suffix": { - "type": "string", - "description": "The suffix to apply to the app subdomain when sending ingress to the agent. This can be a label (e.g., '---current'), a specific revision (e.g., '--0000001'), or empty to use the default endpoint for the container app.", - "example": "--0000001" + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolCallStatus" + } + ], + "description": "The status of the tool call." } }, "allOf": [ { - "$ref": "#/components/schemas/AgentDefinition" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "The container app agent definition.", - "x-ms-foundry-meta": { - "required_previews": [ - "ContainerAgents=V1Preview" - ] - } + "description": "The output of a Fabric data agent tool call." }, - "ContainerDetails": { + "FabricDataAgentToolParameters": { "type": "object", - "required": [ - "provisioning_state", - "state", - "health_state", - "replicas", - "updated_on" - ], "properties": { - "provisioning_state": { - "type": "string", - "description": "The provisioning state of the container." - }, - "provisioning_error": { - "type": "string", - "description": "The provisioning error of the container, if any." - }, - "state": { + "name": { "type": "string", - "description": "The state of the container." + "description": "Optional user-defined name for this tool or configuration." }, - "health_state": { + "description": { "type": "string", - "description": "The health state of the container." + "description": "Optional user-defined description for this tool or configuration." }, - "replicas": { + "project_connections": { "type": "array", "items": { - "$ref": "#/components/schemas/ContainerReplica" + "$ref": "#/components/schemas/ToolProjectConnection" }, - "description": "The list of replicas in the container." - }, - "updated_on": { - "type": "string", - "format": "date-time", - "description": "The last update time of the container." + "maxItems": 1, + "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." } }, - "description": "Detailed information about the container.", - "x-ms-foundry-meta": { - "required_previews": [ - "ContainerAgents=V1Preview" - ] - } - }, - "ContainerLogKind": { - "type": "string", - "enum": [ - "console", - "system" - ], - "description": "The type of logs to stream from a container.", - "x-ms-foundry-meta": { - "required_previews": [ - "ContainerAgents=V1Preview" - ] - } + "description": "The fabric data agent tool parameters." }, - "ContainerReplica": { + "FileDatasetVersion": { "type": "object", "required": [ - "name", - "state", - "container_state" + "type" ], "properties": { - "name": { - "type": "string", - "description": "The name of the replica." - }, - "state": { - "type": "string", - "description": "The state of the replica." - }, - "container_state": { + "type": { "type": "string", - "description": "The container state of the replica." + "enum": [ + "uri_file" + ], + "description": "Dataset type" } }, - "description": "Information about a container replica.", - "x-ms-foundry-meta": { - "required_previews": [ - "ContainerAgents=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/DatasetVersion" + } + ], + "description": "FileDatasetVersion Definition" }, - "ContentFilterResult": { + "FileDatasetVersionUpdate": { "type": "object", "required": [ - "blocked", - "source_type", - "content_filter_results" + "type" ], "properties": { - "blocked": { - "type": "boolean", - "description": "Whether the content was blocked by the content filter." - }, - "source_type": { + "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" - } + "enum": [ + "uri_file" ], - "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": "Dataset type" } }, - "description": "A content filter evaluation result for a specific source in the response." + "allOf": [ + { + "$ref": "#/components/schemas/DatasetVersionUpdate" + } + ], + "description": "FileDatasetVersion Definition" }, - "ContinuousEvaluationRuleAction": { + "FixedRatioVersionSelectionRule": { "type": "object", "required": [ "type", - "evalId" + "traffic_percentage" ], "properties": { "type": { "type": "string", "enum": [ - "continuousEvaluation" + "FixedRatio" ] }, - "evalId": { - "type": "string", - "description": "Eval Id to add continuous evaluation runs to." - }, - "maxHourlyRuns": { + "traffic_percentage": { "type": "integer", "format": "int32", - "description": "Maximum number of evaluation runs allowed per hour." + "minimum": 0, + "maximum": 100, + "description": "The percentage of traffic to route to the version. Must be between 0 and 100." } }, "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleAction" + "$ref": "#/components/schemas/VersionSelectionRule" } ], - "description": "Evaluation rule action for continuous evaluation." + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } }, - "CosmosDBIndex": { + "FolderDatasetVersion": { "type": "object", "required": [ "type" @@ -15588,19 +24154,19 @@ "type": { "type": "string", "enum": [ - "CosmosDBNoSqlVectorStore" + "uri_folder" ], - "description": "Type of index" + "description": "Dataset type" } }, "allOf": [ { - "$ref": "#/components/schemas/Index" + "$ref": "#/components/schemas/DatasetVersion" } ], - "description": "CosmosDB Vector Store Index Definition" + "description": "FileDatasetVersion Definition" }, - "CosmosDBIndexUpdate": { + "FolderDatasetVersionUpdate": { "type": "object", "required": [ "type" @@ -15609,474 +24175,420 @@ "type": { "type": "string", "enum": [ - "CosmosDBNoSqlVectorStore" + "uri_folder" ], - "description": "Type of index" + "description": "Dataset type" } }, "allOf": [ { - "$ref": "#/components/schemas/IndexUpdate" + "$ref": "#/components/schemas/DatasetVersionUpdate" } ], - "description": "CosmosDB Vector Store Index Definition" + "description": "FileDatasetVersion Definition" }, - "CreateAgentFromManifestRequest": { + "FoundryTimestamp": { + "type": "integer", + "format": "unixtime", + "description": "Unix timestamp in seconds used by Foundry data-plane resources." + }, + "FunctionToolCall": { "type": "object", "required": [ "name", - "manifest_id", - "parameter_values" + "arguments" ], "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." + "description": "The name of the function to call." }, - "manifest_id": { + "arguments": { "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." + "description": "The arguments to call the function with, as generated by the model in JSON format." } - } + }, + "description": "Details of a function tool call." }, - "CreateAgentRequest": { + "GrpoTrainingColumnMapping": { "type": "object", "required": [ - "name", - "definition" + "prompt" ], "properties": { - "name": { + "prompt": { "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": "Actual dataset column name containing prompts for rollout generation, for example 'prompt', 'question', or 'problem'." }, - "description": { + "reference": { "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." - }, - "definition": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentDefinition" - } + "description": "Actual dataset column name containing reference answers or reward context passed to the judge, for example 'answer' or 'reference'." + } + }, + "description": "Column mapping for managed online RL prompt datasets. Keys are logical fields expected by GRPO, RLOO, REINFORCE++, and PPO; values are the exact column names in the referenced dataset asset. The training dataset must contain prompts; reference answers or reward context can be passed to the judge." + }, + "GrpoTrainingConfiguration": { + "type": "object", + "required": [ + "algorithm", + "reward" + ], + "properties": { + "algorithm": { + "type": "string", + "enum": [ + "grpo" ], - "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" - ] - } + "description": "Training algorithm, always 'grpo'." }, - "blueprint_reference": { + "reward": { "allOf": [ { - "$ref": "#/components/schemas/AgentBlueprintReference" + "$ref": "#/components/schemas/TrainingRewardConfiguration" } ], - "description": "The blueprint reference for the agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "Reward signal configuration." }, - "agent_endpoint": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/AgentEndpoint" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "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" - ] - } + "description": "LoRA adapter configuration." }, - "agent_card": { + "rollout": { "allOf": [ { - "$ref": "#/components/schemas/AgentCard" + "$ref": "#/components/schemas/TrainingRolloutConfiguration" } ], - "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" - ] - } - }, - "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." + "description": "Rollout generation configuration." }, - "version_indicator": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/VersionIndicator" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "Determines which agent version backs the session." + "description": "Evaluation configuration." } }, - "description": "Request to create a new agent session.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=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." + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" } - } + ], + "description": "Group relative policy optimization training recipe." }, - "CreateAgentVersionRequest": { + "GrpoTrainingDatasetConfiguration": { "type": "object", "required": [ - "definition" + "train", + "columns" ], "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" + "train": { + "type": "string", + "description": "Training dataset asset reference." }, - "description": { + "eval": { "type": "string", - "maxLength": 512, - "description": "A human-readable description of the agent." + "description": "Optional evaluation dataset asset reference." }, - "definition": { + "columns": { "allOf": [ { - "$ref": "#/components/schemas/AgentDefinition" + "$ref": "#/components/schemas/GrpoTrainingColumnMapping" } ], - "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" - ] - } + "description": "Mapping from online RL logical fields to actual dataset column names. GRPO, policy-gradient, and PPO require the 'prompt' logical field and can optionally map 'reference'." }, - "blueprint_reference": { + "data_format": { "allOf": [ { - "$ref": "#/components/schemas/AgentBlueprintReference" + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" } ], - "description": "The blueprint reference for the agent.", - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "Conversational data formatting options." } }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "HostedAgents=V1Preview", - "ContainerAgents=V1Preview", - "WorkflowAgents=V1Preview" - ] - } + "description": "Dataset configuration for managed GRPO training." }, - "CreateEvalRequest": { + "GrpoTrainingJob": { "type": "object", "required": [ - "data_source_config", - "testing_criteria" + "type", + "dataset", + "runtime" ], "properties": { - "name": { + "type": { "type": "string", - "description": "The name of the evaluation." + "enum": [ + "grpo" + ], + "description": "Managed training job type, always 'grpo'." }, - "metadata": { - "type": "object", + "dataset": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/GrpoTrainingDatasetConfiguration" } ], - "nullable": true + "description": "Training and optional evaluation datasets." }, - "data_source_config": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCustomDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalLogsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalStoredCompletionsDataSourceConfig" - }, - { - "$ref": "#/components/schemas/AzureAIDataSourceConfig" - }, + "runtime": { + "allOf": [ { - "$ref": "#/components/schemas/AzureAIBenchmarkDataSourceConfig" + "$ref": "#/components/schemas/GrpoTrainingRuntimeConfiguration" } ], - "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/EvalGraderAzureAIEvaluator" - }, - { - "$ref": "#/components/schemas/EvalGraderInspectAI" - } - ] - }, - "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." + "description": "Runtime options for managed GRPO." } }, - "title": "CreateEvalRequest" + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingJobCreate" + } + ], + "description": "Request body for creating a managed GRPO training job from a base model." }, - "CreateEvalRunRequest": { + "GrpoTrainingRuntimeConfiguration": { "type": "object", "required": [ - "data_source" + "judge" ], "properties": { - "name": { - "type": "string", - "description": "The name of the run." + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." }, - "metadata": { + "hyperparameters": { "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." + }, + "judge": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/TrainingRewardConfiguration" } ], - "nullable": true + "description": "Judge used to score generated completions during GRPO training. Required for GRPO." }, - "data_source": { - "oneOf": [ + "lora": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateEvalJsonlRunDataSource" - }, + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "rollout": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSource" - }, + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration." + }, + "eval": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSource" - }, + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." + }, + "reference": { + "allOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" } ], - "description": "Details about the run's data source." + "description": "Reference policy used for KL anchoring." }, - "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." + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "title": "CreateEvalRunRequest" + "description": "Runtime options for managed GRPO training." }, - "CreateOrUpdateManagedAgentIdentityBlueprintRequest": { + "HeaderIsolationKeySource": { "type": "object", "required": [ - "name" + "kind", + "user_isolation_key", + "chat_isolation_key" ], "properties": { - "name": { + "kind": { "type": "string", - "maxLength": 63, - "description": "The unique name that identifies the managed agent identity blueprint.\nName can be used to retrieve/update/delete the managed agent identity blueprint.\n- Must start and end with alphanumeric characters,\n- Can contain hyphens in the middle\n- Must not exceed 63 characters." + "enum": [ + "Header" + ] + }, + "user_isolation_key": { + "type": "string", + "description": "The user isolation key header value" + }, + "chat_isolation_key": { + "type": "string", + "description": "The chat isolation key header value" } }, + "allOf": [ + { + "$ref": "#/components/schemas/IsolationKeySource" + } + ], "x-ms-foundry-meta": { "required_previews": [ "AgentEndpoints=V1Preview" ] } }, - "CreatedBy": { + "HeaderTelemetryEndpointAuth": { "type": "object", + "required": [ + "type", + "header_name", + "secret_id", + "secret_key" + ], "properties": { - "agent": { - "allOf": [ - { - "$ref": "#/components/schemas/AgentId" - } + "type": { + "type": "string", + "enum": [ + "header" ], - "description": "The agent that created the item." + "description": "The authentication type, always 'header' for header-based secret authentication." }, - "response_id": { + "header_name": { "type": "string", - "description": "The response on which the item is created." - } - } - }, - "CredentialType": { - "anyOf": [ - { - "type": "string" + "description": "The name of the HTTP header to inject the secret value into.", + "example": "X-Otlp-Api-Key" }, - { + "secret_id": { "type": "string", - "enum": [ - "ApiKey", - "AAD", - "SAS", - "CustomKeys", - "None", - "AgenticIdentityToken_Preview" - ] + "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": "The credential type used by the connection" + "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" + ] + } }, - "CronTrigger": { + "HostedAgentDefinition": { "type": "object", "required": [ - "type", - "expression" + "kind", + "container_protocol_versions", + "cpu", + "memory" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "Cron" + "hosted" ] }, - "expression": { - "type": "string", - "description": "Cron expression that defines the schedule frequency." + "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." }, - "timeZone": { + "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": "a2a", + "version": "v0.3.0" + } + ] + }, + "cpu": { "type": "string", - "description": "Time zone for the cron schedule.", - "default": "UTC" + "description": "The CPU configuration for the hosted agent.", + "example": "0.25" }, - "startTime": { + "memory": { "type": "string", - "description": "Start time for the cron schedule in ISO 8601 format." + "description": "The memory configuration for the hosted agent.", + "example": "0.5Gi" }, - "endTime": { + "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": "End time for the cron schedule in ISO 8601 format." + "description": "The image ID for the agent, applicable to image-based hosted agents.", + "example": "my-registry.azurecr.io/my-hosted-agent:latest" + }, + "telemetry_config": { + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryConfig" + } + ], + "description": "Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics." } }, "allOf": [ { - "$ref": "#/components/schemas/Trigger" + "$ref": "#/components/schemas/AgentDefinition" } ], - "description": "Cron based trigger." + "description": "The hosted agent definition.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } }, - "CustomCredential": { + "HourlyRecurrenceSchedule": { "type": "object", "required": [ "type" @@ -16085,121 +24597,90 @@ "type": { "type": "string", "enum": [ - "CustomKeys" - ], - "description": "The credential type", - "readOnly": true + "Hourly" + ] } }, - "additionalProperties": { - "type": "string" - }, "allOf": [ { - "$ref": "#/components/schemas/BaseCredentials" + "$ref": "#/components/schemas/RecurrenceSchedule" } ], - "description": "Custom credential definition" + "description": "Hourly recurrence schedule." }, - "DailyRecurrenceSchedule": { + "HumanEvaluationPreviewRuleAction": { "type": "object", "required": [ "type", - "hours" + "templateId" ], "properties": { "type": { "type": "string", "enum": [ - "Daily" + "humanEvaluationPreview" + ] + }, + "templateId": { + "allOf": [ + { + "$ref": "#/components/schemas/AssetId" + } ], - "description": "Daily recurrence type." - }, - "hours": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "description": "Hours for the recurrence schedule." + "description": "Human evaluation template Id." } }, "allOf": [ { - "$ref": "#/components/schemas/RecurrenceSchedule" + "$ref": "#/components/schemas/EvaluationRuleAction" } ], - "description": "Daily recurrence schedule." + "description": "Evaluation rule action for human evaluation." }, - "DataSourceConfig": { + "HumanEvaluationRuleAction": { "type": "object", "required": [ "type", - "schema" + "templateId" ], "properties": { "type": { "type": "string", - "description": "The data source type discriminator." + "enum": [ + "humanEvaluation" + ] }, - "schema": { - "type": "object", - "additionalProperties": {}, - "description": "The overall object JSON schema for the run data source items." + "templateId": { + "allOf": [ + { + "$ref": "#/components/schemas/AssetId" + } + ], + "description": "Human evaluation template Id." } }, - "discriminator": { - "propertyName": "type", - "mapping": {} - }, - "description": "Base class for run data sources with discriminator support." - }, - "DatasetType": { - "anyOf": [ - { - "type": "string" - }, + "allOf": [ { - "type": "string", - "enum": [ - "uri_file", - "uri_folder" - ] + "$ref": "#/components/schemas/EvaluationRuleAction" } ], - "description": "Enum to determine the type of data." + "description": "Evaluation rule action for human evaluation." }, - "DatasetVersion": { + "Index": { "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" + "$ref": "#/components/schemas/IndexType" } ], - "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" + "description": "Type of index" }, "id": { "type": "string", @@ -16220,13 +24701,29 @@ "discriminator": { "propertyName": "type", "mapping": { - "uri_file": "#/components/schemas/FileDatasetVersion", - "uri_folder": "#/components/schemas/FolderDatasetVersion" + "AzureSearch": "#/components/schemas/AzureAISearchIndex", + "ManagedAzureSearch": "#/components/schemas/ManagedAzureAISearchIndex", + "CosmosDBNoSqlVectorStore": "#/components/schemas/CosmosDBIndex" } }, - "description": "DatasetVersion Definition" + "description": "Index resource Definition" }, - "DatasetVersionUpdate": { + "IndexType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "AzureSearch", + "CosmosDBNoSqlVectorStore", + "ManagedAzureSearch" + ] + } + ] + }, + "IndexUpdate": { "type": "object", "required": [ "type" @@ -16235,10 +24732,10 @@ "type": { "allOf": [ { - "$ref": "#/components/schemas/DatasetType" + "$ref": "#/components/schemas/IndexType" } ], - "description": "Dataset type" + "description": "Type of index" }, "description": { "type": "string", @@ -16255,13 +24752,91 @@ "discriminator": { "propertyName": "type", "mapping": { - "uri_file": "#/components/schemas/FileDatasetVersionUpdate", - "uri_folder": "#/components/schemas/FolderDatasetVersionUpdate" + "AzureSearch": "#/components/schemas/AzureAISearchIndexUpdate", + "ManagedAzureSearch": "#/components/schemas/ManagedAzureAISearchIndexUpdate", + "CosmosDBNoSqlVectorStore": "#/components/schemas/CosmosDBIndexUpdate" } }, - "description": "DatasetVersion Definition" + "description": "Index resource Definition" }, - "DayOfWeek": { + "Input": { + "type": "object", + "required": [ + "job_input_type" + ], + "properties": { + "job_input_type": { + "allOf": [ + { + "$ref": "#/components/schemas/AssetTypes" + } + ], + "description": "Specifies the type of job input." + }, + "uri": { + "type": "string", + "description": "Input Asset URI. Required for uri_file, uri_folder, and safetensors_model types." + }, + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/InputOutputModes" + } + ], + "description": "Input Asset Delivery Mode. Applies to uri-based inputs." + }, + "value": { + "type": "string", + "description": "Literal value. Required for literal type." + } + }, + "description": "Job input definition." + }, + "InputData": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "Type of the data" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "dataset": "#/components/schemas/InputDataset" + } + }, + "description": "Abstract data class." + }, + "InputDataset": { + "type": "object", + "required": [ + "type", + "id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "dataset" + ] + }, + "id": { + "type": "string", + "description": "Evaluation input data" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/InputData" + } + ], + "description": "Dataset as source for evaluation." + }, + "InputOutputModes": { "anyOf": [ { "type": "string" @@ -16269,265 +24844,299 @@ { "type": "string", "enum": [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" + "read_only_mount", + "read_write_mount", + "download", + "direct", + "upload" ] } ], - "description": "Days of the week for recurrence schedule." + "description": "Enum to determine the input/output data delivery mode." }, - "DeleteAgentResponse": { + "Insight": { "type": "object", "required": [ - "object", - "name", - "deleted" + "id", + "metadata", + "state", + "displayName", + "request" ], "properties": { - "object": { + "id": { "type": "string", - "enum": [ - "agent.deleted" + "description": "The unique identifier for the insights report.", + "readOnly": true + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightsMetadata" + } ], - "description": "The object type. Always 'agent.deleted'." + "description": "Metadata about the insights report.", + "readOnly": true }, - "name": { + "state": { + "allOf": [ + { + "$ref": "#/components/schemas/Azure.Core.Foundations.OperationState" + } + ], + "description": "The current state of the insights.", + "readOnly": true + }, + "displayName": { "type": "string", - "description": "The name of the agent." + "description": "User friendly display name for the insight." }, - "deleted": { - "type": "boolean", - "description": "Whether the agent was successfully deleted." + "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": "A deleted agent Object" + "description": "The response body for cluster insights." }, - "DeleteAgentVersionResponse": { + "InsightCluster": { "type": "object", "required": [ - "object", - "name", - "version", - "deleted" + "id", + "label", + "suggestion", + "suggestionTitle", + "description", + "weight" ], "properties": { - "object": { + "id": { "type": "string", - "enum": [ - "agent.version.deleted" - ], - "description": "The object type. Always 'agent.version.deleted'." + "description": "The id of the analysis cluster." }, - "name": { + "label": { "type": "string", - "description": "The name of the agent." + "description": "Label for the cluster" }, - "version": { + "suggestion": { "type": "string", - "description": "The version identifier of the agent." + "description": "Suggestion for the cluster" }, - "deleted": { - "type": "boolean", - "description": "Whether the agent was successfully deleted." + "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 deleted agent version Object" + "description": "A cluster of analysis samples." }, - "DeleteEvalResponse": { + "InsightModelConfiguration": { "type": "object", "required": [ - "object", - "eval_id", - "deleted" + "modelDeploymentName" ], "properties": { - "object": { - "type": "string", - "enum": [ - "eval.deleted" - ], - "description": "The object type. Always 'eval.deleted'." - }, - "eval_id": { + "modelDeploymentName": { "type": "string", - "description": "id of the eval." - }, - "deleted": { - "type": "boolean", - "description": "Whether the eval was successfully deleted." + "description": "The model deployment to be evaluated. Accepts either the deployment name alone or with the connection name as '{connectionName}/'." } }, - "description": "A deleted evaluation Object" + "description": "Configuration of the model used in the insight generation." }, - "DeleteEvalRunResponse": { + "InsightRequest": { "type": "object", + "required": [ + "type" + ], "properties": { - "object": { - "type": "string", - "enum": [ - "eval.deleted" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightType" + } ], - "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": "The type of request." } }, - "description": "A deleted evaluation run Object." + "discriminator": { + "propertyName": "type", + "mapping": { + "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightRequest", + "AgentClusterInsight": "#/components/schemas/AgentClusterInsightRequest", + "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightRequest" + } + }, + "description": "The request of the insights report." }, - "DeleteMemoryStoreResponse": { + "InsightResult": { "type": "object", "required": [ - "object", - "name", - "deleted" + "type" ], "properties": { - "object": { - "type": "string", - "enum": [ - "memory_store.deleted" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InsightType" + } ], - "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." + "description": "The type of insights result." } }, - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "discriminator": { + "propertyName": "type", + "mapping": { + "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightResult", + "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightResult", + "AgentClusterInsight": "#/components/schemas/AgentClusterInsightResult" + } + }, + "description": "The result of the insights." }, - "DeleteResponseResult": { + "InsightSample": { "type": "object", "required": [ "id", - "object", - "deleted" + "type", + "features", + "correlationInfo" ], "properties": { "id": { "type": "string", - "description": "The operation ID." + "description": "The unique identifier for the analysis sample." }, - "object": { - "type": "string", - "enum": [ - "response" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/SampleType" + } ], - "description": "Always return 'response'." + "description": "Sample type" }, - "deleted": { - "type": "boolean", - "enum": [ - true - ], - "description": "Always return true" + "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." } }, - "description": "The result of a delete response operation." + "discriminator": { + "propertyName": "type", + "mapping": { + "EvaluationResultSample": "#/components/schemas/EvaluationResultSample" + } + }, + "description": "A sample from the analysis." }, - "DeleteSkillResponse": { + "InsightScheduleTask": { "type": "object", "required": [ - "object", - "name", - "deleted" + "type", + "insight" ], "properties": { - "object": { + "type": { + "type": "string", + "enum": [ + "Insight" + ] + }, + "insight": { "allOf": [ { - "$ref": "#/components/schemas/SkillObjectType" + "$ref": "#/components/schemas/Insight" } ], - "description": "The object type. Always 'skill.deleted'.", - "default": "skill.deleted" - }, - "name": { - "type": "string", - "description": "The unique name of the skill." - }, - "deleted": { - "type": "boolean", - "description": "Whether the skill was successfully deleted." + "description": "The insight payload." } }, - "description": "A deleted skill Object" + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleTask" + } + ], + "description": "Insight task for the schedule." }, - "DeleteToolsetResponse": { + "InsightSummary": { "type": "object", "required": [ - "object", - "name", - "deleted" + "sampleCount", + "uniqueSubclusterCount", + "uniqueClusterCount", + "method", + "usage" ], "properties": { - "object": { - "type": "string", - "enum": [ - "toolset.deleted" - ], - "description": "The object type. Always 'toolset.deleted'." + "sampleCount": { + "type": "integer", + "format": "int32", + "description": "Total number of samples analyzed." }, - "name": { + "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": "The name of the toolset." + "description": "Method used for clustering." }, - "deleted": { - "type": "boolean", - "description": "Whether the toolset was successfully deleted." - } - }, - "description": "Response returned when a toolset is deleted." - }, - "Deployment": { - "type": "object", - "required": [ - "type", - "name" - ], - "properties": { - "type": { + "usage": { "allOf": [ { - "$ref": "#/components/schemas/DeploymentType" + "$ref": "#/components/schemas/ClusterTokenUsage" } ], - "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": "Token usage while performing clustering analysis" } }, - "description": "Model Deployment Definition" + "description": "Summary of the error cluster analysis." }, - "DeploymentType": { + "InsightType": { "anyOf": [ { "type": "string" @@ -16535,57 +25144,67 @@ { "type": "string", "enum": [ - "ModelDeployment" + "EvaluationRunClusterInsight", + "AgentClusterInsight", + "EvaluationComparison" ] } - ] + ], + "description": "The request of the insights." }, - "DeveloperMessage": { + "InsightsMetadata": { "type": "object", "required": [ - "role", - "content" + "createdAt" ], "properties": { - "role": { + "createdAt": { "type": "string", - "enum": [ - "developer" - ], - "description": "Indicates this is a developer message." + "format": "date-time", + "description": "The timestamp when the insights were created." }, - "content": { + "completedAt": { "type": "string", - "description": "Content provided by a developer to guide model behavior in an evaluation context." + "format": "date-time", + "description": "The timestamp when the insights were completed." } }, - "allOf": [ - { - "$ref": "#/components/schemas/Message" - } - ], - "description": "A message authored by a developer to guide the model during evaluation." + "description": "Metadata about the insights." }, - "EntraAuthorizationScheme": { + "IsolationKeySource": { "type": "object", "required": [ - "type", - "isolation_key_source" + "kind" ], "properties": { - "type": { - "type": "string", - "enum": [ - "Entra" - ] - }, - "isolation_key_source": { - "$ref": "#/components/schemas/IsolationKeySource" + "kind": { + "$ref": "#/components/schemas/IsolationKeySourceKind" } }, - "allOf": [ + "discriminator": { + "propertyName": "kind", + "mapping": { + "Entra": "#/components/schemas/EntraIsolationKeySource", + "Header": "#/components/schemas/HeaderIsolationKeySource" + } + }, + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } + }, + "IsolationKeySourceKind": { + "anyOf": [ { - "$ref": "#/components/schemas/AgentEndpointAuthorizationScheme" + "type": "string" + }, + { + "type": "string", + "enum": [ + "Entra", + "Header" + ] } ], "x-ms-foundry-meta": { @@ -16594,1065 +25213,1128 @@ ] } }, - "EntraIDCredentials": { + "ItemGenerationParams": { "type": "object", "required": [ "type" ], "properties": { "type": { - "type": "string", - "enum": [ - "AAD" + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParamsType" + } ], - "description": "The credential type", - "readOnly": true + "description": "The type of item generation parameters to use." } }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" + "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" } - ], - "description": "Entra ID credential definition" + }, + "description": "Represents the set of parameters used to control item generation operations." }, - "EntraIsolationKeySource": { - "type": "object", - "required": [ - "kind" - ], - "properties": { - "kind": { + "ItemGenerationParamsType": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", "enum": [ - "Entra" + "red_team", + "response_retrieval", + "red_team_seed_prompts", + "red_team_taxonomy", + "synthetic_data_gen_preview" ] } - }, - "allOf": [ - { - "$ref": "#/components/schemas/IsolationKeySource" - } ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "The types of parameters for red team item generation." }, - "Eval": { + "Job": { "type": "object", "required": [ - "object", - "id", "name", - "data_source_config", - "testing_criteria", - "created_at", - "metadata" + "job_type", + "compute_id" ], "properties": { - "object": { + "name": { "type": "string", - "enum": [ - "eval" - ], - "description": "The object type.", - "x-stainless-const": true, - "default": "eval" + "description": "The name of the training job. This is case-sensitive.", + "readOnly": true }, "id": { "type": "string", - "description": "Unique identifier for the evaluation." + "description": "The resource ID.", + "readOnly": true }, - "name": { + "type": { "type": "string", - "description": "The name of the evaluation." + "description": "The resource type.", + "readOnly": 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" - } + "job_type": { + "type": "string", + "enum": [ + "command" ], - "description": "Configuration of data sources used in runs of the evaluation." + "description": "Job type." }, - "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/EvalGraderAzureAIEvaluator" - }, - { - "$ref": "#/components/schemas/EvalGraderInspectAI" - } - ] - }, - "description": "A list of testing criteria." + "command": { + "type": "string", + "description": "The command to execute on startup of the job. Required when training is not specified, and must be omitted when training is specified." }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) for when the eval was created." + "environment_image_reference": { + "type": "string", + "description": "ACR path or Azure ML environment reference. Required when training is not specified." }, - "metadata": { - "type": "object", + "training": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "nullable": true + "description": "Declarative training recipe. When specified, the service compiles the recipe into the command and environment used for execution." }, - "modified_at": { - "allOf": [ - { - "$ref": "#/components/schemas/integer" - } - ], - "description": "Unix timestamp (in seconds) when the evaluation run was last modified." + "display_name": { + "type": "string", + "description": "Display name of job." }, - "created_by": { + "description": { "type": "string", - "description": "the name of the person who created the run." + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." }, "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" - } - }, - "EvalCsvFileIdSource": { - "type": "object", - "required": [ - "type", - "id" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "file_id" - ], - "description": "The type of source, always `file_id`." + "description": "The asset property dictionary." }, - "id": { + "code_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": { + "description": "Code asset reference." + }, + "compute_id": { "type": "string", - "enum": [ - "csv" + "description": "Compute resource ID." + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Input" + }, + "description": "Mapping of input data bindings used in the job." + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Output" + }, + "description": "Mapping of output data bindings used in the job." + }, + "environment_variables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables included in the job." + }, + "resources": { + "allOf": [ + { + "$ref": "#/components/schemas/JobResourceConfiguration" + } ], - "description": "The type of data source, always `csv`." + "description": "Compute Resource configuration for the job." }, - "source": { + "gpu_count": { + "type": "integer", + "format": "int32", + "description": "Number of GPUs requested by the training job." + }, + "distribution": { "allOf": [ { - "$ref": "#/components/schemas/EvalCsvFileIdSource" + "$ref": "#/components/schemas/DistributionConfiguration" } ], - "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." - }, - "EvalGraderAzureAIEvaluator": { - "type": "object", - "required": [ - "type", - "name", - "evaluator_name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "azure_ai_evaluator" + "description": "Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null." + }, + "limits": { + "allOf": [ + { + "$ref": "#/components/schemas/CommandJobLimits" + } ], - "description": "The object type, which is always `azure_ai_evaluator`." + "description": "Command Job limit." }, - "name": { - "type": "string", - "description": "The name of the grader." + "queue_settings": { + "allOf": [ + { + "$ref": "#/components/schemas/QueueSettings" + } + ], + "description": "Queue settings for the job." }, - "evaluator_name": { + "user_assigned_identity_id": { "type": "string", - "description": "The name of the evaluator." + "description": "user-assigned managed identity" }, - "evaluator_version": { + "status": { "type": "string", - "description": "The version of the evaluator. Latest version if not specified." + "description": "Status of the job.", + "readOnly": true }, - "initialization_parameters": { + "latest_attempt": { + "allOf": [ + { + "$ref": "#/components/schemas/JobAttempt" + } + ], + "description": "The latest execution attempt for the job. This field is omitted unless requested with include=latest_attempt. The same attempt resource is available from /training_jobs/{job_name}/attempts/latest.", + "readOnly": true + }, + "input_datasets": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "description": "Input dataset lineage recorded for the job. This field is omitted unless requested with include=input_datasets.", + "readOnly": true + }, + "output_datasets": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + }, + "description": "Output dataset lineage recorded for the job. This field is omitted unless requested with include=output_datasets.", + "readOnly": true + }, + "execution_definition": { "type": "object", "additionalProperties": {}, - "description": "The initialization parameters for the evaluation. Must support structured outputs." + "description": "Backend execution definition used to run the job. This field is omitted unless requested with include=execution_definition.", + "readOnly": true }, - "data_mapping": { + "resolved_specification": { + "type": "object", + "additionalProperties": {}, + "description": "Backend-resolved job specification. This field is omitted unless requested with include=resolved_specification.", + "readOnly": true + }, + "parameters": { + "type": "object", + "additionalProperties": {}, + "description": "Parameters recorded for the job. This field is omitted unless requested with include=parameters.", + "readOnly": true + }, + "settings": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "The model to use for the evaluation. Must support structured outputs." - } - }, - "title": "AzureAIEvaluatorGrader" - }, - "EvalGraderInspectAI": { - "type": "object", - "required": [ - "type", - "name", - "task_name" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "inspect_ai" - ], - "description": "The object type, which is always `inspect_ai`." + "description": "Settings recorded for the job. This field is omitted unless requested with include=settings.", + "readOnly": true }, - "name": { - "type": "string", - "description": "The display name of the benchmark." + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TrainingJobService" + }, + "description": "Service endpoints for the current job run. This field is omitted unless requested with include=services.", + "readOnly": true }, - "task_name": { - "type": "string", - "description": "The inspect_ai task module path (e.g., `inspect_evals/gpqa_diamond`)." - } - }, - "description": "Grader inspect_ai definition for inspect_ai benchmark evaluators." - }, - "EvalResult": { - "type": "object", - "required": [ - "name", - "type", - "score", - "passed" - ], - "properties": { - "name": { - "type": "string", - "description": "name of the check" + "log_files": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Log file URI metadata for the job. This field is omitted unless requested with include=log_files.", + "readOnly": true }, - "type": { - "type": "string", - "description": "type of the check" + "job_cost": { + "type": "object", + "additionalProperties": {}, + "description": "Job cost summary. This field is omitted unless requested with include=job_cost.", + "readOnly": true }, - "score": { - "type": "number", - "format": "float", - "description": "score" + "compute_request": { + "type": "object", + "additionalProperties": {}, + "description": "Compute request recorded for the job. This field is omitted unless requested with include=compute_request.", + "readOnly": true }, - "passed": { - "type": "boolean", - "description": "indicates if the check passed or failed" + "compute": { + "type": "object", + "additionalProperties": {}, + "description": "Compute record for the job. This field is omitted unless requested with include=compute.", + "readOnly": true + }, + "system_data": { + "allOf": [ + { + "$ref": "#/components/schemas/SystemData" + } + ], + "description": "Metadata pertaining to creation and last modification of the resource.", + "readOnly": true } }, - "description": "Result of the evaluation." + "description": "Training job resource." }, - "EvalRun": { + "JobArtifact": { "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" + "path", + "type" ], - "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": { + "properties": { + "artifact_id": { "type": "string", - "description": "The identifier of the associated evaluation." + "description": "Backend artifact identifier.", + "readOnly": true }, - "status": { + "origin": { "type": "string", - "description": "The status of the evaluation run." + "description": "Artifact origin.", + "readOnly": true }, - "model": { + "container": { "type": "string", - "description": "The model that is evaluated, if applicable." + "description": "Artifact container name.", + "readOnly": true }, - "name": { + "path": { "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." + "description": "Artifact path relative to the job artifact root.", + "readOnly": true }, - "report_url": { + "etag": { "type": "string", - "format": "uri", - "description": "The URL to the rendered evaluation run report on the UI dashboard." + "description": "Artifact entity tag.", + "readOnly": true }, - "result_counts": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalRunResultCounts" + "$ref": "#/components/schemas/JobArtifactType" } ], - "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." + "description": "Artifact type.", + "readOnly": true }, - "per_testing_criteria_results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalRunPerTestingCriteriaResults" - }, - "description": "Results per testing criteria applied during the evaluation run." + "size": { + "type": "integer", + "format": "int64", + "description": "Artifact size in bytes.", + "readOnly": true }, - "data_source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalJsonlRunDataSource" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSource" - }, - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSource" - }, + "created_at": { + "allOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "Information about the run's data source." + "description": "Time the artifact was created.", + "readOnly": true }, - "metadata": { - "type": "object", + "updated_at": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/OpenAI.EvalApiError" + "description": "Time the artifact was last updated.", + "readOnly": true }, - "modified_at": { + "data_path": { "allOf": [ { - "$ref": "#/components/schemas/integer" + "$ref": "#/components/schemas/JobArtifactDataPath" } ], - "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." + "description": "Storage path details for the artifact.", + "readOnly": true }, - "properties": { + "tags": { "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": "Artifact tags.", + "readOnly": true } }, - "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" - } + "description": "Metadata for an artifact produced by or attached to a job." }, - "EvalRunDataSource": { + "JobArtifactContentInfo": { "type": "object", "required": [ - "type" + "path", + "content_uri" ], "properties": { - "type": { + "origin": { "type": "string", - "description": "The data source type discriminator." + "description": "Artifact origin.", + "readOnly": true + }, + "container": { + "type": "string", + "description": "Artifact container name.", + "readOnly": true + }, + "path": { + "type": "string", + "description": "Artifact path relative to the job artifact root.", + "readOnly": true + }, + "content_uri": { + "type": "string", + "format": "uri", + "description": "Download URI for the artifact content.", + "readOnly": true + }, + "content_type": { + "type": "string", + "description": "MIME type of the content.", + "readOnly": true + }, + "content_length": { + "type": "integer", + "format": "int64", + "description": "Content length in bytes, when known.", + "readOnly": true + }, + "expires_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Time the content URI expires.", + "readOnly": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Artifact tags.", + "readOnly": true } }, - "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_benchmark_preview": "#/components/schemas/AzureAIBenchmarkPreviewEvalRunDataSource" + "description": "Content access information for a job artifact." + }, + "JobArtifactDataPath": { + "type": "object", + "properties": { + "datastore_name": { + "type": "string", + "description": "Datastore containing the artifact content.", + "readOnly": true + }, + "relative_path": { + "type": "string", + "description": "Path relative to the datastore root.", + "readOnly": true + }, + "sql_data_path": { + "type": "object", + "additionalProperties": {}, + "description": "SQL path information, when the artifact is backed by SQL storage.", + "readOnly": true } }, - "description": "Base class for run data sources with discriminator support." + "description": "Storage path details for an artifact." }, - "EvalRunOutputItem": { + "JobArtifactType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "file", + "directory" + ] + } + ], + "description": "Type of a job artifact." + }, + "JobAttempt": { "type": "object", "required": [ - "object", "id", - "run_id", - "eval_id", - "created_at", - "status", - "datasource_item_id", - "datasource_item", - "results", - "sample" + "job_name" ], "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." + "description": "The attempt identifier.", + "readOnly": true }, "run_id": { "type": "string", - "description": "The identifier of the evaluation run associated with this output item." + "description": "The RunHistory run identifier backing this attempt.", + "readOnly": true }, - "eval_id": { + "job_name": { "type": "string", - "description": "The identifier of the evaluation group." + "description": "The job name this attempt belongs to.", + "readOnly": true }, - "created_at": { + "data_container_id": { + "type": "string", + "description": "The data container identifier backing this attempt's artifacts and metrics.", + "readOnly": true + }, + "sequence_number": { "type": "integer", - "format": "unixtime", - "description": "Unix timestamp (in seconds) when the evaluation run was created." + "format": "int64", + "description": "Backend attempt sequence number.", + "readOnly": true }, "status": { + "allOf": [ + { + "$ref": "#/components/schemas/JobAttemptStatus" + } + ], + "description": "The attempt status.", + "readOnly": true + }, + "status_reason": { "type": "string", - "description": "The status of the evaluation run." + "description": "Additional status reason.", + "readOnly": true }, - "datasource_item_id": { + "started_at": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "The identifier for the data source item." - }, - "datasource_item": { - "type": "object", - "additionalProperties": {}, - "description": "Details of the input data source item." + "description": "Time the attempt started.", + "readOnly": true }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunOutputItemResult" - }, - "description": "A list of grader results for this output item." + "ended_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Time the attempt ended.", + "readOnly": true }, - "sample": { + "last_started_at": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalRunOutputItemSample" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "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": { + "description": "Most recent time the attempt started running.", + "readOnly": true + }, + "compute_duration": { "type": "string", - "description": "The name of the grader." + "format": "duration", + "description": "Total compute duration consumed by the attempt.", + "readOnly": true }, - "type": { + "current_compute_time": { "type": "string", - "description": "The grader type (for example, \"string-check-grader\")." + "format": "duration", + "description": "Current active compute duration for a running attempt.", + "readOnly": true }, - "score": { + "queueing_info": { + "type": "object", + "additionalProperties": {}, + "description": "Queueing details associated with the attempt.", + "readOnly": true + }, + "compute_details": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/JobAttemptComputeDetails" } ], - "description": "The numeric score produced by the grader." + "description": "Compute details associated with the attempt.", + "readOnly": true }, - "passed": { - "type": "boolean", - "description": "Whether the grader considered the output a pass." + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/JobAttemptError" + } + ], + "description": "Terminal error for the attempt, if any.", + "readOnly": true }, - "sample": { - "type": "object", - "additionalProperties": {}, - "nullable": true, - "description": "Optional sample or intermediate data produced by the grader." + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobAttemptWarning" + }, + "description": "Warnings emitted for the attempt.", + "readOnly": true }, - "metric": { + "is_latest": { + "type": "boolean", + "description": "Whether this attempt is the current attempt for the job.", + "readOnly": true + } + }, + "description": "One execution attempt of a training job." + }, + "JobAttemptComputeDetails": { + "type": "object", + "properties": { + "vm_size": { "type": "string", - "description": "The name of the metric (e.g., \"fluency\", \"f1_score\")." + "description": "Virtual machine size used for this attempt.", + "readOnly": true }, - "label": { + "instance_type": { "type": "string", - "description": "The label associated with the test criteria metric (e.g., \"pass\", \"fail\", \"good\", \"bad\")." + "description": "Instance type used for this attempt.", + "readOnly": true }, - "threshold": { - "type": "number", - "format": "float", - "description": "The threshold used to determine pass/fail for this test criteria, if it is numerical." + "instance_count": { + "type": "integer", + "format": "int32", + "description": "Number of instances allocated to this attempt.", + "readOnly": true }, - "reason": { + "gpu_count": { + "type": "integer", + "format": "int32", + "description": "Number of GPUs allocated to this attempt.", + "readOnly": true + }, + "region": { "type": "string", - "description": "The reason for the test criteria metric." + "description": "Region where this attempt was placed.", + "readOnly": true }, "properties": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Additional details about the test criteria metric." + "description": "Additional backend-specific compute placement properties.", + "readOnly": true } }, - "additionalProperties": {}, - "description": "A single grader result for an evaluation run output item.", - "title": "EvalRunOutputItemResult" + "description": "Compute placement details for a job attempt." }, - "EvalRunOutputItemSampleInput": { + "JobAttemptError": { "type": "object", - "required": [ - "role", - "content", - "tool_calls" - ], "properties": { - "role": { - "type": "string" + "code": { + "type": "string", + "description": "Machine-readable error code." }, - "content": { - "type": "string" + "message": { + "type": "string", + "description": "Human-readable error message." }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CompletionMessageToolCallChunk" - }, - "description": "Tool calls made within the message, if any." + "details": { + "type": "object", + "additionalProperties": {}, + "description": "Additional error details." } }, - "description": "A message in the evaluation run." + "description": "Error emitted during a job attempt." }, - "EvalRunOutputItemSampleOutput": { - "type": "object", - "required": [ - "tool_calls" - ], - "properties": { - "role": { + "JobAttemptIdentifier": { + "anyOf": [ + { "type": "string" }, - "content": { + { + "type": "string", + "enum": [ + "latest" + ] + } + ], + "description": "Training job attempt identifier. Use 'latest' for the latest attempt." + }, + "JobAttemptStatus": { + "anyOf": [ + { "type": "string" }, - "tool_calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CompletionMessageToolCallChunk" - }, - "description": "Tool calls made within the message, if any." + { + "type": "string", + "enum": [ + "queued", + "running", + "completed", + "failed", + "canceled" + ] } - }, - "description": "A message in the evaluation run." + ], + "description": "Status of a job execution attempt." }, - "EvalRunResultCompareItem": { + "JobAttemptWarning": { "type": "object", - "required": [ - "treatmentRunId", - "treatmentRunSummary", - "deltaEstimate", - "pValue", - "treatmentEffect" - ], "properties": { - "treatmentRunId": { + "code": { "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." + "description": "Machine-readable warning code." }, - "pValue": { - "type": "number", - "format": "float", - "description": "P-value for the treatment effect." + "message": { + "type": "string", + "description": "Human-readable warning message." }, - "treatmentEffect": { - "allOf": [ - { - "$ref": "#/components/schemas/TreatmentEffectType" - } - ], - "description": "Type of treatment effect." + "details": { + "type": "object", + "additionalProperties": {}, + "description": "Additional warning details." } }, - "description": "Metric comparison for a treatment against the baseline." + "description": "Warning emitted during a job attempt." }, - "EvalRunResultComparison": { + "JobCreate": { "type": "object", "required": [ - "testingCriteria", - "metric", - "evaluator", - "baselineRunSummary", - "compareItems" + "name", + "job_type", + "compute_id" ], "properties": { - "testingCriteria": { - "type": "string", - "description": "Name of the testing criteria." - }, - "metric": { + "name": { "type": "string", - "description": "Metric being evaluated." + "description": "The name of the training job. This is case-sensitive." }, - "evaluator": { + "job_type": { "type": "string", - "description": "Name of the evaluator for this testing criteria." - }, - "baselineRunSummary": { - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunResultSummary" - } + "enum": [ + "command" ], - "description": "Summary statistics of the baseline run." + "description": "Job type." }, - "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": { + "command": { "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." + "description": "The command to execute on startup of the job. Required when training is not specified, and must be omitted when training is specified." }, - "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." - }, - "Evaluation": { - "type": "object", - "required": [ - "id", - "data", - "evaluators" - ], - "properties": { - "id": { + "environment_image_reference": { "type": "string", - "description": "Identifier of the evaluation.", - "readOnly": true + "description": "ACR path or Azure ML environment reference. Required when training is not specified." }, - "data": { + "training": { "allOf": [ { - "$ref": "#/components/schemas/InputData" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "Data for evaluation." + "description": "Declarative training recipe. When specified, the service compiles the recipe into the command and environment used for execution." }, - "displayName": { + "display_name": { "type": "string", - "description": "Display Name for evaluation. It helps to find the evaluation easily in AI Foundry. It does not need to be unique." + "description": "Display name of job." }, "description": { "type": "string", - "description": "Description of the evaluation. It can be used to store additional information about the evaluation and is mutable." + "description": "The asset description text." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tag dictionary. Tags can be added, removed, and updated." + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The asset property dictionary." + }, + "code_id": { + "type": "string", + "description": "Code asset reference." }, - "status": { + "compute_id": { "type": "string", - "description": "Status of the evaluation. It is set by service and is read-only.", - "readOnly": true + "description": "Compute resource ID." }, - "tags": { + "inputs": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/Input" }, - "description": "Evaluation's tags. Unlike properties, tags are fully mutable." + "description": "Mapping of input data bindings used in the job." }, - "properties": { + "outputs": { "type": "object", "additionalProperties": { - "type": "string" + "$ref": "#/components/schemas/Output" }, - "description": "Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed." + "description": "Mapping of output data bindings used in the job." }, - "evaluators": { + "environment_variables": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/EvaluatorConfiguration" + "type": "string" }, - "description": "Evaluators to be used for the evaluation." + "description": "Environment variables included in the job." }, - "target": { + "resources": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationTarget" + "$ref": "#/components/schemas/JobResourceConfiguration" } ], - "description": "Specifies the type and configuration of the entity used for this evaluation." + "description": "Compute Resource configuration for the job." + }, + "gpu_count": { + "type": "integer", + "format": "int32", + "description": "Number of GPUs requested by the training job." + }, + "distribution": { + "allOf": [ + { + "$ref": "#/components/schemas/DistributionConfiguration" + } + ], + "description": "Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null." + }, + "limits": { + "allOf": [ + { + "$ref": "#/components/schemas/CommandJobLimits" + } + ], + "description": "Command Job limit." + }, + "queue_settings": { + "allOf": [ + { + "$ref": "#/components/schemas/QueueSettings" + } + ], + "description": "Queue settings for the job." + }, + "user_assigned_identity_id": { + "type": "string", + "description": "user-assigned managed identity" + }, + "status": { + "type": "string", + "description": "Status of the job.", + "readOnly": true } }, - "description": "Evaluation Definition" + "description": "Request body for creating a training job." }, - "EvaluationComparisonInsightRequest": { + "JobMetric": { "type": "object", "required": [ - "type", - "evalId", - "baselineRunId", - "treatmentRunIds" + "name" ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "EvaluationComparison" + "description": "Metric name.", + "readOnly": true + }, + "run_id": { + "type": "string", + "description": "Run identifier that emitted the metric.", + "readOnly": true + }, + "data_container_id": { + "type": "string", + "description": "Data container identifier that stores the metric.", + "readOnly": true + }, + "metric_type": { + "allOf": [ + { + "$ref": "#/components/schemas/JobMetricType" + } ], - "description": "The type of request." + "description": "Metric type.", + "readOnly": true }, - "evalId": { + "description": { "type": "string", - "description": "Identifier for the evaluation." + "description": "Metric description.", + "readOnly": true }, - "baselineRunId": { + "label": { "type": "string", - "description": "The baseline run ID for comparison." + "description": "Metric label.", + "readOnly": true }, - "treatmentRunIds": { - "type": "array", - "items": { + "num_cells": { + "type": "integer", + "format": "int32", + "description": "Number of metric cells.", + "readOnly": true + }, + "data_location": { + "type": "string", + "description": "Metric data location.", + "readOnly": true + }, + "columns": { + "type": "object", + "additionalProperties": { "type": "string" }, - "description": "List of treatment run IDs for comparison." + "description": "Column metadata for structured metric values.", + "readOnly": true + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/JobMetricSchema" + } + ], + "description": "Full metric schema metadata.", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightRequest" - } - ], - "description": "Evaluation Comparison Request" + "description": "Metadata for a metric emitted by a job or run." }, - "EvaluationComparisonInsightResult": { + "JobMetricAggregate": { "type": "object", "required": [ - "type", - "comparisons", - "method" + "name" ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "EvaluationComparison" + "description": "Metric name.", + "readOnly": true + }, + "started_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } ], - "description": "The type of insights result." + "description": "Aggregate window start.", + "readOnly": true }, - "comparisons": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRunResultComparison" - }, - "description": "Comparison results for each treatment run against the baseline." + "ended_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Aggregate window end.", + "readOnly": true }, - "method": { - "type": "string", - "description": "The statistical method used for comparison." + "values": { + "type": "object", + "additionalProperties": {}, + "description": "Aggregate values.", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "Insights from the evaluation comparison." + "description": "Aggregated values for a metric." }, - "EvaluationResultSample": { + "JobMetricLastValue": { "type": "object", "required": [ - "type", - "evaluationResult" + "name" ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "EvaluationResultSample" - ], - "description": "Evaluation Result Sample Type" + "description": "Metric name.", + "readOnly": true }, - "evaluationResult": { + "value": { "allOf": [ { - "$ref": "#/components/schemas/EvalResult" + "$ref": "#/components/schemas/JobMetricPoint" } ], - "description": "Evaluation result for the analysis sample." + "description": "Latest metric point.", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightSample" - } - ], - "description": "A sample from the evaluation result." + "description": "Latest value for a metric." }, - "EvaluationRule": { + "JobMetricPoint": { "type": "object", - "required": [ - "id", - "action", - "eventType", - "enabled", - "systemData" - ], "properties": { - "id": { + "metric_id": { "type": "string", - "description": "Unique identifier for the evaluation rule.", + "description": "Metric identifier.", "readOnly": true }, - "displayName": { + "name": { "type": "string", - "description": "Display Name for the evaluation rule." + "description": "Metric name.", + "readOnly": true }, - "description": { + "run_id": { "type": "string", - "description": "Description for the evaluation rule." + "description": "Run identifier that emitted the metric.", + "readOnly": true }, - "action": { + "data_container_id": { + "type": "string", + "description": "Data container identifier that stores the metric.", + "readOnly": true + }, + "metric_type": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleAction" + "$ref": "#/components/schemas/JobMetricType" } ], - "description": "Definition of the evaluation rule action.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "Evaluations=V1Preview" - ] - } + "description": "Metric type.", + "readOnly": true }, - "filter": { + "description": { + "type": "string", + "description": "Metric description.", + "readOnly": true + }, + "label": { + "type": "string", + "description": "Metric label.", + "readOnly": true + }, + "num_cells": { + "type": "integer", + "format": "int32", + "description": "Number of metric cells.", + "readOnly": true + }, + "data_location": { + "type": "string", + "description": "Metric data location.", + "readOnly": true + }, + "schema": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleFilter" + "$ref": "#/components/schemas/JobMetricSchema" } ], - "description": "Filter condition of the evaluation rule." + "description": "Full metric schema metadata.", + "readOnly": true }, - "eventType": { + "step": { + "type": "integer", + "format": "int64", + "description": "Metric step.", + "readOnly": true + }, + "created_at": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationRuleEventType" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "Event type that the evaluation rule applies to." - }, - "enabled": { - "type": "boolean", - "description": "Indicates whether the evaluation rule is enabled. Default is true." + "description": "Time the metric point was created.", + "readOnly": true }, - "systemData": { + "data": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "System metadata for the evaluation rule.", + "additionalProperties": {}, + "description": "Metric data values.", "readOnly": true } }, - "description": "Evaluation rule model." + "description": "A metric data point." }, - "EvaluationRuleAction": { + "JobMetricSample": { "type": "object", "required": [ - "type" + "name", + "points" ], "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleActionType" - } - ], - "description": "Type of the evaluation action." + "name": { + "type": "string", + "description": "Metric name.", + "readOnly": true + }, + "points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobMetricPoint" + }, + "description": "Sampled metric points.", + "readOnly": true } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "continuousEvaluation": "#/components/schemas/ContinuousEvaluationRuleAction", - "humanEvaluation": "#/components/schemas/HumanEvaluationRuleAction", - "humanEvaluationPreview": "#/components/schemas/HumanEvaluationPreviewRuleAction" + "description": "Sampled values for a metric." + }, + "JobMetricSchema": { + "type": "object", + "properties": { + "num_properties": { + "type": "integer", + "format": "int32", + "description": "Number of properties in the schema.", + "readOnly": true + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JobMetricSchemaProperty" + }, + "description": "Metric schema properties.", + "readOnly": true } }, - "description": "Evaluation action model." + "description": "Full metric schema metadata." }, - "EvaluationRuleActionType": { - "anyOf": [ - { - "type": "string" + "JobMetricSchemaProperty": { + "type": "object", + "properties": { + "property_id": { + "type": "string", + "description": "Metric schema property identifier.", + "readOnly": true }, - { + "name": { "type": "string", - "enum": [ - "continuousEvaluation", - "humanEvaluation", - "humanEvaluationPreview" - ] + "description": "Metric schema property name.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Metric schema property type.", + "readOnly": true } - ], - "description": "Type of the evaluation action." + }, + "description": "One property in a metric schema." }, - "EvaluationRuleEventType": { + "JobMetricType": { "anyOf": [ { "type": "string" @@ -17660,351 +26342,418 @@ { "type": "string", "enum": [ - "responseCompleted", - "manual" + "scalar", + "table", + "image" ] } ], - "description": "Type of the evaluation rule event." + "description": "The kind of metric emitted by a job." }, - "EvaluationRuleFilter": { + "JobOperationError": { "type": "object", - "required": [ - "agentName" - ], "properties": { - "agentName": { + "code": { "type": "string", - "description": "Filter by agent name." + "description": "Machine-readable error code." + }, + "message": { + "type": "string", + "description": "Human-readable error message." + }, + "details": { + "type": "object", + "additionalProperties": {}, + "description": "Additional error information." } }, - "description": "Evaluation filter model." + "description": "Error details for an asynchronous training job operation." }, - "EvaluationRunClusterInsightRequest": { + "JobOperationResource": { "type": "object", "required": [ - "type", - "evalId", - "runIds" + "status" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "EvaluationRunClusterInsight" - ], - "description": "The type of insights request." + "description": "Operation resource ID.", + "readOnly": true }, - "evalId": { + "name": { "type": "string", - "description": "Evaluation Id for the insights." + "description": "Operation name.", + "readOnly": true }, - "runIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of evaluation run IDs for the insights." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/JobOperationStatus" + } + ], + "description": "Operation status.", + "readOnly": true }, - "modelConfiguration": { + "properties": { + "type": "object", + "additionalProperties": {}, + "description": "Operation result properties.", + "readOnly": true + }, + "started_at": { "allOf": [ { - "$ref": "#/components/schemas/InsightModelConfiguration" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "Configuration of the model used in the insight generation." + "description": "Operation start time.", + "readOnly": true + }, + "ended_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } + ], + "description": "Operation end time.", + "readOnly": true + }, + "percent_complete": { + "type": "number", + "format": "double", + "description": "Operation completion percentage from 0 to 100.", + "readOnly": true + }, + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/JobOperationError" + } + ], + "description": "Operation error information.", + "readOnly": true } }, - "allOf": [ + "description": "Asynchronous training job operation resource." + }, + "JobOperationStatus": { + "anyOf": [ { - "$ref": "#/components/schemas/InsightRequest" + "type": "string" + }, + { + "type": "string", + "enum": [ + "in_progress", + "deleting", + "succeeded", + "failed", + "canceled" + ] } ], - "description": "Insights on set of Evaluation Results" + "description": "Status of an asynchronous training job operation." }, - "EvaluationRunClusterInsightResult": { + "JobOutputReference": { "type": "object", "required": [ - "type", - "clusterInsight" + "name" ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "EvaluationRunClusterInsight" + "description": "Output name.", + "readOnly": true + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/AssetTypes" + } ], - "description": "The type of insights result." + "description": "Output asset type.", + "readOnly": true }, - "clusterInsight": { - "$ref": "#/components/schemas/ClusterInsightResult" + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/InputOutputModes" + } + ], + "description": "Output delivery mode.", + "readOnly": true + }, + "uri": { + "type": "string", + "description": "Output storage URI.", + "readOnly": true + }, + "asset_name": { + "type": "string", + "description": "Registered asset name, if the output produced an asset.", + "readOnly": true + }, + "asset_version": { + "type": "string", + "description": "Registered asset version, if the output produced an asset.", + "readOnly": true + }, + "base_model_id": { + "type": "string", + "description": "Base model ID for model outputs.", + "readOnly": true + }, + "description": { + "type": "string", + "description": "Output description.", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/InsightResult" - } - ], - "description": "Insights from the evaluation run cluster analysis." + "description": "Named output produced by a job." }, - "EvaluationScheduleTask": { + "JobResourceConfiguration": { "type": "object", - "required": [ - "type", - "evalId", - "evalRun" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "Evaluation" - ] + "instance_count": { + "type": "integer", + "format": "int32", + "description": "Optional number of instances or nodes used by the compute target." }, - "evalId": { + "instance_type": { "type": "string", - "description": "Identifier of the evaluation group." + "description": "Optional type of VM used as supported by the compute target." }, - "evalRun": { + "properties": { "type": "object", - "description": "The evaluation run payload." + "additionalProperties": {}, + "description": "Additional properties bag." + }, + "shm_size": { + "type": "string", + "description": "Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes)." + }, + "docker_args": { + "type": "string", + "description": "Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types." } }, - "allOf": [ + "description": "Compute Resource configuration for the job." + }, + "JobServiceType": { + "anyOf": [ { - "$ref": "#/components/schemas/ScheduleTask" + "type": "string" + }, + { + "type": "string", + "enum": [ + "studio", + "tracking" + ] } ], - "description": "Evaluation task for the schedule." - }, - "EvaluationTarget": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationTargetType" - } - ], - "description": "Discriminator that defines the type of the evaluation target." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "modelResponseGeneration": "#/components/schemas/modelResponseGenerationTarget" - } - }, - "description": "Abstract base model for defining evaluation targets." + "description": "Job service endpoint type." }, - "EvaluationTargetType": { + "JobType": { "anyOf": [ + { + "type": "string" + }, { "type": "string", "enum": [ - "modelResponseGeneration" + "command" ] - }, - { - "type": "string" } ], - "description": "Allowed types of evaluation targets." + "description": "Type of a job." + }, + "KtoFeedbackColumnMapping": { + "type": "object", + "required": [ + "prompt", + "response", + "label" + ], + "properties": { + "prompt": { + "type": "string", + "description": "Actual dataset column name containing prompts, for example 'prompt' or 'question'." + }, + "response": { + "type": "string", + "description": "Actual dataset column name containing responses, for example 'response', 'completion', or 'answer'." + }, + "label": { + "type": "string", + "description": "Actual dataset column name containing the binary desirability label, for example 'label' or 'is_desirable'." + } + }, + "description": "Column mapping for KTO feedback datasets. Keys are logical fields expected by KTO; values are the exact column names in the referenced dataset asset." }, - "EvaluationTaxonomy": { + "KtoTrainingConfiguration": { "type": "object", "required": [ - "name", - "version", - "taxonomyInput" + "algorithm" ], "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": { + "algorithm": { "type": "string", - "description": "The version of the resource", - "readOnly": true + "enum": [ + "kto" + ], + "description": "Training algorithm, always 'kto'." }, - "taxonomyInput": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationTaxonomyInput" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "Input configuration for the evaluation taxonomy." - }, - "taxonomyCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxonomyCategory" - }, - "description": "List of taxonomy categories." + "description": "LoRA adapter configuration." }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the evaluation taxonomy." + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, - "description": "Evaluation Taxonomy Definition" + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" + } + ], + "description": "Kahneman-Tversky optimization training recipe." }, - "EvaluationTaxonomyCreateOrUpdate": { + "KtoTrainingDatasetConfiguration": { "type": "object", "required": [ - "taxonomyInput" + "train", + "columns" ], "properties": { - "description": { + "train": { "type": "string", - "description": "The asset description text." + "description": "Training dataset asset reference." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "eval": { + "type": "string", + "description": "Optional evaluation dataset asset reference." }, - "taxonomyInput": { + "columns": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationTaxonomyInput" + "$ref": "#/components/schemas/KtoFeedbackColumnMapping" } ], - "description": "Input configuration for the evaluation taxonomy." - }, - "taxonomyCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxonomyCategory" - }, - "description": "List of taxonomy categories." + "description": "Mapping from KTO logical fields to actual dataset column names. KTO requires 'prompt', 'response', and 'label'." }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the evaluation taxonomy." + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } + ], + "description": "Conversational data formatting options." } }, - "description": "Evaluation Taxonomy Definition" + "description": "Dataset configuration for managed KTO training." }, - "EvaluationTaxonomyInput": { + "KtoTrainingJob": { "type": "object", "required": [ - "type" + "type", + "dataset" ], "properties": { "type": { + "type": "string", + "enum": [ + "kto" + ], + "description": "Managed training job type, always 'kto'." + }, + "dataset": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationTaxonomyInputType" + "$ref": "#/components/schemas/KtoTrainingDatasetConfiguration" } ], - "description": "Input type of the evaluation taxonomy." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "agent": "#/components/schemas/AgentTaxonomyInput" + "description": "Training and optional evaluation datasets." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/KtoTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed KTO." } }, - "description": "Input configuration for the evaluation taxonomy." - }, - "EvaluationTaxonomyInputType": { - "anyOf": [ - { - "type": "string" - }, + "allOf": [ { - "type": "string", - "enum": [ - "agent", - "policy" - ] + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "description": "Type of the evaluation taxonomy input." + "description": "Request body for creating a managed KTO training job from a base model." }, - "EvaluationTaxonomyInputUpdate": { + "KtoTrainingRuntimeConfiguration": { "type": "object", - "required": [ - "type" - ], "properties": { - "type": { + "framework": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationTaxonomyInputType" + "$ref": "#/components/schemas/TrainingFramework" } ], - "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." + "description": "Training framework implementation. If omitted, the service selects a compatible framework." }, - "tags": { + "hyperparameters": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." }, - "taxonomyInput": { + "desirable_weight": { + "type": "number", + "format": "double", + "description": "Weight applied to desirable examples." + }, + "undesirable_weight": { + "type": "number", + "format": "double", + "description": "Weight applied to undesirable examples." + }, + "lora": { "allOf": [ { - "$ref": "#/components/schemas/EvaluationTaxonomyInputUpdate" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "Input configuration for the evaluation taxonomy." + "description": "LoRA adapter configuration." }, - "taxonomyCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxonomyCategory" - }, - "description": "List of taxonomy categories." + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the evaluation taxonomy." + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "description": "Evaluation Taxonomy Definition" + "description": "Runtime options for managed KTO training." }, - "EvaluatorCategory": { + "ListViewType": { "anyOf": [ { "type": "string" @@ -18012,95 +26761,148 @@ { "type": "string", "enum": [ - "quality", - "safety", - "agents" + "active_only", + "archived_only", + "all" ] } ], - "description": "The category of the evaluator" + "description": "Specifies which jobs to include in a list result based on their lifecycle state." }, - "EvaluatorConfiguration": { + "ManagedAgentIdentityBlueprint": { "type": "object", "required": [ - "id" + "name" ], "properties": { - "id": { + "name": { "type": "string", - "description": "Identifier of the evaluator." - }, - "initParams": { - "type": "object", - "additionalProperties": {}, - "description": "Initialization parameters of the evaluator." + "readOnly": true + } + } + }, + "ManagedAgentIdentityBlueprintReference": { + "type": "object", + "required": [ + "type", + "blueprint_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "ManagedAgentIdentityBlueprint" + ] }, - "dataMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Data parameters of the evaluator." + "blueprint_id": { + "type": "string", + "description": "The ID of the managed blueprint" } }, - "description": "Evaluator Configuration" + "allOf": [ + { + "$ref": "#/components/schemas/AgentBlueprintReference" + } + ], + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } }, - "EvaluatorCredentialRequest": { + "ManagedAzureAISearchIndex": { "type": "object", "required": [ - "blobUri" + "type" ], "properties": { - "blobUri": { + "type": { "type": "string", - "format": "uri", - "description": "The blob URI for the evaluator storage. Example: `https://account.blob.core.windows.net:443/container`" + "enum": [ + "ManagedAzureSearch" + ], + "description": "Type of index" } }, - "description": "Request body for getting evaluator credentials" + "allOf": [ + { + "$ref": "#/components/schemas/Index" + } + ], + "description": "Managed Azure AI Search Index Definition" }, - "EvaluatorDefinition": { + "ManagedAzureAISearchIndexUpdate": { "type": "object", "required": [ "type" ], "properties": { "type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorDefinitionType" - } + "type": "string", + "enum": [ + "ManagedAzureSearch" ], - "description": "The type of evaluator definition" + "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." }, - "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." + "updated_at": { + "type": "integer", + "format": "unixtime", + "description": "The last update time of the memory item." }, - "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." + "scope": { + "type": "string", + "description": "The namespace that logically groups and isolates memories, such as a user ID." }, - "metrics": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EvaluatorMetric" - }, - "description": "List of output metrics produced by this evaluator" + "content": { + "type": "string", + "description": "The content of the memory." + }, + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryItemKind" + } + ], + "description": "The kind of the memory item." } }, "discriminator": { - "propertyName": "type", + "propertyName": "kind", "mapping": { - "code": "#/components/schemas/CodeBasedEvaluatorDefinition", - "prompt": "#/components/schemas/PromptBasedEvaluatorDefinition" + "user_profile": "#/components/schemas/UserProfileMemoryItem", + "chat_summary": "#/components/schemas/ChatSummaryMemoryItem" } }, - "description": "Base evaluator configuration with discriminator" + "description": "A single memory item stored in the memory store, containing content and metadata.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorDefinitionType": { + "MemoryItemKind": { "anyOf": [ { "type": "string" @@ -18108,58 +26910,50 @@ { "type": "string", "enum": [ - "prompt", - "code", - "prompt_and_code", - "service", - "openai_graders" + "user_profile", + "chat_summary" ] } ], - "description": "The type of evaluator definition" + "description": "Memory item kind.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorMetric": { + "MemoryOperation": { "type": "object", + "required": [ + "kind", + "memory_item" + ], "properties": { - "type": { + "kind": { "allOf": [ { - "$ref": "#/components/schemas/EvaluatorMetricType" + "$ref": "#/components/schemas/MemoryOperationKind" } ], - "description": "Type of the metric." + "description": "The type of memory operation being performed." }, - "desirable_direction": { + "memory_item": { "allOf": [ { - "$ref": "#/components/schemas/EvaluatorMetricDirection" + "$ref": "#/components/schemas/MemoryItem" } ], - "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": "The memory item to create, update, or delete." } }, - "description": "Evaluator Metric" + "description": "Represents a single memory operation (create, update, or delete) performed on a memory item.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorMetricDirection": { + "MemoryOperationKind": { "anyOf": [ { "type": "string" @@ -18167,1173 +26961,1480 @@ { "type": "string", "enum": [ - "increase", - "decrease", - "neutral" + "create", + "update", + "delete" ] } ], - "description": "The direction of the metric indicating whether a higher value is better, a lower value is better, or neutral" + "description": "Memory operation kind.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorMetricType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "ordinal", - "continuous", - "boolean" - ] - } + "MemorySearchItem": { + "type": "object", + "required": [ + "memory_item" ], - "description": "The type of the evaluator" + "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" + ] + } }, - "EvaluatorType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "builtin", - "custom" - ] + "MemorySearchOptions": { + "type": "object", + "properties": { + "max_memories": { + "type": "integer", + "format": "int32", + "description": "Maximum number of memory items to return." } - ], - "description": "The type of the evaluator" + }, + "description": "Memory search options.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "EvaluatorVersion": { + "MemorySearchPreviewTool": { "type": "object", "required": [ - "evaluator_type", - "categories", - "definition", - "created_by", - "created_at", - "modified_at", - "name", - "version" + "type", + "memory_store_name", + "scope" ], "properties": { - "display_name": { + "type": { "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" - } + "enum": [ + "memory_search_preview" ], - "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 + "description": "The type of the tool. Always `memory_search_preview`." }, - "modified_at": { + "name": { "type": "string", - "description": "Last modified date/time of the evaluator", - "readOnly": true + "description": "Optional user-defined name for this tool or configuration." }, - "id": { + "description": { "type": "string", - "description": "Asset ID, a unique identifier for the asset", - "readOnly": true + "description": "Optional user-defined description for this tool or configuration." }, - "name": { + "memory_store_name": { "type": "string", - "description": "The name of the resource", - "readOnly": true + "description": "The name of the memory store to use." }, - "version": { + "scope": { "type": "string", - "description": "The version of the resource", - "readOnly": true + "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 } }, - "description": "Evaluator Definition" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool for integrating memories into the agent." }, - "EvaluatorVersionCreate": { + "MemorySearchTool": { "type": "object", "required": [ - "evaluator_type", - "categories", - "definition" + "type", + "memory_store_name", + "scope" ], "properties": { - "display_name": { + "type": { "type": "string", - "description": "Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique." + "enum": [ + "memory_search" + ], + "description": "The type of the tool. Always `memory_search_preview`." }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Metadata about the evaluator" + "name": { + "type": "string", + "description": "Optional user-defined name for this tool or configuration." }, - "evaluator_type": { - "allOf": [ - { - "$ref": "#/components/schemas/EvaluatorType" - } - ], - "description": "The type of the evaluator" + "description": { + "type": "string", + "description": "Optional user-defined description for this tool or configuration." }, - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorCategory" - }, - "description": "The categories of the evaluator" + "memory_store_name": { + "type": "string", + "description": "The name of the memory store to use." }, - "definition": { + "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/EvaluatorDefinition" + "$ref": "#/components/schemas/MemorySearchOptions" } ], - "description": "Definition of the evaluator" - }, - "description": { - "type": "string", - "description": "The asset description text." + "description": "Options for searching the memory store." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "update_delay": { + "type": "integer", + "format": "int32", + "description": "Time to wait before updating memories after inactivity (seconds). Default 300.", + "default": 300 } }, - "description": "Evaluator Definition" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" + } + ], + "description": "A tool for integrating memories into the agent." }, - "EvaluatorVersionUpdate": { + "MemorySearchToolCallItemParam": { "type": "object", + "required": [ + "type" + ], "properties": { - "display_name": { + "type": { "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" + "enum": [ + "memory_search_call" + ] }, - "categories": { + "results": { "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" + "$ref": "#/components/schemas/MemorySearchItem" }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "nullable": true, + "description": "The results returned from the memory search." } }, - "description": "Evaluator Definition" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ] }, - "FabricDataAgentToolCall": { + "MemorySearchToolCallItemResource": { "type": "object", "required": [ "type", - "call_id", - "arguments", "status" ], "properties": { "type": { "type": "string", "enum": [ - "fabric_dataagent_preview_call" + "memory_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" - } + "type": "string", + "enum": [ + "in_progress", + "searching", + "completed", + "incomplete", + "failed" ], - "description": "The status of the tool call." + "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" } - ], - "description": "A Fabric data agent tool call." + ] }, - "FabricDataAgentToolCallOutput": { + "MemoryStoreDefaultDefinition": { "type": "object", "required": [ - "type", - "call_id", - "status" + "kind", + "chat_model", + "embedding_model" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "fabric_dataagent_preview_call_output" - ] + "default" + ], + "description": "The kind of the memory store." }, - "call_id": { + "chat_model": { "type": "string", - "description": "The unique ID of the tool call generated by the model." + "description": "The name or identifier of the chat completion model deployment used for memory processing." }, - "output": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallOutputContent" - } - ], - "description": "The output from the Fabric data agent tool call." + "embedding_model": { + "type": "string", + "description": "The name or identifier of the embedding model deployment used for memory processing." }, - "status": { + "options": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/MemoryStoreDefaultOptions" } ], - "description": "The status of the tool call." + "description": "Default memory store options." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/MemoryStoreDefinition" } ], - "description": "The output of a Fabric data agent tool call." + "description": "Default memory store implementation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "FabricDataAgentToolParameters": { + "MemoryStoreDefaultOptions": { "type": "object", + "required": [ + "user_profile_enabled", + "chat_summary_enabled" + ], "properties": { - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "user_profile_enabled": { + "type": "boolean", + "description": "Whether to enable user profile extraction and storage. Default is true.", + "default": true }, - "description": { + "user_profile_details": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "description": "Specific categories or types of user profile information to extract and store." }, - "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." + "chat_summary_enabled": { + "type": "boolean", + "description": "Whether to enable chat summary extraction and storage. Default is true.", + "default": true } }, - "description": "The fabric data agent tool parameters." + "description": "Default memory store configurations.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "FileDatasetVersion": { + "MemoryStoreDefinition": { "type": "object", "required": [ - "type" + "kind" ], "properties": { - "type": { + "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": [ - "uri_file" + "memory_store.scope.deleted" ], - "description": "Dataset type" + "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." } }, - "allOf": [ + "description": "Response for deleting memories from a scope.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreKind": { + "anyOf": [ { - "$ref": "#/components/schemas/DatasetVersion" + "type": "string" + }, + { + "type": "string", + "enum": [ + "default" + ] } ], - "description": "FileDatasetVersion Definition" + "description": "The type of memory store implementation to use.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "FileDatasetVersionUpdate": { + "MemoryStoreObject": { "type": "object", "required": [ - "type" + "object", + "id", + "created_at", + "updated_at", + "name", + "definition" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "uri_file" + "memory_store" ], - "description": "Dataset type" + "description": "The object type, which is always 'memory_store'." + }, + "id": { + "type": "string", + "description": "The unique identifier of the memory store." + }, + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (seconds) when the memory store was created." + }, + "updated_at": { + "type": "integer", + "format": "unixtime", + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/DatasetVersionUpdate" + "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" ], - "description": "FileDatasetVersion Definition" + "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" + ] + } }, - "FixedRatioVersionSelectionRule": { + "MemoryStoreUpdateCompletedResult": { "type": "object", "required": [ - "type", - "traffic_percentage" + "memory_operations", + "usage" ], "properties": { - "type": { - "type": "string", - "enum": [ - "FixedRatio" - ] + "memory_operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemoryOperation" + }, + "description": "A list of individual memory operations that were performed during the update." }, - "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." + "usage": { + "allOf": [ + { + "$ref": "#/components/schemas/MemoryStoreOperationUsage" + } + ], + "description": "Usage statistics associated with the memory update operation." } }, - "allOf": [ - { - "$ref": "#/components/schemas/VersionSelectionRule" - } - ], + "description": "Memory update result.", "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" + "conditional_previews": [ + "MemoryStores=V1Preview" ] } }, - "FolderDatasetVersion": { + "MemoryStoreUpdateResponse": { "type": "object", "required": [ - "type" + "update_id", + "status" ], "properties": { - "type": { + "update_id": { "type": "string", - "enum": [ - "uri_folder" + "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": "Dataset type" + "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\"." } }, - "allOf": [ - { - "$ref": "#/components/schemas/DatasetVersion" - } + "description": "Provides the status of a memory store update operation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } + }, + "MemoryStoreUpdateStatus": { + "type": "string", + "enum": [ + "queued", + "in_progress", + "completed", + "failed", + "superseded" ], - "description": "FileDatasetVersion Definition" + "description": "Status of a memory store update operation.", + "x-ms-foundry-meta": { + "conditional_previews": [ + "MemoryStores=V1Preview" + ] + } }, - "FolderDatasetVersionUpdate": { + "Message": { "type": "object", "required": [ - "type" + "role" ], "properties": { - "type": { - "type": "string", - "enum": [ - "uri_folder" + "role": { + "anyOf": [ + { + "type": "string", + "enum": [ + "system", + "assistant", + "developer", + "user" + ] + }, + { + "type": "string" + } ], - "description": "Dataset type" + "description": "The role of the message author. Known values: 'system', 'assistant', 'developer', 'user'." } }, - "allOf": [ - { - "$ref": "#/components/schemas/DatasetVersionUpdate" - } - ], - "description": "FileDatasetVersion Definition" - }, - "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." + "discriminator": { + "propertyName": "role", + "mapping": { + "system": "#/components/schemas/SystemMessage", + "developer": "#/components/schemas/DeveloperMessage", + "user": "#/components/schemas/UserMessage", + "assistant": "#/components/schemas/AssistantMessage" } }, - "description": "Details of a function tool call." + "description": "Abstract base model representing a single message in a conversation." }, - "HeaderIsolationKeySource": { + "MicrosoftFabricPreviewTool": { "type": "object", "required": [ - "kind", - "user_isolation_key", - "chat_isolation_key" + "type", + "fabric_dataagent_preview" ], "properties": { - "kind": { + "type": { "type": "string", "enum": [ - "Header" - ] + "fabric_dataagent_preview" + ], + "description": "The object type, which is always 'fabric_dataagent_preview'." }, - "user_isolation_key": { + "name": { "type": "string", - "description": "The user isolation key header value" + "description": "Optional user-defined name for this tool or configuration." }, - "chat_isolation_key": { + "description": { "type": "string", - "description": "The chat isolation key header value" + "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/IsolationKeySource" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "The input definition information for a Microsoft Fabric tool as used to configure an agent." }, - "HeaderTelemetryEndpointAuth": { + "Mlflow.MlflowPayload": { + "type": "object", + "additionalProperties": {}, + "description": "Generic MLflow compatibility request payload." + }, + "Mlflow.MlflowResponse": { + "type": "object", + "additionalProperties": {}, + "description": "Generic MLflow compatibility response payload." + }, + "Model": { "type": "object", "required": [ - "type", - "header_name", - "secret_id", - "secret_key" + "name", + "version" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "header" - ], - "description": "The authentication type, always 'header' for header-based secret authentication." + "description": "Asset ID, a unique identifier for the model asset.", + "readOnly": true }, - "header_name": { + "name": { "type": "string", - "description": "The name of the HTTP header to inject the secret value into.", - "example": "X-Otlp-Api-Key" + "description": "The name of the model asset.", + "readOnly": true }, - "secret_id": { + "version": { "type": "string", - "description": "The identifier of the secret store or connection.", - "example": "my-secret-store" + "description": "The version of the model asset.", + "readOnly": true }, - "secret_key": { + "description": { "type": "string", - "description": "The key within the secret to retrieve the authentication value.", - "example": "OTLP_KEY" + "description": "The model asset description text.", + "readOnly": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tags associated with the model asset.", + "readOnly": true + }, + "uri": { + "type": "string", + "description": "URI of the registered model artifact.", + "readOnly": true + }, + "base_model": { + "type": "string", + "description": "Base model used to create this model, when the model was produced by managed training.", + "readOnly": true + }, + "training_job": { + "type": "string", + "description": "Backing training job that produced this model, when available.", + "readOnly": true } }, - "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" - ] - } + "description": "Model asset produced by managed model training." }, - "HostedAgentDefinition": { + "ModelDeployment": { "type": "object", "required": [ - "kind", - "container_protocol_versions", - "cpu", - "memory" + "type", + "modelName", + "modelVersion", + "modelPublisher", + "capabilities", + "sku" ], "properties": { - "kind": { + "type": { "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." + "ModelDeployment" + ], + "description": "The type of the deployment" }, - "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": "a2a", - "version": "v0.3.0" - } - ] + "modelName": { + "type": "string", + "description": "Publisher-specific name of the deployed model", + "readOnly": true }, - "cpu": { + "modelVersion": { "type": "string", - "description": "The CPU configuration for the hosted agent.", - "example": "0.25" + "description": "Publisher-specific version of the deployed model", + "readOnly": true }, - "memory": { + "modelPublisher": { "type": "string", - "description": "The memory configuration for the hosted agent.", - "example": "0.5Gi" + "description": "Name of the deployed model's publisher", + "readOnly": true }, - "environment_variables": { + "capabilities": { "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" + "description": "Capabilities of deployed model", + "readOnly": true }, - "telemetry_config": { + "sku": { "allOf": [ { - "$ref": "#/components/schemas/TelemetryConfig" + "$ref": "#/components/schemas/Sku" } ], - "description": "Optional customer-supplied telemetry configuration for exporting container logs, traces, and metrics." + "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/AgentDefinition" + "$ref": "#/components/schemas/Deployment" } ], - "description": "The hosted agent definition.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } + "description": "Model Deployment Definition" }, - "HourlyRecurrenceSchedule": { + "ModelSamplingParams": { "type": "object", "required": [ - "type" + "temperature", + "top_p", + "seed", + "max_completion_tokens" ], "properties": { - "type": { - "type": "string", - "enum": [ - "Hourly" - ] + "temperature": { + "type": "number", + "format": "float", + "description": "The temperature parameter for sampling." + }, + "top_p": { + "type": "number", + "format": "float", + "description": "The top-p parameter for nucleus sampling." + }, + "seed": { + "type": "integer", + "format": "int32", + "description": "The random seed for reproducibility." + }, + "max_completion_tokens": { + "type": "integer", + "format": "int32", + "description": "The maximum number of tokens allowed in the completion." } }, - "allOf": [ - { - "$ref": "#/components/schemas/RecurrenceSchedule" - } - ], - "description": "Hourly recurrence schedule." + "description": "Represents a set of parameters used to control the sampling behavior of a language model during text generation." }, - "HumanEvaluationPreviewRuleAction": { + "ModelSamplingParamsUpdate": { "type": "object", - "required": [ - "type", - "templateId" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "humanEvaluationPreview" - ] + "temperature": { + "type": "number", + "format": "float", + "description": "The temperature parameter for sampling." }, - "templateId": { - "allOf": [ - { - "$ref": "#/components/schemas/AssetId" - } - ], - "description": "Human evaluation template Id." + "top_p": { + "type": "number", + "format": "float", + "description": "The top-p parameter for nucleus sampling." + }, + "seed": { + "type": "integer", + "format": "int32", + "description": "The random seed for reproducibility." + }, + "max_completion_tokens": { + "type": "integer", + "format": "int32", + "description": "The maximum number of tokens allowed in the completion." } }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleAction" - } - ], - "description": "Evaluation rule action for human evaluation." + "description": "Represents a set of parameters used to control the sampling behavior of a language model during text generation." }, - "HumanEvaluationRuleAction": { + "ModelTrainingComputeConfiguration": { "type": "object", "required": [ - "type", - "templateId" + "id" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "humanEvaluation" - ] + "description": "Compute resource ID used to run the managed training job." }, - "templateId": { + "resources": { "allOf": [ { - "$ref": "#/components/schemas/AssetId" + "$ref": "#/components/schemas/JobResourceConfiguration" } ], - "description": "Human evaluation template Id." + "description": "Compute resource configuration for the managed training job." + }, + "gpu_count": { + "type": "integer", + "format": "int32", + "description": "Number of GPUs requested by the managed training job." + }, + "distribution": { + "allOf": [ + { + "$ref": "#/components/schemas/DistributionConfiguration" + } + ], + "description": "Distribution configuration for the managed training job." + }, + "queue_settings": { + "allOf": [ + { + "$ref": "#/components/schemas/QueueSettings" + } + ], + "description": "Queue settings for the managed training job." + }, + "user_assigned_identity_id": { + "type": "string", + "description": "ARM resource ID of a user-assigned managed identity attached to the Foundry project." } }, - "allOf": [ - { - "$ref": "#/components/schemas/EvaluationRuleAction" - } - ], - "description": "Evaluation rule action for human evaluation." + "description": "Compute placement for a managed model training job." }, - "Index": { + "ModelTrainingJobCreate": { "type": "object", "required": [ "type", - "name", - "version" + "model", + "compute" ], "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 + "description": "Managed training job type." }, "name": { "type": "string", - "description": "The name of the resource", - "readOnly": true + "description": "Optional name of the model to create. If omitted, the service generates one." }, "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" + "description": "Optional version of the model to create. If omitted, the service generates one." }, - { + "description": { + "type": "string", + "description": "Optional description for the model to create." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Optional tags for the model to create." + }, + "model": { "type": "string", - "enum": [ - "AzureSearch", - "CosmosDBNoSqlVectorStore", - "ManagedAzureSearch" - ] + "description": "Base model asset reference." + }, + "compute": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingComputeConfiguration" + } + ], + "description": "Compute placement for the managed training job." } - ] + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "sft": "#/components/schemas/SftTrainingJob", + "preference": "#/components/schemas/PreferenceTrainingJob", + "kto": "#/components/schemas/KtoTrainingJob", + "reward_model": "#/components/schemas/RewardModelTrainingJob", + "grpo": "#/components/schemas/GrpoTrainingJob", + "policy_gradient": "#/components/schemas/PolicyGradientTrainingJob", + "ppo": "#/components/schemas/PpoTrainingJob" + } + }, + "description": "Base request body for creating a managed training job from a base model." }, - "IndexUpdate": { + "ModelTrainingOperation": { "type": "object", "required": [ - "type" + "operation_id", + "status" ], "properties": { - "type": { + "operation_id": { + "type": "string", + "description": "Operation identifier for the managed model training request." + }, + "status": { "allOf": [ { - "$ref": "#/components/schemas/IndexType" + "$ref": "#/components/schemas/ModelTrainingOperationStatus" } ], - "description": "Type of index" + "description": "Managed model training operation status." }, - "description": { - "type": "string", - "description": "The asset description text." + "result": { + "allOf": [ + { + "$ref": "#/components/schemas/Model" + } + ], + "description": "The model produced by managed training when the operation succeeds." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Tag dictionary. Tags can be added, removed, and updated." + "error": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Error" + } + ], + "description": "Error object that describes the failure when status is 'failed'." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "AzureSearch": "#/components/schemas/AzureAISearchIndexUpdate", - "ManagedAzureSearch": "#/components/schemas/ManagedAzureAISearchIndexUpdate", - "CosmosDBNoSqlVectorStore": "#/components/schemas/CosmosDBIndexUpdate" + "description": "Status resource for a managed model training operation." + }, + "ModelTrainingOperationStatus": { + "type": "string", + "enum": [ + "queued", + "in_progress", + "succeeded", + "failed", + "canceled" + ], + "description": "Status of a managed model training operation." + }, + "ModelTrainingPackagingConfiguration": { + "type": "object", + "properties": { + "mode": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingMode" + } + ], + "description": "How the trained model artifact should be packaged.", + "default": "merged_model" } }, - "description": "Index resource Definition" + "description": "Model artifact packaging options." }, - "InputData": { + "ModelTrainingPackagingMode": { + "type": "string", + "enum": [ + "merged_model", + "adapter", + "model_and_adapter" + ], + "description": "Output packaging for a managed model training job." + }, + "ModelTrainingReferenceConfiguration": { "type": "object", "required": [ - "type" + "kind" ], "properties": { - "type": { + "kind": { "type": "string", - "description": "Type of the data" + "description": "Reference policy kind." } }, "discriminator": { - "propertyName": "type", + "propertyName": "kind", "mapping": { - "dataset": "#/components/schemas/InputDataset" + "base_model": "#/components/schemas/BaseModelReferenceConfiguration", + "model": "#/components/schemas/ExplicitModelReferenceConfiguration", + "none": "#/components/schemas/NoReferenceConfiguration" } }, - "description": "Abstract data class." + "description": "Reference policy used for preference optimization or online reinforcement training." }, - "InputDataset": { + "MonthlyRecurrenceSchedule": { "type": "object", "required": [ "type", - "id" + "daysOfMonth" ], "properties": { "type": { "type": "string", "enum": [ - "dataset" - ] + "Monthly" + ], + "description": "Monthly recurrence type." }, - "id": { - "type": "string", - "description": "Evaluation input data" + "daysOfMonth": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Days of the month for the recurrence schedule." } }, "allOf": [ { - "$ref": "#/components/schemas/InputData" + "$ref": "#/components/schemas/RecurrenceSchedule" } ], - "description": "Dataset as source for evaluation." + "description": "Monthly recurrence schedule." }, - "Insight": { + "MpiDistribution": { "type": "object", "required": [ - "id", - "metadata", - "state", - "displayName", - "request" + "distribution_type" ], "properties": { - "id": { + "distribution_type": { "type": "string", - "description": "The unique identifier for the insights report.", - "readOnly": true - }, - "metadata": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightsMetadata" - } + "enum": [ + "mpi" ], - "description": "Metadata about the insights report.", - "readOnly": true + "description": "Specifies the type of distribution framework." }, - "state": { - "allOf": [ - { - "$ref": "#/components/schemas/Azure.Core.Foundations.OperationState" - } + "process_count_per_node": { + "type": "integer", + "format": "int32", + "description": "Number of processes per MPI node." + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/DistributionConfiguration" + } + ], + "description": "MPI distribution configuration." + }, + "NoAuthenticationCredentials": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "None" ], - "description": "The current state of the insights.", + "description": "The credential type ", "readOnly": true - }, - "displayName": { + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/BaseCredentials" + } + ], + "description": "Credentials that do not require authentication" + }, + "NoReferenceConfiguration": { + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { "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" - } + "enum": [ + "none" ], - "description": "The result of the insights report.", - "readOnly": true + "description": "Reference policy kind, always 'none'." } }, - "description": "The response body for cluster insights." + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Disable reference policy or KL anchoring." }, - "InsightCluster": { + "OAuthConsentRequestOutputItem": { "type": "object", "required": [ "id", - "label", - "suggestion", - "suggestionTitle", - "description", - "weight" + "type", + "consent_link", + "server_label" ], "properties": { "id": { - "type": "string", - "description": "The id of the analysis cluster." - }, - "label": { - "type": "string", - "description": "Label for the cluster" + "type": "string" }, - "suggestion": { + "type": { "type": "string", - "description": "Suggestion for the cluster" + "enum": [ + "oauth_consent_request" + ] }, - "suggestionTitle": { + "consent_link": { "type": "string", - "description": "The title of the suggestion for the cluster" + "description": "The link the user can use to perform OAuth consent." }, - "description": { + "server_label": { "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": "The server label for the OAuth consent request." } }, - "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}/'." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" } - }, - "description": "Configuration of the model used in the insight generation." + ], + "description": "Request from the service for the user to perform OAuth consent." }, - "InsightRequest": { + "OneTimeTrigger": { "type": "object", "required": [ - "type" + "type", + "triggerAt" ], "properties": { "type": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightType" - } - ], - "description": "The type of request." + "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" } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightRequest", - "AgentClusterInsight": "#/components/schemas/AgentClusterInsightRequest", - "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightRequest" + "allOf": [ + { + "$ref": "#/components/schemas/Trigger" } - }, - "description": "The request of the insights report." + ], + "description": "One-time trigger." }, - "InsightResult": { + "OpenAI.Annotation": { "type": "object", "required": [ "type" ], "properties": { "type": { - "allOf": [ - { - "$ref": "#/components/schemas/InsightType" - } - ], - "description": "The type of insights result." + "$ref": "#/components/schemas/OpenAI.AnnotationType" } }, "discriminator": { "propertyName": "type", "mapping": { - "EvaluationComparison": "#/components/schemas/EvaluationComparisonInsightResult", - "EvaluationRunClusterInsight": "#/components/schemas/EvaluationRunClusterInsightResult", - "AgentClusterInsight": "#/components/schemas/AgentClusterInsightResult" + "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": "The result of the insights." + "description": "An annotation that applies to a span of output text." }, - "InsightSample": { + "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": [ - "id", "type", - "features", - "correlationInfo" + "path", + "diff" ], "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the analysis sample." - }, "type": { - "allOf": [ - { - "$ref": "#/components/schemas/SampleType" - } + "type": "string", + "enum": [ + "create_file" ], - "description": "Sample type" + "description": "Create a new file with the provided diff.", + "x-stainless-const": true, + "default": "create_file" }, - "features": { - "type": "object", - "additionalProperties": {}, - "description": "Features to help with additional filtering of data in UX." + "path": { + "type": "string", + "description": "Path of the file to create." }, - "correlationInfo": { - "type": "object", - "additionalProperties": {}, - "description": "Info about the correlation for the analysis sample." + "diff": { + "type": "string", + "description": "Diff to apply." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "EvaluationResultSample": "#/components/schemas/EvaluationResultSample" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" } - }, - "description": "A sample from the analysis." + ], + "description": "Instruction describing how to create a file via the apply_patch tool.", + "title": "Apply patch create file operation" }, - "InsightScheduleTask": { + "OpenAI.ApplyPatchCreateFileOperationParam": { "type": "object", "required": [ "type", - "insight" + "path", + "diff" ], "properties": { "type": { "type": "string", "enum": [ - "Insight" - ] - }, - "insight": { - "allOf": [ - { - "$ref": "#/components/schemas/Insight" - } + "create_file" ], - "description": "The insight payload." + "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/ScheduleTask" + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" } ], - "description": "Insight task for the schedule." + "description": "Instruction for creating a new file via the apply_patch tool.", + "title": "Apply patch create file operation" }, - "InsightSummary": { + "OpenAI.ApplyPatchDeleteFileOperation": { "type": "object", "required": [ - "sampleCount", - "uniqueSubclusterCount", - "uniqueClusterCount", - "method", - "usage" + "type", + "path" ], "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": { "type": "string", - "description": "Method used for clustering." - }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/ClusterTokenUsage" - } + "enum": [ + "delete_file" ], - "description": "Token usage while performing clustering analysis" + "description": "Delete the specified file.", + "x-stainless-const": true, + "default": "delete_file" + }, + "path": { + "type": "string", + "description": "Path of the file to delete." } }, - "description": "Summary of the error cluster analysis." - }, - "InsightType": { - "anyOf": [ - { - "type": "string" - }, + "allOf": [ { - "type": "string", - "enum": [ - "EvaluationRunClusterInsight", - "AgentClusterInsight", - "EvaluationComparison" - ] + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" } ], - "description": "The request of the insights." + "description": "Instruction describing how to delete a file via the apply_patch tool.", + "title": "Apply patch delete file operation" }, - "InsightsMetadata": { + "OpenAI.ApplyPatchDeleteFileOperationParam": { "type": "object", "required": [ - "createdAt" + "type", + "path" ], "properties": { - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp when the insights were created." + "type": { + "type": "string", + "enum": [ + "delete_file" + ], + "description": "The operation type. Always `delete_file`.", + "x-stainless-const": true, + "default": "delete_file" }, - "completedAt": { + "path": { "type": "string", - "format": "date-time", - "description": "The timestamp when the insights were completed." + "minLength": 1, + "description": "Path of the file to delete relative to the workspace root." } }, - "description": "Metadata about the insights." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + } + ], + "description": "Instruction for deleting an existing file via the apply_patch tool.", + "title": "Apply patch delete file operation" }, - "IsolationKeySource": { + "OpenAI.ApplyPatchFileOperation": { "type": "object", "required": [ - "kind" + "type" ], "properties": { - "kind": { - "$ref": "#/components/schemas/IsolationKeySourceKind" + "type": { + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperationType" } }, "discriminator": { - "propertyName": "kind", + "propertyName": "type", "mapping": { - "Entra": "#/components/schemas/EntraIsolationKeySource", - "Header": "#/components/schemas/HeaderIsolationKeySource" + "create_file": "#/components/schemas/OpenAI.ApplyPatchCreateFileOperation", + "delete_file": "#/components/schemas/OpenAI.ApplyPatchDeleteFileOperation", + "update_file": "#/components/schemas/OpenAI.ApplyPatchUpdateFileOperation" } }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "One of the create_file, delete_file, or update_file operations applied via apply_patch.", + "title": "Apply patch operation" }, - "IsolationKeySourceKind": { + "OpenAI.ApplyPatchFileOperationType": { "anyOf": [ { "type": "string" @@ -19341,44 +28442,35 @@ { "type": "string", "enum": [ - "Entra", - "Header" + "create_file", + "delete_file", + "update_file" ] } - ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + ] }, - "ItemGenerationParams": { + "OpenAI.ApplyPatchOperationParam": { "type": "object", "required": [ "type" ], "properties": { "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParamsType" - } - ], - "description": "The type of item generation parameters to use." + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParamType" } }, "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" + "create_file": "#/components/schemas/OpenAI.ApplyPatchCreateFileOperationParam", + "delete_file": "#/components/schemas/OpenAI.ApplyPatchDeleteFileOperationParam", + "update_file": "#/components/schemas/OpenAI.ApplyPatchUpdateFileOperationParam" } }, - "description": "Represents the set of parameters used to control item generation operations." + "description": "One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool.", + "title": "Apply patch operation" }, - "ItemGenerationParamsType": { + "OpenAI.ApplyPatchOperationParamType": { "anyOf": [ { "type": "string" @@ -19386,79 +28478,108 @@ { "type": "string", "enum": [ - "red_team", - "response_retrieval", - "red_team_seed_prompts", - "red_team_taxonomy", - "synthetic_data_gen_preview" + "create_file", + "delete_file", + "update_file" ] } - ], - "description": "The types of parameters for red team item generation." + ] }, - "ManagedAgentIdentityBlueprint": { + "OpenAI.ApplyPatchToolParam": { "type": "object", "required": [ - "name" + "type" ], "properties": { - "name": { + "type": { "type": "string", - "readOnly": true + "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" }, - "ManagedAgentIdentityBlueprintReference": { + "OpenAI.ApplyPatchUpdateFileOperation": { "type": "object", "required": [ "type", - "blueprint_id" + "path", + "diff" ], "properties": { "type": { "type": "string", "enum": [ - "ManagedAgentIdentityBlueprint" - ] + "update_file" + ], + "description": "Update an existing file with the provided diff.", + "x-stainless-const": true, + "default": "update_file" }, - "blueprint_id": { + "path": { "type": "string", - "description": "The ID of the managed blueprint" + "description": "Path of the file to update." + }, + "diff": { + "type": "string", + "description": "Diff to apply." } }, "allOf": [ { - "$ref": "#/components/schemas/AgentBlueprintReference" + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" } ], - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "description": "Instruction describing how to update a file via the apply_patch tool.", + "title": "Apply patch update file operation" }, - "ManagedAzureAISearchIndex": { + "OpenAI.ApplyPatchUpdateFileOperationParam": { "type": "object", "required": [ - "type" + "type", + "path", + "diff" ], "properties": { "type": { "type": "string", "enum": [ - "ManagedAzureSearch" + "update_file" ], - "description": "Type of index" + "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/Index" + "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" } ], - "description": "Managed Azure AI Search Index Definition" + "description": "Instruction for updating an existing file via the apply_patch tool.", + "title": "Apply patch update file operation" }, - "ManagedAzureAISearchIndexUpdate": { + "OpenAI.ApproximateLocation": { "type": "object", "required": [ "type" @@ -19467,245 +28588,290 @@ "type": { "type": "string", "enum": [ - "ManagedAzureSearch" + "approximate" ], - "description": "Type of index" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/IndexUpdate" + "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": "Managed Azure AI Search Index Definition" + } }, - "MemoryItem": { + "OpenAI.AutoCodeInterpreterToolParam": { "type": "object", "required": [ - "memory_id", - "updated_at", - "scope", - "content", - "kind" + "type" ], "properties": { - "memory_id": { - "type": "string", - "description": "The unique ID of the memory item." - }, - "updated_at": { - "type": "integer", - "format": "unixtime", - "description": "The last update time of the memory item." - }, - "scope": { + "type": { "type": "string", - "description": "The namespace that logically groups and isolates memories, such as a user ID." + "enum": [ + "auto" + ], + "description": "Always `auto`.", + "x-stainless-const": true, + "default": "auto" }, - "content": { - "type": "string", - "description": "The content of the memory." + "file_ids": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 50, + "description": "An optional list of uploaded files to make available to your code." }, - "kind": { + "memory_limit": { "allOf": [ { - "$ref": "#/components/schemas/MemoryItemKind" + "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" } ], - "description": "The kind of the memory item." - } - }, - "discriminator": { - "propertyName": "kind", - "mapping": { - "user_profile": "#/components/schemas/UserProfileMemoryItem", - "chat_summary": "#/components/schemas/ChatSummaryMemoryItem" + "nullable": true + }, + "network_policy": { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" } }, - "description": "A single memory item stored in the memory store, containing content and metadata.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "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" }, - "MemoryItemKind": { - "anyOf": [ - { - "type": "string" - }, - { + "OpenAI.ChatCompletionTool": { + "type": "object", + "required": [ + "type", + "function" + ], + "properties": { + "type": { "type": "string", "enum": [ - "user_profile", - "chat_summary" - ] + "function" + ], + "description": "The type of the tool. Currently, only `function` is supported.", + "x-stainless-const": true + }, + "function": { + "$ref": "#/components/schemas/OpenAI.FunctionObject" } - ], - "description": "Memory item kind.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + }, + "description": "A function tool that can be used to generate a response.", + "title": "Function tool" }, - "MemoryOperation": { + "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": [ - "kind", - "memory_item" + "type", + "button", + "x", + "y" ], "properties": { - "kind": { + "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/MemoryOperationKind" + "$ref": "#/components/schemas/OpenAI.ClickButtonType" } ], - "description": "The type of memory operation being performed." + "description": "Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`." }, - "memory_item": { + "x": { "allOf": [ { - "$ref": "#/components/schemas/MemoryItem" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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" + "description": "The x-coordinate where the click occurred." }, - { - "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": { + "y": { "allOf": [ { - "$ref": "#/components/schemas/MemoryItem" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "Retrieved memory item." + "description": "The y-coordinate where the click occurred." } }, - "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." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" } - }, - "description": "Memory search options.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + ], + "description": "A click action.", + "title": "Click" }, - "MemorySearchPreviewTool": { + "OpenAI.CodeInterpreterOutputImage": { "type": "object", "required": [ "type", - "memory_store_name", - "scope" + "url" ], "properties": { "type": { "type": "string", "enum": [ - "memory_search_preview" + "image" ], - "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." + "description": "The type of the output. Always `image`.", + "x-stainless-const": true, + "default": "image" }, - "memory_store_name": { + "url": { "type": "string", - "description": "The name of the memory store to use." - }, - "scope": { + "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", - "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" - } + "enum": [ + "logs" ], - "description": "Options for searching the memory store." + "description": "The type of the output. Always `logs`.", + "x-stainless-const": true, + "default": "logs" }, - "update_delay": { - "type": "integer", - "format": "int32", - "description": "Time to wait before updating memories after inactivity (seconds). Default 300.", - "default": 300 + "logs": { + "type": "string", + "description": "The logs output from the code interpreter." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "A tool for integrating memories into the agent." + "description": "The logs output from the code interpreter.", + "title": "Code interpreter output logs" }, - "MemorySearchTool": { + "OpenAI.CodeInterpreterTool": { "type": "object", "required": [ - "type", - "memory_store_name", - "scope" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "memory_search" + "code_interpreter" ], - "description": "The type of the tool. Always `memory_search_preview`." + "description": "The type of the code interpreter tool. Always `code_interpreter`.", + "x-stainless-const": true }, "name": { "type": "string", @@ -19715,27 +28881,16 @@ "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": [ + "container": { + "anyOf": [ { - "$ref": "#/components/schemas/MemorySearchOptions" + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.AutoCodeInterpreterToolParam" } ], - "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 + "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": [ @@ -19743,1681 +28898,2126 @@ "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "A tool for integrating memories into the agent." + "description": "A tool that runs Python code to help generate a response to a prompt.", + "title": "Code interpreter" }, - "MemorySearchToolCallItemParam": { + "OpenAI.CompactResource": { "type": "object", "required": [ - "type" + "id", + "object", + "output", + "created_at", + "usage" ], "properties": { - "type": { + "id": { + "type": "string", + "description": "The unique identifier for the compacted response." + }, + "object": { "type": "string", "enum": [ - "memory_search_call" - ] + "response.compaction" + ], + "description": "The object type. Always `response.compaction`.", + "x-stainless-const": true, + "default": "response.compaction" }, - "results": { + "output": { "type": "array", "items": { - "$ref": "#/components/schemas/MemorySearchItem" + "$ref": "#/components/schemas/OpenAI.ItemField" }, - "nullable": true, - "description": "The results returned from the memory search." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ] + "title": "The compacted response object" }, - "MemorySearchToolCallItemResource": { + "OpenAI.CompactResponseMethodPublicBody": { "type": "object", "required": [ - "type", - "status" + "model" ], "properties": { - "type": { - "type": "string", - "enum": [ - "memory_search_call" - ] + "model": { + "$ref": "#/components/schemas/OpenAI.ModelIdsCompaction" }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" + "input": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + } ], - "description": "The status of the memory search tool call. One of `in_progress`,\n`searching`, `completed`, `incomplete` or `failed`," + "nullable": true }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MemorySearchItem" - }, - "nullable": true, - "description": "The results returned from the memory search." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "previous_response_id": { + "type": "string", + "nullable": true + }, + "instructions": { + "type": "string", + "nullable": true } - ] + } }, - "MemoryStoreDefaultDefinition": { + "OpenAI.ComparisonFilter": { "type": "object", "required": [ - "kind", - "chat_model", - "embedding_model" + "type", + "key", + "value" ], "properties": { - "kind": { + "type": { "type": "string", "enum": [ - "default" + "eq", + "ne", + "gt", + "gte", + "lt", + "lte" ], - "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." + "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" }, - "embedding_model": { + "key": { "type": "string", - "description": "The name or identifier of the embedding model deployment used for memory processing." + "description": "The key to compare against the value." }, - "options": { - "allOf": [ + "value": { + "oneOf": [ { - "$ref": "#/components/schemas/MemoryStoreDefaultOptions" + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ] + } } ], - "description": "Default memory store options." + "description": "The value to compare against the attribute key; supports string, number, or boolean types." } }, - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreDefinition" - } - ], - "description": "Default memory store implementation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] + "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" } }, - "MemoryStoreDefaultOptions": { + "OpenAI.CompoundFilter": { "type": "object", "required": [ - "user_profile_enabled", - "chat_summary_enabled" + "type", + "filters" ], "properties": { - "user_profile_enabled": { - "type": "boolean", - "description": "Whether to enable user profile extraction and storage. Default is true.", - "default": true - }, - "user_profile_details": { + "type": { "type": "string", - "description": "Specific categories or types of user profile information to extract and store." + "enum": [ + "and", + "or" + ], + "description": "Type of operation: `and` or `or`." }, - "chat_summary_enabled": { - "type": "boolean", - "description": "Whether to enable chat summary extraction and storage. Default is true.", - "default": true + "filters": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComparisonFilter" + }, + {} + ] + }, + "description": "Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`." } }, - "description": "Default memory store configurations.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] + "description": "Combine multiple filters using `and` or `or`.", + "title": "Compound Filter", + "x-oaiMeta": { + "name": "CompoundFilter" } }, - "MemoryStoreDefinition": { + "OpenAI.ComputerAction": { "type": "object", "required": [ - "kind" + "type" ], "properties": { - "kind": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreKind" - } - ], - "description": "The kind of the memory store." + "type": { + "$ref": "#/components/schemas/OpenAI.ComputerActionType" } }, "discriminator": { - "propertyName": "kind", + "propertyName": "type", "mapping": { - "default": "#/components/schemas/MemoryStoreDefaultDefinition" + "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" } - }, - "description": "Base definition for memory store configurations.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] } }, - "MemoryStoreDeleteScopeResponse": { + "OpenAI.ComputerActionType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "click", + "double_click", + "drag", + "keypress", + "move", + "screenshot", + "scroll", + "type", + "wait" + ] + } + ] + }, + "OpenAI.ComputerCallSafetyCheckParam": { "type": "object", "required": [ - "object", - "name", - "scope", - "deleted" + "id" ], "properties": { - "object": { + "id": { "type": "string", - "enum": [ - "memory_store.scope.deleted" - ], - "description": "The object type. Always 'memory_store.scope.deleted'." + "description": "The ID of the pending safety check." }, - "name": { + "code": { "type": "string", - "description": "The name of the memory store." + "nullable": true }, - "scope": { + "message": { "type": "string", - "description": "The scope from which memories were deleted." - }, - "deleted": { - "type": "boolean", - "description": "Whether the deletion operation was successful." + "nullable": true } }, - "description": "Response for deleting memories from a scope.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "description": "A pending safety check for the computer call." }, - "MemoryStoreKind": { - "anyOf": [ - { - "type": "string" - }, - { + "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": [ - "default" - ] + "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": "The type of memory store implementation to use.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "description": "A screenshot of a computer.", + "title": "Computer screenshot" }, - "MemoryStoreObject": { + "OpenAI.ComputerScreenshotImage": { "type": "object", "required": [ - "object", - "id", - "created_at", - "updated_at", - "name", - "definition" + "type" ], "properties": { - "object": { + "type": { "type": "string", "enum": [ - "memory_store" + "computer_screenshot" ], - "description": "The object type, which is always 'memory_store'." + "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" }, - "id": { + "image_url": { "type": "string", - "description": "The unique identifier of the memory store." + "format": "uri", + "description": "The URL of the screenshot image." }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (seconds) when the memory store was created." + "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" }, - "updated_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (seconds) when the memory store was last updated." + "environment": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerEnvironment" + } + ], + "description": "The type of computer environment to control." }, - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the memory store." + "display_width": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The width of the computer display." }, - "description": { + "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", - "maxLength": 512, - "description": "A human-readable description of the memory store." + "enum": [ + "container_auto" + ], + "description": "Automatically creates a container for this request", + "x-stainless-const": true, + "default": "container_auto" }, - "metadata": { - "type": "object", - "additionalProperties": { + "file_ids": { + "type": "array", + "items": { "type": "string" }, - "description": "Arbitrary key-value metadata to associate with the memory store." + "maxItems": 50, + "description": "An optional list of uploaded files to make available to your code." }, - "definition": { + "memory_limit": { "allOf": [ { - "$ref": "#/components/schemas/MemoryStoreDefinition" + "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" } ], - "description": "The definition of the memory store." + "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" } }, - "description": "A memory store that can store and retrieve user memories.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" + } + ] }, - "MemoryStoreOperationUsage": { + "OpenAI.ContainerFileCitationBody": { "type": "object", "required": [ - "embedding_tokens", - "input_tokens", - "input_tokens_details", - "output_tokens", - "output_tokens_details", - "total_tokens" + "type", + "container_id", + "file_id", + "start_index", + "end_index", + "filename" ], "properties": { - "embedding_tokens": { - "type": "integer", - "format": "int32", - "description": "The number of embedding tokens." - }, - "input_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "type": { + "type": "string", + "enum": [ + "container_file_citation" ], - "description": "The number of input tokens." + "description": "The type of the container file citation. Always `container_file_citation`.", + "x-stainless-const": true, + "default": "container_file_citation" }, - "input_tokens_details": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" - } - ], - "description": "A detailed breakdown of the input tokens." + "container_id": { + "type": "string", + "description": "The ID of the container file." }, - "output_tokens": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The number of output tokens." + "file_id": { + "type": "string", + "description": "The ID of the file." }, - "output_tokens_details": { + "start_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "A detailed breakdown of the output tokens." + "description": "The index of the first character of the container file citation in the message." }, - "total_tokens": { + "end_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The total number of tokens used." + "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." } }, - "description": "Usage statistics of a memory store operation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Annotation" + } + ], + "description": "A citation for a container file used to generate a model response.", + "title": "Container file citation" }, - "MemoryStoreSearchResponse": { + "OpenAI.ContainerMemoryLimit": { + "type": "string", + "enum": [ + "1g", + "4g", + "16g", + "64g" + ] + }, + "OpenAI.ContainerNetworkPolicyAllowlistParam": { "type": "object", "required": [ - "search_id", - "memories", - "usage" + "type", + "allowed_domains" ], "properties": { - "search_id": { + "type": { "type": "string", - "description": "The unique ID of this search request. Use this value as previous_search_id in subsequent requests to perform incremental searches." + "enum": [ + "allowlist" + ], + "description": "Allow outbound network access only to specified domains. Always `allowlist`.", + "x-stainless-const": true, + "default": "allowlist" }, - "memories": { + "allowed_domains": { "type": "array", "items": { - "$ref": "#/components/schemas/MemorySearchItem" + "type": "string" }, - "description": "Related memory items found during the search operation." + "minItems": 1, + "description": "A list of allowed domains when type is `allowlist`." }, - "usage": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreOperationUsage" - } - ], - "description": "Usage statistics associated with the memory search operation." + "domain_secrets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyDomainSecretParam" + }, + "minItems": 1, + "description": "Optional domain-scoped secrets for allowlisted domains." } }, - "description": "Memory search response.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" + } + ] }, - "MemoryStoreUpdateCompletedResult": { + "OpenAI.ContainerNetworkPolicyDisabledParam": { "type": "object", "required": [ - "memory_operations", - "usage" + "type" ], "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" - } + "type": { + "type": "string", + "enum": [ + "disabled" ], - "description": "Usage statistics associated with the memory update operation." + "description": "Disable outbound network access. Always `disabled`.", + "x-stainless-const": true, + "default": "disabled" } }, - "description": "Memory update result.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" + } + ] }, - "MemoryStoreUpdateResponse": { + "OpenAI.ContainerNetworkPolicyDomainSecretParam": { "type": "object", "required": [ - "update_id", - "status" + "domain", + "name", + "value" ], "properties": { - "update_id": { + "domain": { "type": "string", - "description": "The unique ID of this update request. Use this value as previous_update_id in subsequent requests to perform incremental updates." + "minLength": 1, + "description": "The domain associated with the secret." }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreUpdateStatus" - } - ], - "description": "The status of the memory update operation. One of \"queued\", \"in_progress\", \"completed\", \"failed\", or \"superseded\"." + "name": { + "type": "string", + "minLength": 1, + "description": "The name of the secret to inject for the domain." }, - "superseded_by": { + "value": { "type": "string", - "description": "The update_id the operation was superseded by when status is \"superseded\"." + "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" }, - "result": { - "allOf": [ - { - "$ref": "#/components/schemas/MemoryStoreUpdateCompletedResult" - } + { + "type": "string", + "enum": [ + "disabled", + "allowlist" + ] + } + ] + }, + "OpenAI.ContainerReferenceResource": { + "type": "object", + "required": [ + "type", + "container_id" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "container_reference" ], - "description": "The result of memory store update operation when status is \"completed\"." + "description": "The environment type. Always `container_reference`.", + "x-stainless-const": true, + "default": "container_reference" }, - "error": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Error" - } - ], - "description": "Error object that describes the error when status is \"failed\"." + "container_id": { + "type": "string" } }, - "description": "Provides the status of a memory store update operation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + } + ], + "description": "Represents a container created with /v1/containers.", + "title": "Container Reference" }, - "MemoryStoreUpdateStatus": { - "type": "string", - "enum": [ - "queued", - "in_progress", - "completed", - "failed", - "superseded" + "OpenAI.ContainerSkill": { + "type": "object", + "required": [ + "type" ], - "description": "Status of a memory store update operation.", - "x-ms-foundry-meta": { - "conditional_previews": [ - "MemoryStores=V1Preview" - ] + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ContainerSkillType" + } + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "skill_reference": "#/components/schemas/OpenAI.SkillReferenceParam", + "inline": "#/components/schemas/OpenAI.InlineSkillParam" + } } }, - "Message": { + "OpenAI.ContainerSkillType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "skill_reference", + "inline" + ] + } + ] + }, + "OpenAI.ContextManagementParam": { "type": "object", "required": [ - "role" + "type" ], "properties": { - "role": { - "anyOf": [ - { - "type": "string", - "enum": [ - "system", - "assistant", - "developer", - "user" - ] - }, + "type": { + "type": "string", + "description": "The context management entry type. Currently only 'compaction' is supported." + }, + "compact_threshold": { + "type": "integer", + "allOf": [ { - "type": "string" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The role of the message author. Known values: 'system', 'assistant', 'developer', 'user'." + "nullable": true + } + } + }, + "OpenAI.ConversationItem": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "$ref": "#/components/schemas/OpenAI.ConversationItemType" } }, "discriminator": { - "propertyName": "role", + "propertyName": "type", "mapping": { - "system": "#/components/schemas/SystemMessage", - "developer": "#/components/schemas/DeveloperMessage", - "user": "#/components/schemas/UserMessage", - "assistant": "#/components/schemas/AssistantMessage" + "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": "Abstract base model representing a single message in a conversation." + "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" }, - "MicrosoftFabricPreviewTool": { + "OpenAI.ConversationItemApplyPatchToolCall": { "type": "object", "required": [ "type", - "fabric_dataagent_preview" + "id", + "call_id", + "status", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "fabric_dataagent_preview" + "apply_patch_call" ], - "description": "The object type, which is always 'fabric_dataagent_preview'." + "description": "The type of the item. Always `apply_patch_call`.", + "x-stainless-const": true, + "default": "apply_patch_call" }, - "name": { + "id": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." }, - "description": { + "call_id": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "description": "The unique ID of the apply patch tool call generated by the model." }, - "fabric_dataagent_preview": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/FabricDataAgentToolParameters" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" } ], - "description": "The fabric data agent tool parameters." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "The input definition information for a Microsoft Fabric tool as used to configure an agent." + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", + "title": "Apply patch tool call" }, - "ModelDeployment": { + "OpenAI.ConversationItemApplyPatchToolCallOutput": { "type": "object", "required": [ "type", - "modelName", - "modelVersion", - "modelPublisher", - "capabilities", - "sku" + "id", + "call_id", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "ModelDeployment" + "apply_patch_call_output" ], - "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 + "description": "The type of the item. Always `apply_patch_call_output`.", + "x-stainless-const": true, + "default": "apply_patch_call_output" }, - "modelPublisher": { + "id": { "type": "string", - "description": "Name of the deployed model's publisher", - "readOnly": true + "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." }, - "capabilities": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Capabilities of deployed model", - "readOnly": true + "call_id": { + "type": "string", + "description": "The unique ID of the apply patch tool call generated by the model." }, - "sku": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/Sku" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" } ], - "description": "Sku of the model deployment", - "readOnly": true + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." }, - "connectionName": { + "output": { "type": "string", - "description": "Name of the connection the deployment comes from", - "readOnly": true + "nullable": true + }, + "created_by": { + "type": "string", + "description": "The ID of the entity that created this tool call output." } }, "allOf": [ { - "$ref": "#/components/schemas/Deployment" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Model Deployment Definition" + "description": "The output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" }, - "ModelSamplingParams": { + "OpenAI.ConversationItemCodeInterpreterToolCall": { "type": "object", "required": [ - "temperature", - "top_p", - "seed", - "max_completion_tokens" + "type", + "id", + "status", + "container_id", + "code", + "outputs" ], "properties": { - "temperature": { - "type": "number", - "format": "float", - "description": "The temperature parameter for sampling." - }, - "top_p": { - "type": "number", - "format": "float", - "description": "The top-p parameter for nucleus sampling." + "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" }, - "seed": { - "type": "integer", - "format": "int32", - "description": "The random seed for reproducibility." + "id": { + "type": "string", + "description": "The unique ID of the code interpreter tool call." }, - "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." - }, - "ModelSamplingParamsUpdate": { - "type": "object", - "properties": { - "temperature": { - "type": "number", - "format": "float", - "description": "The temperature parameter for sampling." + "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`." }, - "top_p": { - "type": "number", - "format": "float", - "description": "The top-p parameter for nucleus sampling." + "container_id": { + "type": "string", + "description": "The ID of the container used to run the code." }, - "seed": { - "type": "integer", - "format": "int32", - "description": "The random seed for reproducibility." + "code": { + "type": "string", + "nullable": true }, - "max_completion_tokens": { - "type": "integer", - "format": "int32", - "description": "The maximum number of tokens allowed in the completion." + "outputs": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" + }, + { + "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" + } + ] + }, + "nullable": true } }, - "description": "Represents a set of parameters used to control the sampling behavior of a language model during text generation." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A tool call to run code.", + "title": "Code interpreter tool call" }, - "MonthlyRecurrenceSchedule": { + "OpenAI.ConversationItemComputerToolCall": { "type": "object", "required": [ "type", - "daysOfMonth" + "id", + "call_id", + "action", + "pending_safety_checks", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "Monthly" + "computer_call" ], - "description": "Monthly recurrence type." + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" }, - "daysOfMonth": { + "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": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" }, - "description": "Days of the month for the recurrence schedule." + "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/RecurrenceSchedule" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Monthly recurrence schedule." + "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" }, - "NoAuthenticationCredentials": { + "OpenAI.ConversationItemComputerToolCallOutputResource": { "type": "object", "required": [ - "type" + "type", + "call_id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "None" + "computer_call_output" ], - "description": "The credential type ", - "readOnly": true + "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/BaseCredentials" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } - ], - "description": "Credentials that do not require authentication" + ] }, - "OAuthConsentRequestOutputItem": { + "OpenAI.ConversationItemCustomToolCall": { "type": "object", "required": [ - "id", "type", - "consent_link", - "server_label" + "call_id", + "name", + "input" ], "properties": { - "id": { - "type": "string" - }, "type": { "type": "string", "enum": [ - "oauth_consent_request" - ] + "custom_tool_call" + ], + "description": "The type of the custom tool call. Always `custom_tool_call`.", + "x-stainless-const": true }, - "consent_link": { + "id": { "type": "string", - "description": "The link the user can use to perform OAuth consent." + "description": "The unique ID of the custom tool call in the OpenAI platform." }, - "server_label": { + "call_id": { "type": "string", - "description": "The server label for the OAuth consent request." + "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" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Request from the service for the user to perform OAuth consent." + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" }, - "OneTimeTrigger": { + "OpenAI.ConversationItemCustomToolCallOutput": { "type": "object", "required": [ "type", - "triggerAt" + "call_id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "OneTime" - ] + "custom_tool_call_output" + ], + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true }, - "triggerAt": { + "id": { "type": "string", - "description": "Date and time for the one-time trigger in ISO 8601 format." + "description": "The unique ID of the custom tool call output in the OpenAI platform." }, - "timeZone": { + "call_id": { "type": "string", - "description": "Time zone for the one-time trigger.", - "default": "UTC" + "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/Trigger" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "One-time trigger." + "description": "The output of a custom tool call from your code, being sent back to the model.", + "title": "Custom tool call output" }, - "OpenAI.Annotation": { + "OpenAI.ConversationItemFileSearchToolCall": { "type": "object", "required": [ - "type" + "id", + "type", + "status", + "queries" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, "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_search_call" + ], + "description": "The type of the file search tool call. Always `file_search_call`.", + "x-stainless-const": true }, - { + "status": { "type": "string", "enum": [ - "file_citation", - "url_citation", - "container_file_citation", - "file_path" - ] + "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" } - ] - }, - "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" + "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.ApplyPatchCreateFileOperation": { + "OpenAI.ConversationItemFunctionShellCall": { "type": "object", "required": [ "type", - "path", - "diff" + "id", + "call_id", + "action", + "status", + "environment" ], "properties": { "type": { "type": "string", "enum": [ - "create_file" + "shell_call" ], - "description": "Create a new file with the provided diff.", + "description": "The type of the item. Always `shell_call`.", "x-stainless-const": true, - "default": "create_file" + "default": "shell_call" }, - "path": { + "id": { "type": "string", - "description": "Path of the file to create." + "description": "The unique ID of the shell tool call. Populated when this item is returned via API." }, - "diff": { + "call_id": { "type": "string", - "description": "Diff to apply." + "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.ApplyPatchFileOperation" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Instruction describing how to create a file via the apply_patch tool.", - "title": "Apply patch create file operation" + "description": "A tool call that executes one or more shell commands in a managed environment.", + "title": "Shell tool call" }, - "OpenAI.ApplyPatchCreateFileOperationParam": { + "OpenAI.ConversationItemFunctionShellCallOutput": { "type": "object", "required": [ "type", - "path", - "diff" + "id", + "call_id", + "status", + "output", + "max_output_length" ], "properties": { "type": { "type": "string", "enum": [ - "create_file" + "shell_call_output" ], - "description": "The operation type. Always `create_file`.", + "description": "The type of the shell call output. Always `shell_call_output`.", "x-stainless-const": true, - "default": "create_file" + "default": "shell_call_output" }, - "path": { + "id": { "type": "string", - "minLength": 1, - "description": "Path of the file to create relative to the workspace root." + "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 }, - "diff": { + "created_by": { "type": "string", - "maxLength": 10485760, - "description": "Unified diff content to apply when creating the file." + "description": "The identifier of the actor that created the item." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Instruction for creating a new file via the apply_patch tool.", - "title": "Apply patch create file operation" + "description": "The output of a shell tool call that was emitted.", + "title": "Shell call output" }, - "OpenAI.ApplyPatchDeleteFileOperation": { + "OpenAI.ConversationItemFunctionToolCallOutputResource": { "type": "object", "required": [ "type", - "path" + "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": [ - "delete_file" + "function_call_output" ], - "description": "Delete the specified file.", - "x-stainless-const": true, - "default": "delete_file" + "description": "The type of the function tool call output. Always `function_call_output`.", + "x-stainless-const": true }, - "path": { + "call_id": { "type": "string", - "description": "Path of the file to delete." + "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.ApplyPatchFileOperation" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } - ], - "description": "Instruction describing how to delete a file via the apply_patch tool.", - "title": "Apply patch delete file operation" + ] }, - "OpenAI.ApplyPatchDeleteFileOperationParam": { + "OpenAI.ConversationItemFunctionToolCallResource": { "type": "object", "required": [ "type", - "path" + "call_id", + "name", + "arguments" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, "type": { "type": "string", "enum": [ - "delete_file" + "function_call" ], - "description": "The operation type. Always `delete_file`.", - "x-stainless-const": true, - "default": "delete_file" + "description": "The type of the function tool call. Always `function_call`.", + "x-stainless-const": true }, - "path": { + "call_id": { "type": "string", - "minLength": 1, - "description": "Path of the file to delete relative to the workspace root." + "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.ApplyPatchOperationParam" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } - ], - "description": "Instruction for deleting an existing file via the apply_patch tool.", - "title": "Apply patch delete file operation" + ] }, - "OpenAI.ApplyPatchFileOperation": { + "OpenAI.ConversationItemImageGenToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "status", + "result" ], "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" + "image_generation_call" + ], + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true }, - { + "id": { "type": "string", - "enum": [ - "create_file", - "delete_file", - "update_file" - ] - } - ] - }, - "OpenAI.ApplyPatchToolParam": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { + "description": "The unique ID of the image generation call." + }, + "status": { "type": "string", "enum": [ - "apply_patch" + "in_progress", + "completed", + "generating", + "failed" ], - "description": "The type of the tool. Always `apply_patch`.", - "x-stainless-const": true, - "default": "apply_patch" + "description": "The status of the image generation call." + }, + "result": { + "type": "string", + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Allows the assistant to create, delete, or update files using unified diffs.", - "title": "Apply patch tool" + "description": "An image generation request made by the model.", + "title": "Image generation call" }, - "OpenAI.ApplyPatchUpdateFileOperation": { + "OpenAI.ConversationItemList": { "type": "object", "required": [ - "type", - "path", - "diff" + "object", + "data", + "has_more", + "first_id", + "last_id" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "update_file" + "list" ], - "description": "Update an existing file with the provided diff.", - "x-stainless-const": true, - "default": "update_file" + "description": "The type of object returned, must be `list`.", + "x-stainless-const": true }, - "path": { + "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": "Path of the file to update." + "description": "The ID of the first item in the list." }, - "diff": { + "last_id": { "type": "string", - "description": "Diff to apply." + "description": "The ID of the last item in the list.", + "x-ms-list-continuation-token": true } }, - "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" + "description": "A list of Conversation items.", + "title": "The conversation item list", + "x-oaiMeta": { + "name": "The item list", + "group": "conversations" + } }, - "OpenAI.ApplyPatchUpdateFileOperationParam": { + "OpenAI.ConversationItemLocalShellToolCall": { "type": "object", "required": [ "type", - "path", - "diff" + "id", + "call_id", + "action", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "update_file" + "local_shell_call" ], - "description": "The operation type. Always `update_file`.", - "x-stainless-const": true, - "default": "update_file" + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true }, - "path": { + "id": { "type": "string", - "minLength": 1, - "description": "Path of the file to update relative to the workspace root." + "description": "The unique ID of the local shell call." }, - "diff": { + "call_id": { "type": "string", - "maxLength": 10485760, - "description": "Unified diff content to apply to the existing file." + "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.ApplyPatchOperationParam" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "Instruction for updating an existing file via the apply_patch tool.", - "title": "Apply patch update file operation" + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" }, - "OpenAI.ApproximateLocation": { + "OpenAI.ConversationItemLocalShellToolCallOutput": { "type": "object", "required": [ - "type" + "type", + "id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "approximate" + "local_shell_call_output" ], - "description": "The type of location approximation. Always `approximate`.", - "x-stainless-const": true, - "default": "approximate" - }, - "country": { - "type": "string", - "nullable": true + "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", + "x-stainless-const": true }, - "region": { + "id": { "type": "string", - "nullable": true + "description": "The unique ID of the local shell tool call generated by the model." }, - "city": { + "output": { "type": "string", - "nullable": true + "description": "A JSON string of the output of the local shell tool call." }, - "timezone": { + "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.AutoCodeInterpreterToolParam": { + "OpenAI.ConversationItemMcpApprovalRequest": { "type": "object", "required": [ - "type" + "type", + "id", + "server_label", + "name", + "arguments" ], "properties": { "type": { "type": "string", "enum": [ - "auto" + "mcp_approval_request" ], - "description": "Always `auto`.", - "x-stainless-const": true, - "default": "auto" + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true }, - "file_ids": { - "type": "array", - "items": { - "type": "string" - }, - "maxItems": 50, - "description": "An optional list of uploaded files to make available to your code." + "id": { + "type": "string", + "description": "The unique ID of the approval request." }, - "memory_limit": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" - } - ], - "nullable": true + "server_label": { + "type": "string", + "description": "The label of the MCP server making the request." }, - "network_policy": { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" + "name": { + "type": "string", + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." } }, - "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" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" }, - "OpenAI.ChatCompletionTool": { + "OpenAI.ConversationItemMcpApprovalResponseResource": { "type": "object", "required": [ "type", - "function" + "id", + "approval_request_id", + "approve" ], "properties": { "type": { "type": "string", "enum": [ - "function" + "mcp_approval_response" ], - "description": "The type of the tool. Currently, only `function` is supported.", + "description": "The type of the item. Always `mcp_approval_response`.", "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" - ] + "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.ClickParam": { + "OpenAI.ConversationItemMcpListTools": { "type": "object", "required": [ "type", - "button", - "x", - "y" + "id", + "server_label", + "tools" ], "properties": { "type": { "type": "string", "enum": [ - "click" + "mcp_list_tools" ], - "description": "Specifies the event type. For a click action, this property is always `click`.", - "x-stainless-const": true, - "default": "click" + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true }, - "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`." + "id": { + "type": "string", + "description": "The unique ID of the list." }, - "x": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "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 x-coordinate where the click occurred." + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true }, - "y": { + "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.integer" + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" } ], - "description": "The y-coordinate where the click occurred." + "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.ComputerAction" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "A click action.", - "title": "Click" + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" }, - "OpenAI.CodeInterpreterOutputImage": { + "OpenAI.ConversationItemMessage": { "type": "object", "required": [ "type", - "url" + "id", + "status", + "role", + "content" ], "properties": { "type": { "type": "string", "enum": [ - "image" + "message" ], - "description": "The type of the output. Always `image`.", + "description": "The type of the message. Always set to `message`.", "x-stainless-const": true, - "default": "image" + "default": "message" }, - "url": { + "id": { "type": "string", - "format": "uri", - "description": "The URL of the image output from the code interpreter." + "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" } }, - "description": "The image output from the code interpreter.", - "title": "Code interpreter output image" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + ], + "description": "A message to or from the model.", + "title": "Message" }, - "OpenAI.CodeInterpreterOutputLogs": { + "OpenAI.ConversationItemReasoningItem": { "type": "object", "required": [ "type", - "logs" + "id", + "summary" ], "properties": { "type": { "type": "string", "enum": [ - "logs" + "reasoning" ], - "description": "The type of the output. Always `logs`.", - "x-stainless-const": true, - "default": "logs" + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true }, - "logs": { + "id": { "type": "string", - "description": "The logs output from the code interpreter." + "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." } }, - "description": "The logs output from the code interpreter.", - "title": "Code interpreter output logs" + "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.CodeInterpreterTool": { + "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": [ - "type" + "id", + "type", + "status", + "action" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, "type": { "type": "string", "enum": [ - "code_interpreter" + "web_search_call" ], - "description": "The type of the code interpreter tool. Always `code_interpreter`.", + "description": "The type of the web search tool call. Always `web_search_call`.", "x-stainless-const": true }, - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." - }, - "description": { + "status": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." }, - "container": { - "anyOf": [ + "action": { + "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" }, { - "$ref": "#/components/schemas/OpenAI.AutoCodeInterpreterToolParam" + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" } ], - "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." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.ConversationItem" } ], - "description": "A tool that runs Python code to help generate a response to a prompt.", - "title": "Code interpreter" + "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.CompactResource": { + "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", - "output", - "created_at", - "usage" + "metadata", + "created_at" ], "properties": { "id": { "type": "string", - "description": "The unique identifier for the compacted response." + "description": "The unique ID of the conversation." }, "object": { "type": "string", "enum": [ - "response.compaction" + "conversation" ], - "description": "The object type. Always `response.compaction`.", + "description": "The object type, which is always `conversation`.", "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." + "default": "conversation" }, - "usage": { + "metadata": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponseUsage" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "description": "Token accounting for the compaction pass, including cached, reasoning, and total tokens." + "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." } - }, - "title": "The compacted response object" + } }, - "OpenAI.CompactResponseMethodPublicBody": { + "OpenAI.CoordParam": { "type": "object", "required": [ - "model" + "x", + "y" ], "properties": { - "model": { - "$ref": "#/components/schemas/OpenAI.ModelIdsCompaction" - }, - "input": { - "anyOf": [ - { - "type": "string" - }, + "x": { + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - } + "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true - }, - "previous_response_id": { - "type": "string", - "nullable": true + "description": "The x-coordinate." }, - "instructions": { - "type": "string", - "nullable": true + "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.ComparisonFilter": { + "OpenAI.CreateChatCompletionRequestResponseFormat": { "type": "object", "required": [ - "type", - "key", - "value" + "type" ], "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." + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormatType" } }, - "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" - } + "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.CompoundFilter": { + "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject": { "type": "object", "required": [ - "type", - "filters" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "and", - "or" + "json_object" ], - "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": "The type of response format being defined. Always `json_object`.", + "x-stainless-const": true } }, - "description": "Combine multiple filters using `and` or `or`.", - "title": "Compound Filter", - "x-oaiMeta": { - "name": "CompoundFilter" - } + "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.ComputerAction": { + "OpenAI.CreateChatCompletionRequestResponseFormatResponseFormatText": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.ComputerActionType" + "type": "string", + "enum": [ + "text" + ], + "description": "The type of response format being defined. Always `text`.", + "x-stainless-const": true } }, - "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" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateChatCompletionRequestResponseFormat" } - } + ], + "description": "Default response format. Used to generate text responses.", + "title": "Text" }, - "OpenAI.ComputerActionType": { + "OpenAI.CreateChatCompletionRequestResponseFormatType": { "anyOf": [ { "type": "string" @@ -21425,318 +31025,261 @@ { "type": "string", "enum": [ - "click", - "double_click", - "drag", - "keypress", - "move", - "screenshot", - "scroll", - "type", - "wait" + "text", + "json_schema", + "json_object" ] } ] }, - "OpenAI.ComputerCallSafetyCheckParam": { + "OpenAI.CreateConversationBody": { "type": "object", - "required": [ - "id" - ], "properties": { - "id": { - "type": "string", - "description": "The ID of the pending safety check." - }, - "code": { - "type": "string", + "metadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Metadata" + } + ], "nullable": true }, - "message": { - "type": "string", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + }, "nullable": true } - }, - "description": "A pending safety check for the computer call." - }, - "OpenAI.ComputerEnvironment": { - "type": "string", - "enum": [ - "windows", - "mac", - "linux", - "ubuntu", - "browser" - ] + } }, - "OpenAI.ComputerScreenshotContent": { + "OpenAI.CreateEvalCompletionsRunDataSource": { "type": "object", "required": [ "type", - "image_url", - "file_id" + "source" ], "properties": { "type": { "type": "string", "enum": [ - "computer_screenshot" + "completions" ], - "description": "Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`.", - "x-stainless-const": true, - "default": "computer_screenshot" + "description": "The type of run data source. Always `completions`.", + "default": "completions" }, - "image_url": { - "type": "string", - "format": "uri", - "nullable": true + "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." }, - "file_id": { + "sampling_params": { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams" + }, + "model": { "type": "string", - "nullable": true + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A screenshot of a computer.", - "title": "Computer screenshot" + "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.ComputerScreenshotImage": { + "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference": { "type": "object", "required": [ - "type" + "type", + "item_reference" ], "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." + "item_reference" + ] }, - "file_id": { - "type": "string", - "description": "The identifier of an uploaded file that contains the screenshot." + "item_reference": { + "type": "string" } - }, - "description": "A computer screenshot image used with the computer use tool." + } }, - "OpenAI.ComputerUsePreviewTool": { + "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplate": { "type": "object", "required": [ "type", - "environment", - "display_width", - "display_height" + "template" ], "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" + "template" + ] }, - "environment": { + "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.ComputerEnvironment" + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "description": "The type of computer environment to control." + "default": 1 }, - "display_width": { + "max_completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "top_p": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "description": "The width of the computer display." + "default": 1 }, - "display_height": { + "seed": { "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." + "default": 42 }, - "memory_limit": { - "allOf": [ + "response_format": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.ContainerMemoryLimit" + "$ref": "#/components/schemas/OpenAI.ResponseFormatText" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchema" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonObject" } - ], - "nullable": true + ] }, - "skills": { + "tools": { "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" + "$ref": "#/components/schemas/OpenAI.ChatCompletionTool" + } } - ] + } }, - "OpenAI.ContainerFileCitationBody": { + "OpenAI.CreateEvalCustomDataSourceConfig": { "type": "object", "required": [ "type", - "container_id", - "file_id", - "start_index", - "end_index", - "filename" + "item_schema" ], "properties": { "type": { "type": "string", "enum": [ - "container_file_citation" + "custom" ], - "description": "The type of the container file citation. Always `container_file_citation`.", + "description": "The type of data source. Always `custom`.", "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." + "default": "custom" }, - "end_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the last character of the container file citation in the message." + "item_schema": { + "type": "object", + "additionalProperties": {}, + "description": "The json schema for each row in the data source." }, - "filename": { - "type": "string", - "description": "The filename of the container file cited." + "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)" } }, - "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" - ] + "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.ContainerNetworkPolicyAllowlistParam": { + "OpenAI.CreateEvalJsonlRunDataSource": { "type": "object", "required": [ "type", - "allowed_domains" + "source" ], "properties": { "type": { "type": "string", "enum": [ - "allowlist" + "jsonl" ], - "description": "Allow outbound network access only to specified domains. Always `allowlist`.", + "description": "The type of data source. Always `jsonl`.", "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`." + "default": "jsonl" }, - "domain_secrets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyDomainSecretParam" - }, - "minItems": 1, - "description": "Optional domain-scoped secrets for allowlisted domains." + "source": { + "oneOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + } + ], + "description": "Determines what populates the `item` namespace in the data source." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" - } - ] + "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.ContainerNetworkPolicyDisabledParam": { + "OpenAI.CreateEvalLogsDataSourceConfig": { "type": "object", "required": [ "type" @@ -21745,1342 +31288,1329 @@ "type": { "type": "string", "enum": [ - "disabled" + "logs" ], - "description": "Disable outbound network access. Always `disabled`.", + "description": "The type of data source. Always `logs`.", "x-stainless-const": true, - "default": "disabled" + "default": "logs" + }, + "metadata": { + "type": "object", + "additionalProperties": {}, + "description": "Metadata filters for the logs data source." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerNetworkPolicyParam" - } - ] + "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.ContainerNetworkPolicyDomainSecretParam": { + "OpenAI.CreateEvalResponsesRunDataSource": { "type": "object", "required": [ - "domain", - "name", - "value" + "type", + "source" ], "properties": { - "domain": { + "type": { "type": "string", - "minLength": 1, - "description": "The domain associated with the secret." + "enum": [ + "responses" + ], + "description": "The type of run data source. Always `responses`.", + "default": "responses" }, - "name": { - "type": "string", - "minLength": 1, - "description": "The name of the secret to inject for the domain." + "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." }, - "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" + "sampling_params": { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceSamplingParams" }, - { + "model": { "type": "string", - "enum": [ - "disabled", - "allowlist" - ] + "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.ContainerReferenceResource": { + "OpenAI.CreateEvalResponsesRunDataSourceInputMessagesItemReference": { "type": "object", "required": [ "type", - "container_id" + "item_reference" ], "properties": { "type": { "type": "string", "enum": [ - "container_reference" - ], - "description": "The environment type. Always `container_reference`.", - "x-stainless-const": true, - "default": "container_reference" + "item_reference" + ] }, - "container_id": { + "item_reference": { "type": "string" } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], - "description": "Represents a container created with /v1/containers.", - "title": "Container Reference" + } }, - "OpenAI.ContainerSkill": { + "OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate": { "type": "object", "required": [ - "type" + "type", + "template" ], "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" + "template" ] + }, + "template": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "role": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": [ + "role", + "content" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.EvalItem" + } + ] + } } - ] + } }, - "OpenAI.ContextManagementParam": { + "OpenAI.CreateEvalResponsesRunDataSourceSamplingParams": { "type": "object", - "required": [ - "type" - ], "properties": { - "type": { - "type": "string", - "description": "The context management entry type. Currently only 'compaction' is supported." + "reasoning_effort": { + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" }, - "compact_threshold": { - "type": "integer", + "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" } ], - "nullable": true + "default": 42 + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + } + }, + "text": { + "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText" } } }, - "OpenAI.ConversationItem": { + "OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText": { + "type": "object", + "properties": { + "format": { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + } + } + }, + "OpenAI.CreateEvalStoredCompletionsDataSourceConfig": { "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" + "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": "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" + "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.ConversationItemApplyPatchToolCall": { + "OpenAI.CreateFineTuningJobRequest": { "type": "object", "required": [ - "type", - "id", - "call_id", - "status", - "operation" + "model", + "training_file" ], "properties": { - "type": { + "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", - "enum": [ - "apply_patch_call" + "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 type of the item. Always `apply_patch_call`.", - "x-stainless-const": true, - "default": "apply_patch_call" + "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 }, - "id": { + "suffix": { "type": "string", - "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." + "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`." }, - "call_id": { + "validation_file": { "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." + "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." }, - "status": { + "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.ApplyPatchCallStatus" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + "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." }, - "operation": { + "method": { + "$ref": "#/components/schemas/OpenAI.FineTuneMethod" + }, + "metadata": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "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." + "nullable": true } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + } + }, + "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" } - ], - "description": "A tool call that applies file diffs by creating, deleting, or updating files.", - "title": "Apply patch tool call" + } }, - "OpenAI.ConversationItemApplyPatchToolCallOutput": { + "OpenAI.CreateFineTuningJobRequestIntegrations": { "type": "object", "required": [ "type", - "id", - "call_id", - "status" + "wandb" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call_output" + "wandb" ], - "description": "The type of the item. Always `apply_patch_call_output`.", - "x-stainless-const": true, - "default": "apply_patch_call_output" + "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." + "wandb": { + "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrationsWandb" + } + } + }, + "OpenAI.CreateFineTuningJobRequestIntegrationsWandb": { + "type": "object", + "required": [ + "project" + ], + "properties": { + "project": { + "type": "string" }, - "call_id": { + "name": { "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`." + "nullable": true }, - "output": { + "entity": { "type": "string", "nullable": true }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call output." - } - }, - "allOf": [ + "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.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" + "$ref": "#/components/schemas/OpenAI.ResponseOutputItemDoneEvent" }, - "id": { - "type": "string", - "description": "The unique ID of the code interpreter tool call." + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEvent" }, - "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`." + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryTextDoneEvent" }, - "container_id": { - "type": "string", - "description": "The ID of the container used to run the code." + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningTextDoneEvent" }, - "code": { - "type": "string", - "nullable": true + { + "$ref": "#/components/schemas/OpenAI.ResponseRefusalDoneEvent" }, - "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" + "$ref": "#/components/schemas/OpenAI.ResponseTextDoneEvent" }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." + { + "$ref": "#/components/schemas/OpenAI.ResponseWebSearchCallCompletedEvent" }, - "call_id": { - "type": "string", - "description": "An identifier used when responding to the tool call with output." + { + "$ref": "#/components/schemas/OpenAI.ResponseImageGenCallCompletedEvent" }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPCallArgumentsDoneEvent" }, - "pending_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, - "description": "The pending safety checks for the computer call." + { + "$ref": "#/components/schemas/OpenAI.ResponseMCPCallCompletedEvent" }, - "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" + "$ref": "#/components/schemas/OpenAI.ResponseMCPListToolsCompletedEvent" + }, + { + "$ref": "#/components/schemas/OpenAI.ResponseCustomToolCallInputDoneEvent" } - ], - "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": { + "OpenAI.CustomGrammarFormatParam": { "type": "object", "required": [ "type", - "call_id", - "output" + "syntax", + "definition" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call_output" + "grammar" ], - "description": "The type of the computer tool call output. Always `computer_call_output`.", + "description": "Grammar format. Always `grammar`.", "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." + "default": "grammar" }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + "syntax": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.GrammarSyntax1" + } + ], + "description": "The syntax of the grammar definition. One of `lark` or `regex`." }, - "status": { + "definition": { "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." + "description": "The grammar definition." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" } - ] + ], + "description": "A grammar defined by the user.", + "title": "Grammar format" }, - "OpenAI.ConversationItemCustomToolCall": { + "OpenAI.CustomTextFormatParam": { "type": "object", "required": [ - "type", - "call_id", - "name", - "input" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "custom_tool_call" + "text" ], - "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." + "description": "Unconstrained text format. Always `text`.", + "x-stainless-const": true, + "default": "text" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" } ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" + "description": "Unconstrained free-form text.", + "title": "Text format" }, - "OpenAI.ConversationItemCustomToolCallOutput": { + "OpenAI.CustomToolParam": { "type": "object", "required": [ "type", - "call_id", - "output" + "name" ], "properties": { "type": { "type": "string", "enum": [ - "custom_tool_call_output" + "custom" ], - "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", - "x-stainless-const": true + "description": "The type of the custom tool. Always `custom`.", + "x-stainless-const": true, + "default": "custom" }, - "id": { + "name": { "type": "string", - "description": "The unique ID of the custom tool call output in the OpenAI platform." + "description": "The name of the custom tool, used to identify it in tool calls." }, - "call_id": { + "description": { "type": "string", - "description": "The call ID, used to map this custom tool call output to a custom tool call." + "description": "Optional description of the custom tool, used to provide more context." }, - "output": { - "oneOf": [ - { - "type": "string" - }, + "format": { + "allOf": [ { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" - } + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" } ], - "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." + "description": "The input format for the custom tool. Default is unconstrained text." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "The output of a custom tool call from your code, being sent back to the model.", - "title": "Custom tool call output" + "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.ConversationItemFileSearchToolCall": { + "OpenAI.CustomToolParamFormat": { "type": "object", "required": [ - "id", - "type", - "status", - "queries" + "type" ], "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 + "$ref": "#/components/schemas/OpenAI.CustomToolParamFormatType" } }, - "allOf": [ + "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": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "type": "string" + }, + { + "type": "string", + "enum": [ + "text", + "grammar" + ] } - ], - "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": { + "OpenAI.DeletedConversationResource": { "type": "object", "required": [ - "type", - "id", - "call_id", - "action", - "status", - "environment" + "object", + "deleted", + "id" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "shell_call" + "conversation.deleted" ], - "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`." + "default": "conversation.deleted" }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], - "nullable": true + "deleted": { + "type": "boolean" }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "id": { + "type": "string" } - ], - "description": "A tool call that executes one or more shell commands in a managed environment.", - "title": "Shell tool call" + } }, - "OpenAI.ConversationItemFunctionShellCallOutput": { + "OpenAI.DetailEnum": { + "type": "string", + "enum": [ + "low", + "high", + "auto" + ] + }, + "OpenAI.DoubleClickAction": { "type": "object", "required": [ "type", - "id", - "call_id", - "status", - "output", - "max_output_length" + "x", + "y" ], "properties": { "type": { "type": "string", "enum": [ - "shell_call_output" + "double_click" ], - "description": "The type of the shell call output. Always `shell_call_output`.", + "description": "Specifies the event type. For a double click action, this property is always set to `double_click`.", "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." + "default": "double_click" }, - "status": { + "x": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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" + "description": "The x-coordinate where the double click occurred." }, - "max_output_length": { - "type": "integer", + "y": { "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." + "description": "The y-coordinate where the double click occurred." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$ref": "#/components/schemas/OpenAI.ComputerAction" } - ] + ], + "description": "A double click action.", + "title": "DoubleClick" }, - "OpenAI.ConversationItemFunctionToolCallResource": { + "OpenAI.DragParam": { "type": "object", "required": [ "type", - "call_id", - "name", - "arguments" + "path" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, "type": { "type": "string", "enum": [ - "function_call" + "drag" ], - "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." + "description": "Specifies the event type. For a drag action, this property is always set to `drag`.", + "x-stainless-const": true, + "default": "drag" }, - "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." + "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.ConversationItem" + "$ref": "#/components/schemas/OpenAI.ComputerAction" } - ] + ], + "description": "A drag action.", + "title": "Drag" }, - "OpenAI.ConversationItemImageGenToolCall": { + "OpenAI.EasyInputMessage": { "type": "object", "required": [ - "type", - "id", - "status", - "result" + "role", + "content", + "type" ], "properties": { - "type": { + "role": { "type": "string", "enum": [ - "image_generation_call" + "user", + "assistant", + "system", + "developer" ], - "description": "The type of the image generation call. Always `image_generation_call`.", - "x-stainless-const": true + "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n `developer`." }, - "id": { + "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", - "description": "The unique ID of the image generation call." + "enum": [ + "message" + ], + "description": "The type of the message input. Always `message`.", + "x-stainless-const": true }, "status": { "type": "string", "enum": [ "in_progress", "completed", - "generating", - "failed" + "incomplete" ], - "description": "The status of the image generation call." - }, - "result": { - "type": "string", - "nullable": true + "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.ConversationItem" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "An image generation request made by the model.", - "title": "Image generation call" + "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.ConversationItemList": { + "OpenAI.Error": { "type": "object", "required": [ - "object", - "data", - "has_more", - "first_id", - "last_id" + "code", + "message" ], "properties": { - "object": { + "code": { "type": "string", - "enum": [ - "list" - ], - "description": "The type of object returned, must be `list`.", - "x-stainless-const": true + "nullable": true }, - "data": { + "message": { + "type": "string" + }, + "param": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string" + }, + "details": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - }, - "description": "A list of conversation items.", - "x-ms-list-page-items": true + "$ref": "#/components/schemas/OpenAI.Error" + } }, - "has_more": { - "type": "boolean", - "description": "Whether there are more items available." + "additionalInfo": { + "type": "object", + "additionalProperties": {} }, - "first_id": { + "debugInfo": { + "type": "object", + "additionalProperties": {} + } + } + }, + "OpenAI.EvalApiError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { "type": "string", - "description": "The ID of the first item in the list." + "description": "The error code." }, - "last_id": { + "message": { "type": "string", - "description": "The ID of the last item in the list.", - "x-ms-list-continuation-token": true + "description": "The error message." } }, - "description": "A list of Conversation items.", - "title": "The conversation item list", + "description": "An object representing an error response from the Eval API.", + "title": "EvalApiError", "x-oaiMeta": { - "name": "The item list", - "group": "conversations" + "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.ConversationItemLocalShellToolCall": { + "OpenAI.EvalGraderLabelModel": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status" + "name", + "model", + "input", + "labels", + "passing_labels" ], "properties": { "type": { "type": "string", "enum": [ - "local_shell_call" + "label_model" ], - "description": "The type of the local shell call. Always `local_shell_call`.", + "description": "The object type, which is always `label_model`.", "x-stainless-const": true }, - "id": { + "name": { "type": "string", - "description": "The unique ID of the local shell call." + "description": "The name of the grader." }, - "call_id": { + "model": { "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." + "description": "The model to use for the evaluation. Must support structured outputs." }, - "action": { - "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" + "input": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.EvalItem" + } }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" + "title": "LabelModelGrader" }, - "OpenAI.ConversationItemLocalShellToolCallOutput": { + "OpenAI.EvalGraderPython": { "type": "object", "required": [ "type", - "id", - "output" + "name", + "source" ], "properties": { "type": { "type": "string", "enum": [ - "local_shell_call_output" + "python" ], - "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", + "description": "The object type, which is always `python`.", "x-stainless-const": true }, - "id": { + "name": { "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." + "description": "The name of the grader." }, - "output": { + "source": { "type": "string", - "description": "A JSON string of the output of the local shell tool call." + "description": "The source code of the python script." }, - "status": { + "image_tag": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "description": "The image tag to use for the python script." + }, + "pass_threshold": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } ], - "nullable": true + "description": "The threshold for the score." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" + "title": "PythonGrader" }, - "OpenAI.ConversationItemMcpApprovalRequest": { + "OpenAI.EvalGraderScoreModel": { "type": "object", "required": [ "type", - "id", - "server_label", "name", - "arguments" + "model", + "input" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_request" + "score_model" ], - "description": "The type of the item. Always `mcp_approval_request`.", + "description": "The object type, which is always `score_model`.", "x-stainless-const": true }, - "id": { + "name": { "type": "string", - "description": "The unique ID of the approval request." + "description": "The name of the grader." }, - "server_label": { + "model": { "type": "string", - "description": "The label of the MCP server making the request." + "description": "The model to use for the evaluation." }, - "name": { - "type": "string", - "description": "The name of the tool to run." + "sampling_params": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModelSamplingParams" + } + ], + "description": "The sampling parameters for the model." }, - "arguments": { - "type": "string", - "description": "A JSON string of arguments for the tool." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" + "title": "ScoreModelGrader" }, - "OpenAI.ConversationItemMcpApprovalResponseResource": { + "OpenAI.EvalGraderScoreModelSamplingParams": { "type": "object", - "required": [ - "type", - "id", - "approval_request_id", - "approve" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "mcp_approval_response" + "seed": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "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" + "nullable": true }, - "approval_request_id": { - "type": "string", - "description": "The ID of the approval request being answered." + "top_p": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true, + "default": 1 }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." + "temperature": { + "type": "number", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "nullable": true }, - "reason": { - "type": "string", + "max_completions_tokens": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], "nullable": true + }, + "reasoning_effort": { + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" + } }, - "OpenAI.ConversationItemMcpListTools": { + "OpenAI.EvalGraderStringCheck": { "type": "object", "required": [ "type", - "id", - "server_label", - "tools" + "name", + "input", + "reference", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_list_tools" + "string_check" ], - "description": "The type of the item. Always `mcp_list_tools`.", + "description": "The object type, which is always `string_check`.", "x-stainless-const": true }, - "id": { + "name": { "type": "string", - "description": "The unique ID of the list." + "description": "The name of the grader." }, - "server_label": { + "input": { "type": "string", - "description": "The label of the MCP server." + "description": "The input text. This may include template strings." }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." + "reference": { + "type": "string", + "description": "The reference text. This may include template strings." }, - "error": { + "operation": { "type": "string", - "nullable": true + "enum": [ + "eq", + "ne", + "like", + "ilike" + ], + "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" + "title": "StringCheckGrader" }, - "OpenAI.ConversationItemMcpToolCall": { + "OpenAI.EvalGraderTextSimilarity": { "type": "object", "required": [ "type", - "id", - "server_label", "name", - "arguments" + "input", + "reference", + "evaluation_metric", + "pass_threshold" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_call" + "text_similarity" ], - "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." + "description": "The type of grader.", + "x-stainless-const": true, + "default": "text_similarity" }, "name": { "type": "string", - "description": "The name of the tool that was run." + "description": "The name of the grader." }, - "arguments": { + "input": { "type": "string", - "description": "A JSON string of the arguments passed to the tool." + "description": "The text being graded." }, - "output": { + "reference": { "type": "string", - "nullable": true + "description": "The text being graded against." }, - "error": { - "type": "object", - "additionalProperties": {} + "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`." }, - "status": { + "pass_threshold": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." - }, - "approval_request_id": { - "type": "string", - "nullable": true + "description": "The threshold for the score." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ConversationItem" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" + "title": "TextSimilarityGrader" }, - "OpenAI.ConversationItemMessage": { + "OpenAI.EvalItem": { "type": "object", "required": [ - "type", - "id", - "status", "role", "content" ], "properties": { - "type": { + "role": { "type": "string", "enum": [ - "message" + "user", + "assistant", + "system", + "developer" ], - "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." + "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n `developer`." }, - "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." + "content": { + "$ref": "#/components/schemas/OpenAI.EvalItemContent" }, - "role": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageRole" - } + "type": { + "type": "string", + "enum": [ + "message" ], - "description": "The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`." + "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" }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MessageContent" - }, - "description": "The content of the message" + { + "$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" }, - "allOf": [ + "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.ConversationItem" + "$ref": "#/components/schemas/OpenAI.EvalItemContentText" + }, + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" } ], - "description": "A message to or from the model.", - "title": "Message" + "description": "A single content item: input text, output text, input image, or input audio.", + "title": "Eval content item" }, - "OpenAI.ConversationItemReasoningItem": { + "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", - "id", - "summary" + "text" ], "properties": { "type": { "type": "string", "enum": [ - "reasoning" + "input_text" ], - "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." + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" }, - "status": { + "text": { "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." + "description": "The text input to the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" } ], - "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" + "description": "A text input to the model.", + "title": "Input text" }, - "OpenAI.ConversationItemType": { + "OpenAI.EvalItemContentItemObjectType": { "anyOf": [ { "type": "string" @@ -23088,712 +32618,708 @@ { "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" + "input_text", + "output_text", + "input_image", + "input_audio" ] } ] }, - "OpenAI.ConversationItemWebSearchToolCall": { + "OpenAI.EvalItemContentOutputText": { "type": "object", "required": [ - "id", "type", - "status", - "action" + "text" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, "type": { "type": "string", "enum": [ - "web_search_call" + "output_text" ], - "description": "The type of the web search tool call. Always `web_search_call`.", + "description": "The type of the output text. Always `output_text`.", "x-stainless-const": true }, - "status": { + "text": { "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)." + "description": "The text output from the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationItem" + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" } ], - "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" + "description": "A text output from the model.", + "title": "Output text" }, - "OpenAI.ConversationParam": { - "oneOf": [ - { - "type": "string" + "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.ConversationParam-2" + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" } ], - "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." + "description": "An image input block used within EvalItem content arrays.", + "title": "Input image" }, - "OpenAI.ConversationParam-2": { + "OpenAI.EvalJsonlFileContentSource": { "type": "object", "required": [ - "id" + "type", + "content" ], "properties": { - "id": { + "type": { "type": "string", - "description": "The unique ID of the conversation." + "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." } }, - "description": "The conversation that this response belongs to.", - "title": "Conversation object" + "title": "EvalJsonlFileContentSource" }, - "OpenAI.ConversationReference": { + "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 unique ID of the conversation that this response was associated with." + "description": "The identifier of the file." } }, - "description": "The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.", - "title": "Conversation" + "title": "EvalJsonlFileIdSource" }, - "OpenAI.ConversationResource": { + "OpenAI.EvalResponsesSource": { "type": "object", "required": [ - "id", - "object", - "metadata", - "created_at" + "type" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the conversation." - }, - "object": { + "type": { "type": "string", "enum": [ - "conversation" + "responses" ], - "description": "The object type, which is always `conversation`.", - "x-stainless-const": true, - "default": "conversation" + "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.Metadata" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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." + "nullable": true }, - "created_at": { + "created_before": { "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." + "nullable": true }, - "y": { + "reasoning_effort": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ReasoningEffort" } ], - "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" + "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": "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." + "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.CreateChatCompletionRequestResponseFormatResponseFormatJsonObject": { + "OpenAI.EvalRunOutputItemSample": { "type": "object", "required": [ - "type" + "input", + "output", + "finish_reason", + "model", + "usage", + "error", + "temperature", + "max_completion_tokens", + "top_p", + "seed" ], "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" + "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" } - ], - "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": { + "OpenAI.EvalRunOutputItemSampleUsage": { "type": "object", "required": [ - "type" + "total_tokens", + "completion_tokens", + "prompt_tokens", + "cached_tokens" ], "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" + "total_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - { - "type": "string", - "enum": [ - "text", - "json_schema", - "json_object" - ] - } - ] - }, - "OpenAI.CreateConversationBody": { - "type": "object", - "properties": { - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true + "completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - }, - "nullable": true + "prompt_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "cached_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" } } }, - "OpenAI.CreateEvalCompletionsRunDataSource": { + "OpenAI.EvalRunPerModelUsage": { "type": "object", "required": [ - "type", - "source" + "model_name", + "invocation_count", + "prompt_tokens", + "completion_tokens", + "total_tokens", + "cached_tokens" ], "properties": { - "type": { - "type": "string", - "enum": [ - "completions" - ], - "description": "The type of run data source. Always `completions`.", - "default": "completions" + "model_name": { + "type": "string" }, - "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." + "invocation_count": { + "$ref": "#/components/schemas/OpenAI.integer" }, - "sampling_params": { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams" + "prompt_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - "model": { - "type": "string", - "description": "The name of the model to use for generating completions (e.g. \"o3-mini\")." + "completion_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" }, - "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." + "total_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "cached_tokens": { + "$ref": "#/components/schemas/OpenAI.integer" } - }, - "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": { + "OpenAI.EvalRunPerTestingCriteriaResults": { "type": "object", "required": [ - "type", - "item_reference" + "testing_criteria", + "passed", + "failed" ], "properties": { - "type": { - "type": "string", - "enum": [ - "item_reference" - ] - }, - "item_reference": { + "testing_criteria": { "type": "string" + }, + "passed": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "failed": { + "$ref": "#/components/schemas/OpenAI.integer" } } }, - "OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesTemplate": { + "OpenAI.EvalRunResultCounts": { "type": "object", "required": [ - "type", - "template" + "total", + "errored", + "failed", + "passed" ], "properties": { - "type": { - "type": "string", - "enum": [ - "template" - ] + "total": { + "$ref": "#/components/schemas/OpenAI.integer" }, - "template": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EasyInputMessage" - }, - { - "$ref": "#/components/schemas/OpenAI.EvalItem" - } - ] - } + "errored": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "failed": { + "$ref": "#/components/schemas/OpenAI.integer" + }, + "passed": { + "$ref": "#/components/schemas/OpenAI.integer" } } }, - "OpenAI.CreateEvalCompletionsRunDataSourceSamplingParams": { + "OpenAI.EvalStoredCompletionsSource": { "type": "object", + "required": [ + "type" + ], "properties": { - "reasoning_effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" + "type": { + "type": "string", + "enum": [ + "stored_completions" + ], + "description": "The type of source. Always `stored_completions`.", + "x-stainless-const": true, + "default": "stored_completions" }, - "temperature": { + "metadata": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.Metadata" } ], - "default": 1 + "nullable": true }, - "max_completion_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" + "model": { + "type": "string", + "nullable": true }, - "top_p": { + "created_after": { + "type": "integer", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "default": 1 + "nullable": true }, - "seed": { + "created_before": { + "type": "integer", "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "default": 42 + "nullable": true }, - "response_format": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseFormatText" - }, - { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchema" - }, + "limit": { + "type": "integer", + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonObject" + "$ref": "#/components/schemas/OpenAI.integer" } - ] - }, - "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)" + "nullable": true } }, - "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", + "description": "A StoredCompletionsRunDataSource configuration describing a set of filters", + "title": "StoredCompletionsRunDataSource", "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" + "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.CreateEvalJsonlRunDataSource": { + "OpenAI.FileCitationBody": { "type": "object", "required": [ "type", - "source" + "file_id", + "index", + "filename" ], "properties": { "type": { "type": "string", "enum": [ - "jsonl" + "file_citation" ], - "description": "The type of data source. Always `jsonl`.", + "description": "The type of the file citation. Always `file_citation`.", "x-stainless-const": true, - "default": "jsonl" + "default": "file_citation" }, - "source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, + "file_id": { + "type": "string", + "description": "The ID of the file." + }, + "index": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "Determines what populates the `item` namespace in the data source." + "description": "The index of the file in the list of files." + }, + "filename": { + "type": "string", + "description": "The filename of the file cited." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Annotation" + } + ], + "description": "A citation to a file.", + "title": "File citation" }, - "OpenAI.CreateEvalLogsDataSourceConfig": { + "OpenAI.FilePath": { "type": "object", "required": [ - "type" + "type", + "file_id", + "index" ], "properties": { "type": { "type": "string", "enum": [ - "logs" + "file_path" ], - "description": "The type of data source. Always `logs`.", - "x-stainless-const": true, - "default": "logs" + "description": "The type of the file path. Always `file_path`.", + "x-stainless-const": true }, - "metadata": { - "type": "object", - "additionalProperties": {}, - "description": "Metadata filters for the logs data source." + "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." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Annotation" + } + ], + "description": "A path to a file.", + "title": "File path" }, - "OpenAI.CreateEvalResponsesRunDataSource": { + "OpenAI.FileSearchTool": { "type": "object", "required": [ "type", - "source" + "vector_store_ids" ], "properties": { "type": { "type": "string", "enum": [ - "responses" + "file_search" ], - "description": "The type of run data source. Always `responses`.", - "default": "responses" + "description": "The type of the file search tool. Always `file_search`.", + "x-stainless-const": true, + "default": "file_search" }, - "input_messages": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - }, + "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.CreateEvalResponsesRunDataSourceInputMessagesItemReference" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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\")." + "description": "The maximum number of results to return. This number should be between 1 and 50 inclusive." }, - "source": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, + "ranking_options": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - }, + "$ref": "#/components/schemas/OpenAI.RankingOptions" + } + ], + "description": "Ranking options for search." + }, + "filters": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalResponsesSource" + "$ref": "#/components/schemas/OpenAI.Filters" } ], - "description": "Determines what populates the `item` namespace in this run's data source." + "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." } }, - "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" - } + "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.CreateEvalResponsesRunDataSourceInputMessagesItemReference": { + "OpenAI.FileSearchToolCallResults": { "type": "object", - "required": [ - "type", - "item_reference" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "item_reference" - ] + "file_id": { + "type": "string" }, - "item_reference": { + "text": { "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" - } - ] - } + "filename": { + "type": "string" + }, + "attributes": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.VectorStoreFileAttributes" + } + ], + "nullable": true + }, + "score": { + "type": "number", + "format": "float" } } }, - "OpenAI.CreateEvalResponsesRunDataSourceSamplingParams": { + "OpenAI.Filters": { + "anyOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComparisonFilter" + }, + { + "$ref": "#/components/schemas/OpenAI.CompoundFilter" + } + ] + }, + "OpenAI.FineTuneDPOHyperparameters": { "type": "object", "properties": { - "reasoning_effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" - }, - "temperature": { - "allOf": [ + "beta": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, { "$ref": "#/components/schemas/OpenAI.numeric" } ], - "default": 1 + "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" }, - "max_completion_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" + "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" }, - "top_p": { - "allOf": [ + "learning_rate_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, { "$ref": "#/components/schemas/OpenAI.numeric" } ], - "default": 1 + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", + "default": "auto" }, - "seed": { - "allOf": [ + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, { "$ref": "#/components/schemas/OpenAI.integer" } ], - "default": 42 - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - } - }, - "text": { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceSamplingParamsText" + "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.CreateEvalResponsesRunDataSourceSamplingParamsText": { + "OpenAI.FineTuneDPOMethod": { "type": "object", "properties": { - "format": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + "hyperparameters": { + "$ref": "#/components/schemas/OpenAI.FineTuneDPOHyperparameters" } - } + }, + "description": "Configuration for the DPO fine-tuning method." }, - "OpenAI.CreateEvalStoredCompletionsDataSourceConfig": { + "OpenAI.FineTuneMethod": { "type": "object", "required": [ "type" @@ -23802,115 +33328,84 @@ "type": { "type": "string", "enum": [ - "stored_completions" + "supervised", + "dpo", + "reinforcement" ], - "description": "The type of data source. Always `stored_completions`.", - "x-stainless-const": true, - "default": "stored_completions" + "description": "The type of method. Is either `supervised`, `dpo`, or `reinforcement`." }, - "metadata": { - "type": "object", - "additionalProperties": {}, - "description": "Metadata filters for the stored completions data source." + "supervised": { + "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedMethod" + }, + "dpo": { + "$ref": "#/components/schemas/OpenAI.FineTuneDPOMethod" + }, + "reinforcement": { + "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementMethod" } }, - "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" - } + "description": "The method used for fine-tuning." }, - "OpenAI.CreateFineTuningJobRequest": { + "OpenAI.FineTuneReinforcementHyperparameters": { "type": "object", - "required": [ - "model", - "training_file" - ], "properties": { - "model": { - "anyOf": [ - { - "type": "string" - }, + "batch_size": { + "oneOf": [ { "type": "string", "enum": [ - "babbage-002", - "davinci-002", - "gpt-3.5-turbo", - "gpt-4o-mini" + "auto" ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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." + "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" }, - "hyperparameters": { - "allOf": [ + "learning_rate_multiplier": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestHyperparameters" + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" } ], - "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." + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", + "default": "auto" }, - "seed": { - "type": "integer", - "allOf": [ + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, { "$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" + "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", + "default": "auto" }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } + "reasoning_effort": { + "type": "string", + "enum": [ + "default", + "low", + "medium", + "high" ], - "nullable": true - } - } - }, - "OpenAI.CreateFineTuningJobRequestHyperparameters": { - "type": "object", - "properties": { - "batch_size": { + "description": "Level of reasoning effort.", + "default": "default" + }, + "compute_multiplier": { "oneOf": [ { "type": "string", @@ -23919,12 +33414,13 @@ ] }, { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.numeric" } ], + "description": "Multiplier on amount of compute used for exploring search space during training.", "default": "auto" }, - "learning_rate_multiplier": { + "eval_interval": { "oneOf": [ { "type": "string", @@ -23933,12 +33429,13 @@ ] }, { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], + "description": "The number of training steps between evaluation runs.", "default": "auto" }, - "n_epochs": { + "eval_samples": { "oneOf": [ { "type": "string", @@ -23950,986 +33447,801 @@ "$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.CreateFineTuningJobRequestIntegrations": { + "OpenAI.FineTuneReinforcementMethod": { "type": "object", "required": [ - "type", - "wandb" + "grader" ], "properties": { - "type": { - "type": "string", - "enum": [ - "wandb" + "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" + } ], - "x-stainless-const": true + "description": "The grader used for the fine-tuning job." }, - "wandb": { - "$ref": "#/components/schemas/OpenAI.CreateFineTuningJobRequestIntegrationsWandb" + "hyperparameters": { + "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementHyperparameters" } - } + }, + "description": "Configuration for the reinforcement fine-tuning method." }, - "OpenAI.CreateFineTuningJobRequestIntegrationsWandb": { + "OpenAI.FineTuneSupervisedHyperparameters": { "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" + "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" }, - { - "$ref": "#/components/schemas/OpenAI.ResponseCustomToolCallInputDoneEvent" - } - ] - }, - "OpenAI.CustomGrammarFormatParam": { - "type": "object", - "required": [ - "type", - "syntax", - "definition" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "grammar" + "learning_rate_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.numeric" + } ], - "description": "Grammar format. Always `grammar`.", - "x-stainless-const": true, - "default": "grammar" + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", + "default": "auto" }, - "syntax": { - "allOf": [ + "n_epochs": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.GrammarSyntax1" + "type": "string", + "enum": [ + "auto" + ] + }, + { + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The syntax of the grammar definition. One of `lark` or `regex`." - }, - "definition": { - "type": "string", - "description": "The grammar definition." + "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", + "default": "auto" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" - } - ], - "description": "A grammar defined by the user.", - "title": "Grammar format" + "description": "The hyperparameters used for the fine-tuning job." }, - "OpenAI.CustomTextFormatParam": { + "OpenAI.FineTuneSupervisedMethod": { "type": "object", - "required": [ - "type" - ], "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ], - "description": "Unconstrained text format. Always `text`.", - "x-stainless-const": true, - "default": "text" + "hyperparameters": { + "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedHyperparameters" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" - } - ], - "description": "Unconstrained free-form text.", - "title": "Text format" + "description": "Configuration for the supervised fine-tuning method." }, - "OpenAI.CustomToolParam": { + "OpenAI.FineTuningIntegration": { "type": "object", "required": [ "type", - "name" + "wandb" ], "properties": { "type": { "type": "string", "enum": [ - "custom" + "wandb" ], - "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." + "description": "The type of the integration being enabled for the fine-tuning job", + "x-stainless-const": true }, - "format": { + "wandb": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CustomToolParamFormat" + "$ref": "#/components/schemas/OpenAI.FineTuningIntegrationWandb" } ], - "description": "The input format for the custom tool. Default is unconstrained text." + "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." } }, - "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" + "title": "Fine-Tuning Job Integration" }, - "OpenAI.CustomToolParamFormat": { + "OpenAI.FineTuningIntegrationWandb": { "type": "object", "required": [ - "type" + "project" ], "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": [ - { + "project": { "type": "string" }, - { - "type": "string", - "enum": [ - "text", - "grammar" - ] - } - ] - }, - "OpenAI.DeletedConversationResource": { - "type": "object", - "required": [ - "object", - "deleted", - "id" - ], - "properties": { - "object": { + "name": { "type": "string", - "enum": [ - "conversation.deleted" - ], - "x-stainless-const": true, - "default": "conversation.deleted" + "nullable": true }, - "deleted": { - "type": "boolean" + "entity": { + "type": "string", + "nullable": true }, - "id": { - "type": "string" + "tags": { + "type": "array", + "items": { + "type": "string" + } } } }, - "OpenAI.DetailEnum": { - "type": "string", - "enum": [ - "low", - "high", - "auto" - ] - }, - "OpenAI.DoubleClickAction": { + "OpenAI.FineTuningJob": { "type": "object", "required": [ - "type", - "x", - "y" + "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": { - "type": { + "id": { "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" + "description": "The object identifier, which can be referenced in the API endpoints." }, - "x": { + "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.integer" + "$ref": "#/components/schemas/OpenAI.FineTuningJobError" } ], - "description": "The x-coordinate where the double click occurred." + "nullable": true }, - "y": { + "fine_tuned_model": { + "type": "string", + "nullable": true + }, + "finished_at": { + "type": "integer", + "format": "unixtime", + "nullable": true + }, + "hyperparameters": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.FineTuningJobHyperparameters" } ], - "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": { + "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": [ - "drag" + "fine_tuning.job" ], - "description": "Specifies the event type. For a drag action, this property is always set to `drag`.", - "x-stainless-const": true, - "default": "drag" + "description": "The object type, which is always \"fine_tuning.job\".", + "x-stainless-const": true }, - "path": { + "organization_id": { + "type": "string", + "description": "The organization that owns the fine-tuning job." + }, + "result_files": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.CoordParam" + "type": "string" }, - "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": { + "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": [ - "user", - "assistant", - "system", - "developer" + "validating_files", + "queued", + "running", + "succeeded", + "failed", + "cancelled" ], - "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n `developer`." + "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`." }, - "content": { - "oneOf": [ - { - "type": "string" - }, + "trained_tokens": { + "type": "integer", + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputMessageContentList" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "Text, image, or audio input to the model, used to generate a response.\n Can also contain previous assistant responses." + "nullable": true }, - "type": { + "training_file": { "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message input. Always `message`.", - "x-stainless-const": true + "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents)." }, - "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": { + "validation_file": { "type": "string", "nullable": true }, - "message": { - "type": "string" - }, - "param": { - "type": "string", + "integrations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FineTuningIntegration" + }, "nullable": true }, - "type": { - "type": "string" + "seed": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The seed used for the fine-tuning job." }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Error" - } + "estimated_finish": { + "type": "integer", + "format": "unixtime", + "nullable": true }, - "additionalInfo": { - "type": "object", - "additionalProperties": {} + "method": { + "$ref": "#/components/schemas/OpenAI.FineTuneMethod" }, - "debugInfo": { + "metadata": { "type": "object", - "additionalProperties": {} + "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.EvalApiError": { + "OpenAI.FineTuningJobCheckpoint": { "type": "object", "required": [ - "code", - "message" + "id", + "created_at", + "fine_tuned_model_checkpoint", + "step_number", + "metrics", + "fine_tuning_job_id", + "object" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The error code." + "description": "The checkpoint identifier, which can be referenced in the API endpoints." }, - "message": { + "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 error message." + "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": "An object representing an error response from the Eval API.", - "title": "EvalApiError", + "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 API error object", - "group": "evals", - "example": "{\n \"code\": \"internal_error\",\n \"message\": \"The eval run failed due to an internal error.\"\n}\n" + "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.EvalGraderLabelModel": { + "OpenAI.FineTuningJobCheckpointMetrics": { "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 + "step": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - "name": { - "type": "string", - "description": "The name of the grader." + "train_loss": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - "model": { - "type": "string", - "description": "The model to use for the evaluation. Must support structured outputs." + "train_mean_token_accuracy": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - "input": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalItem" - } + "valid_loss": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - "labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels to assign to each item in the evaluation." + "valid_mean_token_accuracy": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - "passing_labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels that indicate a passing result. Must be a subset of labels." + "full_valid_loss": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "full_valid_mean_token_accuracy": { + "$ref": "#/components/schemas/OpenAI.numeric" } - }, - "title": "LabelModelGrader" + } }, - "OpenAI.EvalGraderPython": { - "type": "object", - "required": [ - "type", - "name", - "source" + "OpenAI.FineTuningJobError": { + "type": "object", + "required": [ + "code", + "message", + "param" ], "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." + "code": { + "type": "string" }, - "source": { - "type": "string", - "description": "The source code of the python script." + "message": { + "type": "string" }, - "image_tag": { + "param": { "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." + "nullable": true } - }, - "title": "PythonGrader" + } }, - "OpenAI.EvalGraderScoreModel": { + "OpenAI.FineTuningJobEvent": { "type": "object", "required": [ - "type", - "name", - "model", - "input" + "object", + "id", + "created_at", + "level", + "message" ], "properties": { - "type": { + "object": { "type": "string", "enum": [ - "score_model" + "fine_tuning.job.event" ], - "description": "The object type, which is always `score_model`.", + "description": "The object type, which is always \"fine_tuning.job.event\".", "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The object identifier." }, - "model": { - "type": "string", - "description": "The model to use for the evaluation." + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created." }, - "sampling_params": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModelSamplingParams" - } + "level": { + "type": "string", + "enum": [ + "info", + "warn", + "error" ], - "description": "The sampling parameters for the model." + "description": "The log level of the event." }, - "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." + "message": { + "type": "string", + "description": "The message of the event." }, - "range": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "description": "The range of the score. Defaults to `[0, 1]`." + "type": { + "type": "string", + "enum": [ + "message", + "metrics" + ], + "description": "The type of event." }, - "pass_threshold": { + "data": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.FineTuningJobEventData" } ], - "description": "The threshold for the score." + "description": "The data associated with the event." } }, - "title": "ScoreModelGrader" + "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.EvalGraderScoreModelSamplingParams": { + "OpenAI.FineTuningJobEventData": { + "type": "object" + }, + "OpenAI.FineTuningJobHyperparameters": { "type": "object", "properties": { - "seed": { - "type": "integer", - "allOf": [ + "batch_size": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true - }, - "top_p": { - "type": "number", - "allOf": [ + "type": "string", + "enum": [ + "auto" + ], + "nullable": true + }, { - "$ref": "#/components/schemas/OpenAI.numeric" + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "nullable": true } ], - "nullable": true, - "default": 1 + "default": "auto" }, - "temperature": { - "type": "number", - "allOf": [ + "learning_rate_multiplier": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, { "$ref": "#/components/schemas/OpenAI.numeric" } ], - "nullable": true + "default": "auto" }, - "max_completions_tokens": { - "type": "integer", - "allOf": [ + "n_epochs": { + "oneOf": [ + { + "type": "string", + "enum": [ + "auto" + ] + }, { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true - }, - "reasoning_effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" + "default": "auto" } } }, - "OpenAI.EvalGraderStringCheck": { + "OpenAI.FunctionAndCustomToolCallOutput": { "type": "object", "required": [ - "type", - "name", - "input", - "reference", - "operation" + "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": [ - "string_check" + "input_file" ], - "description": "The object type, which is always `string_check`.", - "x-stainless-const": true + "description": "The type of the input item. Always `input_file`.", + "x-stainless-const": true, + "default": "input_file" }, - "name": { + "file_id": { "type": "string", - "description": "The name of the grader." + "nullable": true }, - "input": { + "filename": { "type": "string", - "description": "The input text. This may include template strings." + "description": "The name of the file to be sent to the model." }, - "reference": { + "file_url": { "type": "string", - "description": "The reference text. This may include template strings." + "format": "uri", + "description": "The URL of the file to be sent to the model." }, - "operation": { + "file_data": { "type": "string", - "enum": [ - "eq", - "ne", - "like", - "ilike" - ], - "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." + "description": "The content of the file to be sent to the model." } }, - "title": "StringCheckGrader" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + ], + "description": "A file input to the model.", + "title": "Input file" }, - "OpenAI.EvalGraderTextSimilarity": { + "OpenAI.FunctionAndCustomToolCallOutputInputImageContent": { "type": "object", "required": [ "type", - "name", - "input", - "reference", - "evaluation_metric", - "pass_threshold" + "detail" ], "properties": { "type": { "type": "string", "enum": [ - "text_similarity" + "input_image" ], - "description": "The type of grader.", + "description": "The type of the input item. Always `input_image`.", "x-stainless-const": true, - "default": "text_similarity" - }, - "name": { - "type": "string", - "description": "The name of the grader." - }, - "input": { - "type": "string", - "description": "The text being graded." + "default": "input_image" }, - "reference": { + "image_url": { "type": "string", - "description": "The text being graded against." + "format": "uri", + "nullable": true }, - "evaluation_metric": { + "file_id": { "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`." + "nullable": true }, - "pass_threshold": { + "detail": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.ImageDetail" } ], - "description": "The threshold for the score." + "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." } }, - "title": "TextSimilarityGrader" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } + ], + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" }, - "OpenAI.EvalItem": { + "OpenAI.FunctionAndCustomToolCallOutputInputTextContent": { "type": "object", "required": [ - "role", - "content" + "type", + "text" ], "properties": { - "role": { + "type": { "type": "string", "enum": [ - "user", - "assistant", - "system", - "developer" + "input_text" ], - "description": "The role of the message input. One of `user`, `assistant`, `system`, or\n `developer`." - }, - "content": { - "$ref": "#/components/schemas/OpenAI.EvalItemContent" + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" }, - "type": { + "text": { "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message input. Always `message`.", - "x-stainless-const": true + "description": "The text input to the model." } }, - "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" - }, + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalItemContentArray" + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" } ], - "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" + "description": "A text input to the model.", + "title": "Input text" }, - "OpenAI.EvalItemContentItem": { - "oneOf": [ + "OpenAI.FunctionAndCustomToolCallOutputType": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalItemContentText" + "type": "string" }, { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + "type": "string", + "enum": [ + "input_text", + "input_image", + "input_file" + ] } + ] + }, + "OpenAI.FunctionCallItemStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.FunctionObject": { + "type": "object", + "required": [ + "name" ], - "description": "A single content item: input text, output text, input image, or input audio.", - "title": "Eval content item" + "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.EvalItemContentItemObject": { + "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": [ - "type" + "commands", + "timeout_ms", + "max_output_length" ], "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObjectType" + "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 } }, - "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": "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": "A single content item: input text, output text, input image, or input audio.", - "title": "Eval content item" + "description": "Commands and limits describing how to run the shell tool call.", + "title": "Shell action" }, - "OpenAI.EvalItemContentItemObjectInputTextContent": { + "OpenAI.FunctionShellCallEnvironment": { "type": "object", "required": [ - "type", - "text" + "type" ], "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." + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironmentType" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + "discriminator": { + "propertyName": "type", + "mapping": { + "local": "#/components/schemas/OpenAI.LocalEnvironmentResource", + "container_reference": "#/components/schemas/OpenAI.ContainerReferenceResource" } - ], - "description": "A text input to the model.", - "title": "Input text" + } }, - "OpenAI.EvalItemContentItemObjectType": { + "OpenAI.FunctionShellCallEnvironmentType": { "anyOf": [ { "type": "string" @@ -24937,574 +34249,377 @@ { "type": "string", "enum": [ - "input_text", - "output_text", - "input_image", - "input_audio" + "local", + "container_reference" ] } ] }, - "OpenAI.EvalItemContentOutputText": { + "OpenAI.FunctionShellCallItemParamEnvironment": { "type": "object", "required": [ - "type", - "text" + "type" ], "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." + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentType" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + "discriminator": { + "propertyName": "type", + "mapping": { + "local": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam", + "container_reference": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam" } - ], - "description": "A text output from the model.", - "title": "Output text" - }, - "OpenAI.EvalItemContentText": { - "type": "string", - "description": "A text input to the model.", - "title": "Text input" + }, + "description": "The environment to execute the shell commands in." }, - "OpenAI.EvalItemInputImage": { + "OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam": { "type": "object", "required": [ "type", - "image_url" + "container_id" ], "properties": { "type": { "type": "string", "enum": [ - "input_image" + "container_reference" ], - "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." + "description": "References a container created with the /v1/containers endpoint", + "x-stainless-const": true, + "default": "container_reference" }, - "detail": { + "container_id": { "type": "string", - "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + "description": "The ID of the referenced container." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" } - ], - "description": "An image input block used within EvalItem content arrays.", - "title": "Input image" + ] }, - "OpenAI.EvalJsonlFileContentSource": { + "OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam": { "type": "object", "required": [ - "type", - "content" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "file_content" + "local" ], - "description": "The type of jsonl source. Always `file_content`.", + "description": "Use a local computer environment.", "x-stainless-const": true, - "default": "file_content" + "default": "local" }, - "content": { + "skills": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSourceContent" + "$ref": "#/components/schemas/OpenAI.LocalSkillParam" }, - "description": "The content of the jsonl file." + "maxItems": 200, + "description": "An optional list of skills." } }, - "title": "EvalJsonlFileContentSource" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + } + ] }, - "OpenAI.EvalJsonlFileContentSourceContent": { - "type": "object", - "required": [ - "item" - ], - "properties": { - "item": { - "type": "object", - "additionalProperties": {} + "OpenAI.FunctionShellCallItemParamEnvironmentType": { + "anyOf": [ + { + "type": "string" }, - "sample": { - "type": "object", - "additionalProperties": {} + { + "type": "string", + "enum": [ + "local", + "container_reference" + ] } - } + ] }, - "OpenAI.EvalJsonlFileIdSource": { + "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": [ - "type", - "id" + "stdout", + "stderr", + "outcome" ], "properties": { - "type": { + "stdout": { "type": "string", - "enum": [ - "file_id" + "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": "The type of jsonl source. Always `file_id`.", - "x-stainless-const": true, - "default": "file_id" + "description": "Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.", + "title": "Shell call outcome" }, - "id": { + "created_by": { "type": "string", - "description": "The identifier of the file." + "description": "The identifier of the actor that created the item." } }, - "title": "EvalJsonlFileIdSource" + "description": "The content of a shell tool call output that was emitted.", + "title": "Shell call output content" }, - "OpenAI.EvalResponsesSource": { + "OpenAI.FunctionShellCallOutputContentParam": { "type": "object", "required": [ - "type" + "stdout", + "stderr", + "outcome" ], "properties": { - "type": { - "type": "string", - "enum": [ - "responses" - ], - "description": "The type of run data source. Always `responses`." - }, - "metadata": { - "type": "object", - "additionalProperties": {}, - "nullable": true - }, - "model": { + "stdout": { "type": "string", - "nullable": true + "maxLength": 10485760, + "description": "Captured stdout output for the shell call." }, - "instructions_search": { + "stderr": { "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 + "maxLength": 10485760, + "description": "Captured stderr output for the shell call." }, - "top_p": { - "type": "number", + "outcome": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" } ], - "nullable": true - }, - "users": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "tools": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true + "description": "The exit or timeout outcome associated with this shell call." } }, - "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" - } + "description": "Captured stdout and stderr for a portion of a shell tool call output.", + "title": "Shell output content" }, - "OpenAI.EvalRunOutputItemSample": { + "OpenAI.FunctionShellCallOutputExitOutcome": { "type": "object", "required": [ - "input", - "output", - "finish_reason", - "model", - "usage", - "error", - "temperature", - "max_completion_tokens", - "top_p", - "seed" + "type", + "exit_code" ], "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" + "type": { + "type": "string", + "enum": [ + "exit" + ], + "description": "The outcome type. Always `exit`.", + "x-stainless-const": true, + "default": "exit" }, - "seed": { - "$ref": "#/components/schemas/OpenAI.integer" + "exit_code": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "Exit code from the shell process." } - } - }, - "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" + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" } - } - }, - "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" - } - } + "description": "Indicates that the shell commands finished and returned an exit code.", + "title": "Shell call exit outcome" }, - "OpenAI.EvalRunPerTestingCriteriaResults": { + "OpenAI.FunctionShellCallOutputExitOutcomeParam": { "type": "object", "required": [ - "testing_criteria", - "passed", - "failed" + "type", + "exit_code" ], "properties": { - "testing_criteria": { - "type": "string" - }, - "passed": { - "$ref": "#/components/schemas/OpenAI.integer" + "type": { + "type": "string", + "enum": [ + "exit" + ], + "description": "The outcome type. Always `exit`.", + "x-stainless-const": true, + "default": "exit" }, - "failed": { - "$ref": "#/components/schemas/OpenAI.integer" + "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.EvalRunResultCounts": { + "OpenAI.FunctionShellCallOutputOutcome": { "type": "object", "required": [ - "total", - "errored", - "failed", - "passed" + "type" ], "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" + "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.EvalStoredCompletionsSource": { + "OpenAI.FunctionShellCallOutputOutcomeParam": { "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 + "$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" }, - "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 + "enum": [ + "timeout", + "exit" + ] + } + ] + }, + "OpenAI.FunctionShellCallOutputOutcomeType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "timeout", + "exit" + ] } - }, - "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": { + "OpenAI.FunctionShellCallOutputTimeoutOutcome": { "type": "object", "required": [ - "type", - "file_id", - "index", - "filename" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "file_citation" + "timeout" ], - "description": "The type of the file citation. Always `file_citation`.", + "description": "The outcome type. Always `timeout`.", "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." + "default": "timeout" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Annotation" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcome" } ], - "description": "A citation to a file.", - "title": "File citation" + "description": "Indicates that the shell call exceeded its configured time limit.", + "title": "Shell call timeout outcome" }, - "OpenAI.FilePath": { + "OpenAI.FunctionShellCallOutputTimeoutOutcomeParam": { "type": "object", "required": [ - "type", - "file_id", - "index" + "type" ], "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" - } + "timeout" ], - "description": "The index of the file in the list of files." + "description": "The outcome type. Always `timeout`.", + "x-stainless-const": true, + "default": "timeout" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Annotation" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" } ], - "description": "A path to a file.", - "title": "File path" + "description": "Indicates that the shell call exceeded its configured time limit.", + "title": "Shell call timeout outcome" }, - "OpenAI.FileSearchTool": { + "OpenAI.FunctionShellToolParam": { "type": "object", "required": [ - "type", - "vector_store_ids" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "file_search" + "shell" ], - "description": "The type of the file search tool. Always `file_search`.", + "description": "The type of the shell tool. Always `shell`.", "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." + "default": "shell" }, - "filters": { + "environment": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Filters" + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" } ], "nullable": true @@ -25523,122 +34638,56 @@ "$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" + "description": "A tool that allows the model to execute shell commands.", + "title": "Shell tool" }, - "OpenAI.FileSearchToolCallResults": { + "OpenAI.FunctionShellToolParamEnvironment": { "type": "object", + "required": [ + "type" + ], "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" + "type": { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentType" } - } - }, - "OpenAI.Filters": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComparisonFilter" - }, - { - "$ref": "#/components/schemas/OpenAI.CompoundFilter" + }, + "discriminator": { + "propertyName": "type", + "mapping": { + "local": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam", + "container_reference": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam", + "container_auto": "#/components/schemas/OpenAI.ContainerAutoParam" } - ] + } }, - "OpenAI.FineTuneDPOHyperparameters": { + "OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam": { "type": "object", + "required": [ + "type", + "container_id" + ], "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" - } + "type": { + "type": "string", + "enum": [ + "container_reference" ], - "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.", - "default": "auto" + "description": "References a container created with the /v1/containers endpoint", + "x-stainless-const": true, + "default": "container_reference" }, - "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" + "container_id": { + "type": "string", + "description": "The ID of the referenced container." } }, - "description": "The hyperparameters used for the DPO fine-tuning job." - }, - "OpenAI.FineTuneDPOMethod": { - "type": "object", - "properties": { - "hyperparameters": { - "$ref": "#/components/schemas/OpenAI.FineTuneDPOHyperparameters" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" } - }, - "description": "Configuration for the DPO fine-tuning method." + ] }, - "OpenAI.FineTuneMethod": { + "OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam": { "type": "object", "required": [ "type" @@ -25647,1010 +34696,931 @@ "type": { "type": "string", "enum": [ - "supervised", - "dpo", - "reinforcement" + "local" ], - "description": "The type of method. Is either `supervised`, `dpo`, or `reinforcement`." - }, - "supervised": { - "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedMethod" - }, - "dpo": { - "$ref": "#/components/schemas/OpenAI.FineTuneDPOMethod" + "description": "Use a local computer environment.", + "x-stainless-const": true, + "default": "local" }, - "reinforcement": { - "$ref": "#/components/schemas/OpenAI.FineTuneReinforcementMethod" + "skills": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LocalSkillParam" + }, + "maxItems": 200, + "description": "An optional list of skills." } }, - "description": "The method used for fine-tuning." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironment" + } + ] }, - "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" + "OpenAI.FunctionShellToolParamEnvironmentType": { + "anyOf": [ + { + "type": "string" }, - "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" + "container_auto", + "local", + "container_reference" + ] } - }, - "description": "The hyperparameters used for the reinforcement fine-tuning job." + ] }, - "OpenAI.FineTuneReinforcementMethod": { + "OpenAI.FunctionTool": { "type": "object", "required": [ - "grader" + "type", + "name", + "parameters", + "strict" ], "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" - } + "type": { + "type": "string", + "enum": [ + "function" ], - "description": "The grader used for the fine-tuning job." + "description": "The type of the function tool. Always `function`.", + "x-stainless-const": true, + "default": "function" }, - "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" + "name": { + "type": "string", + "description": "The name of the function to call." }, - "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" + "description": { + "type": "string", + "nullable": true }, - "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" + "parameters": { + "type": "object", + "additionalProperties": {}, + "nullable": true + }, + "strict": { + "type": "boolean", + "nullable": true } }, - "description": "The hyperparameters used for the fine-tuning job." - }, - "OpenAI.FineTuneSupervisedMethod": { - "type": "object", - "properties": { - "hyperparameters": { - "$ref": "#/components/schemas/OpenAI.FineTuneSupervisedHyperparameters" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" } - }, - "description": "Configuration for the supervised fine-tuning method." + ], + "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.FineTuningIntegration": { + "OpenAI.FunctionToolCallOutput": { "type": "object", "required": [ "type", - "wandb" + "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": [ - "wandb" + "function_call_output" ], - "description": "The type of the integration being enabled for the fine-tuning job", + "description": "The type of the function tool call output. Always `function_call_output`.", "x-stainless-const": true }, - "wandb": { - "allOf": [ + "call_id": { + "type": "string", + "description": "The unique ID of the function tool call generated by the model." + }, + "output": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.FineTuningIntegrationWandb" + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } } ], - "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." + "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." } }, - "title": "Fine-Tuning Job Integration" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ItemField" + } + ], + "description": "The output of a function tool call.", + "title": "Function tool call output" }, - "OpenAI.FineTuningIntegrationWandb": { + "OpenAI.GraderLabelModel": { "type": "object", "required": [ - "project" + "type", + "name", + "model", + "input", + "labels", + "passing_labels" ], "properties": { - "project": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "label_model" + ], + "description": "The object type, which is always `label_model`.", + "x-stainless-const": true }, "name": { "type": "string", - "nullable": true + "description": "The name of the grader." }, - "entity": { + "model": { "type": "string", - "nullable": true + "description": "The model to use for the evaluation. Must support structured outputs." }, - "tags": { + "input": { "type": "array", "items": { - "type": "string" + "$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.FineTuningJob": { + "OpenAI.GraderMulti": { "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" + "type", + "name", + "graders", + "calculate_output" ], "properties": { - "id": { + "type": { "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" - } + "enum": [ + "multi" ], - "nullable": true + "description": "The object type, which is always `multi`.", + "x-stainless-const": true, + "default": "multi" }, - "fine_tuned_model": { + "name": { "type": "string", - "nullable": true - }, - "finished_at": { - "type": "integer", - "format": "unixtime", - "nullable": true + "description": "The name of the grader." }, - "hyperparameters": { - "allOf": [ + "graders": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.FineTuningJobHyperparameters" + "$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" } - ], - "description": "The hyperparameters used for the fine-tuning job. This value will only be returned when running `supervised` jobs." + ] }, - "model": { + "calculate_output": { "type": "string", - "description": "The base model that is being fine-tuned." - }, - "object": { + "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": [ - "fine_tuning.job" + "python" ], - "description": "The object type, which is always \"fine_tuning.job\".", + "description": "The object type, which is always `python`.", "x-stainless-const": true }, - "organization_id": { + "name": { "type": "string", - "description": "The organization that owns the fine-tuning job." + "description": "The name of the grader." }, - "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)." + "source": { + "type": "string", + "description": "The source code of the python script." }, - "status": { + "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": [ - "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" - } + "score_model" ], - "nullable": true + "description": "The object type, which is always `score_model`.", + "x-stainless-const": true }, - "training_file": { + "name": { "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)." + "description": "The name of the grader." }, - "validation_file": { + "model": { "type": "string", - "nullable": true - }, - "integrations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FineTuningIntegration" - }, - "nullable": true + "description": "The model to use for the evaluation." }, - "seed": { + "sampling_params": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.EvalGraderScoreModelSamplingParams" } ], - "description": "The seed used for the fine-tuning job." - }, - "estimated_finish": { - "type": "integer", - "format": "unixtime", - "nullable": true + "description": "The sampling parameters for the model." }, - "method": { - "$ref": "#/components/schemas/OpenAI.FineTuneMethod" + "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." }, - "metadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Metadata" - } - ], - "nullable": true + "range": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "description": "The range of the score. Defaults to `[0, 1]`." } }, - "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.", - "title": "FineTuningJob", + "description": "A ScoreModelGrader object that uses a model to assign a score to the input.", + "title": "ScoreModelGrader", "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" + "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.FineTuningJobCheckpoint": { + "OpenAI.GraderStringCheck": { "type": "object", "required": [ - "id", - "created_at", - "fine_tuned_model_checkpoint", - "step_number", - "metrics", - "fine_tuning_job_id", - "object" + "type", + "name", + "input", + "reference", + "operation" ], "properties": { - "id": { + "type": { "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." + "enum": [ + "string_check" + ], + "description": "The object type, which is always `string_check`.", + "x-stainless-const": true }, - "fine_tuned_model_checkpoint": { + "name": { "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." + "description": "The name of the grader." }, - "metrics": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpointMetrics" - } - ], - "description": "Metrics at the step number during the fine-tuning job." + "input": { + "type": "string", + "description": "The input text. This may include template strings." }, - "fine_tuning_job_id": { + "reference": { "type": "string", - "description": "The name of the fine-tuning job that this checkpoint was created from." + "description": "The reference text. This may include template strings." }, - "object": { + "operation": { "type": "string", "enum": [ - "fine_tuning.job.checkpoint" + "eq", + "ne", + "like", + "ilike" ], - "description": "The object type, which is always \"fine_tuning.job.checkpoint\".", - "x-stainless-const": true + "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." } }, - "description": "The `fine_tuning.job.checkpoint` object represents a model checkpoint for a fine-tuning job that is ready to use.", - "title": "FineTuningJobCheckpoint", + "description": "A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.", + "title": "StringCheckGrader", "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" + "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.FineTuningJobCheckpointMetrics": { + "OpenAI.GraderTextSimilarity": { "type": "object", + "required": [ + "type", + "name", + "input", + "reference", + "evaluation_metric" + ], "properties": { - "step": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "train_loss": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "train_mean_token_accuracy": { - "$ref": "#/components/schemas/OpenAI.numeric" + "type": { + "type": "string", + "enum": [ + "text_similarity" + ], + "description": "The type of grader.", + "x-stainless-const": true, + "default": "text_similarity" }, - "valid_loss": { - "$ref": "#/components/schemas/OpenAI.numeric" + "name": { + "type": "string", + "description": "The name of the grader." }, - "valid_mean_token_accuracy": { - "$ref": "#/components/schemas/OpenAI.numeric" + "input": { + "type": "string", + "description": "The text being graded." }, - "full_valid_loss": { - "$ref": "#/components/schemas/OpenAI.numeric" + "reference": { + "type": "string", + "description": "The text being graded against." }, - "full_valid_mean_token_accuracy": { - "$ref": "#/components/schemas/OpenAI.numeric" + "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.FineTuningJobError": { + "OpenAI.GrammarSyntax1": { + "type": "string", + "enum": [ + "lark", + "regex" + ] + }, + "OpenAI.HybridSearchOptions": { "type": "object", "required": [ - "code", - "message", - "param" + "embedding_weight", + "text_weight" ], "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" + "embedding_weight": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The weight of the embedding in the reciprocal ranking fusion." }, - "param": { - "type": "string", - "nullable": true + "text_weight": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.numeric" + } + ], + "description": "The weight of the text in the reciprocal ranking fusion." } } }, - "OpenAI.FineTuningJobEvent": { + "OpenAI.ImageDetail": { + "type": "string", + "enum": [ + "low", + "high", + "auto" + ] + }, + "OpenAI.ImageGenActionEnum": { + "type": "string", + "enum": [ + "generate", + "edit", + "auto" + ] + }, + "OpenAI.ImageGenTool": { "type": "object", "required": [ - "object", - "id", - "created_at", - "level", - "message" + "type" ], "properties": { - "object": { + "type": { "type": "string", "enum": [ - "fine_tuning.job.event" + "image_generation" ], - "description": "The object type, which is always \"fine_tuning.job.event\".", - "x-stainless-const": true + "description": "The type of the image generation tool. Always `image_generation`.", + "x-stainless-const": true, + "default": "image_generation" }, - "id": { + "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", - "description": "The object identifier." + "enum": [ + "low", + "medium", + "high", + "auto" + ], + "description": "The quality of the generated image. One of `low`, `medium`, `high`,\n or `auto`. Default: `auto`.", + "default": "auto" }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created." + "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" }, - "level": { + "output_format": { "type": "string", "enum": [ - "info", - "warn", - "error" + "png", + "webp", + "jpeg" ], - "description": "The log level of the event." + "description": "The output format of the generated image. One of `png`, `webp`, or\n `jpeg`. Default: `png`.", + "default": "png" }, - "message": { + "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", - "description": "The message of the event." + "enum": [ + "auto", + "low" + ], + "description": "Moderation level for the generated image. Default: `auto`.", + "default": "auto" }, - "type": { + "background": { "type": "string", "enum": [ - "message", - "metrics" + "transparent", + "opaque", + "auto" ], - "description": "The type of event." + "description": "Background type for the generated image. One of `transparent`,\n `opaque`, or `auto`. Default: `auto`.", + "default": "auto" }, - "data": { + "input_fidelity": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FineTuningJobEventData" + "$ref": "#/components/schemas/OpenAI.InputFidelity" } ], - "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 - }, + "nullable": true + }, + "input_image_mask": { + "allOf": [ { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true + "$ref": "#/components/schemas/OpenAI.ImageGenToolInputImageMask" } ], - "default": "auto" + "description": "Optional mask for inpainting. Contains `image_url`\n (string, optional) and `file_id` (string, optional)." }, - "learning_rate_multiplier": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, + "partial_images": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "default": "auto" + "minimum": 0, + "maximum": 3, + "description": "Number of partial images to generate in streaming mode, from 0 (default value) to 3." }, - "n_epochs": { - "oneOf": [ - { - "type": "string", - "enum": [ - "auto" - ] - }, + "action": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ImageGenActionEnum" } ], - "default": "auto" - } - } - }, - "OpenAI.FunctionAndCustomToolCallOutput": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputType" + "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." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "input_text": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputTextContent", - "input_image": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputImageContent", - "input_file": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutputInputFileContent" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" } - } + ], + "description": "A tool that generates images using the GPT image models.", + "title": "Image generation tool" }, - "OpenAI.FunctionAndCustomToolCallOutputInputFileContent": { + "OpenAI.ImageGenToolInputImageMask": { "type": "object", - "required": [ - "type" - ], "properties": { - "type": { + "image_url": { "type": "string", - "enum": [ - "input_file" - ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" + "format": "uri" }, "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." + "type": "string" } - }, - "allOf": [ + } + }, + "OpenAI.IncludeEnum": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + "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": "A file input to the model.", - "title": "Input file" + "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.FunctionAndCustomToolCallOutputInputImageContent": { + "OpenAI.InlineSkillParam": { "type": "object", "required": [ "type", - "detail" + "name", + "description", + "source" ], "properties": { "type": { "type": "string", "enum": [ - "input_image" + "inline" ], - "description": "The type of the input item. Always `input_image`.", + "description": "Defines an inline skill for this request.", "x-stainless-const": true, - "default": "input_image" + "default": "inline" }, - "image_url": { + "name": { "type": "string", - "format": "uri", - "nullable": true + "description": "The name of the skill." }, - "file_id": { + "description": { "type": "string", - "nullable": true + "description": "The description of the skill." }, - "detail": { + "source": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ImageDetail" + "$ref": "#/components/schemas/OpenAI.InlineSkillSourceParam" } ], - "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + "description": "Inline skill payload" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + "$ref": "#/components/schemas/OpenAI.ContainerSkill" } - ], - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" + ] }, - "OpenAI.FunctionAndCustomToolCallOutputInputTextContent": { + "OpenAI.InlineSkillSourceParam": { "type": "object", "required": [ "type", - "text" + "media_type", + "data" ], "properties": { "type": { "type": "string", "enum": [ - "input_text" + "base64" ], - "description": "The type of the input item. Always `input_text`.", + "description": "The type of the inline skill source. Must be `base64`.", "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" + "default": "base64" }, - { + "media_type": { "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." + "application/zip" + ], + "description": "The media type of the inline skill payload. Must be `application/zip`.", + "x-stainless-const": true, + "default": "application/zip" }, - "name": { + "data": { "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 + "minLength": 1, + "maxLength": 70254592, + "description": "Base64-encoded skill zip bundle." } - } - }, - "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." + }, + "description": "Inline skill payload" }, - "OpenAI.FunctionShellAction": { + "OpenAI.InputAudio": { "type": "object", "required": [ - "commands", - "timeout_ms", - "max_output_length" + "type", + "input_audio" ], "properties": { - "commands": { - "type": "array", - "items": { - "type": "string" - } - }, - "timeout_ms": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "type": { + "type": "string", + "enum": [ + "input_audio" ], - "nullable": true + "description": "The type of the input item. Always `input_audio`.", + "x-stainless-const": true }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true + "input_audio": { + "$ref": "#/components/schemas/OpenAI.InputAudioInputAudio" } }, - "description": "Execute a shell command.", - "title": "Shell exec action" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.EvalItemContentItemObject" + } + ], + "description": "An audio input to the model.", + "title": "Input audio" }, - "OpenAI.FunctionShellActionParam": { + "OpenAI.InputAudioInputAudio": { "type": "object", "required": [ - "commands" + "data", + "format" ], "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 + "data": { + "type": "string" }, - "max_output_length": { - "type": "integer", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "nullable": true + "format": { + "type": "string", + "enum": [ + "mp3", + "wav" + ] } - }, - "description": "Commands and limits describing how to run the shell tool call.", - "title": "Shell action" + } }, - "OpenAI.FunctionShellCallEnvironment": { + "OpenAI.InputContent": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironmentType" + "$ref": "#/components/schemas/OpenAI.InputContentType" } }, "discriminator": { "propertyName": "type", "mapping": { - "local": "#/components/schemas/OpenAI.LocalEnvironmentResource", - "container_reference": "#/components/schemas/OpenAI.ContainerReferenceResource" + "input_text": "#/components/schemas/OpenAI.InputContentInputTextContent", + "input_image": "#/components/schemas/OpenAI.InputContentInputImageContent", + "input_file": "#/components/schemas/OpenAI.InputContentInputFileContent" } } }, - "OpenAI.FunctionShellCallEnvironmentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "local", - "container_reference" - ] - } - ] - }, - "OpenAI.FunctionShellCallItemParamEnvironment": { + "OpenAI.InputContentInputFileContent": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentType" + "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." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "local": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam", - "container_reference": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputContent" } - }, - "description": "The environment to execute the shell commands in." + ], + "description": "A file input to the model.", + "title": "Input file" }, - "OpenAI.FunctionShellCallItemParamEnvironmentContainerReferenceParam": { + "OpenAI.InputContentInputImageContent": { "type": "object", "required": [ "type", - "container_id" + "detail" ], "properties": { "type": { "type": "string", "enum": [ - "container_reference" + "input_image" ], - "description": "References a container created with the /v1/containers endpoint", + "description": "The type of the input item. Always `input_image`.", "x-stainless-const": true, - "default": "container_reference" + "default": "input_image" }, - "container_id": { + "image_url": { "type": "string", - "description": "The ID of the referenced container." + "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.FunctionShellCallItemParamEnvironment" + "$ref": "#/components/schemas/OpenAI.InputContent" } - ] + ], + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" }, - "OpenAI.FunctionShellCallItemParamEnvironmentLocalEnvironmentParam": { + "OpenAI.InputContentInputTextContent": { "type": "object", "required": [ - "type" + "type", + "text" ], "properties": { "type": { "type": "string", "enum": [ - "local" + "input_text" ], - "description": "Use a local computer environment.", + "description": "The type of the input item. Always `input_text`.", "x-stainless-const": true, - "default": "local" + "default": "input_text" }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.LocalSkillParam" - }, - "maxItems": 200, - "description": "An optional list of skills." + "text": { + "type": "string", + "description": "The text input to the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + "$ref": "#/components/schemas/OpenAI.InputContent" } - ] + ], + "description": "A text input to the model.", + "title": "Input text" }, - "OpenAI.FunctionShellCallItemParamEnvironmentType": { + "OpenAI.InputContentType": { "anyOf": [ { "type": "string" @@ -26658,480 +35628,883 @@ { "type": "string", "enum": [ - "local", - "container_reference" + "input_text", + "input_image", + "input_file" ] } ] }, - "OpenAI.FunctionShellCallItemStatus": { + "OpenAI.InputFidelity": { "type": "string", "enum": [ - "in_progress", - "completed", - "incomplete" + "high", + "low" ], - "description": "Status values reported for shell tool calls.", - "title": "Shell call status" + "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.FunctionShellCallOutputContent": { + "OpenAI.InputFileContent": { "type": "object", "required": [ - "stdout", - "stderr", - "outcome" + "type" ], "properties": { - "stdout": { + "type": { "type": "string", - "description": "The standard output that was captured." + "enum": [ + "input_file" + ], + "description": "The type of the input item. Always `input_file`.", + "x-stainless-const": true, + "default": "input_file" }, - "stderr": { + "file_id": { "type": "string", - "description": "The standard error output that was captured." + "nullable": true }, - "outcome": { + "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.FunctionShellCallOutputOutcome" + "$ref": "#/components/schemas/OpenAI.ImageDetail" } ], - "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 detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." } }, - "description": "The content of a shell tool call output that was emitted.", - "title": "Shell call output content" + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" }, - "OpenAI.FunctionShellCallOutputContentParam": { + "OpenAI.InputImageContentParamAutoParam": { "type": "object", "required": [ - "stdout", - "stderr", - "outcome" + "type" ], "properties": { - "stdout": { + "type": { "type": "string", - "maxLength": 10485760, - "description": "Captured stdout output for the shell call." + "enum": [ + "input_image" + ], + "description": "The type of the input item. Always `input_image`.", + "x-stainless-const": true, + "default": "input_image" }, - "stderr": { + "image_url": { "type": "string", - "maxLength": 10485760, - "description": "Captured stderr output for the shell call." + "format": "uri", + "nullable": true }, - "outcome": { + "file_id": { + "type": "string", + "nullable": true + }, + "detail": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParam" + "$ref": "#/components/schemas/OpenAI.DetailEnum" } ], - "description": "The exit or timeout outcome associated with this shell call." + "nullable": true } }, - "description": "Captured stdout and stderr for a portion of a shell tool call output.", - "title": "Shell output content" + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision)", + "title": "Input image" }, - "OpenAI.FunctionShellCallOutputExitOutcome": { + "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", - "exit_code" + "call_id", + "status", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "exit" + "apply_patch_call" ], - "description": "The outcome type. Always `exit`.", + "description": "The type of the item. Always `apply_patch_call`.", "x-stainless-const": true, - "default": "exit" + "default": "apply_patch_call" }, - "exit_code": { + "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.integer" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatusParam" } ], - "description": "Exit code from the shell process." + "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.FunctionShellCallOutputOutcome" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "Indicates that the shell commands finished and returned an exit code.", - "title": "Shell call exit outcome" + "description": "A tool call representing a request to create, delete, or update files using diff patches.", + "title": "Apply patch tool call" }, - "OpenAI.FunctionShellCallOutputExitOutcomeParam": { + "OpenAI.InputItemApplyPatchToolCallOutputItemParam": { "type": "object", "required": [ "type", - "exit_code" + "call_id", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "exit" + "apply_patch_call_output" ], - "description": "The outcome type. Always `exit`.", + "description": "The type of the item. Always `apply_patch_call_output`.", "x-stainless-const": true, - "default": "exit" + "default": "apply_patch_call_output" }, - "exit_code": { + "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.integer" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatusParam" } ], - "description": "The exit code returned by the shell process." + "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.FunctionShellCallOutputOutcomeParam" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "Indicates that the shell commands finished and returned an exit code.", - "title": "Shell call exit outcome" + "description": "The streamed output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" }, - "OpenAI.FunctionShellCallOutputOutcome": { + "OpenAI.InputItemCodeInterpreterToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "status", + "container_id", + "code", + "outputs" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeType" + "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 } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "timeout": "#/components/schemas/OpenAI.FunctionShellCallOutputTimeoutOutcome", - "exit": "#/components/schemas/OpenAI.FunctionShellCallOutputExitOutcome" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" } - }, - "description": "Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk.", - "title": "Shell call outcome" + ], + "description": "A tool call to run code.", + "title": "Code interpreter tool call" }, - "OpenAI.FunctionShellCallOutputOutcomeParam": { + "OpenAI.InputItemCompactionSummaryItemParam": { "type": "object", "required": [ - "type" + "type", + "encrypted_content" ], "properties": { + "id": { + "type": "string", + "nullable": true + }, "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputOutcomeParamType" + "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." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "timeout": "#/components/schemas/OpenAI.FunctionShellCallOutputTimeoutOutcomeParam", - "exit": "#/components/schemas/OpenAI.FunctionShellCallOutputExitOutcomeParam" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" } - }, - "description": "The exit or timeout outcome associated with this shell call.", - "title": "Shell call outcome" + ], + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" }, - "OpenAI.FunctionShellCallOutputOutcomeParamType": { - "anyOf": [ - { - "type": "string" + "OpenAI.InputItemComputerCallOutputItemParam": { + "type": "object", + "required": [ + "call_id", + "type", + "output" + ], + "properties": { + "id": { + "type": "string", + "nullable": true }, - { + "call_id": { "type": "string", - "enum": [ - "timeout", - "exit" - ] - } - ] - }, - "OpenAI.FunctionShellCallOutputOutcomeType": { - "anyOf": [ - { - "type": "string" + "minLength": 1, + "maxLength": 64, + "description": "The ID of the computer tool call that produced the output." }, - { + "type": { "type": "string", "enum": [ - "timeout", - "exit" - ] + "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.FunctionShellCallOutputTimeoutOutcome": { + "OpenAI.InputItemComputerToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "timeout" + "computer_call" ], - "description": "The outcome type. Always `timeout`.", - "x-stainless-const": true, - "default": "timeout" + "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.FunctionShellCallOutputOutcome" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "Indicates that the shell call exceeded its configured time limit.", - "title": "Shell call timeout outcome" + "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.FunctionShellCallOutputTimeoutOutcomeParam": { + "OpenAI.InputItemCustomToolCall": { "type": "object", "required": [ - "type" + "type", + "call_id", + "name", + "input" ], "properties": { "type": { "type": "string", "enum": [ - "timeout" + "custom_tool_call" ], - "description": "The outcome type. Always `timeout`.", - "x-stainless-const": true, - "default": "timeout" + "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.FunctionShellCallOutputOutcomeParam" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "Indicates that the shell call exceeded its configured time limit.", - "title": "Shell call timeout outcome" + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" }, - "OpenAI.FunctionShellToolParam": { + "OpenAI.InputItemCustomToolCallOutput": { "type": "object", "required": [ - "type" + "type", + "call_id", + "output" ], "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" - } + "custom_tool_call_output" ], - "nullable": true + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "The unique ID of the custom tool call output in the OpenAI platform." }, - "description": { + "call_id": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "A tool that allows the model to execute shell commands.", - "title": "Shell tool" + "description": "The output of a custom tool call from your code, being sent back to the model.", + "title": "Custom tool call output" }, - "OpenAI.FunctionShellToolParamEnvironment": { + "OpenAI.InputItemFileSearchToolCall": { "type": "object", "required": [ - "type" + "id", + "type", + "status", + "queries" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the file search tool call." + }, "type": { - "$ref": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentType" + "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 } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "local": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam", - "container_reference": "#/components/schemas/OpenAI.FunctionShellToolParamEnvironmentContainerReferenceParam", - "container_auto": "#/components/schemas/OpenAI.ContainerAutoParam" + "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.FunctionShellToolParamEnvironmentContainerReferenceParam": { + "OpenAI.InputItemFunctionCallOutputItemParam": { "type": "object", "required": [ + "call_id", "type", - "container_id" + "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": [ - "container_reference" + "function_call_output" ], - "description": "References a container created with the /v1/containers endpoint", + "description": "The type of the function tool call output. Always `function_call_output`.", "x-stainless-const": true, - "default": "container_reference" + "default": "function_call_output" }, - "container_id": { - "type": "string", - "description": "The ID of the referenced container." + "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.FunctionShellToolParamEnvironment" + "$ref": "#/components/schemas/OpenAI.InputItem" } - ] + ], + "description": "The output of a function tool call.", + "title": "Function tool call output" }, - "OpenAI.FunctionShellToolParamEnvironmentLocalEnvironmentParam": { + "OpenAI.InputItemFunctionShellCallItemParam": { "type": "object", "required": [ - "type" + "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": [ - "local" + "shell_call" ], - "description": "Use a local computer environment.", + "description": "The type of the item. Always `shell_call`.", "x-stainless-const": true, - "default": "local" + "default": "shell_call" }, - "skills": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.LocalSkillParam" - }, - "maxItems": 200, - "description": "An optional list of skills." + "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.FunctionShellToolParamEnvironment" - } - ] - }, - "OpenAI.FunctionShellToolParamEnvironmentType": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "container_auto", - "local", - "container_reference" - ] + "$ref": "#/components/schemas/OpenAI.InputItem" } - ] + ], + "description": "A tool representing a request to execute one or more shell commands.", + "title": "Shell tool call" }, - "OpenAI.FunctionTool": { + "OpenAI.InputItemFunctionShellCallOutputItemParam": { "type": "object", "required": [ + "call_id", "type", - "name", - "parameters", - "strict" + "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": [ - "function" + "shell_call_output" ], - "description": "The type of the function tool. Always `function`.", + "description": "The type of the item. Always `shell_call_output`.", "x-stainless-const": true, - "default": "function" - }, - "name": { - "type": "string", - "description": "The name of the function to call." + "default": "shell_call_output" }, - "description": { - "type": "string", - "nullable": true + "output": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContentParam" + }, + "description": "Captured chunks of stdout and stderr output, along with their associated outcomes." }, - "parameters": { - "type": "object", - "additionalProperties": {}, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + } + ], "nullable": true }, - "strict": { - "type": "boolean", + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "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" + "description": "The streamed output items emitted by a shell tool call.", + "title": "Shell tool call output" }, - "OpenAI.FunctionToolCallOutput": { + "OpenAI.InputItemFunctionToolCall": { "type": "object", "required": [ "type", "call_id", - "output" + "name", + "arguments" ], "properties": { "id": { "type": "string", - "description": "The unique ID of the function tool call output. Populated when this item\n is returned via API." + "description": "The unique ID of the function tool call." }, "type": { "type": "string", "enum": [ - "function_call_output" + "function_call" ], - "description": "The type of the function tool call output. Always `function_call_output`.", + "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." }, - "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." + "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", @@ -27145,526 +36518,449 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "description": "The output of a function tool call.", - "title": "Function tool call output" + "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.GraderLabelModel": { + "OpenAI.InputItemImageGenToolCall": { "type": "object", "required": [ "type", - "name", - "model", - "input", - "labels", - "passing_labels" + "id", + "status", + "result" ], "properties": { "type": { "type": "string", "enum": [ - "label_model" + "image_generation_call" ], - "description": "The object type, which is always `label_model`.", + "description": "The type of the image generation call. Always `image_generation_call`.", "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the image generation call." }, - "model": { + "status": { "type": "string", - "description": "The model to use for the evaluation. Must support structured outputs." + "enum": [ + "in_progress", + "completed", + "generating", + "failed" + ], + "description": "The status of the image generation call." }, - "input": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalItem" - } + "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 }, - "labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels to assign to each item in the evaluation." + "id": { + "type": "string", + "description": "The unique ID of the local shell call." }, - "passing_labels": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The labels that indicate a passing result. Must be a subset of labels." + "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." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" }, - "OpenAI.GraderMulti": { + "OpenAI.InputItemLocalShellToolCallOutput": { "type": "object", "required": [ "type", - "name", - "graders", - "calculate_output" + "id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "multi" + "local_shell_call_output" ], - "description": "The object type, which is always `multi`.", - "x-stainless-const": true, - "default": "multi" + "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", + "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the local shell tool call generated by the model." }, - "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" - } - ] + "output": { + "type": "string", + "description": "A JSON string of the output of the local shell tool call." }, - "calculate_output": { + "status": { "type": "string", - "description": "A formula to calculate the output based on grader results." + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "nullable": true } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "The output of a local shell tool call.", + "title": "Local shell call output" }, - "OpenAI.GraderPython": { + "OpenAI.InputItemMcpApprovalRequest": { "type": "object", "required": [ "type", + "id", + "server_label", "name", - "source" + "arguments" ], "properties": { "type": { "type": "string", "enum": [ - "python" + "mcp_approval_request" ], - "description": "The object type, which is always `python`.", + "description": "The type of the item. Always `mcp_approval_request`.", "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the approval request." }, - "source": { + "server_label": { "type": "string", - "description": "The source code of the python script." + "description": "The label of the MCP server making the request." }, - "image_tag": { + "name": { "type": "string", - "description": "The image tag to use for the python script." + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" }, - "OpenAI.GraderScoreModel": { + "OpenAI.InputItemMcpApprovalResponse": { "type": "object", "required": [ "type", - "name", - "model", - "input" + "approval_request_id", + "approve" ], "properties": { "type": { "type": "string", "enum": [ - "score_model" + "mcp_approval_response" ], - "description": "The object type, which is always `score_model`.", + "description": "The type of the item. Always `mcp_approval_response`.", "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "nullable": true }, - "model": { + "approval_request_id": { "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." + "description": "The ID of the approval request being answered." }, - "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." + "approve": { + "type": "boolean", + "description": "Whether the request was approved." }, - "range": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - "description": "The range of the score. Defaults to `[0, 1]`." + "reason": { + "type": "string", + "nullable": true } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A response to an MCP approval request.", + "title": "MCP approval response" }, - "OpenAI.GraderStringCheck": { + "OpenAI.InputItemMcpListTools": { "type": "object", "required": [ "type", - "name", - "input", - "reference", - "operation" + "id", + "server_label", + "tools" ], "properties": { "type": { "type": "string", "enum": [ - "string_check" + "mcp_list_tools" ], - "description": "The object type, which is always `string_check`.", + "description": "The type of the item. Always `mcp_list_tools`.", "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the list." }, - "input": { + "server_label": { "type": "string", - "description": "The input text. This may include template strings." + "description": "The label of the MCP server." }, - "reference": { - "type": "string", - "description": "The reference text. This may include template strings." + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + }, + "description": "The tools available on the server." }, - "operation": { + "error": { "type": "string", - "enum": [ - "eq", - "ne", - "like", - "ilike" - ], - "description": "The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`." + "nullable": true } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" }, - "OpenAI.GraderTextSimilarity": { + "OpenAI.InputItemMcpToolCall": { "type": "object", "required": [ "type", + "id", + "server_label", "name", - "input", - "reference", - "evaluation_metric" + "arguments" ], "properties": { "type": { "type": "string", "enum": [ - "text_similarity" + "mcp_call" ], - "description": "The type of grader.", - "x-stainless-const": true, - "default": "text_similarity" + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "The name of the grader." + "description": "The unique ID of the tool call." }, - "input": { + "server_label": { "type": "string", - "description": "The text being graded." + "description": "The label of the MCP server running the tool." }, - "reference": { + "name": { "type": "string", - "description": "The text being graded against." + "description": "The name of the tool that was run." }, - "evaluation_metric": { + "arguments": { "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." + "description": "A JSON string of the arguments passed to the tool." }, - "text_weight": { + "output": { + "type": "string", + "nullable": true + }, + "error": { + "type": "object", + "additionalProperties": {} + }, + "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" } ], - "description": "The weight of the text in the reciprocal ranking fusion." + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + }, + "approval_request_id": { + "type": "string", + "nullable": true } - } - }, - "OpenAI.ImageDetail": { - "type": "string", - "enum": [ - "low", - "high", - "auto" - ] - }, - "OpenAI.ImageGenActionEnum": { - "type": "string", - "enum": [ - "generate", - "edit", - "auto" - ] + }, + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.InputItem" + } + ], + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" }, - "OpenAI.ImageGenTool": { + "OpenAI.InputItemOutputMessage": { "type": "object", "required": [ - "type" + "id", + "type", + "role", + "content", + "status" ], "properties": { - "type": { + "id": { "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" + "description": "The unique ID of the output message." }, - "quality": { + "type": { "type": "string", "enum": [ - "low", - "medium", - "high", - "auto" + "output_message" ], - "description": "The quality of the generated image. One of `low`, `medium`, `high`,\n or `auto`. Default: `auto`.", - "default": "auto" + "description": "The type of the output message. Always `message`.", + "x-stainless-const": true }, - "size": { + "role": { "type": "string", "enum": [ - "1024x1024", - "1024x1536", - "1536x1024", - "auto" + "assistant" ], - "description": "The size of the generated image. One of `1024x1024`, `1024x1536`,\n `1536x1024`, or `auto`. Default: `auto`.", - "default": "auto" + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true }, - "output_format": { + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" + }, + "description": "The content of the output message." + }, + "status": { "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" - } + "in_progress", + "completed", + "incomplete" ], - "minimum": 0, - "maximum": 100, - "description": "Compression level for the output image. Default: 100.", - "default": 100 - }, - "moderation": { + "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": [ - "auto", - "low" + "reasoning" ], - "description": "Moderation level for the generated image. Default: `auto`.", - "default": "auto" + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true }, - "background": { + "id": { "type": "string", - "enum": [ - "transparent", - "opaque", - "auto" - ], - "description": "Background type for the generated image. One of `transparent`,\n `opaque`, or `auto`. Default: `auto`.", - "default": "auto" + "description": "The unique identifier of the reasoning content." }, - "input_fidelity": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputFidelity" - } - ], + "encrypted_content": { + "type": "string", "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`." + "summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + }, + "description": "Reasoning summary content." }, - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + }, + "description": "Reasoning text content." }, - "description": { + "status": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.InputItem" } ], - "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" - } - } + "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.IncludeEnum": { + "OpenAI.InputItemType": { "anyOf": [ { "type": "string" @@ -27672,487 +36968,741 @@ { "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" + "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" ] } - ], - "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": { + "OpenAI.InputItemWebSearchToolCall": { "type": "object", "required": [ + "id", "type", - "name", - "description", - "source" + "status", + "action" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, "type": { "type": "string", "enum": [ - "inline" + "web_search_call" ], - "description": "Defines an inline skill for this request.", - "x-stainless-const": true, - "default": "inline" - }, - "name": { - "type": "string", - "description": "The name of the skill." + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true }, - "description": { + "status": { "type": "string", - "description": "The description of the skill." + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." }, - "source": { - "allOf": [ + "action": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.InlineSkillSourceParam" + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" } ], - "description": "Inline skill payload" + "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.ContainerSkill" + "$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.InlineSkillSourceParam": { + "OpenAI.InputMessage": { "type": "object", "required": [ "type", - "media_type", - "data" + "role", + "content" ], "properties": { "type": { "type": "string", "enum": [ - "base64" + "message" ], - "description": "The type of the inline skill source. Must be `base64`.", - "x-stainless-const": true, - "default": "base64" + "description": "The type of the message input. Always set to `message`.", + "x-stainless-const": true }, - "media_type": { + "role": { "type": "string", "enum": [ - "application/zip" + "user", + "system", + "developer" ], - "description": "The media type of the inline skill payload. Must be `application/zip`.", - "x-stainless-const": true, - "default": "application/zip" + "description": "The role of the message input. One of `user`, `system`, or `developer`." }, - "data": { + "status": { "type": "string", - "minLength": 1, - "maxLength": 70254592, - "description": "Base64-encoded skill zip bundle." + "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" } }, - "description": "Inline skill payload" + "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.InputAudio": { + "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", - "input_audio" + "role", + "content", + "id" ], "properties": { "type": { "type": "string", "enum": [ - "input_audio" + "message" ], - "description": "The type of the input item. Always `input_audio`.", + "description": "The type of the message input. Always set to `message`.", "x-stainless-const": true }, - "input_audio": { - "$ref": "#/components/schemas/OpenAI.InputAudioInputAudio" + "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.EvalItemContentItemObject" + "$ref": "#/components/schemas/OpenAI.ItemResource" + } + ] + }, + "OpenAI.InputParam": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.InputItem" + } } ], - "description": "An audio input to the model.", - "title": "Input audio" + "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.InputAudioInputAudio": { + "OpenAI.InputTextContent": { "type": "object", "required": [ - "data", - "format" + "type", + "text" ], "properties": { - "data": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "input_text" + ], + "description": "The type of the input item. Always `input_text`.", + "x-stainless-const": true, + "default": "input_text" }, - "format": { + "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": [ - "mp3", - "wav" - ] + "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.InputContent": { + "OpenAI.Item": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.InputContentType" + "$ref": "#/components/schemas/OpenAI.ItemType" } }, "discriminator": { "propertyName": "type", "mapping": { - "input_text": "#/components/schemas/OpenAI.InputContentInputTextContent", - "input_image": "#/components/schemas/OpenAI.InputContentInputImageContent", - "input_file": "#/components/schemas/OpenAI.InputContentInputFileContent" + "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.InputContentInputFileContent": { + "OpenAI.ItemApplyPatchToolCallItemParam": { "type": "object", "required": [ - "type" + "type", + "call_id", + "status", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "input_file" + "apply_patch_call" ], - "description": "The type of the input item. Always `input_file`.", + "description": "The type of the item. Always `apply_patch_call`.", "x-stainless-const": true, - "default": "input_file" + "default": "apply_patch_call" }, - "file_id": { + "id": { "type": "string", "nullable": true }, - "filename": { + "call_id": { "type": "string", - "description": "The name of the file to be sent to the model." + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the apply patch tool call generated by the model." }, - "file_url": { - "type": "string", - "format": "uri", - "description": "The URL of the file to be sent to the model." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatusParam" + } + ], + "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." }, - "file_data": { - "type": "string", - "description": "The content of the file to be sent to the model." + "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.InputContent" + "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "A file input to the model.", - "title": "Input file" + "description": "A tool call representing a request to create, delete, or update files using diff patches.", + "title": "Apply patch tool call" }, - "OpenAI.InputContentInputImageContent": { + "OpenAI.ItemApplyPatchToolCallOutputItemParam": { "type": "object", "required": [ "type", - "detail" + "call_id", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "input_image" + "apply_patch_call_output" ], - "description": "The type of the input item. Always `input_image`.", + "description": "The type of the item. Always `apply_patch_call_output`.", "x-stainless-const": true, - "default": "input_image" + "default": "apply_patch_call_output" }, - "image_url": { + "id": { "type": "string", - "format": "uri", "nullable": true }, - "file_id": { + "call_id": { "type": "string", - "nullable": true + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the apply patch tool call generated by the model." }, - "detail": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ImageDetail" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatusParam" } ], - "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + "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.InputContent" + "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" + "description": "The streamed output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" }, - "OpenAI.InputContentInputTextContent": { + "OpenAI.ItemCodeInterpreterToolCall": { "type": "object", "required": [ "type", - "text" + "id", + "status", + "container_id", + "code", + "outputs" ], "properties": { "type": { "type": "string", "enum": [ - "input_text" + "code_interpreter_call" ], - "description": "The type of the input item. Always `input_text`.", + "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", "x-stainless-const": true, - "default": "input_text" + "default": "code_interpreter_call" }, - "text": { + "id": { "type": "string", - "description": "The text input to the model." + "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.InputContent" + "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "A text input to the model.", - "title": "Input text" + "description": "A tool call to run code.", + "title": "Code interpreter tool call" }, - "OpenAI.InputContentType": { - "anyOf": [ - { - "type": "string" + "OpenAI.ItemCompactionSummaryItemParam": { + "type": "object", + "required": [ + "type", + "encrypted_content" + ], + "properties": { + "id": { + "type": "string", + "nullable": true }, - { + "type": { "type": "string", "enum": [ - "input_text", - "input_image", - "input_file" - ] + "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" } - ] - }, - "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`." + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" }, - "OpenAI.InputFileContent": { + "OpenAI.ItemComputerCallOutputItemParam": { "type": "object", "required": [ - "type" + "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": [ - "input_file" + "computer_call_output" ], - "description": "The type of the input item. Always `input_file`.", + "description": "The type of the computer tool call output. Always `computer_call_output`.", "x-stainless-const": true, - "default": "input_file" - }, - "file_id": { - "type": "string", - "nullable": true + "default": "computer_call_output" }, - "filename": { - "type": "string", - "description": "The name of the file to be sent to the model." + "output": { + "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" }, - "file_url": { - "type": "string", - "format": "uri", - "description": "The URL of the file to be sent to the model." + "acknowledged_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "nullable": true }, - "file_data": { - "type": "string", - "description": "The content of the file to be sent to the model." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" + } + ], + "nullable": true } }, - "description": "A file input to the model.", - "title": "Input file" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The output of a computer tool call.", + "title": "Computer tool call output" }, - "OpenAI.InputFileContentParam": { + "OpenAI.ItemComputerToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "call_id", + "action", + "pending_safety_checks", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "input_file" + "computer_call" ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" }, - "file_id": { + "id": { "type": "string", - "nullable": true + "description": "The unique ID of the computer call." }, - "filename": { + "call_id": { "type": "string", - "nullable": true + "description": "An identifier used when responding to the tool call with output." }, - "file_data": { - "type": "string", - "nullable": true + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" }, - "file_url": { + "pending_safety_checks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + }, + "description": "The pending safety checks for the computer call." + }, + "status": { "type": "string", - "format": "uri", - "nullable": true + "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." } }, - "description": "A file input to the model.", - "title": "Input file" + "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.InputImageContent": { + "OpenAI.ItemCustomToolCall": { "type": "object", "required": [ "type", - "detail" + "call_id", + "name", + "input" ], "properties": { "type": { "type": "string", "enum": [ - "input_image" + "custom_tool_call" ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" + "description": "The type of the custom tool call. Always `custom_tool_call`.", + "x-stainless-const": true }, - "image_url": { + "id": { "type": "string", - "format": "uri", - "nullable": true + "description": "The unique ID of the custom tool call in the OpenAI platform." }, - "file_id": { + "call_id": { "type": "string", - "nullable": true + "description": "An identifier used to map this custom tool call to a tool call output." }, - "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`." + "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." } }, - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" }, - "OpenAI.InputImageContentParamAutoParam": { + "OpenAI.ItemCustomToolCallOutput": { "type": "object", "required": [ - "type" + "type", + "call_id", + "output" ], "properties": { "type": { "type": "string", "enum": [ - "input_image" + "custom_tool_call_output" ], - "description": "The type of the input item. Always `input_image`.", - "x-stainless-const": true, - "default": "input_image" + "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", + "x-stainless-const": true }, - "image_url": { + "id": { "type": "string", - "format": "uri", - "nullable": true + "description": "The unique ID of the custom tool call output in the OpenAI platform." }, - "file_id": { + "call_id": { "type": "string", - "nullable": true + "description": "The call ID, used to map this custom tool call output to a custom tool call." }, - "detail": { - "allOf": [ + "output": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.DetailEnum" + "type": "string" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FunctionAndCustomToolCallOutput" + } } ], - "nullable": true + "description": "The output from the custom tool call generated by your code.\n Can be a string or an list of output content." } }, - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision)", - "title": "Input image" + "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.InputItem": { + "OpenAI.ItemField": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.InputItemType" + "$ref": "#/components/schemas/OpenAI.ItemFieldType" } }, "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" + "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 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." + "description": "An item representing a message, tool call, tool output, reasoning, or other response element." }, - "OpenAI.InputItemApplyPatchToolCallItemParam": { + "OpenAI.ItemFieldApplyPatchToolCall": { "type": "object", "required": [ "type", + "id", "call_id", "status", "operation" @@ -28169,18 +37719,16 @@ }, "id": { "type": "string", - "nullable": true + "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." }, "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" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" } ], "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." @@ -28188,24 +37736,30 @@ "operation": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" + "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" } ], - "description": "The specific create, delete, or update instruction for the apply_patch tool call." + "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.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "A tool call representing a request to create, delete, or update files using diff patches.", + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", "title": "Apply patch tool call" }, - "OpenAI.InputItemApplyPatchToolCallOutputItemParam": { + "OpenAI.ItemFieldApplyPatchToolCallOutput": { "type": "object", "required": [ "type", + "id", "call_id", "status" ], @@ -28221,18 +37775,16 @@ }, "id": { "type": "string", - "nullable": true + "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." }, "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" + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" } ], "description": "The status of the apply patch tool call output. One of `completed` or `failed`." @@ -28240,17 +37792,21 @@ "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.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "The streamed output emitted by an apply patch tool call.", + "description": "The output emitted by an apply patch tool call.", "title": "Apply patch tool call output" }, - "OpenAI.InputItemCodeInterpreterToolCall": { + "OpenAI.ItemFieldCodeInterpreterToolCall": { "type": "object", "required": [ "type", @@ -28310,23 +37866,20 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A tool call to run code.", "title": "Code interpreter tool call" }, - "OpenAI.InputItemCompactionSummaryItemParam": { + "OpenAI.ItemFieldCompactionBody": { "type": "object", "required": [ "type", + "id", "encrypted_content" ], "properties": { - "id": { - "type": "string", - "nullable": true - }, "type": { "type": "string", "enum": [ @@ -28336,110 +37889,116 @@ "x-stainless-const": true, "default": "compaction" }, + "id": { + "type": "string", + "description": "The unique ID of the compaction item." + }, "encrypted_content": { "type": "string", - "maxLength": 10485760, - "description": "The encrypted content of the compaction summary." + "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.InputItem" + "$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.InputItemComputerCallOutputItemParam": { + "OpenAI.ItemFieldComputerToolCall": { "type": "object", "required": [ - "call_id", "type", - "output" + "id", + "call_id", + "action", + "pending_safety_checks", + "status" ], "properties": { - "id": { + "type": { "type": "string", - "nullable": true + "enum": [ + "computer_call" + ], + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" }, - "call_id": { + "id": { "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The ID of the computer tool call that produced the output." + "description": "The unique ID of the computer call." }, - "type": { + "call_id": { "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" + "description": "An identifier used when responding to the tool call with output." }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + "action": { + "$ref": "#/components/schemas/OpenAI.ComputerAction" }, - "acknowledged_safety_checks": { + "pending_safety_checks": { "type": "array", "items": { "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" }, - "nullable": true + "description": "The pending safety checks for the computer call." }, "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" - } + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" ], - "nullable": true + "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" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "The output of a computer tool call.", - "title": "Computer tool call output" + "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.InputItemComputerToolCall": { + "OpenAI.ItemFieldComputerToolCallOutputResource": { "type": "object", "required": [ "type", - "id", "call_id", - "action", - "pending_safety_checks", - "status" + "output" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call" + "computer_call_output" ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" + "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 unique ID of the computer call." + "description": "The ID of the computer tool call output." }, "call_id": { "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "description": "The ID of the computer tool call that produced the output." }, - "pending_safety_checks": { + "acknowledged_safety_checks": { "type": "array", "items": { "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" }, - "description": "The pending safety checks for the computer call." + "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", @@ -28448,18 +38007,16 @@ "completed", "incomplete" ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "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" + "$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.InputItemCustomToolCall": { + "OpenAI.ItemFieldCustomToolCall": { "type": "object", "required": [ "type", @@ -28495,13 +38052,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A call to a custom tool created by the model.", "title": "Custom tool call" }, - "OpenAI.InputItemCustomToolCallOutput": { + "OpenAI.ItemFieldCustomToolCallOutput": { "type": "object", "required": [ "type", @@ -28542,13 +38099,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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.InputItemFileSearchToolCall": { + "OpenAI.ItemFieldFileSearchToolCall": { "type": "object", "required": [ "id", @@ -28597,98 +38154,23 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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.InputItemFunctionCallOutputItemParam": { + "OpenAI.ItemFieldFunctionShellCall": { "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": [ + "id", "call_id", - "type", - "action" + "action", + "status", + "environment" ], "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": [ @@ -28698,10 +38180,18 @@ "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.FunctionShellActionParam" + "$ref": "#/components/schemas/OpenAI.FunctionShellAction" } ], "description": "The shell commands and limits that describe how to run the tool call." @@ -28709,70 +38199,75 @@ "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemStatus" + "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" } ], - "nullable": true + "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." }, "environment": { "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallItemParamEnvironment" + "$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.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "A tool representing a request to execute one or more shell commands.", + "description": "A tool call that executes one or more shell commands in a managed environment.", "title": "Shell tool call" }, - "OpenAI.InputItemFunctionShellCallOutputItemParam": { + "OpenAI.ItemFieldFunctionShellCallOutput": { "type": "object", "required": [ - "call_id", "type", - "output" + "id", + "call_id", + "status", + "output", + "max_output_length" ], "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`.", + "description": "The type of the shell call output. 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." + "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.FunctionShellCallItemStatus" + "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" } ], - "nullable": true + "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", @@ -28782,17 +38277,21 @@ } ], "nullable": true + }, + "created_by": { + "type": "string", + "description": "The identifier of the actor that created the item." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "The streamed output items emitted by a shell tool call.", - "title": "Shell tool call output" + "description": "The output of a shell tool call that was emitted.", + "title": "Shell call output" }, - "OpenAI.InputItemFunctionToolCall": { + "OpenAI.ItemFieldFunctionToolCall": { "type": "object", "required": [ "type", @@ -28837,13 +38336,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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.InputItemImageGenToolCall": { + "OpenAI.ItemFieldImageGenToolCall": { "type": "object", "required": [ "type", @@ -28881,13 +38380,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "An image generation request made by the model.", "title": "Image generation call" }, - "OpenAI.InputItemLocalShellToolCall": { + "OpenAI.ItemFieldLocalShellToolCall": { "type": "object", "required": [ "type", @@ -28928,13 +38427,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A tool call to run a command on the local shell.", "title": "Local shell call" }, - "OpenAI.InputItemLocalShellToolCallOutput": { + "OpenAI.ItemFieldLocalShellToolCallOutput": { "type": "object", "required": [ "type", @@ -28970,13 +38469,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "The output of a local shell tool call.", "title": "Local shell call output" }, - "OpenAI.InputItemMcpApprovalRequest": { + "OpenAI.ItemFieldMcpApprovalRequest": { "type": "object", "required": [ "type", @@ -29013,16 +38512,17 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A request for human approval of a tool invocation.", "title": "MCP approval request" }, - "OpenAI.InputItemMcpApprovalResponse": { + "OpenAI.ItemFieldMcpApprovalResponseResource": { "type": "object", "required": [ "type", + "id", "approval_request_id", "approve" ], @@ -29037,7 +38537,7 @@ }, "id": { "type": "string", - "nullable": true + "description": "The unique ID of the approval response" }, "approval_request_id": { "type": "string", @@ -29054,13 +38554,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A response to an MCP approval request.", "title": "MCP approval response" }, - "OpenAI.InputItemMcpListTools": { + "OpenAI.ItemFieldMcpListTools": { "type": "object", "required": [ "type", @@ -29099,13 +38599,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "A list of tools available on an MCP server.", "title": "MCP list tools" }, - "OpenAI.InputItemMcpToolCall": { + "OpenAI.ItemFieldMcpToolCall": { "type": "object", "required": [ "type", @@ -29162,68 +38662,68 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], "description": "An invocation of a tool on an MCP server.", "title": "MCP tool call" }, - "OpenAI.InputItemOutputMessage": { + "OpenAI.ItemFieldMessage": { "type": "object", "required": [ - "id", "type", + "id", + "status", "role", - "content", - "status" + "content" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, "type": { "type": "string", "enum": [ - "output_message" + "message" ], - "description": "The type of the output message. Always `message`.", - "x-stainless-const": true + "description": "The type of the message. Always set to `message`.", + "x-stainless-const": true, + "default": "message" }, - "role": { + "id": { "type": "string", - "enum": [ - "assistant" + "description": "The unique ID of the message." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageStatus" + } ], - "description": "The role of the output message. Always `assistant`.", - "x-stainless-const": true + "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.OutputMessageContent" + "$ref": "#/components/schemas/OpenAI.MessageContent" }, - "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." + "description": "The content of the message" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$ref": "#/components/schemas/OpenAI.ItemField" } ], - "description": "An output message from the model.", - "title": "Output message" + "description": "A message to or from the model.", + "title": "Message" }, - "OpenAI.InputItemReasoningItem": { + "OpenAI.ItemFieldReasoningItem": { "type": "object", "required": [ "type", @@ -29273,13 +38773,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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.InputItemType": { + "OpenAI.ItemFieldType": { "anyOf": [ { "type": "string" @@ -29288,16 +38788,15 @@ "type": "string", "enum": [ "message", - "output_message", + "function_call", + "function_call_output", "file_search_call", + "web_search_call", + "image_generation_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", @@ -29309,14 +38808,13 @@ "mcp_approval_request", "mcp_approval_response", "mcp_call", - "custom_tool_call_output", "custom_tool_call", - "item_reference" + "custom_tool_call_output" ] } ] }, - "OpenAI.InputItemWebSearchToolCall": { + "OpenAI.ItemFieldWebSearchToolCall": { "type": "object", "required": [ "id", @@ -29364,48 +38862,57 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.InputItem" + "$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.InputMessage": { + "OpenAI.ItemFileSearchToolCall": { "type": "object", "required": [ + "id", "type", - "role", - "content" + "status", + "queries" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message input. Always set to `message`.", - "x-stainless-const": true + "description": "The unique ID of the file search tool call." }, - "role": { + "type": { "type": "string", "enum": [ - "user", - "system", - "developer" + "file_search_call" ], - "description": "The role of the message input. One of `user`, `system`, or `developer`." + "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" + "incomplete", + "failed" ], - "description": "The status of item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," }, - "content": { - "$ref": "#/components/schemas/OpenAI.InputMessageContentList" + "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": [ @@ -29413,214 +38920,283 @@ "$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" + "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.InputMessageResource": { + "OpenAI.ItemFunctionCallOutputItemParam": { "type": "object", "required": [ + "call_id", "type", - "role", - "content", - "id" + "output" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "message" - ], - "description": "The type of the message input. Always set to `message`.", - "x-stainless-const": true + "nullable": true }, - "role": { + "call_id": { "type": "string", - "enum": [ - "user", - "system", - "developer" - ], - "description": "The role of the message input. One of `user`, `system`, or `developer`." + "minLength": 1, + "maxLength": 64, + "description": "The unique ID of the function tool call generated by the model." }, - "status": { + "type": { "type": "string", "enum": [ - "in_progress", - "completed", - "incomplete" + "function_call_output" ], - "description": "The status of item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "The type of the function tool call output. Always `function_call_output`.", + "x-stainless-const": true, + "default": "function_call_output" }, - "content": { - "$ref": "#/components/schemas/OpenAI.InputMessageContentList" + "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." }, - "id": { - "type": "string", - "description": "The unique ID of the message input." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.FunctionCallItemStatus" + } + ], + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" - } - ] - }, - "OpenAI.InputParam": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - } + "$ref": "#/components/schemas/OpenAI.Item" } ], - "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)" + "description": "The output of a function tool call.", + "title": "Function tool call output" }, - "OpenAI.InputTextContent": { + "OpenAI.ItemFunctionShellCallItemParam": { "type": "object", "required": [ + "call_id", "type", - "text" + "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": [ - "input_text" + "shell_call" ], - "description": "The type of the input item. Always `input_text`.", + "description": "The type of the item. Always `shell_call`.", "x-stainless-const": true, - "default": "input_text" + "default": "shell_call" }, - "text": { - "type": "string", - "description": "The text input to the model." + "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 } }, - "description": "A text input to the model.", - "title": "Input text" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "A tool representing a request to execute one or more shell commands.", + "title": "Shell tool call" }, - "OpenAI.InputTextContentParam": { + "OpenAI.ItemFunctionShellCallOutputItemParam": { "type": "object", "required": [ + "call_id", "type", - "text" + "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": [ - "input_text" + "shell_call_output" ], - "description": "The type of the input item. Always `input_text`.", + "description": "The type of the item. Always `shell_call_output`.", "x-stainless-const": true, - "default": "input_text" + "default": "shell_call_output" }, - "text": { - "type": "string", - "maxLength": 10485760, - "description": "The text input to the model." + "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 } }, - "description": "A text input to the model.", - "title": "Input text" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Item" + } + ], + "description": "The streamed output items emitted by a shell tool call.", + "title": "Shell tool call output" }, - "OpenAI.Item": { + "OpenAI.ItemFunctionToolCall": { "type": "object", "required": [ - "type" + "type", + "call_id", + "name", + "arguments" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the function tool call." + }, "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" + "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." } }, - "description": "Content item used to generate a response." + "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.ItemApplyPatchToolCallItemParam": { + "OpenAI.ItemImageGenToolCall": { "type": "object", "required": [ "type", - "call_id", + "id", "status", - "operation" + "result" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call" + "image_generation_call" ], - "description": "The type of the item. Always `apply_patch_call`.", - "x-stainless-const": true, - "default": "apply_patch_call" + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true }, "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." + "description": "The unique ID of the image generation call." }, "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatusParam" - } + "type": "string", + "enum": [ + "in_progress", + "completed", + "generating", + "failed" ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + "description": "The status of the image generation call." }, - "operation": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApplyPatchOperationParam" - } - ], - "description": "The specific create, delete, or update instruction for the apply_patch tool call." + "result": { + "type": "string", + "nullable": true } }, "allOf": [ @@ -29628,47 +39204,46 @@ "$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" + "description": "An image generation request made by the model.", + "title": "Image generation call" }, - "OpenAI.ItemApplyPatchToolCallOutputItemParam": { + "OpenAI.ItemLocalShellToolCall": { "type": "object", "required": [ "type", + "id", "call_id", + "action", "status" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call_output" + "local_shell_call" ], - "description": "The type of the item. Always `apply_patch_call_output`.", - "x-stainless-const": true, - "default": "apply_patch_call_output" + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true }, "id": { "type": "string", - "nullable": true + "description": "The unique ID of the local shell call." }, "call_id": { "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The unique ID of the apply patch tool call generated by the model." + "description": "The unique ID of the local shell 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`." + "action": { + "$ref": "#/components/schemas/OpenAI.LocalShellExecAction" }, - "output": { + "status": { "type": "string", - "nullable": true + "enum": [ + "in_progress", + "completed", + "incomplete" + ], + "description": "The status of the local shell call." } }, "allOf": [ @@ -29676,65 +39251,84 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "The streamed output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" }, - "OpenAI.ItemCodeInterpreterToolCall": { + "OpenAI.ItemLocalShellToolCallOutput": { "type": "object", "required": [ "type", "id", - "status", - "container_id", - "code", - "outputs" + "output" ], "properties": { "type": { "type": "string", "enum": [ - "code_interpreter_call" + "local_shell_call_output" ], - "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", - "x-stainless-const": true, - "default": "code_interpreter_call" + "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 code interpreter tool call." + "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", - "interpreting", - "failed" + "incomplete" ], - "description": "The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`." + "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 }, - "container_id": { + "id": { "type": "string", - "description": "The ID of the container used to run the code." + "description": "The unique ID of the approval request." }, - "code": { + "server_label": { "type": "string", - "nullable": true + "description": "The label of the MCP server making the request." }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true + "name": { + "type": "string", + "description": "The name of the tool to run." + }, + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." } }, "allOf": [ @@ -29742,33 +39336,40 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" }, - "OpenAI.ItemCompactionSummaryItemParam": { + "OpenAI.ItemMcpApprovalResponse": { "type": "object", "required": [ "type", - "encrypted_content" + "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 }, - "type": { + "approval_request_id": { "type": "string", - "enum": [ - "compaction" - ], - "description": "The type of the item. Always `compaction`.", - "x-stainless-const": true, - "default": "compaction" + "description": "The ID of the approval request being answered." }, - "encrypted_content": { + "approve": { + "type": "boolean", + "description": "Whether the request was approved." + }, + "reason": { "type": "string", - "maxLength": 10485760, - "description": "The encrypted content of the compaction summary." + "nullable": true } }, "allOf": [ @@ -29776,52 +39377,106 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", - "title": "Compaction item" + "description": "A response to an MCP approval request.", + "title": "MCP approval response" }, - "OpenAI.ItemComputerCallOutputItemParam": { + "OpenAI.ItemMcpListTools": { "type": "object", "required": [ - "call_id", "type", - "output" + "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", - "nullable": true + "description": "The unique ID of the list." }, - "call_id": { + "server_label": { "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The ID of the computer tool call that produced the output." + "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": [ - "computer_call_output" + "mcp_call" ], - "description": "The type of the computer tool call output. Always `computer_call_output`.", - "x-stainless-const": true, - "default": "computer_call_output" + "description": "The type of the item. Always `mcp_call`.", + "x-stainless-const": true }, - "output": { - "$ref": "#/components/schemas/OpenAI.ComputerScreenshotImage" + "id": { + "type": "string", + "description": "The unique ID of the tool call." }, - "acknowledged_safety_checks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" - }, + "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.FunctionCallItemStatus" + "$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 } }, @@ -29830,45 +39485,45 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "The output of a computer tool call.", - "title": "Computer tool call output" + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" }, - "OpenAI.ItemComputerToolCall": { + "OpenAI.ItemOutputMessage": { "type": "object", "required": [ - "type", "id", - "call_id", - "action", - "pending_safety_checks", + "type", + "role", + "content", "status" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the output message." + }, "type": { "type": "string", "enum": [ - "computer_call" + "output_message" ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." + "description": "The type of the output message. Always `message`.", + "x-stainless-const": true }, - "call_id": { + "role": { "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true }, - "pending_safety_checks": { + "content": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" }, - "description": "The pending safety checks for the computer call." + "description": "The content of the output message." }, "status": { "type": "string", @@ -29877,7 +39532,7 @@ "completed", "incomplete" ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." } }, "allOf": [ @@ -29885,41 +39540,55 @@ "$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" + "description": "An output message from the model.", + "title": "Output message" }, - "OpenAI.ItemCustomToolCall": { + "OpenAI.ItemReasoningItem": { "type": "object", "required": [ "type", - "call_id", - "name", - "input" + "id", + "summary" ], "properties": { "type": { "type": "string", "enum": [ - "custom_tool_call" + "reasoning" ], - "description": "The type of the custom tool call. Always `custom_tool_call`.", + "description": "The type of the object. Always `reasoning`.", "x-stainless-const": true }, "id": { "type": "string", - "description": "The unique ID of the custom tool call in the OpenAI platform." + "description": "The unique identifier of the reasoning content." }, - "call_id": { + "encrypted_content": { "type": "string", - "description": "An identifier used to map this custom tool call to a tool call output." + "nullable": true }, - "name": { - "type": "string", - "description": "The name of the custom tool being called." + "summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + }, + "description": "Reasoning summary content." }, - "input": { + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + }, + "description": "Reasoning text content." + }, + "status": { "type": "string", - "description": "The input for the custom tool call generated by the model." + "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": [ @@ -29927,97 +39596,76 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" + "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.ItemCustomToolCallOutput": { + "OpenAI.ItemReferenceParam": { "type": "object", "required": [ "type", - "call_id", - "output" + "id" ], "properties": { "type": { "type": "string", "enum": [ - "custom_tool_call_output" + "item_reference" ], - "description": "The type of the custom tool call output. Always `custom_tool_call_output`.", - "x-stainless-const": true + "description": "The type of item to reference. Always `item_reference`.", + "x-stainless-const": true, + "default": "item_reference" }, "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." + "description": "The ID of the item to reference." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Item" + "$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" + "description": "An internal identifier for an item to reference.", + "title": "Item reference" }, - "OpenAI.ItemField": { + "OpenAI.ItemResource": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.ItemFieldType" + "$ref": "#/components/schemas/OpenAI.ItemResourceType" } }, "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" + "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": "An item representing a message, tool call, tool output, reasoning, or other response element." + "description": "Content item used to generate a response." }, - "OpenAI.ItemFieldApplyPatchToolCall": { + "OpenAI.ItemResourceApplyPatchToolCall": { "type": "object", "required": [ "type", @@ -30068,13 +39716,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFieldApplyPatchToolCallOutput": { + "OpenAI.ItemResourceApplyPatchToolCallOutput": { "type": "object", "required": [ "type", @@ -30119,13 +39767,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "The output emitted by an apply patch tool call.", "title": "Apply patch tool call output" }, - "OpenAI.ItemFieldCodeInterpreterToolCall": { + "OpenAI.ItemResourceCodeInterpreterToolCall": { "type": "object", "required": [ "type", @@ -30185,51 +39833,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "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": { + "OpenAI.ItemResourceComputerToolCall": { "type": "object", "required": [ "type", @@ -30278,13 +39888,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFieldComputerToolCallOutputResource": { + "OpenAI.ItemResourceComputerToolCallOutputResource": { "type": "object", "required": [ "type", @@ -30331,100 +39941,11 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ] }, - "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": { + "OpenAI.ItemResourceFileSearchToolCall": { "type": "object", "required": [ "id", @@ -30473,13 +39994,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFieldFunctionShellCall": { + "OpenAI.ItemResourceFunctionShellCall": { "type": "object", "required": [ "type", @@ -30539,13 +40060,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFieldFunctionShellCallOutput": { + "OpenAI.ItemResourceFunctionShellCallOutput": { "type": "object", "required": [ "type", @@ -30604,13 +40125,67 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "The output of a shell tool call that was emitted.", "title": "Shell call output" }, - "OpenAI.ItemFieldFunctionToolCall": { + "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", @@ -30655,13 +40230,11 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } - ], - "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": { + "OpenAI.ItemResourceImageGenToolCall": { "type": "object", "required": [ "type", @@ -30699,13 +40272,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "An image generation request made by the model.", "title": "Image generation call" }, - "OpenAI.ItemFieldLocalShellToolCall": { + "OpenAI.ItemResourceLocalShellToolCall": { "type": "object", "required": [ "type", @@ -30746,13 +40319,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "A tool call to run a command on the local shell.", "title": "Local shell call" }, - "OpenAI.ItemFieldLocalShellToolCallOutput": { + "OpenAI.ItemResourceLocalShellToolCallOutput": { "type": "object", "required": [ "type", @@ -30788,13 +40361,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "The output of a local shell tool call.", "title": "Local shell call output" }, - "OpenAI.ItemFieldMcpApprovalRequest": { + "OpenAI.ItemResourceMcpApprovalRequest": { "type": "object", "required": [ "type", @@ -30831,13 +40404,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "A request for human approval of a tool invocation.", "title": "MCP approval request" }, - "OpenAI.ItemFieldMcpApprovalResponseResource": { + "OpenAI.ItemResourceMcpApprovalResponseResource": { "type": "object", "required": [ "type", @@ -30873,13 +40446,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "A response to an MCP approval request.", "title": "MCP approval response" }, - "OpenAI.ItemFieldMcpListTools": { + "OpenAI.ItemResourceMcpListTools": { "type": "object", "required": [ "type", @@ -30918,13 +40491,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], "description": "A list of tools available on an MCP server.", "title": "MCP list tools" }, - "OpenAI.ItemFieldMcpToolCall": { + "OpenAI.ItemResourceMcpToolCall": { "type": "object", "required": [ "type", @@ -30969,116 +40542,60 @@ "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" + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" } ], - "description": "The role of the message. One of `unknown`, `user`, `assistant`, `system`, `critic`, `discriminator`, `developer`, or `tool`." + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MessageContent" - }, - "description": "The content of the message" + "approval_request_id": { + "type": "string", + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], - "description": "A message to or from the model.", - "title": "Message" + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" }, - "OpenAI.ItemFieldReasoningItem": { + "OpenAI.ItemResourceOutputMessage": { "type": "object", "required": [ - "type", "id", - "summary" + "type", + "role", + "content", + "status" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the output message." + }, "type": { "type": "string", "enum": [ - "reasoning" + "output_message" ], - "description": "The type of the object. Always `reasoning`.", + "description": "The type of the output message. Always `message`.", "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique identifier of the reasoning content." - }, - "encrypted_content": { + "role": { "type": "string", - "nullable": true - }, - "summary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.SummaryTextContent" - }, - "description": "Reasoning summary content." + "enum": [ + "assistant" + ], + "description": "The role of the output message. Always `assistant`.", + "x-stainless-const": true }, "content": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" }, - "description": "Reasoning text content." + "description": "The content of the output message." }, "status": { "type": "string", @@ -31087,18 +40604,18 @@ "completed", "incomplete" ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "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" + "$ref": "#/components/schemas/OpenAI.ItemResource" } ], - "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" + "description": "An output message from the model.", + "title": "Output message" }, - "OpenAI.ItemFieldType": { + "OpenAI.ItemResourceType": { "anyOf": [ { "type": "string" @@ -31107,15 +40624,14 @@ "type": "string", "enum": [ "message", - "function_call", - "function_call_output", + "output_message", "file_search_call", - "web_search_call", - "image_generation_call", "computer_call", "computer_call_output", - "reasoning", - "compaction", + "web_search_call", + "function_call", + "function_call_output", + "image_generation_call", "code_interpreter_call", "local_shell_call", "local_shell_call_output", @@ -31127,13 +40643,33 @@ "mcp_approval_request", "mcp_approval_response", "mcp_call", - "custom_tool_call", - "custom_tool_call_output" + "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.ItemFieldWebSearchToolCall": { + "OpenAI.ItemResourceWebSearchToolCall": { "type": "object", "required": [ "id", @@ -31181,31 +40717,89 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemField" + "$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.ItemFileSearchToolCall": { + "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", - "queries" + "action" ], "properties": { "id": { "type": "string", - "description": "The unique ID of the file search tool call." + "description": "The unique ID of the web search tool call." }, "type": { "type": "string", "enum": [ - "file_search_call" + "web_search_call" ], - "description": "The type of the file search tool call. Always `file_search_call`.", + "description": "The type of the web search tool call. Always `web_search_call`.", "x-stainless-const": true }, "status": { @@ -31214,308 +40808,23 @@ "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" + "description": "The status of the web search tool call." }, - "output": { + "action": { "oneOf": [ { - "type": "string" + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" }, { - "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.WebSearchActionOpenPage" + }, { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" } ], - "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 + "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": [ @@ -31523,1398 +40832,1348 @@ "$ref": "#/components/schemas/OpenAI.Item" } ], - "description": "An image generation request made by the model.", - "title": "Image generation call" + "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.ItemLocalShellToolCall": { + "OpenAI.KeyPressAction": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status" + "keys" ], "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" + "keypress" ], - "description": "The status of the local shell call." + "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.Item" + "$ref": "#/components/schemas/OpenAI.ComputerAction" } ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" + "description": "A collection of keypresses the model would like to perform.", + "title": "KeyPress" }, - "OpenAI.ItemLocalShellToolCallOutput": { + "OpenAI.ListFineTuningJobCheckpointsResponse": { "type": "object", "required": [ - "type", - "id", - "output" + "data", + "object", + "has_more" ], "properties": { - "type": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpoint" + }, + "x-ms-list-page-items": true + }, + "object": { "type": "string", "enum": [ - "local_shell_call_output" + "list" ], - "description": "The type of the local shell tool call output. Always `local_shell_call_output`.", "x-stainless-const": true }, - "id": { + "first_id": { "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." + "nullable": true }, - "output": { + "last_id": { "type": "string", - "description": "A JSON string of the output of the local shell tool call." + "nullable": true, + "x-ms-list-continuation-token": true }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "nullable": true - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" + "has_more": { + "type": "boolean" } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" + } }, - "OpenAI.ItemMcpApprovalRequest": { + "OpenAI.ListFineTuningJobEventsResponse": { "type": "object", "required": [ - "type", - "id", - "server_label", - "name", - "arguments" + "data", + "object", + "has_more" ], "properties": { - "type": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.FineTuningJobEvent" + }, + "x-ms-list-page-items": true + }, + "object": { "type": "string", "enum": [ - "mcp_approval_request" + "list" ], - "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." + "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 }, - "server_label": { - "type": "string", - "description": "The label of the MCP server making the request." + "has_more": { + "type": "boolean" }, - "name": { + "object": { "type": "string", - "description": "The name of the tool to run." - }, - "arguments": { + "enum": [ + "list" + ], + "x-stainless-const": true + } + } + }, + "OpenAI.LocalEnvironmentResource": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { "type": "string", - "description": "A JSON string of arguments for the tool." + "enum": [ + "local" + ], + "description": "The environment type. Always `local`.", + "x-stainless-const": true, + "default": "local" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Item" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" } ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" + "description": "Represents the use of a local environment to perform shell actions.", + "title": "Local Environment" }, - "OpenAI.ItemMcpApprovalResponse": { + "OpenAI.LocalShellCallOutputStatusEnum": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.LocalShellCallStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete" + ] + }, + "OpenAI.LocalShellExecAction": { "type": "object", "required": [ "type", - "approval_request_id", - "approve" + "command", + "env" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_response" + "exec" ], - "description": "The type of the item. Always `mcp_approval_response`.", - "x-stainless-const": true + "description": "The type of the local shell action. Always `exec`.", + "x-stainless-const": true, + "default": "exec" }, - "id": { - "type": "string", + "command": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The command to run." + }, + "timeout_ms": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], "nullable": true }, - "approval_request_id": { + "working_directory": { "type": "string", - "description": "The ID of the approval request being answered." + "nullable": true }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables to set for the command.", + "x-oaiTypeLabel": "map" }, - "reason": { + "user": { "type": "string", "nullable": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" + "description": "Execute a shell command on the server.", + "title": "Local shell exec action" }, - "OpenAI.ItemMcpListTools": { + "OpenAI.LocalShellToolParam": { "type": "object", "required": [ - "type", - "id", - "server_label", - "tools" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_list_tools" + "local_shell" ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true - }, - "id": { - "type": "string", - "description": "The unique ID of the list." + "description": "The type of the local shell tool. Always `local_shell`.", + "x-stainless-const": true, + "default": "local_shell" }, - "server_label": { + "name": { "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." + "description": "Optional user-defined name for this tool or configuration." }, - "error": { + "description": { "type": "string", - "nullable": true + "description": "Optional user-defined description for this tool or configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Item" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" + "description": "A tool that allows the model to execute shell commands in a local environment.", + "title": "Local shell tool" }, - "OpenAI.ItemMcpToolCall": { + "OpenAI.LocalSkillParam": { "type": "object", "required": [ - "type", - "id", - "server_label", "name", - "arguments" + "description", + "path" ], "properties": { - "type": { + "name": { "type": "string", - "enum": [ - "mcp_call" - ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true + "description": "The name of the skill." }, - "id": { + "description": { "type": "string", - "description": "The unique ID of the tool call." + "description": "The description of the skill." }, - "server_label": { + "path": { "type": "string", - "description": "The label of the MCP server running the tool." + "description": "The path to the directory containing the skill." + } + } + }, + "OpenAI.LogProb": { + "type": "object", + "required": [ + "token", + "logprob", + "bytes", + "top_logprobs" + ], + "properties": { + "token": { + "type": "string" }, - "name": { - "type": "string", - "description": "The name of the tool that was run." + "logprob": { + "$ref": "#/components/schemas/OpenAI.numeric" }, - "arguments": { + "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": "A JSON string of the arguments passed to the tool." + "description": "The name of the tool." }, - "output": { + "description": { "type": "string", "nullable": true }, - "error": { - "type": "object", - "additionalProperties": {} - }, - "status": { + "input_schema": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + "$ref": "#/components/schemas/OpenAI.MCPListToolsToolInputSchema" } ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." + "description": "The JSON schema describing the tool's input." }, - "approval_request_id": { - "type": "string", + "annotations": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPListToolsToolAnnotations" + } + ], "nullable": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Item" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" + "description": "A tool available on an MCP server.", + "title": "MCP list tools tool" }, - "OpenAI.ItemOutputMessage": { + "OpenAI.MCPListToolsToolAnnotations": { + "type": "object" + }, + "OpenAI.MCPListToolsToolInputSchema": { + "type": "object" + }, + "OpenAI.MCPTool": { "type": "object", "required": [ - "id", "type", - "role", - "content", - "status" + "server_label" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, "type": { "type": "string", "enum": [ - "output_message" + "mcp" ], - "description": "The type of the output message. Always `message`.", + "description": "The type of the MCP tool. Always `mcp`.", "x-stainless-const": true }, - "role": { + "server_label": { "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." + "description": "A label for this MCP server, used to identify it in tool calls." }, - "status": { + "server_url": { "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": { + "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": [ - "reasoning" + "connector_dropbox", + "connector_gmail", + "connector_googlecalendar", + "connector_googledrive", + "connector_microsoftteams", + "connector_outlookcalendar", + "connector_outlookemail", + "connector_sharepoint" ], - "description": "The type of the object. Always `reasoning`.", - "x-stainless-const": true + "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`" }, - "id": { + "authorization": { "type": "string", - "description": "The unique identifier of the reasoning content." + "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." }, - "encrypted_content": { + "server_description": { "type": "string", - "nullable": true + "description": "Optional description of the MCP server, used to provide more context." }, - "summary": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" }, - "description": "Reasoning summary content." + "nullable": true }, - "content": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" - }, - "description": "Reasoning text content." + "allowed_tools": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolFilter" + } + ], + "nullable": true + } + ] }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "require_approval": { + "anyOf": [ + { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MCPToolRequireApproval" + } + ], + "nullable": true + }, + { + "type": "string", + "enum": [ + "always", + "never" + ], + "nullable": true + } ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "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.Item" + "$ref": "#/components/schemas/OpenAI.Tool" } ], - "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" + "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.ItemReferenceParam": { + "OpenAI.MCPToolCallStatus": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "incomplete", + "calling", + "failed" + ] + }, + "OpenAI.MCPToolFilter": { "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" + "tool_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of allowed tool names.", + "title": "MCP allowed tools" }, - "id": { - "type": "string", - "description": "The ID of the item to reference." + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.InputItem" + "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" } - ], - "description": "An internal identifier for an item to reference.", - "title": "Item reference" + } }, - "OpenAI.ItemResource": { + "OpenAI.MessageContent": { "type": "object", "required": [ "type" ], "properties": { "type": { - "$ref": "#/components/schemas/OpenAI.ItemResourceType" + "$ref": "#/components/schemas/OpenAI.MessageContentType" } }, "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" + "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": "Content item used to generate a response." + "description": "A content part that makes up an input or output item." }, - "OpenAI.ItemResourceApplyPatchToolCall": { + "OpenAI.MessageContentInputFileContent": { "type": "object", "required": [ - "type", - "id", - "call_id", - "status", - "operation" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call" + "input_file" ], - "description": "The type of the item. Always `apply_patch_call`.", + "description": "The type of the input item. Always `input_file`.", "x-stainless-const": true, - "default": "apply_patch_call" + "default": "input_file" }, - "id": { + "file_id": { "type": "string", - "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." + "nullable": true }, - "call_id": { + "filename": { "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`." + "description": "The name of the file to be sent to the model." }, - "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" + "file_url": { + "type": "string", + "format": "uri", + "description": "The URL of the file to be sent to the model." }, - "created_by": { + "file_data": { "type": "string", - "description": "The ID of the entity that created this tool call." + "description": "The content of the file to be sent to the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "description": "A tool call that applies file diffs by creating, deleting, or updating files.", - "title": "Apply patch tool call" + "description": "A file input to the model.", + "title": "Input file" }, - "OpenAI.ItemResourceApplyPatchToolCallOutput": { + "OpenAI.MessageContentInputImageContent": { "type": "object", "required": [ "type", - "id", - "call_id", - "status" + "detail" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call_output" + "input_image" ], - "description": "The type of the item. Always `apply_patch_call_output`.", + "description": "The type of the input item. Always `input_image`.", "x-stainless-const": true, - "default": "apply_patch_call_output" + "default": "input_image" }, - "id": { + "image_url": { "type": "string", - "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." + "format": "uri", + "nullable": true }, - "call_id": { + "file_id": { "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." + "nullable": true }, - "status": { + "detail": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + "$ref": "#/components/schemas/OpenAI.ImageDetail" } ], - "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." + "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.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "description": "The output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" + "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", + "title": "Input image" }, - "OpenAI.ItemResourceCodeInterpreterToolCall": { + "OpenAI.MessageContentInputTextContent": { "type": "object", "required": [ "type", - "id", - "status", - "container_id", - "code", - "outputs" + "text" ], "properties": { "type": { "type": "string", "enum": [ - "code_interpreter_call" + "input_text" ], - "description": "The type of the code interpreter tool call. Always `code_interpreter_call`.", + "description": "The type of the input item. Always `input_text`.", "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." + "default": "input_text" }, - "code": { + "text": { "type": "string", - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputLogs" - }, - { - "$ref": "#/components/schemas/OpenAI.CodeInterpreterOutputImage" - } - ] - }, - "nullable": true + "description": "The text input to the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" + "description": "A text input to the model.", + "title": "Input text" }, - "OpenAI.ItemResourceComputerToolCall": { + "OpenAI.MessageContentOutputTextContent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" + "text", + "annotations", + "logprobs" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call" + "output_text" ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" - }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." + "description": "The type of the output text. Always `output_text`.", + "x-stainless-const": true, + "default": "output_text" }, - "call_id": { + "text": { "type": "string", - "description": "An identifier used when responding to the tool call with output." - }, - "action": { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "description": "The text output from the model." }, - "pending_safety_checks": { + "annotations": { "type": "array", "items": { - "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" + "$ref": "#/components/schemas/OpenAI.Annotation" }, - "description": "The pending safety checks for the computer call." + "description": "The annotations of the text output." }, - "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." + "logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LogProb" + } } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "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" + "description": "A text output from the model.", + "title": "Output text" }, - "OpenAI.ItemResourceComputerToolCallOutputResource": { + "OpenAI.MessageContentReasoningTextContent": { "type": "object", "required": [ "type", - "call_id", - "output" + "text" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call_output" + "reasoning_text" ], - "description": "The type of the computer tool call output. Always `computer_call_output`.", + "description": "The type of the reasoning text. Always `reasoning_text`.", "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" + "default": "reasoning_text" }, - "status": { + "text": { "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." + "description": "The reasoning text from the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } - ] + ], + "description": "Reasoning text from the model.", + "title": "Reasoning text" }, - "OpenAI.ItemResourceFileSearchToolCall": { + "OpenAI.MessageContentRefusalContent": { "type": "object", "required": [ - "id", "type", - "status", - "queries" + "refusal" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, "type": { "type": "string", "enum": [ - "file_search_call" + "refusal" ], - "description": "The type of the file search tool call. Always `file_search_call`.", - "x-stainless-const": true + "description": "The type of the refusal. Always `refusal`.", + "x-stainless-const": true, + "default": "refusal" }, - "status": { + "refusal": { "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 + "description": "The refusal explanation from the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.MessageContent" } ], - "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" + "description": "A refusal from the model.", + "title": "Refusal" }, - "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." + "OpenAI.MessageContentType": { + "anyOf": [ + { + "type": "string" }, - "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": { + "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.LocalShellCallStatus" + "$ref": "#/components/schemas/OpenAI.ModelIdsResponses" } ], - "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." + "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 }, - "environment": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" - } - ], + { + "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" }, - "created_by": { + { "type": "string", - "description": "The ID of the entity that created this tool call." + "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" + ] } - }, - "allOf": [ + ] + }, + "OpenAI.ModelIdsShared": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "type": "string" + }, + { + "$ref": "#/components/schemas/OpenAI.ChatModel" } - ], - "description": "A tool call that executes one or more shell commands in a managed environment.", - "title": "Shell tool call" + ] }, - "OpenAI.ItemResourceFunctionShellCallOutput": { + "OpenAI.MoveParam": { "type": "object", "required": [ "type", - "id", - "call_id", - "status", - "output", - "max_output_length" + "x", + "y" ], "properties": { "type": { "type": "string", "enum": [ - "shell_call_output" + "move" ], - "description": "The type of the shell call output. Always `shell_call_output`.", + "description": "Specifies the event type. For a move action, this property is always set to `move`.", "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." + "default": "move" }, - "status": { + "x": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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" + "description": "The x-coordinate to move to." }, - "max_output_length": { - "type": "integer", + "y": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." + "description": "The y-coordinate to move to." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.ComputerAction" } ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" + "description": "A mouse move action.", + "title": "Move" }, - "OpenAI.ItemResourceFunctionToolCallOutputResource": { + "OpenAI.OutputContent": { "type": "object", "required": [ - "type", - "call_id", - "output" + "type" ], "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." + "$ref": "#/components/schemas/OpenAI.OutputContentType" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "discriminator": { + "propertyName": "type", + "mapping": { + "output_text": "#/components/schemas/OpenAI.OutputContentOutputTextContent", + "refusal": "#/components/schemas/OpenAI.OutputContentRefusalContent", + "reasoning_text": "#/components/schemas/OpenAI.OutputContentReasoningTextContent" } - ] + } }, - "OpenAI.ItemResourceFunctionToolCallResource": { + "OpenAI.OutputContentOutputTextContent": { "type": "object", "required": [ "type", - "call_id", - "name", - "arguments" + "text", + "annotations", + "logprobs" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, "type": { "type": "string", "enum": [ - "function_call" + "output_text" ], - "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." + "description": "The type of the output text. Always `output_text`.", + "x-stainless-const": true, + "default": "output_text" }, - "name": { + "text": { "type": "string", - "description": "The name of the function to run." + "description": "The text output from the model." }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Annotation" + }, + "description": "The annotations of the text output." }, - "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." + "logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.LogProb" + } } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputContent" } - ] + ], + "description": "A text output from the model.", + "title": "Output text" }, - "OpenAI.ItemResourceImageGenToolCall": { + "OpenAI.OutputContentReasoningTextContent": { "type": "object", "required": [ "type", - "id", - "status", - "result" + "text" ], "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" + "reasoning_text" ], - "description": "The status of the image generation call." + "description": "The type of the reasoning text. Always `reasoning_text`.", + "x-stainless-const": true, + "default": "reasoning_text" }, - "result": { + "text": { "type": "string", - "nullable": true + "description": "The reasoning text from the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputContent" } ], - "description": "An image generation request made by the model.", - "title": "Image generation call" + "description": "Reasoning text from the model.", + "title": "Reasoning text" }, - "OpenAI.ItemResourceLocalShellToolCall": { + "OpenAI.OutputContentRefusalContent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status" + "refusal" ], "properties": { "type": { "type": "string", "enum": [ - "local_shell_call" + "refusal" ], - "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" + "description": "The type of the refusal. Always `refusal`.", + "x-stainless-const": true, + "default": "refusal" }, - "status": { + "refusal": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "description": "The status of the local shell call." + "description": "The refusal explanation from the model." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputContent" } ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" + "description": "A refusal from the model.", + "title": "Refusal" }, - "OpenAI.ItemResourceLocalShellToolCallOutput": { + "OpenAI.OutputContentType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "output_text", + "refusal", + "reasoning_text" + ] + } + ] + }, + "OpenAI.OutputItem": { "type": "object", "required": [ - "type", - "id", - "output" + "type" ], "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 + "$ref": "#/components/schemas/OpenAI.OutputItemType" }, - "id": { - "type": "string", - "description": "The unique ID of the local shell tool call generated by the model." + "created_by": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreatedBy" + }, + { + "type": "string" + } + ], + "description": "The information about the creator of the item" }, - "output": { - "type": "string", - "description": "A JSON string of the output of the local shell tool call." + "agent_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentReference" + } + ], + "description": "The agent that created the item." }, - "status": { + "response_id": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" - ], - "nullable": true + "description": "The response on which the item is created." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "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" } - ], - "description": "The output of a local shell tool call.", - "title": "Local shell call output" + } }, - "OpenAI.ItemResourceMcpApprovalRequest": { + "OpenAI.OutputItemApplyPatchToolCall": { "type": "object", "required": [ "type", "id", - "server_label", - "name", - "arguments" + "call_id", + "status", + "operation" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_request" + "apply_patch_call" ], - "description": "The type of the item. Always `mcp_approval_request`.", - "x-stainless-const": true + "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 approval request." + "description": "The unique ID of the apply patch tool call. Populated when this item is returned via API." }, - "server_label": { + "call_id": { "type": "string", - "description": "The label of the MCP server making the request." + "description": "The unique ID of the apply patch tool call generated by the model." }, - "name": { - "type": "string", - "description": "The name of the tool to run." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallStatus" + } + ], + "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." }, - "arguments": { + "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": "A JSON string of arguments for the tool." + "description": "The ID of the entity that created this tool call." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" + "description": "A tool call that applies file diffs by creating, deleting, or updating files.", + "title": "Apply patch tool call" }, - "OpenAI.ItemResourceMcpApprovalResponseResource": { + "OpenAI.OutputItemApplyPatchToolCallOutput": { "type": "object", "required": [ "type", "id", - "approval_request_id", - "approve" + "call_id", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_response" + "apply_patch_call_output" ], - "description": "The type of the item. Always `mcp_approval_response`.", - "x-stainless-const": true + "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 approval response" + "description": "The unique ID of the apply patch tool call output. Populated when this item is returned via API." }, - "approval_request_id": { + "call_id": { "type": "string", - "description": "The ID of the approval request being answered." + "description": "The unique ID of the apply patch tool call generated by the model." }, - "approve": { - "type": "boolean", - "description": "Whether the request was approved." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + } + ], + "description": "The status of the apply patch tool call output. One of `completed` or `failed`." }, - "reason": { + "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" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A response to an MCP approval request.", - "title": "MCP approval response" + "description": "The output emitted by an apply patch tool call.", + "title": "Apply patch tool call output" }, - "OpenAI.ItemResourceMcpListTools": { + "OpenAI.OutputItemCodeInterpreterToolCall": { "type": "object", "required": [ "type", "id", - "server_label", - "tools" + "status", + "container_id", + "code", + "outputs" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_list_tools" + "code_interpreter_call" ], - "description": "The type of the item. Always `mcp_list_tools`.", - "x-stainless-const": true + "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 list." + "description": "The unique ID of the code interpreter tool call." }, - "server_label": { + "status": { "type": "string", - "description": "The label of the MCP server." + "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`." }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." + "container_id": { + "type": "string", + "description": "The ID of the container used to run the code." }, - "error": { + "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" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A list of tools available on an MCP server.", - "title": "MCP list tools" + "description": "A tool call to run code.", + "title": "Code interpreter tool call" }, - "OpenAI.ItemResourceMcpToolCall": { + "OpenAI.OutputItemCompactionBody": { "type": "object", "required": [ "type", "id", - "server_label", - "name", - "arguments" + "encrypted_content" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_call" + "compaction" ], - "description": "The type of the item. Always `mcp_call`.", - "x-stainless-const": true + "description": "The type of the item. Always `compaction`.", + "x-stainless-const": true, + "default": "compaction" }, "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." + "description": "The unique ID of the compaction item." }, - "output": { + "encrypted_content": { "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`." + "description": "The encrypted content that was produced by compaction." }, - "approval_request_id": { + "created_by": { "type": "string", - "nullable": true + "description": "The identifier of the actor that created the item." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ItemResource" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" + "description": "A compaction item generated by the [`v1/responses/compact` API](/docs/api-reference/responses/compact).", + "title": "Compaction item" }, - "OpenAI.ItemResourceOutputMessage": { + "OpenAI.OutputItemComputerToolCall": { "type": "object", "required": [ - "id", "type", - "role", - "content", + "id", + "call_id", + "action", + "pending_safety_checks", "status" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, "type": { "type": "string", "enum": [ - "output_message" + "computer_call" ], - "description": "The type of the output message. Always `message`.", - "x-stainless-const": true + "description": "The type of the computer call. Always `computer_call`.", + "default": "computer_call" }, - "role": { + "id": { "type": "string", - "enum": [ - "assistant" - ], - "description": "The role of the output message. Always `assistant`.", - "x-stainless-const": true + "description": "The unique ID of the computer call." }, - "content": { + "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.OutputMessageContent" + "$ref": "#/components/schemas/OpenAI.ComputerCallSafetyCheckParam" }, - "description": "The content of the output message." + "description": "The pending safety checks for the computer call." }, "status": { "type": "string", @@ -32923,202 +42182,78 @@ "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." + "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" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "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" - ] - } - ] + "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.ItemResourceWebSearchToolCall": { + "OpenAI.OutputItemCustomToolCall": { "type": "object", "required": [ - "id", "type", - "status", - "action" + "call_id", + "name", + "input" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, "type": { "type": "string", "enum": [ - "web_search_call" + "custom_tool_call" ], - "description": "The type of the web search tool call. Always `web_search_call`.", + "description": "The type of the custom tool call. Always `custom_tool_call`.", "x-stainless-const": true }, - "status": { + "id": { "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" - ], - "description": "The status of the web search tool call." + "description": "The unique ID of the custom tool call in the OpenAI platform." }, - "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)." + "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.ItemResource" + "$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.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" - ] - } - ] + "description": "A call to a custom tool created by the model.", + "title": "Custom tool call" }, - "OpenAI.ItemWebSearchToolCall": { + "OpenAI.OutputItemFileSearchToolCall": { "type": "object", "required": [ "id", "type", "status", - "action" + "queries" ], "properties": { "id": { "type": "string", - "description": "The unique ID of the web search tool call." + "description": "The unique ID of the file search tool call." }, "type": { "type": "string", "enum": [ - "web_search_call" + "file_search_call" ], - "description": "The type of the web search tool call. Always `web_search_call`.", + "description": "The type of the file search tool call. Always `file_search_call`.", "x-stainless-const": true }, "status": { @@ -33127,661 +42262,694 @@ "in_progress", "searching", "completed", + "incomplete", "failed" ], - "description": "The status of the web search tool call." + "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," }, - "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)." + "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" + "$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" + "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.KeyPressAction": { + "OpenAI.OutputItemFunctionShellCall": { "type": "object", "required": [ "type", - "keys" + "id", + "call_id", + "action", + "status", + "environment" ], "properties": { "type": { "type": "string", "enum": [ - "keypress" + "shell_call" ], - "description": "Specifies the event type. For a keypress action, this property is always set to `keypress`.", + "description": "The type of the item. Always `shell_call`.", "x-stainless-const": true, - "default": "keypress" + "default": "shell_call" }, - "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." + "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.ComputerAction" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A collection of keypresses the model would like to perform.", - "title": "KeyPress" + "description": "A tool call that executes one or more shell commands in a managed environment.", + "title": "Shell tool call" }, - "OpenAI.ListFineTuningJobCheckpointsResponse": { + "OpenAI.OutputItemFunctionShellCallOutput": { "type": "object", "required": [ - "data", - "object", - "has_more" + "type", + "id", + "call_id", + "status", + "output", + "max_output_length" ], "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FineTuningJobCheckpoint" - }, - "x-ms-list-page-items": true - }, - "object": { + "type": { "type": "string", "enum": [ - "list" + "shell_call_output" ], - "x-stainless-const": true + "description": "The type of the shell call output. Always `shell_call_output`.", + "x-stainless-const": true, + "default": "shell_call_output" }, - "first_id": { + "id": { "type": "string", - "nullable": true + "description": "The unique ID of the shell call output. Populated when this item is returned via API." }, - "last_id": { + "call_id": { "type": "string", - "nullable": true, - "x-ms-list-continuation-token": true + "description": "The unique ID of the shell tool call generated by the model." }, - "has_more": { - "type": "boolean" - } - } - }, - "OpenAI.ListFineTuningJobEventsResponse": { - "type": "object", - "required": [ - "data", - "object", - "has_more" - ], - "properties": { - "data": { + "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.FineTuningJobEvent" + "$ref": "#/components/schemas/OpenAI.FunctionShellCallOutputContent" }, - "x-ms-list-page-items": true + "description": "An array of shell call output contents" }, - "object": { - "type": "string", - "enum": [ - "list" + "max_output_length": { + "type": "integer", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "x-stainless-const": true + "nullable": true }, - "has_more": { - "type": "boolean" + "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.ListPaginatedFineTuningJobsResponse": { + "OpenAI.OutputItemFunctionToolCall": { "type": "object", "required": [ - "data", - "has_more", - "object" + "type", + "call_id", + "name", + "arguments" ], "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FineTuningJob" - }, - "x-ms-list-page-items": true - }, - "has_more": { - "type": "boolean" + "id": { + "type": "string", + "description": "The unique ID of the function tool call." }, - "object": { + "type": { "type": "string", "enum": [ - "list" + "function_call" ], + "description": "The type of the function tool call. Always `function_call`.", "x-stainless-const": true - } - } - }, - "OpenAI.LocalEnvironmentResource": { - "type": "object", - "required": [ - "type" - ], - "properties": { - "type": { + }, + "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": [ - "local" + "in_progress", + "completed", + "incomplete" ], - "description": "The environment type. Always `local`.", - "x-stainless-const": true, - "default": "local" + "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.FunctionShellCallEnvironment" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "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" - ] + "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.LocalShellExecAction": { + "OpenAI.OutputItemImageGenToolCall": { "type": "object", "required": [ "type", - "command", - "env" + "id", + "status", + "result" ], "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" - } + "image_generation_call" ], - "nullable": true + "description": "The type of the image generation call. Always `image_generation_call`.", + "x-stainless-const": true }, - "working_directory": { + "id": { "type": "string", - "nullable": true + "description": "The unique ID of the image generation call." }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables to set for the command.", - "x-oaiTypeLabel": "map" + "status": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "generating", + "failed" + ], + "description": "The status of the image generation call." }, - "user": { + "result": { "type": "string", "nullable": true } }, - "description": "Execute a shell command on the server.", - "title": "Local shell exec action" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "An image generation request made by the model.", + "title": "Image generation call" }, - "OpenAI.LocalShellToolParam": { + "OpenAI.OutputItemLocalShellToolCall": { "type": "object", "required": [ - "type" + "type", + "id", + "call_id", + "action", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "local_shell" + "local_shell_call" ], - "description": "The type of the local shell tool. Always `local_shell`.", - "x-stainless-const": true, - "default": "local_shell" + "description": "The type of the local shell call. Always `local_shell_call`.", + "x-stainless-const": true }, - "name": { + "id": { "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "description": "The unique ID of the local shell call." }, - "description": { + "call_id": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "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.Tool" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A tool that allows the model to execute shell commands in a local environment.", - "title": "Local shell tool" + "description": "A tool call to run a command on the local shell.", + "title": "Local shell call" }, - "OpenAI.LocalSkillParam": { + "OpenAI.OutputItemMcpApprovalRequest": { "type": "object", "required": [ + "type", + "id", + "server_label", "name", - "description", - "path" + "arguments" ], "properties": { - "name": { + "type": { "type": "string", - "description": "The name of the skill." + "enum": [ + "mcp_approval_request" + ], + "description": "The type of the item. Always `mcp_approval_request`.", + "x-stainless-const": true }, - "description": { + "id": { "type": "string", - "description": "The description of the skill." + "description": "The unique ID of the approval request." }, - "path": { + "server_label": { "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" + "description": "The label of the MCP server making the request." }, - "bytes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.integer" - } + "name": { + "type": "string", + "description": "The name of the tool to run." }, - "top_logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.TopLogProb" - } + "arguments": { + "type": "string", + "description": "A JSON string of arguments for the tool." } }, - "description": "The log probability of a token.", - "title": "Log probability" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A request for human approval of a tool invocation.", + "title": "MCP approval request" }, - "OpenAI.MCPListToolsTool": { + "OpenAI.OutputItemMcpListTools": { "type": "object", "required": [ - "name", - "input_schema" + "type", + "id", + "server_label", + "tools" ], "properties": { - "name": { + "type": { "type": "string", - "description": "The name of the tool." + "enum": [ + "mcp_list_tools" + ], + "description": "The type of the item. Always `mcp_list_tools`.", + "x-stainless-const": true }, - "description": { + "id": { "type": "string", - "nullable": true + "description": "The unique ID of the list." }, - "input_schema": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPListToolsToolInputSchema" - } - ], - "description": "The JSON schema describing the tool's input." + "server_label": { + "type": "string", + "description": "The label of the MCP server." }, - "annotations": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPListToolsToolAnnotations" - } - ], + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" + }, + "description": "The tools available on the server." + }, + "error": { + "type": "string", "nullable": true } }, - "description": "A tool available on an MCP server.", - "title": "MCP list tools tool" - }, - "OpenAI.MCPListToolsToolAnnotations": { - "type": "object" - }, - "OpenAI.MCPListToolsToolInputSchema": { - "type": "object" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "A list of tools available on an MCP server.", + "title": "MCP list tools" }, - "OpenAI.MCPTool": { + "OpenAI.OutputItemMcpToolCall": { "type": "object", "required": [ "type", - "server_label" + "id", + "server_label", + "name", + "arguments" ], "properties": { "type": { "type": "string", "enum": [ - "mcp" + "mcp_call" ], - "description": "The type of the MCP tool. Always `mcp`.", + "description": "The type of the item. Always `mcp_call`.", "x-stainless-const": true }, - "server_label": { + "id": { "type": "string", - "description": "A label for this MCP server, used to identify it in tool calls." + "description": "The unique ID of the tool call." }, - "server_url": { + "server_label": { "type": "string", - "format": "uri", - "description": "The URL for the MCP server. One of `server_url` or `connector_id` must be\n provided." + "description": "The label of the MCP server running the tool." }, - "connector_id": { + "name": { "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`" + "description": "The name of the tool that was run." }, - "authorization": { + "arguments": { "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." + "description": "A JSON string of the arguments passed to the tool." }, - "server_description": { + "output": { "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 - } - ] + "error": { + "type": "object", + "additionalProperties": {} }, - "require_approval": { - "anyOf": [ - { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MCPToolRequireApproval" - } - ], - "nullable": true - }, + "status": { + "allOf": [ { - "type": "string", - "enum": [ - "always", - "never" - ], - "nullable": true + "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" } ], - "default": "always" + "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." }, - "project_connection_id": { + "approval_request_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." + "nullable": true } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "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" - ] + "description": "An invocation of a tool on an MCP server.", + "title": "MCP tool call" }, - "OpenAI.MCPToolFilter": { + "OpenAI.OutputItemOutputMessage": { "type": "object", + "required": [ + "id", + "type", + "role", + "content", + "status" + ], "properties": { - "tool_names": { + "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": { - "type": "string" + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" }, - "description": "List of allowed tool names.", - "title": "MCP allowed tools" + "description": "The content of the output message." }, - "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." + "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." } }, - "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" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" } - } - }, - "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." + "description": "An output message from the model.", + "title": "Output message" }, - "OpenAI.MessageContentInputFileContent": { + "OpenAI.OutputItemReasoningItem": { "type": "object", "required": [ - "type" + "type", + "id", + "summary" ], "properties": { "type": { "type": "string", "enum": [ - "input_file" + "reasoning" ], - "description": "The type of the input item. Always `input_file`.", - "x-stainless-const": true, - "default": "input_file" + "description": "The type of the object. Always `reasoning`.", + "x-stainless-const": true }, - "file_id": { + "id": { "type": "string", - "nullable": true + "description": "The unique identifier of the reasoning content." }, - "filename": { + "encrypted_content": { "type": "string", - "description": "The name of the file to be sent to the model." + "nullable": true }, - "file_url": { - "type": "string", - "format": "uri", - "description": "The URL of the file to be sent to the model." + "summary": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.SummaryTextContent" + }, + "description": "Reasoning summary content." }, - "file_data": { + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.ReasoningTextContent" + }, + "description": "Reasoning text content." + }, + "status": { "type": "string", - "description": "The content of the file to be sent to the model." + "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.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "A file input to the model.", - "title": "Input file" + "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.MessageContentInputImageContent": { + "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", - "detail" + "status", + "action" ], "properties": { + "id": { + "type": "string", + "description": "The unique ID of the web search tool call." + }, "type": { "type": "string", "enum": [ - "input_image" + "web_search_call" ], - "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 + "description": "The type of the web search tool call. Always `web_search_call`.", + "x-stainless-const": true }, - "file_id": { + "status": { "type": "string", - "nullable": true + "enum": [ + "in_progress", + "searching", + "completed", + "failed" + ], + "description": "The status of the web search tool call." }, - "detail": { - "allOf": [ + "action": { + "oneOf": [ { - "$ref": "#/components/schemas/OpenAI.ImageDetail" + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" + }, + { + "$ref": "#/components/schemas/OpenAI.WebSearchActionFind" } ], - "description": "The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`. Defaults to `auto`." + "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.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).", - "title": "Input image" + "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.MessageContentInputTextContent": { + "OpenAI.OutputMessageContent": { "type": "object", "required": [ - "type", - "text" + "type" ], "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." + "$ref": "#/components/schemas/OpenAI.OutputMessageContentType" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" + "discriminator": { + "propertyName": "type", + "mapping": { + "output_text": "#/components/schemas/OpenAI.OutputMessageContentOutputTextContent", + "refusal": "#/components/schemas/OpenAI.OutputMessageContentRefusalContent" } - ], - "description": "A text input to the model.", - "title": "Input text" + } }, - "OpenAI.MessageContentOutputTextContent": { + "OpenAI.OutputMessageContentOutputTextContent": { "type": "object", "required": [ "type", @@ -33819,42 +42987,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" } ], "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": { + "OpenAI.OutputMessageContentRefusalContent": { "type": "object", "required": [ "type", @@ -33877,13 +43016,13 @@ }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MessageContent" + "$ref": "#/components/schemas/OpenAI.OutputMessageContent" } ], "description": "A refusal from the model.", "title": "Refusal" }, - "OpenAI.MessageContentType": { + "OpenAI.OutputMessageContentType": { "anyOf": [ { "type": "string" @@ -33891,1953 +43030,1821 @@ { "type": "string", "enum": [ - "input_text", "output_text", - "text", - "summary_text", - "reasoning_text", - "refusal", - "input_image", - "computer_screenshot", - "input_file" + "refusal" ] } ] }, - "OpenAI.MessageRole": { + "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": [ - "unknown", - "user", - "assistant", - "system", - "critic", - "discriminator", - "developer", - "tool" + "auto", + "default-2024-11-15" ] }, - "OpenAI.MessageStatus": { + "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": [ - "in_progress", - "completed", - "incomplete" - ] + "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.Metadata": { + "OpenAI.ReasoningTextContent": { "type": "object", - "additionalProperties": { - "type": "string" + "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": "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" + "description": "Reasoning text from the model.", + "title": "Reasoning text" }, - "OpenAI.ModelIdsCompaction": { - "anyOf": [ - { + "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.ModelIdsResponses" + "$ref": "#/components/schemas/OpenAI.ResponseIncompleteDetails" } ], - "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.", + "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 - } - ], - "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" }, - { + "output_text": { "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" + "nullable": true }, - { - "$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" + "usage": { + "$ref": "#/components/schemas/OpenAI.ResponseUsage" }, - "x": { + "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.integer" + "$ref": "#/components/schemas/OpenAI.ConversationReference" } ], - "description": "The x-coordinate to move to." + "nullable": true }, - "y": { + "agent": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/AgentId" } ], - "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" + "description": "(Deprecated) Use agent_reference instead.\nThe agent used for this response" }, - "text": { + "agent_session_id": { "type": "string", - "description": "The text output from the model." + "description": "The session identifier for this response. Currently only relevant for hosted agents.\nAlways returned for hosted agents — either the caller-provided value, the auto-derived value,\nor an auto-generated UUID. Use for session-scoped operations and to maintain sandbox\naffinity in follow-up calls." }, - "annotations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Annotation" - }, - "description": "The annotations of the text output." + "agent_reference": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/AgentReference" + } + ], + "nullable": true, + "description": "The agent used for this response" }, - "logprobs": { + "content_filters": { "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." + "$ref": "#/components/schemas/ContentFilterResult" + }, + "description": "The content filter evaluation results." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputContent" - } - ], - "description": "Reasoning text from the model.", - "title": "Reasoning text" + "title": "The response object" }, - "OpenAI.OutputContentRefusalContent": { + "OpenAI.ResponseAudioDeltaEvent": { "type": "object", "required": [ "type", - "refusal" + "sequence_number", + "delta" ], "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" - }, - "created_by": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreatedBy" - }, - { - "type": "string" - } + "response.audio.delta" ], - "description": "The information about the creator of the item" + "description": "The type of the event. Always `response.audio.delta`.", + "x-stainless-const": true }, - "agent_reference": { + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/AgentReference" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The agent that created the item." + "description": "A sequence number for this chunk of the stream response." }, - "response_id": { + "delta": { "type": "string", - "description": "The response on which the item is created." + "format": "base64", + "description": "A chunk of Base64 encoded response audio bytes." } }, - "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" - } + "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.OutputItemApplyPatchToolCall": { + "OpenAI.ResponseAudioDoneEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "status", - "operation" + "sequence_number" ], "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" - } + "response.audio.done" ], - "description": "The status of the apply patch tool call. One of `in_progress` or `completed`." + "description": "The type of the event. Always `response.audio.done`.", + "x-stainless-const": true }, - "operation": { + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchFileOperation" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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." + "description": "The sequence number of the delta." } }, - "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" + "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.OutputItemApplyPatchToolCallOutput": { + "OpenAI.ResponseAudioTranscriptDeltaEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "status" + "delta", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "apply_patch_call_output" + "response.audio.transcript.delta" ], - "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." + "description": "The type of the event. Always `response.audio.transcript.delta`.", + "x-stainless-const": true }, - "call_id": { + "delta": { "type": "string", - "description": "The unique ID of the apply patch tool call generated by the model." + "description": "The partial transcript of the audio response." }, - "status": { + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ApplyPatchCallOutputStatus" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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." + "description": "The sequence number of this event." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output emitted by an apply patch tool call.", - "title": "Apply patch tool call output" + "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.OutputItemCodeInterpreterToolCall": { + "OpenAI.ResponseAudioTranscriptDoneEvent": { "type": "object", "required": [ "type", - "id", - "status", - "container_id", - "code", - "outputs" + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "code_interpreter_call" + "response.audio.transcript.done" ], - "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." + "description": "The type of the event. Always `response.audio.transcript.done`.", + "x-stainless-const": true }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete", - "interpreting", - "failed" + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "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 + "description": "The sequence number of this event." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A tool call to run code.", - "title": "Code interpreter tool call" + "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.OutputItemCompactionBody": { + "OpenAI.ResponseCodeInterpreterCallCodeDeltaEvent": { "type": "object", "required": [ "type", - "id", - "encrypted_content" + "output_index", + "item_id", + "delta", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "compaction" + "response.code_interpreter_call_code.delta" ], - "description": "The type of the item. Always `compaction`.", - "x-stainless-const": true, - "default": "compaction" + "description": "The type of the event. Always `response.code_interpreter_call_code.delta`.", + "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique ID of the compaction item." + "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." }, - "encrypted_content": { + "item_id": { "type": "string", - "description": "The encrypted content that was produced by compaction." + "description": "The unique identifier of the code interpreter tool call item." }, - "created_by": { + "delta": { "type": "string", - "description": "The identifier of the actor that created the item." + "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." } }, - "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" + "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.OutputItemComputerToolCall": { + "OpenAI.ResponseCodeInterpreterCallCodeDoneEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "pending_safety_checks", - "status" + "output_index", + "item_id", + "code", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "computer_call" + "response.code_interpreter_call_code.done" ], - "description": "The type of the computer call. Always `computer_call`.", - "default": "computer_call" + "description": "The type of the event. Always `response.code_interpreter_call_code.done`.", + "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique ID of the computer call." + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item in the response for which the code is finalized." }, - "call_id": { + "item_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." + "description": "The unique identifier of the code interpreter tool call item." }, - "status": { + "code": { "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "description": "The final code snippet output by the code interpreter." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "The sequence number of this event, used to order streaming events." } }, - "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" + "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.OutputItemCustomToolCall": { + "OpenAI.ResponseCodeInterpreterCallCompletedEvent": { "type": "object", "required": [ "type", - "call_id", - "name", - "input" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "custom_tool_call" + "response.code_interpreter_call.completed" ], - "description": "The type of the custom tool call. Always `custom_tool_call`.", + "description": "The type of the event. Always `response.code_interpreter_call.completed`.", "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." + "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." }, - "name": { + "item_id": { "type": "string", - "description": "The name of the custom tool being called." + "description": "The unique identifier of the code interpreter tool call item." }, - "input": { - "type": "string", - "description": "The input for the custom tool call generated by the model." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A call to a custom tool created by the model.", - "title": "Custom tool call" + "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.OutputItemFileSearchToolCall": { + "OpenAI.ResponseCodeInterpreterCallInProgressEvent": { "type": "object", "required": [ - "id", "type", - "status", - "queries" + "output_index", + "item_id", + "sequence_number" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the file search tool call." - }, "type": { "type": "string", "enum": [ - "file_search_call" + "response.code_interpreter_call.in_progress" ], - "description": "The type of the file search tool call. Always `file_search_call`.", + "description": "The type of the event. Always `response.code_interpreter_call.in_progress`.", "x-stainless-const": true }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "incomplete", - "failed" + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the file search tool call. One of `in_progress`,\n `searching`, `incomplete` or `failed`," + "description": "The index of the output item in the response for which the code interpreter call is in progress." }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The queries used to search for files." + "item_id": { + "type": "string", + "description": "The unique identifier of the code interpreter tool call item." }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.FileSearchToolCallResults" - }, - "nullable": true + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event, used to order streaming events." } }, - "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" + "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.OutputItemFunctionShellCall": { + "OpenAI.ResponseCodeInterpreterCallInterpretingEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status", - "environment" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "shell_call" + "response.code_interpreter_call.interpreting" ], - "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." + "description": "The type of the event. Always `response.code_interpreter_call.interpreting`.", + "x-stainless-const": true }, - "action": { + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellAction" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The shell commands and limits that describe how to run the tool call." + "description": "The index of the output item in the response for which the code interpreter is interpreting code." }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.LocalShellCallStatus" - } - ], - "description": "The status of the shell call. One of `in_progress`, `completed`, or `incomplete`." + "item_id": { + "type": "string", + "description": "The unique identifier of the code interpreter tool call item." }, - "environment": { - "type": "object", + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.FunctionShellCallEnvironment" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The ID of the entity that created this tool call." + "description": "The sequence number of this event, used to order streaming events." } }, - "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" + "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.OutputItemFunctionShellCallOutput": { + "OpenAI.ResponseCompletedEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "status", - "output", - "max_output_length" + "response", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "shell_call_output" + "response.completed" ], - "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." + "description": "The type of the event. Always `response.completed`.", + "x-stainless-const": true }, - "status": { + "response": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.LocalShellCallOutputStatusEnum" + "$ref": "#/components/schemas/OpenAI.Response" } ], - "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" + "description": "Properties of the completed response." }, - "max_output_length": { - "type": "integer", + "sequence_number": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true - }, - "created_by": { - "type": "string", - "description": "The identifier of the actor that created the item." + "description": "The sequence number for this event." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "The output of a shell tool call that was emitted.", - "title": "Shell call output" + "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.OutputItemFunctionToolCall": { + "OpenAI.ResponseContentPartAddedEvent": { "type": "object", "required": [ "type", - "call_id", - "name", - "arguments" + "item_id", + "output_index", + "content_index", + "part", + "sequence_number" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the function tool call." - }, "type": { "type": "string", "enum": [ - "function_call" + "response.content_part.added" ], - "description": "The type of the function tool call. Always `function_call`.", + "description": "The type of the event. Always `response.content_part.added`.", "x-stainless-const": true }, - "call_id": { + "item_id": { "type": "string", - "description": "The unique ID of the function tool call generated by the model." + "description": "The ID of the output item that the content part was added to." }, - "name": { - "type": "string", - "description": "The name of the function to run." + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the content part was added to." }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the function." + "content_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the content part that was added." }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "part": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputContent" + } ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "The content part that was added." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." } }, - "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" + "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.OutputItemImageGenToolCall": { + "OpenAI.ResponseContentPartDoneEvent": { "type": "object", "required": [ "type", - "id", - "status", - "result" + "item_id", + "output_index", + "content_index", + "sequence_number", + "part" ], "properties": { "type": { "type": "string", "enum": [ - "image_generation_call" + "response.content_part.done" ], - "description": "The type of the image generation call. Always `image_generation_call`.", + "description": "The type of the event. Always `response.content_part.done`.", "x-stainless-const": true }, - "id": { + "item_id": { "type": "string", - "description": "The unique ID of the image generation call." + "description": "The ID of the output item that the content part was added to." }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "generating", - "failed" + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the image generation call." + "description": "The index of the output item that the content part was added to." }, - "result": { - "type": "string", - "nullable": true + "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." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "An image generation request made by the model.", - "title": "Image generation call" + "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.OutputItemLocalShellToolCall": { + "OpenAI.ResponseCreatedEvent": { "type": "object", "required": [ "type", - "id", - "call_id", - "action", - "status" + "response", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "local_shell_call" + "response.created" ], - "description": "The type of the local shell call. Always `local_shell_call`.", + "description": "The type of the event. Always `response.created`.", "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" + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "The response that was created." }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the local shell call." + "description": "The sequence number for this event." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A tool call to run a command on the local shell.", - "title": "Local shell call" + "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.OutputItemMcpApprovalRequest": { + "OpenAI.ResponseCustomToolCallInputDeltaEvent": { "type": "object", "required": [ "type", - "id", - "server_label", - "name", - "arguments" + "sequence_number", + "output_index", + "item_id", + "delta" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_approval_request" + "response.custom_tool_call_input.delta" ], - "description": "The type of the item. Always `mcp_approval_request`.", + "description": "The event type identifier.", "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique ID of the approval request." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." }, - "server_label": { - "type": "string", - "description": "The label of the MCP server making the request." + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output this delta applies to." }, - "name": { + "item_id": { "type": "string", - "description": "The name of the tool to run." + "description": "Unique identifier for the API item associated with this event." }, - "arguments": { + "delta": { "type": "string", - "description": "A JSON string of arguments for the tool." + "description": "The incremental input data (delta) for the custom tool call." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "A request for human approval of a tool invocation.", - "title": "MCP approval request" + "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.OutputItemMcpListTools": { + "OpenAI.ResponseCustomToolCallInputDoneEvent": { "type": "object", "required": [ "type", - "id", - "server_label", - "tools" + "sequence_number", + "output_index", + "item_id", + "input" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_list_tools" + "response.custom_tool_call_input.done" ], - "description": "The type of the item. Always `mcp_list_tools`.", + "description": "The event type identifier.", "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique ID of the list." + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." }, - "server_label": { - "type": "string", - "description": "The label of the MCP server." + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output this event applies to." }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.MCPListToolsTool" - }, - "description": "The tools available on the server." + "item_id": { + "type": "string", + "description": "Unique identifier for the API item associated with this event." }, - "error": { + "input": { "type": "string", - "nullable": true + "description": "The complete input data for the custom tool call." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "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": "A list of tools available on an MCP server.", - "title": "MCP list tools" + "description": "The error code for the response." }, - "OpenAI.OutputItemMcpToolCall": { + "OpenAI.ResponseErrorEvent": { "type": "object", "required": [ "type", - "id", - "server_label", - "name", - "arguments" + "code", + "message", + "param", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "mcp_call" + "error" ], - "description": "The type of the item. Always `mcp_call`.", + "description": "The type of the event. Always `error`.", "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": { + "code": { "type": "string", - "description": "The name of the tool that was run." + "nullable": true }, - "arguments": { + "message": { "type": "string", - "description": "A JSON string of the arguments passed to the tool." + "description": "The error message." }, - "output": { + "param": { "type": "string", "nullable": true }, - "error": { - "type": "object", - "additionalProperties": {} - }, - "status": { + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.MCPToolCallStatus" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`." - }, - "approval_request_id": { - "type": "string", - "nullable": true + "description": "The sequence number of this event." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "An invocation of a tool on an MCP server.", - "title": "MCP tool call" + "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.OutputItemOutputMessage": { + "OpenAI.ResponseFailedEvent": { "type": "object", "required": [ - "id", "type", - "role", - "content", - "status" + "sequence_number", + "response" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the output message." - }, "type": { "type": "string", "enum": [ - "output_message" + "response.failed" ], - "description": "The type of the output message. Always `message`.", + "description": "The type of the event. Always `response.failed`.", "x-stainless-const": true }, - "role": { - "type": "string", - "enum": [ - "assistant" + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "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." + "description": "The sequence number of this event." }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } ], - "description": "The status of the message input. One of `in_progress`, `completed`, or\n `incomplete`. Populated when input items are returned via API." + "description": "The response that failed." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" - } - ], - "description": "An output message from the model.", - "title": "Output message" + "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.OutputItemReasoningItem": { + "OpenAI.ResponseFileSearchCallCompletedEvent": { "type": "object", "required": [ "type", - "id", - "summary" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "reasoning" + "response.file_search_call.completed" ], - "description": "The type of the object. Always `reasoning`.", + "description": "The type of the event. Always `response.file_search_call.completed`.", "x-stainless-const": true }, - "id": { - "type": "string", - "description": "The unique identifier of the reasoning content." + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the file search call is initiated." }, - "encrypted_content": { + "item_id": { "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." + "description": "The ID of the output item that the file search call is initiated." }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "completed", - "incomplete" + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the item. One of `in_progress`, `completed`, or\n `incomplete`. Populated when items are returned via API." + "description": "The sequence number of this event." } }, - "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" - ] - } - ] + "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.OutputItemWebSearchToolCall": { + "OpenAI.ResponseFileSearchCallInProgressEvent": { "type": "object", "required": [ - "id", "type", - "status", - "action" + "output_index", + "item_id", + "sequence_number" ], "properties": { - "id": { - "type": "string", - "description": "The unique ID of the web search tool call." - }, "type": { "type": "string", "enum": [ - "web_search_call" + "response.file_search_call.in_progress" ], - "description": "The type of the web search tool call. Always `web_search_call`.", + "description": "The type of the event. Always `response.file_search_call.in_progress`.", "x-stainless-const": true }, - "status": { - "type": "string", - "enum": [ - "in_progress", - "searching", - "completed", - "failed" + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The status of the web search tool call." + "description": "The index of the output item that the file search call is initiated." }, - "action": { - "oneOf": [ - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearch" - }, - { - "$ref": "#/components/schemas/OpenAI.WebSearchActionOpenPage" - }, + "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.WebSearchActionFind" + "$ref": "#/components/schemas/OpenAI.integer" } - ], - "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" + ], + "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.OutputMessageContentOutputTextContent": { + "OpenAI.ResponseFileSearchCallSearchingEvent": { "type": "object", "required": [ "type", - "text", - "annotations", - "logprobs" + "output_index", + "item_id", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "output_text" + "response.file_search_call.searching" ], - "description": "The type of the output text. Always `output_text`.", - "x-stainless-const": true, - "default": "output_text" + "description": "The type of the event. Always `response.file_search_call.searching`.", + "x-stainless-const": true }, - "text": { - "type": "string", - "description": "The text output from the model." + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item that the file search call is searching." }, - "annotations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Annotation" - }, - "description": "The annotations of the text output." + "item_id": { + "type": "string", + "description": "The ID of the output item that the file search call is initiated." }, - "logprobs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.LogProb" - } + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The sequence number of this event." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputMessageContent" - } - ], - "description": "A text output from the model.", - "title": "Output text" + "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.OutputMessageContentRefusalContent": { + "OpenAI.ResponseFormatJsonObject": { "type": "object", "required": [ - "type", - "refusal" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "refusal" + "json_object" ], - "description": "The type of the refusal. Always `refusal`.", - "x-stainless-const": true, - "default": "refusal" - }, - "refusal": { - "type": "string", - "description": "The refusal explanation from the model." + "description": "The type of response format being defined. Always `json_object`.", + "x-stainless-const": true } }, - "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" - ] - } - ] + "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.Prompt": { + "OpenAI.ResponseFormatJsonSchema": { "type": "object", "required": [ - "id" + "type", + "json_schema" ], "properties": { - "id": { - "type": "string", - "description": "The unique identifier of the prompt template to use." - }, - "version": { + "type": { "type": "string", - "nullable": true + "enum": [ + "json_schema" + ], + "description": "The type of response format being defined. Always `json_schema`.", + "x-stainless-const": true }, - "variables": { - "type": "object", + "json_schema": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponsePromptVariables" + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaJsonSchema" } ], - "nullable": true + "description": "Structured Outputs configuration options, including a JSON Schema.", + "title": "JSON schema" } }, - "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" - ] + "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.RankingOptions": { + "OpenAI.ResponseFormatJsonSchemaJsonSchema": { "type": "object", + "required": [ + "name" + ], "properties": { - "ranker": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.RankerVersionType" - } - ], - "description": "The ranker to use for the file search." + "description": { + "type": "string" }, - "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." + "name": { + "type": "string" }, - "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." + "schema": { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaSchema" + }, + "strict": { + "type": "boolean", + "nullable": true } } }, - "OpenAI.Reasoning": { + "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": { - "effort": { - "$ref": "#/components/schemas/OpenAI.ReasoningEffort" - }, - "summary": { - "type": "string", - "enum": [ - "auto", - "concise", - "detailed" - ], - "nullable": true - }, - "generate_summary": { + "type": { "type": "string", "enum": [ - "auto", - "concise", - "detailed" + "text" ], - "nullable": true + "description": "The type of response format being defined. Always `text`.", + "x-stainless-const": 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 + "description": "Default response format. Used to generate text responses.", + "title": "Text" }, - "OpenAI.ReasoningTextContent": { + "OpenAI.ResponseFunctionCallArgumentsDeltaEvent": { "type": "object", "required": [ "type", - "text" + "item_id", + "output_index", + "sequence_number", + "delta" ], "properties": { "type": { "type": "string", "enum": [ - "reasoning_text" + "response.function_call_arguments.delta" ], - "description": "The type of the reasoning text. Always `reasoning_text`.", - "x-stainless-const": true, - "default": "reasoning_text" + "description": "The type of the event. Always `response.function_call_arguments.delta`.", + "x-stainless-const": true }, - "text": { + "item_id": { "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 + "description": "The ID of the output item that the function-call arguments delta is added to." }, - "top_logprobs": { - "type": "integer", + "output_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true - }, - "temperature": { - "type": "number", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } - ], - "nullable": true, - "default": 1 + "description": "The index of the output item that the function-call arguments delta is added to." }, - "top_p": { - "type": "number", + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.numeric" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "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)." + "description": "The sequence number of this event." }, - "prompt_cache_key": { + "delta": { "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": { + "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": [ - "in-memory", - "24h" + "response.function_call_arguments.done" ], - "nullable": true + "x-stainless-const": true }, - "previous_response_id": { + "item_id": { "type": "string", - "nullable": true + "description": "The ID of the item." }, - "model": { + "name": { "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 + "description": "The name of the function that was called." }, - "max_output_tokens": { - "type": "integer", + "output_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "description": "The index of the output item." }, - "max_tool_calls": { - "type": "integer", + "sequence_number": { "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" + "description": "The sequence number of this event." }, - "id": { + "arguments": { "type": "string", - "description": "Unique identifier for this Response." - }, - "object": { + "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" + "response.image_generation_call.completed" ], - "description": "The object type of this resource - always set to `response`.", + "description": "The type of the event. Always 'response.image_generation_call.completed'.", "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", + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponseError" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "description": "The index of the output item in the response's output array." }, - "incomplete_details": { - "type": "object", + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ResponseIncompleteDetails" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "description": "The sequence number of this event." }, - "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." + "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 }, - "instructions": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.InputItem" - } + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "description": "The index of the output item in the response's output array." }, - "output_text": { + "item_id": { "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 + "description": "The unique identifier of the image generation item being processed." }, - "conversation": { - "type": "object", + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ConversationReference" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true + "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 }, - "agent": { + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/AgentId" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "(Deprecated) Use agent_reference instead.\nThe agent used for this response" + "description": "The index of the output item in the response's output array." }, - "agent_session_id": { + "item_id": { "type": "string", - "description": "The session identifier for this response. Currently only relevant for hosted agents.\nAlways returned for hosted agents — either the caller-provided value, the auto-derived value,\nor an auto-generated UUID. Use for session-scoped operations and to maintain sandbox\naffinity in follow-up calls." + "description": "The unique identifier of the image generation item being processed." }, - "agent_reference": { - "type": "object", + "sequence_number": { "allOf": [ { - "$ref": "#/components/schemas/AgentReference" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "nullable": true, - "description": "The agent used for this response" - }, - "content_filters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContentFilterResult" - }, - "description": "The content filter evaluation results." + "description": "The sequence number of the image generation item being processed." } }, - "title": "The response object" + "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.ResponseAudioDeltaEvent": { + "OpenAI.ResponseImageGenCallPartialImageEvent": { "type": "object", "required": [ "type", + "output_index", + "item_id", "sequence_number", - "delta" + "partial_image_index", + "partial_image_b64" ], "properties": { "type": { "type": "string", "enum": [ - "response.audio.delta" + "response.image_generation_call.partial_image" ], - "description": "The type of the event. Always `response.audio.delta`.", + "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": "A sequence number for this chunk of the stream response." + "description": "The sequence number of the image generation item being processed." }, - "delta": { + "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", - "format": "base64", - "description": "A chunk of Base64 encoded response audio bytes." + "description": "Base64-encoded partial image data, suitable for rendering as an image." } }, - "description": "Emitted when there is a partial audio response.", + "description": "Emitted when a partial image is available during image generation streaming.", + "title": "ResponseImageGenCallPartialImageEvent", "x-oaiMeta": { - "name": "response.audio.delta", + "name": "response.image_generation_call.partial_image", "group": "responses", - "example": "{\n \"type\": \"response.audio.delta\",\n \"response_id\": \"resp_123\",\n \"delta\": \"base64encoded...\",\n \"sequence_number\": 1\n}\n" + "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.ResponseAudioDoneEvent": { + "OpenAI.ResponseInProgressEvent": { "type": "object", "required": [ "type", + "response", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.audio.done" + "response.in_progress" ], - "description": "The type of the event. Always `response.audio.done`.", + "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 the delta." + "description": "The sequence number of this event." } }, - "description": "Emitted when the audio response is complete.", + "description": "Emitted when the response is in progress.", "x-oaiMeta": { - "name": "response.audio.done", + "name": "response.in_progress", "group": "responses", - "example": "{\n \"type\": \"response.audio.done\",\n \"response_id\": \"resp-123\",\n \"sequence_number\": 1\n}\n" + "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.ResponseAudioTranscriptDeltaEvent": { + "OpenAI.ResponseIncompleteDetails": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "enum": [ + "max_output_tokens", + "content_filter" + ] + } + } + }, + "OpenAI.ResponseIncompleteEvent": { "type": "object", "required": [ "type", - "delta", + "response", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.audio.transcript.delta" + "response.incomplete" ], - "description": "The type of the event. Always `response.audio.transcript.delta`.", + "description": "The type of the event. Always `response.incomplete`.", "x-stainless-const": true }, - "delta": { - "type": "string", - "description": "The partial transcript of the audio response." + "response": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Response" + } + ], + "description": "The response that was incomplete." }, "sequence_number": { "allOf": [ @@ -35848,28 +44855,87 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when there is a partial transcript of audio.", + "description": "An event that is emitted when a response finishes as incomplete.", "x-oaiMeta": { - "name": "response.audio.transcript.delta", + "name": "response.incomplete", "group": "responses", - "example": "{\n \"type\": \"response.audio.transcript.delta\",\n \"response_id\": \"resp_123\",\n \"delta\": \" ... partial transcript ... \",\n \"sequence_number\": 1\n}\n" + "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.ResponseAudioTranscriptDoneEvent": { + "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.audio.transcript.done" + "response.mcp_call_arguments.delta" ], - "description": "The type of the event. Always `response.audio.transcript.done`.", + "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": [ { @@ -35879,29 +44945,30 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when the full audio transcript is completed.", + "description": "Emitted when there is a delta (partial update) to the arguments of an MCP tool call.", + "title": "ResponseMCPCallArgumentsDeltaEvent", "x-oaiMeta": { - "name": "response.audio.transcript.done", + "name": "response.mcp_call_arguments.delta", "group": "responses", - "example": "{\n \"type\": \"response.audio.transcript.done\",\n \"response_id\": \"resp_123\",\n \"sequence_number\": 1\n}\n" + "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.ResponseCodeInterpreterCallCodeDeltaEvent": { + "OpenAI.ResponseMCPCallArgumentsDoneEvent": { "type": "object", "required": [ "type", "output_index", "item_id", - "delta", + "arguments", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call_code.delta" + "response.mcp_call_arguments.done" ], - "description": "The type of the event. Always `response.code_interpreter_call_code.delta`.", + "description": "The type of the event. Always 'response.mcp_call_arguments.done'.", "x-stainless-const": true }, "output_index": { @@ -35910,15 +44977,15 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item in the response for which the code is being streamed." + "description": "The index of the output item in the response's output array." }, "item_id": { "type": "string", - "description": "The unique identifier of the code interpreter tool call item." + "description": "The unique identifier of the MCP tool call item being processed." }, - "delta": { + "arguments": { "type": "string", - "description": "The partial code snippet being streamed by the code interpreter." + "description": "A JSON string containing the finalized arguments for the MCP tool call." }, "sequence_number": { "allOf": [ @@ -35926,49 +44993,91 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "description": "The sequence number of this event." } }, - "description": "Emitted when a partial code snippet is streamed by the code interpreter.", + "description": "Emitted when the arguments for an MCP tool call are finalized.", + "title": "ResponseMCPCallArgumentsDoneEvent", "x-oaiMeta": { - "name": "response.code_interpreter_call_code.delta", + "name": "response.mcp_call_arguments.done", "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" + "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.ResponseCodeInterpreterCallCodeDoneEvent": { + "OpenAI.ResponseMCPCallCompletedEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", - "code", + "output_index", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call_code.done" + "response.mcp_call.completed" ], - "description": "The type of the event. Always `response.code_interpreter_call_code.done`.", + "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 in the response for which the code is finalized." + "description": "The index of the output item that completed." }, - "item_id": { + "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", - "description": "The unique identifier of the code interpreter tool call item." + "enum": [ + "response.mcp_call.failed" + ], + "description": "The type of the event. Always 'response.mcp_call.failed'.", + "x-stainless-const": true }, - "code": { + "item_id": { "type": "string", - "description": "The final code snippet output by the code interpreter." + "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": [ @@ -35976,44 +45085,91 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "description": "The sequence number of this event." } }, - "description": "Emitted when the code snippet is finalized by the code interpreter.", + "description": "Emitted when an MCP tool call has failed.", + "title": "ResponseMCPCallFailedEvent", "x-oaiMeta": { - "name": "response.code_interpreter_call_code.done", + "name": "response.mcp_call.failed", "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" + "example": "{\n \"type\": \"response.mcp_call.failed\",\n \"sequence_number\": 1,\n \"item_id\": \"mcp_682d437d90a88191bf88cd03aae0c3e503937d5f622d7a90\",\n \"output_index\": 0\n}\n" } }, - "OpenAI.ResponseCodeInterpreterCallCompletedEvent": { + "OpenAI.ResponseMCPCallInProgressEvent": { "type": "object", "required": [ "type", + "sequence_number", "output_index", - "item_id", - "sequence_number" + "item_id" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call.completed" + "response.mcp_call.in_progress" ], - "description": "The type of the event. Always `response.code_interpreter_call.completed`.", + "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 for which the code interpreter call is completed." + "description": "The index of the output item in the response's output array." }, "item_id": { "type": "string", - "description": "The unique identifier of the code interpreter tool call item." + "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": [ @@ -36021,44 +45177,45 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "description": "The sequence number of this event." } }, - "description": "Emitted when the code interpreter call is completed.", + "description": "Emitted when the list of available MCP tools has been successfully retrieved.", + "title": "ResponseMCPListToolsCompletedEvent", "x-oaiMeta": { - "name": "response.code_interpreter_call.completed", + "name": "response.mcp_list_tools.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" + "example": "{\n \"type\": \"response.mcp_list_tools.completed\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n" } }, - "OpenAI.ResponseCodeInterpreterCallInProgressEvent": { + "OpenAI.ResponseMCPListToolsFailedEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", + "output_index", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call.in_progress" + "response.mcp_list_tools.failed" ], - "description": "The type of the event. Always `response.code_interpreter_call.in_progress`.", + "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 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." + "description": "The index of the output item that failed." }, "sequence_number": { "allOf": [ @@ -36066,44 +45223,45 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "description": "The sequence number of this event." } }, - "description": "Emitted when a code interpreter call is in progress.", + "description": "Emitted when the attempt to list available MCP tools has failed.", + "title": "ResponseMCPListToolsFailedEvent", "x-oaiMeta": { - "name": "response.code_interpreter_call.in_progress", + "name": "response.mcp_list_tools.failed", "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" + "example": "{\n \"type\": \"response.mcp_list_tools.failed\",\n \"sequence_number\": 1,\n \"output_index\": 0,\n \"item_id\": \"mcpl_682d4379df088191886b70f4ec39f90403937d5f622d7a90\"\n}\n" } }, - "OpenAI.ResponseCodeInterpreterCallInterpretingEvent": { + "OpenAI.ResponseMCPListToolsInProgressEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", + "output_index", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.code_interpreter_call.interpreting" + "response.mcp_list_tools.in_progress" ], - "description": "The type of the event. Always `response.code_interpreter_call.interpreting`.", + "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 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." + "description": "The index of the output item that is being processed." }, "sequence_number": { "allOf": [ @@ -36111,39 +45269,41 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event, used to order streaming events." + "description": "The sequence number of this event." } }, - "description": "Emitted when the code interpreter is actively interpreting the code snippet.", + "description": "Emitted when the system is in the process of retrieving the list of available MCP tools.", + "title": "ResponseMCPListToolsInProgressEvent", "x-oaiMeta": { - "name": "response.code_interpreter_call.interpreting", + "name": "response.mcp_list_tools.in_progress", "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" + "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.ResponseCompletedEvent": { + "OpenAI.ResponseOutputItemAddedEvent": { "type": "object", "required": [ "type", - "response", - "sequence_number" + "output_index", + "sequence_number", + "item" ], "properties": { "type": { "type": "string", "enum": [ - "response.completed" + "response.output_item.added" ], - "description": "The type of the event. Always `response.completed`.", + "description": "The type of the event. Always `response.output_item.added`.", "x-stainless-const": true }, - "response": { + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Response" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "Properties of the completed response." + "description": "The index of the output item that was added." }, "sequence_number": { "allOf": [ @@ -36151,101 +45311,96 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number for this event." + "description": "The sequence number of this event." + }, + "item": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output item that was added." } }, - "description": "Emitted when the model response is complete.", + "description": "Emitted when a new output item is added.", "x-oaiMeta": { - "name": "response.completed", + "name": "response.output_item.added", "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" + "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.ResponseContentPartAddedEvent": { + "OpenAI.ResponseOutputItemDoneEvent": { "type": "object", "required": [ "type", - "item_id", "output_index", - "content_index", - "part", - "sequence_number" + "sequence_number", + "item" ], "properties": { "type": { "type": "string", "enum": [ - "response.content_part.added" + "response.output_item.done" ], - "description": "The type of the event. Always `response.content_part.added`.", + "description": "The type of the event. Always `response.output_item.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." + "description": "The index of the output item that was marked done." }, - "content_index": { + "sequence_number": { "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." + "description": "The sequence number of this event." }, - "sequence_number": { + "item": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "The sequence number of this event." + "description": "The output item that was marked done." } }, - "description": "Emitted when a new content part is added.", + "description": "Emitted when an output item is marked done.", "x-oaiMeta": { - "name": "response.content_part.added", + "name": "response.output_item.done", "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" + "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.ResponseContentPartDoneEvent": { + "OpenAI.ResponseOutputTextAnnotationAddedEvent": { "type": "object", "required": [ "type", "item_id", "output_index", "content_index", + "annotation_index", "sequence_number", - "part" + "annotation" ], "properties": { "type": { "type": "string", "enum": [ - "response.content_part.done" + "response.output_text.annotation.added" ], - "description": "The type of the event. Always `response.content_part.done`.", + "description": "The type of the event. Always 'response.output_text.annotation.added'.", "x-stainless-const": true }, "item_id": { "type": "string", - "description": "The ID of the output item that the content part was added to." + "description": "The unique identifier of the item to which the annotation is being added." }, "output_index": { "allOf": [ @@ -36253,7 +45408,7 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item that the content part was added to." + "description": "The index of the output item in the response's output array." }, "content_index": { "allOf": [ @@ -36261,7 +45416,15 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the content part that is done." + "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": [ @@ -36271,23 +45434,47 @@ ], "description": "The sequence number of this event." }, - "part": { + "annotation": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputContent" + "$ref": "#/components/schemas/OpenAI.Annotation" } ], - "description": "The content part that is done." + "description": "The annotation object being added. (See annotation schema for details.)" } }, - "description": "Emitted when a content part is done.", + "description": "Emitted when an annotation is added to output text content.", + "title": "ResponseOutputTextAnnotationAddedEvent", "x-oaiMeta": { - "name": "response.content_part.done", + "name": "response.output_text.annotation.added", "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" + "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.ResponseCreatedEvent": { + "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", @@ -36298,9 +45485,9 @@ "type": { "type": "string", "enum": [ - "response.created" + "response.queued" ], - "description": "The type of the event. Always `response.created`.", + "description": "The type of the event. Always 'response.queued'.", "x-stainless-const": true }, "response": { @@ -36309,7 +45496,7 @@ "$ref": "#/components/schemas/OpenAI.Response" } ], - "description": "The response that was created." + "description": "The full response object that is queued." }, "sequence_number": { "allOf": [ @@ -36320,81 +45507,52 @@ "description": "The sequence number for this event." } }, - "description": "An event that is emitted when a response is created.", + "description": "Emitted when a response is queued and waiting to be processed.", + "title": "ResponseQueuedEvent", "x-oaiMeta": { - "name": "response.created", + "name": "response.queued", "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" + "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.ResponseCustomToolCallInputDeltaEvent": { + "OpenAI.ResponseReasoningSummaryPartAddedEvent": { "type": "object", "required": [ "type", - "sequence_number", - "output_index", "item_id", - "delta" + "output_index", + "summary_index", + "sequence_number", + "part" ], "properties": { "type": { "type": "string", "enum": [ - "response.custom_tool_call_input.delta" + "response.reasoning_summary_part.added" ], - "description": "The event type identifier.", + "description": "The type of the event. Always `response.reasoning_summary_part.added`.", "x-stainless-const": true }, - "sequence_number": { + "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 sequence number of this event." + "description": "The index of the output item this summary part is associated with." }, - "output_index": { + "summary_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 + "description": "The index of the summary part within the reasoning summary." }, "sequence_number": { "allOf": [ @@ -36404,101 +45562,79 @@ ], "description": "The sequence number of this event." }, - "output_index": { + "part": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartAddedEventPart" } ], - "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": "The summary part that was added." } }, - "description": "Event indicating that input for a custom tool call is complete.", - "title": "ResponseCustomToolCallInputDone", + "description": "Emitted when a new reasoning summary part is added.", "x-oaiMeta": { - "name": "response.custom_tool_call_input.done", + "name": "response.reasoning_summary_part.added", "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" + "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.ResponseError": { + "OpenAI.ResponseReasoningSummaryPartAddedEventPart": { "type": "object", "required": [ - "code", - "message" + "type", + "text" ], "properties": { - "code": { - "$ref": "#/components/schemas/OpenAI.ResponseErrorCode" - }, - "message": { + "type": { "type": "string", - "description": "A human-readable description of the error." + "enum": [ + "summary_text" + ], + "x-stainless-const": true + }, + "text": { + "type": "string" } - }, - "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": { + "OpenAI.ResponseReasoningSummaryPartDoneEvent": { "type": "object", "required": [ "type", - "code", - "message", - "param", - "sequence_number" + "item_id", + "output_index", + "summary_index", + "sequence_number", + "part" ], "properties": { "type": { "type": "string", "enum": [ - "error" + "response.reasoning_summary_part.done" ], - "description": "The type of the event. Always `error`.", + "description": "The type of the event. Always `response.reasoning_summary_part.done`.", "x-stainless-const": true }, - "code": { + "item_id": { "type": "string", - "nullable": true + "description": "The ID of the item this summary part is associated with." }, - "message": { - "type": "string", - "description": "The error message." + "output_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the output item this summary part is associated with." }, - "param": { - "type": "string", - "nullable": true + "summary_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the summary part within the reasoning summary." }, "sequence_number": { "allOf": [ @@ -36507,83 +45643,84 @@ } ], "description": "The sequence number of this event." + }, + "part": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEventPart" + } + ], + "description": "The completed summary part." } }, - "description": "Emitted when an error occurs.", + "description": "Emitted when a reasoning summary part is completed.", "x-oaiMeta": { - "name": "error", + "name": "response.reasoning_summary_part.done", "group": "responses", - "example": "{\n \"type\": \"error\",\n \"code\": \"ERR_SOMETHING\",\n \"message\": \"Something went wrong\",\n \"param\": null,\n \"sequence_number\": 1\n}\n" + "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.ResponseFailedEvent": { + "OpenAI.ResponseReasoningSummaryPartDoneEventPart": { "type": "object", "required": [ "type", - "sequence_number", - "response" + "text" ], "properties": { "type": { "type": "string", "enum": [ - "response.failed" + "summary_text" ], - "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." + "text": { + "type": "string" } - }, - "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": { + "OpenAI.ResponseReasoningSummaryTextDeltaEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", + "output_index", + "summary_index", + "delta", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.file_search_call.completed" + "response.reasoning_summary_text.delta" ], - "description": "The type of the event. Always `response.file_search_call.completed`.", + "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 that the file search call is initiated." + "description": "The index of the output item this summary text delta is associated with." }, - "item_id": { + "summary_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the summary part within the reasoning summary." + }, + "delta": { "type": "string", - "description": "The ID of the output item that the file search call is initiated." + "description": "The text delta that was added to the summary." }, "sequence_number": { "allOf": [ @@ -36594,41 +45731,55 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when a file search call is completed (results found).", + "description": "Emitted when a delta is added to a reasoning summary text.", "x-oaiMeta": { - "name": "response.file_search_call.completed", + "name": "response.reasoning_summary_text.delta", "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" + "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.ResponseFileSearchCallInProgressEvent": { + "OpenAI.ResponseReasoningSummaryTextDoneEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", + "output_index", + "summary_index", + "text", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.file_search_call.in_progress" + "response.reasoning_summary_text.done" ], - "description": "The type of the event. Always `response.file_search_call.in_progress`.", + "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 that the file search call is initiated." + "description": "The index of the output item this summary text is associated with." }, - "item_id": { + "summary_index": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } + ], + "description": "The index of the summary part within the reasoning summary." + }, + "text": { "type": "string", - "description": "The ID of the output item that the file search call is initiated." + "description": "The full text of the completed reasoning summary." }, "sequence_number": { "allOf": [ @@ -36639,41 +45790,55 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when a file search call is initiated.", + "description": "Emitted when a reasoning summary text is completed.", "x-oaiMeta": { - "name": "response.file_search_call.in_progress", + "name": "response.reasoning_summary_text.done", "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" + "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.ResponseFileSearchCallSearchingEvent": { + "OpenAI.ResponseReasoningTextDeltaEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", + "output_index", + "content_index", + "delta", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.file_search_call.searching" + "response.reasoning_text.delta" ], - "description": "The type of the event. Always `response.file_search_call.searching`.", + "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 that the file search call is searching." + "description": "The index of the output item this reasoning text delta is associated with." }, - "item_id": { + "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 ID of the output item that the file search call is initiated." + "description": "The text delta that was added to the reasoning content." }, "sequence_number": { "allOf": [ @@ -36684,130 +45849,94 @@ "description": "The sequence number of this event." } }, - "description": "Emitted when a file search is currently searching.", + "description": "Emitted when a delta is added to a reasoning text.", "x-oaiMeta": { - "name": "response.file_search_call.searching", + "name": "response.reasoning_text.delta", "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" + "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.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": { + "OpenAI.ResponseReasoningTextDoneEvent": { "type": "object", "required": [ "type", - "json_schema" + "item_id", + "output_index", + "content_index", + "text", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "json_schema" + "response.reasoning_text.done" ], - "description": "The type of response format being defined. Always `json_schema`.", + "description": "The type of the event. Always `response.reasoning_text.done`.", "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" + "item_id": { + "type": "string", + "description": "The ID of the item this reasoning text is associated with." }, - "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": { + "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", - "enum": [ - "text" + "description": "The full text of the completed reasoning content." + }, + "sequence_number": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.integer" + } ], - "description": "The type of response format being defined. Always `text`.", - "x-stainless-const": true + "description": "The sequence number of this event." } }, - "description": "Default response format. Used to generate text responses.", - "title": "Text" + "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.ResponseFunctionCallArgumentsDeltaEvent": { + "OpenAI.ResponseRefusalDeltaEvent": { "type": "object", "required": [ "type", "item_id", "output_index", - "sequence_number", - "delta" + "content_index", + "delta", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.function_call_arguments.delta" + "response.refusal.delta" ], - "description": "The type of the event. Always `response.function_call_arguments.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 function-call arguments delta is added to." + "description": "The ID of the output item that the refusal text is added to." }, "output_index": { "allOf": [ @@ -36815,53 +45944,58 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item that the function-call arguments delta is added to." + "description": "The index of the output item that the refusal text is added to." }, - "sequence_number": { + "content_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event." + "description": "The index of the content part that the refusal text is added to." }, "delta": { "type": "string", - "description": "The function-call arguments delta that is added." + "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 function-call arguments delta.", + "description": "Emitted when there is a partial refusal text.", "x-oaiMeta": { - "name": "response.function_call_arguments.delta", + "name": "response.refusal.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" + "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.ResponseFunctionCallArgumentsDoneEvent": { + "OpenAI.ResponseRefusalDoneEvent": { "type": "object", "required": [ "type", "item_id", - "name", "output_index", - "sequence_number", - "arguments" + "content_index", + "refusal", + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.function_call_arguments.done" + "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 item." - }, - "name": { - "type": "string", - "description": "The name of the function that was called." + "description": "The ID of the output item that the refusal text is finalized." }, "output_index": { "allOf": [ @@ -36869,102 +46003,156 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item." + "description": "The index of the output item that the refusal text is finalized." }, - "sequence_number": { + "content_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event." + "description": "The index of the content part that the refusal text is finalized." }, - "arguments": { + "refusal": { "type": "string", - "description": "The function-call arguments." + "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 function-call arguments are finalized.", + "description": "Emitted when refusal text is finalized.", "x-oaiMeta": { - "name": "response.function_call_arguments.done", + "name": "response.refusal.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" + "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.ResponseImageGenCallCompletedEvent": { + "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", - "item_id" + "logprobs" ], "properties": { "type": { "type": "string", "enum": [ - "response.image_generation_call.completed" + "response.output_text.delta" ], - "description": "The type of the event. Always 'response.image_generation_call.completed'.", + "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 in the response's output array." + "description": "The index of the output item that the text delta was added to." }, - "sequence_number": { + "content_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event." + "description": "The index of the content part that the text delta was added to." }, - "item_id": { + "delta": { "type": "string", - "description": "The unique identifier of the image generation item being processed." + "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 an image generation tool call has completed and the final image is available.", - "title": "ResponseImageGenCallCompletedEvent", + "description": "Emitted when there is an additional text delta.", "x-oaiMeta": { - "name": "response.image_generation_call.completed", + "name": "response.output_text.delta", "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" + "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.ResponseImageGenCallGeneratingEvent": { + "OpenAI.ResponseTextDoneEvent": { "type": "object", "required": [ "type", - "output_index", "item_id", - "sequence_number" + "output_index", + "content_index", + "text", + "sequence_number", + "logprobs" ], "properties": { "type": { "type": "string", "enum": [ - "response.image_generation_call.generating" + "response.output_text.done" ], - "description": "The type of the event. Always 'response.image_generation_call.generating'.", + "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 in the response's output array." + "description": "The index of the output item that the text content is finalized." }, - "item_id": { + "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 unique identifier of the image generation item being processed." + "description": "The text content that is finalized." }, "sequence_number": { "allOf": [ @@ -36972,18 +46160,111 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of the image generation item being processed." + "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 an image generation tool call is actively generating an image (intermediate state).", - "title": "ResponseImageGenCallGeneratingEvent", + "description": "Emitted when text content is finalized.", "x-oaiMeta": { - "name": "response.image_generation_call.generating", + "name": "response.output_text.done", "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" + "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.ResponseImageGenCallInProgressEvent": { + "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", @@ -36995,9 +46276,9 @@ "type": { "type": "string", "enum": [ - "response.image_generation_call.in_progress" + "response.web_search_call.completed" ], - "description": "The type of the event. Always 'response.image_generation_call.in_progress'.", + "description": "The type of the event. Always `response.web_search_call.completed`.", "x-stainless-const": true }, "output_index": { @@ -37006,11 +46287,11 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item in the response's output array." + "description": "The index of the output item that the web search call is associated with." }, "item_id": { "type": "string", - "description": "The unique identifier of the image generation item being processed." + "description": "Unique ID for the output item associated with the web search call." }, "sequence_number": { "allOf": [ @@ -37018,34 +46299,31 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of the image generation item being processed." + "description": "The sequence number of the web search call being processed." } }, - "description": "Emitted when an image generation tool call is in progress.", - "title": "ResponseImageGenCallInProgressEvent", + "description": "Emitted when a web search call is completed.", "x-oaiMeta": { - "name": "response.image_generation_call.in_progress", + "name": "response.web_search_call.completed", "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" + "example": "{\n \"type\": \"response.web_search_call.completed\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" } }, - "OpenAI.ResponseImageGenCallPartialImageEvent": { + "OpenAI.ResponseWebSearchCallInProgressEvent": { "type": "object", "required": [ "type", "output_index", "item_id", - "sequence_number", - "partial_image_index", - "partial_image_b64" + "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.image_generation_call.partial_image" + "response.web_search_call.in_progress" ], - "description": "The type of the event. Always 'response.image_generation_call.partial_image'.", + "description": "The type of the event. Always `response.web_search_call.in_progress`.", "x-stainless-const": true }, "output_index": { @@ -37054,11 +46332,11 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item in the response's output array." + "description": "The index of the output item that the web search call is associated with." }, "item_id": { "type": "string", - "description": "The unique identifier of the image generation item being processed." + "description": "Unique ID for the output item associated with the web search call." }, "sequence_number": { "allOf": [ @@ -37066,52 +46344,44 @@ "$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": "The sequence number of the web search call being processed." } }, - "description": "Emitted when a partial image is available during image generation streaming.", - "title": "ResponseImageGenCallPartialImageEvent", + "description": "Emitted when a web search call is initiated.", "x-oaiMeta": { - "name": "response.image_generation_call.partial_image", + "name": "response.web_search_call.in_progress", "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" + "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.ResponseInProgressEvent": { + "OpenAI.ResponseWebSearchCallSearchingEvent": { "type": "object", "required": [ "type", - "response", + "output_index", + "item_id", "sequence_number" ], "properties": { "type": { "type": "string", "enum": [ - "response.in_progress" + "response.web_search_call.searching" ], - "description": "The type of the event. Always `response.in_progress`.", + "description": "The type of the event. Always `response.web_search_call.searching`.", "x-stainless-const": true }, - "response": { + "output_index": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Response" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The response that is in progress." + "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": [ @@ -37119,867 +46389,801 @@ "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event." + "description": "The sequence number of the web search call being processed." } }, - "description": "Emitted when the response is in progress.", + "description": "Emitted when a web search call is executing.", "x-oaiMeta": { - "name": "response.in_progress", + "name": "response.web_search_call.searching", "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" + "example": "{\n \"type\": \"response.web_search_call.searching\",\n \"output_index\": 0,\n \"item_id\": \"ws_123\",\n \"sequence_number\": 0\n}\n" } }, - "OpenAI.ResponseIncompleteDetails": { + "OpenAI.ScreenshotParam": { "type": "object", + "required": [ + "type" + ], "properties": { - "reason": { + "type": { "type": "string", "enum": [ - "max_output_tokens", - "content_filter" - ] + "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.ResponseIncompleteEvent": { + "OpenAI.ScrollParam": { "type": "object", "required": [ "type", - "response", - "sequence_number" + "x", + "y", + "scroll_x", + "scroll_y" ], "properties": { "type": { "type": "string", "enum": [ - "response.incomplete" + "scroll" ], - "description": "The type of the event. Always `response.incomplete`.", - "x-stainless-const": true + "description": "Specifies the event type. For a scroll action, this property is always set to `scroll`.", + "x-stainless-const": true, + "default": "scroll" }, - "response": { + "x": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Response" + "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The response that was incomplete." + "description": "The x-coordinate where the scroll occurred." }, - "sequence_number": { + "y": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The sequence number of this event." + "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." } }, - "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" - } + "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.ResponseLogProb": { + "OpenAI.SpecificApplyPatchParam": { "type": "object", "required": [ - "token", - "logprob" + "type" ], "properties": { - "token": { + "type": { "type": "string", - "description": "A possible text token." - }, - "logprob": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.numeric" - } + "enum": [ + "apply_patch" ], - "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": "The tool to call. Always `apply_patch`.", + "x-stainless-const": true, + "default": "apply_patch" } }, - "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" + "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.ResponseMCPCallArgumentsDeltaEvent": { + "OpenAI.SpecificFunctionShellParam": { "type": "object", "required": [ - "type", - "output_index", - "item_id", - "delta", - "sequence_number" + "type" ], "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" - } + "shell" ], - "description": "The sequence number of this event." + "description": "The tool to call. Always `shell`.", + "x-stainless-const": true, + "default": "shell" } }, - "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" - } + "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.ResponseMCPCallArgumentsDoneEvent": { + "OpenAI.SummaryTextContent": { "type": "object", "required": [ "type", - "output_index", - "item_id", - "arguments", - "sequence_number" + "text" ], "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" - } + "summary_text" ], - "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": "The type of the object. Always `summary_text`.", + "x-stainless-const": true, + "default": "summary_text" }, - "arguments": { + "text": { "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": "A summary of the reasoning output from the model so far." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A summary text from the model.", + "title": "Summary text" }, - "OpenAI.ResponseMCPCallCompletedEvent": { + "OpenAI.TextContent": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "sequence_number" + "text" ], "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" - } + "text" ], - "description": "The index of the output item that completed." + "x-stainless-const": true, + "default": "text" }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "text": { + "type": "string" } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.MessageContent" + } + ], + "description": "A text content.", + "title": "Text Content" }, - "OpenAI.ResponseMCPCallFailedEvent": { + "OpenAI.TextResponseFormatConfiguration": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "sequence_number" + "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": [ - "response.mcp_call.failed" + "json_object" ], - "description": "The type of the event. Always 'response.mcp_call.failed'.", + "description": "The type of response format being defined. Always `json_object`.", "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" - } + "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.ResponseMCPCallInProgressEvent": { + "OpenAI.TextResponseFormatConfigurationResponseFormatText": { "type": "object", "required": [ - "type", - "sequence_number", - "output_index", - "item_id" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "response.mcp_call.in_progress" + "text" ], - "description": "The type of the event. Always 'response.mcp_call.in_progress'.", + "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" }, - "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." + "enum": [ + "text", + "json_schema", + "json_object" + ] } - }, - "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": { + "OpenAI.TextResponseFormatJsonSchema": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "sequence_number" + "name", + "schema" ], "properties": { "type": { "type": "string", "enum": [ - "response.mcp_list_tools.completed" + "json_schema" ], - "description": "The type of the event. Always 'response.mcp_list_tools.completed'.", + "description": "The type of response format being defined. Always `json_schema`.", "x-stainless-const": true }, - "item_id": { + "description": { "type": "string", - "description": "The ID of the MCP tool call item that produced this output." + "description": "A description of what the response format is for, used by the model to\n determine how to respond in the format." }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the output item that was processed." + "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." }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "schema": { + "$ref": "#/components/schemas/OpenAI.ResponseFormatJsonSchemaSchema" + }, + "strict": { + "type": "boolean", + "nullable": true } }, - "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" - } + "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.ResponseMCPListToolsFailedEvent": { + "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", + "memory_search_preview": "#/components/schemas/MemorySearchPreviewTool", + "memory_search": "#/components/schemas/MemorySearchTool", + "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", - "item_id", - "output_index", - "sequence_number" + "mode", + "tools" ], "properties": { "type": { "type": "string", "enum": [ - "response.mcp_list_tools.failed" + "allowed_tools" ], - "description": "The type of the event. Always 'response.mcp_list_tools.failed'.", + "description": "Allowed tool configuration type. Always `allowed_tools`.", "x-stainless-const": true }, - "item_id": { + "mode": { "type": "string", - "description": "The ID of the MCP tool call item that failed." - }, - "output_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "enum": [ + "auto", + "required" ], - "description": "The index of the output item that failed." + "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." }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "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 ```" } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Constrains the tools available to the model to a pre-defined set.", + "title": "Allowed tools" }, - "OpenAI.ResponseMCPListToolsInProgressEvent": { + "OpenAI.ToolChoiceCodeInterpreter": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "sequence_number" + "type" ], "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." + "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" + ] } }, - "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" - } + "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.ResponseOutputItemAddedEvent": { + "OpenAI.ToolChoiceCustom": { "type": "object", "required": [ "type", - "output_index", - "sequence_number", - "item" + "name" ], "properties": { "type": { "type": "string", "enum": [ - "response.output_item.added" + "custom" ], - "description": "The type of the event. Always `response.output_item.added`.", + "description": "For custom tool calling, the type is always `custom`.", "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." + "name": { + "type": "string", + "description": "The name of the custom tool to call." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Use this option to force the model to call a specific custom tool.", + "title": "Custom tool" }, - "OpenAI.ResponseOutputItemDoneEvent": { + "OpenAI.ToolChoiceFileSearch": { "type": "object", "required": [ - "type", - "output_index", - "sequence_number", - "item" + "type" ], "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." + "file_search" + ] } }, - "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" - } + "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.ResponseOutputTextAnnotationAddedEvent": { + "OpenAI.ToolChoiceFunction": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "content_index", - "annotation_index", - "sequence_number", - "annotation" + "name" ], "properties": { "type": { "type": "string", "enum": [ - "response.output_text.annotation.added" + "function" ], - "description": "The type of the event. Always 'response.output_text.annotation.added'.", + "description": "For function calling, the type is always `function`.", "x-stainless-const": true }, - "item_id": { + "name": { "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": "The name of the function to call." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + } + ], + "description": "Use this option to force the model to call a specific function.", + "title": "Function tool" }, - "OpenAI.ResponsePromptVariables": { + "OpenAI.ToolChoiceImageGeneration": { "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.InputTextContent" - }, - { - "$ref": "#/components/schemas/OpenAI.InputImageContent" - }, - { - "$ref": "#/components/schemas/OpenAI.InputFileContent" - } - ] + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "image_generation" + ] + } }, - "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" + "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.ResponseQueuedEvent": { + "OpenAI.ToolChoiceMCP": { "type": "object", "required": [ "type", - "response", - "sequence_number" + "server_label" ], "properties": { "type": { "type": "string", "enum": [ - "response.queued" + "mcp" ], - "description": "The type of the event. Always 'response.queued'.", + "description": "For MCP tools, the type is always `mcp`.", "x-stainless-const": true }, - "response": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Response" - } - ], - "description": "The full response object that is queued." + "server_label": { + "type": "string", + "description": "The label of the MCP server to use." }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number for this event." + "name": { + "type": "string", + "nullable": true } }, - "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" - } + "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.ResponseReasoningSummaryPartAddedEvent": { + "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", - "item_id", - "output_index", - "summary_index", - "sequence_number", - "part" + "type" ], "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 + "$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" }, - "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." + "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" + ] } - }, - "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": { + "OpenAI.ToolChoiceWebSearchPreview": { "type": "object", "required": [ - "type", - "text" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "summary_text" - ], - "x-stainless-const": true - }, - "text": { - "type": "string" + "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.ResponseReasoningSummaryPartDoneEvent": { + "OpenAI.ToolChoiceWebSearchPreview20250311": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "summary_index", - "sequence_number", - "part" + "type" ], "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 + "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" }, - "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." + "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", + "azure_ai_search", + "azure_function", + "bing_grounding", + "capture_structured_outputs", + "openapi", + "memory_search" + ] + } + ] + }, + "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" }, - "part": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseReasoningSummaryPartDoneEventPart" - } - ], - "description": "The completed summary part." + "logprob": { + "$ref": "#/components/schemas/OpenAI.numeric" + }, + "bytes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.integer" + } } }, - "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" - } + "description": "The top log probability of a token.", + "title": "Top log probability" }, - "OpenAI.ResponseReasoningSummaryPartDoneEventPart": { + "OpenAI.TypeParam": { "type": "object", "required": [ "type", @@ -37989,3013 +47193,3623 @@ "type": { "type": "string", "enum": [ - "summary_text" + "type" ], - "x-stainless-const": true + "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" + "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.ResponseReasoningSummaryTextDeltaEvent": { + "OpenAI.UrlCitationBody": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "summary_index", - "delta", - "sequence_number" + "url", + "start_index", + "end_index", + "title" ], "properties": { "type": { "type": "string", "enum": [ - "response.reasoning_summary_text.delta" + "url_citation" ], - "description": "The type of the event. Always `response.reasoning_summary_text.delta`.", - "x-stainless-const": true + "description": "The type of the URL citation. Always `url_citation`.", + "x-stainless-const": true, + "default": "url_citation" }, - "item_id": { + "url": { "type": "string", - "description": "The ID of the item this summary text delta is associated with." + "format": "uri", + "description": "The URL of the web resource." }, - "output_index": { + "start_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the output item this summary text delta is associated with." + "description": "The index of the first character of the URL citation in the message." }, - "summary_index": { + "end_index": { "allOf": [ { "$ref": "#/components/schemas/OpenAI.integer" } ], - "description": "The index of the summary part within the reasoning summary." + "description": "The index of the last character of the URL citation in the message." }, - "delta": { + "title": { "type": "string", - "description": "The text delta that was added to the summary." - }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } + "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": "The sequence number of this event." + "description": "Specifies the event type. For a wait action, this property is always set to `wait`.", + "x-stainless-const": true, + "default": "wait" } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.ComputerAction" + } + ], + "description": "A wait action.", + "title": "Wait" }, - "OpenAI.ResponseReasoningSummaryTextDoneEvent": { + "OpenAI.WebSearchActionFind": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "summary_index", - "text", - "sequence_number" + "url", + "pattern" ], "properties": { "type": { "type": "string", "enum": [ - "response.reasoning_summary_text.done" + "find_in_page" ], - "description": "The type of the event. Always `response.reasoning_summary_text.done`.", + "description": "The action type.", "x-stainless-const": true }, - "item_id": { + "url": { "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." + "format": "uri", + "description": "The URL of the page searched for the pattern." }, - "text": { + "pattern": { "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": "The pattern or text to search for within the page." } }, - "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" - } + "description": "Action type \"find_in_page\": Searches for a pattern within a loaded page.", + "title": "Find action" }, - "OpenAI.ResponseReasoningTextDeltaEvent": { + "OpenAI.WebSearchActionOpenPage": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "content_index", - "delta", - "sequence_number" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "response.reasoning_text.delta" + "open_page" ], - "description": "The type of the event. Always `response.reasoning_text.delta`.", + "description": "The action type.", "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": { + "url": { "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." + "format": "uri", + "nullable": true, + "description": "The URL opened by the model." } }, - "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" - } + "description": "Action type \"open_page\" - Opens a specific URL from search results.", + "title": "Open page action" }, - "OpenAI.ResponseReasoningTextDoneEvent": { + "OpenAI.WebSearchActionSearch": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "content_index", - "text", - "sequence_number" + "query" ], "properties": { "type": { "type": "string", "enum": [ - "response.reasoning_text.done" + "search" ], - "description": "The type of the event. Always `response.reasoning_text.done`.", + "description": "The action type.", "x-stainless-const": true }, - "item_id": { + "query": { "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." + "description": "[DEPRECATED] The search query.", + "deprecated": true }, - "text": { - "type": "string", - "description": "The full text of the completed reasoning content." + "queries": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The search queries.", + "title": "Search queries" }, - "sequence_number": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The sequence number of this event." + "sources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.WebSearchActionSearchSources" + }, + "description": "The sources used in the search.", + "title": "Web search sources" } }, - "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" - } + "description": "Action type \"search\" - Performs a web search query.", + "title": "Search action" }, - "OpenAI.ResponseRefusalDeltaEvent": { + "OpenAI.WebSearchActionSearchSources": { "type": "object", "required": [ "type", - "item_id", - "output_index", - "content_index", - "delta", - "sequence_number" + "url" ], "properties": { "type": { "type": "string", "enum": [ - "response.refusal.delta" + "url" ], - "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." + "url": { + "type": "string" } - }, - "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": { + "OpenAI.WebSearchApproximateLocation": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "content_index", - "refusal", - "sequence_number" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "response.refusal.done" + "approximate" ], - "description": "The type of the event. Always `response.refusal.done`.", - "x-stainless-const": true + "description": "The type of location approximation. Always `approximate`.", + "x-stainless-const": true, + "default": "approximate" }, - "item_id": { + "country": { "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." + "nullable": true }, - "content_index": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The index of the content part that the refusal text is finalized." + "region": { + "type": "string", + "nullable": true }, - "refusal": { + "city": { "type": "string", - "description": "The refusal text that is finalized." + "nullable": true }, - "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." + "timezone": { + "type": "string", + "nullable": true } }, - "description": "Options for streaming responses. Only set this when you set `stream: true`." + "description": "The approximate location of the user.", + "title": "Web search approximate location" }, - "OpenAI.ResponseTextDeltaEvent": { + "OpenAI.WebSearchPreviewTool": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "content_index", - "delta", - "sequence_number", - "logprobs" + "type" ], "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" - } + "web_search_preview" ], - "description": "The index of the output item that the text delta was added to." + "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" }, - "content_index": { + "user_location": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.ApproximateLocation" } ], - "description": "The index of the content part that the text delta was added to." - }, - "delta": { - "type": "string", - "description": "The text delta that was added." + "nullable": true }, - "sequence_number": { + "search_context_size": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.SearchContextSize" } ], - "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": "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." } }, - "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" - } + "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.ResponseTextDoneEvent": { + "OpenAI.WebSearchTool": { "type": "object", "required": [ - "type", - "item_id", - "output_index", - "content_index", - "text", - "sequence_number", - "logprobs" + "type" ], "properties": { "type": { "type": "string", "enum": [ - "response.output_text.done" + "web_search" ], - "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." + "description": "The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.", + "default": "web_search" }, - "output_index": { + "filters": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.WebSearchToolFilters" } ], - "description": "The index of the output item that the text content is finalized." + "nullable": true }, - "content_index": { + "user_location": { + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenAI.WebSearchApproximateLocation" } ], - "description": "The index of the content part that the text content is finalized." + "nullable": true }, - "text": { + "search_context_size": { "type": "string", - "description": "The text content that is finalized." + "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" }, - "sequence_number": { + "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/OpenAI.integer" + "$ref": "#/components/schemas/WebSearchConfiguration" } ], - "description": "The sequence number for this event." - }, - "logprobs": { + "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": { - "$ref": "#/components/schemas/OpenAI.ResponseLogProb" + "type": "string" }, - "description": "The log probabilities of the tokens in the delta." + "nullable": true } - }, - "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": { + "OpenAI.integer": { + "type": "integer", + "format": "int64" + }, + "OpenAI.numeric": { + "type": "number", + "format": "double" + }, + "OpenApiAnonymousAuthDetails": { "type": "object", + "required": [ + "type" + ], "properties": { - "format": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" - }, - "verbosity": { - "$ref": "#/components/schemas/OpenAI.Verbosity" + "type": { + "type": "string", + "enum": [ + "anonymous" + ], + "description": "The object type, which is always 'anonymous'." } }, - "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)" + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiAuthDetails" + } + ], + "description": "Security details for OpenApi anonymous authentication" }, - "OpenAI.ResponseUsage": { + "OpenApiAuthDetails": { "type": "object", "required": [ - "input_tokens", - "input_tokens_details", - "output_tokens", - "output_tokens_details", - "total_tokens" + "type" ], "properties": { - "input_tokens": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenApiAuthType" } ], - "description": "The number of input tokens." + "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" + ] }, - "input_tokens_details": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsageInputTokensDetails" - } - ], - "description": "A detailed breakdown of the input tokens." + { + "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." }, - "output_tokens": { + "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/OpenAI.integer" + "$ref": "#/components/schemas/OpenApiAuthDetails" } ], - "description": "The number of output tokens." + "description": "Open API authentication details" }, - "output_tokens_details": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ResponseUsageOutputTokensDetails" - } + "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": "A detailed breakdown of the output tokens." + "description": "The object type, which is always 'managed_identity'." }, - "total_tokens": { + "security_scheme": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenApiManagedSecurityScheme" } ], - "description": "The total number of tokens used." + "description": "Connection auth security details" } }, - "description": "Represents token usage details including input tokens, output tokens,\na breakdown of output tokens, and the total tokens used." + "allOf": [ + { + "$ref": "#/components/schemas/OpenApiAuthDetails" + } + ], + "description": "Security details for OpenApi managed_identity authentication" }, - "OpenAI.ResponseUsageInputTokensDetails": { + "OpenApiManagedSecurityScheme": { "type": "object", "required": [ - "cached_tokens" + "audience" ], "properties": { - "cached_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" + "audience": { + "type": "string", + "description": "Authentication scope for managed_identity auth type" } - } + }, + "description": "Security scheme for OpenApi managed_identity authentication" }, - "OpenAI.ResponseUsageOutputTokensDetails": { + "OpenApiProjectConnectionAuthDetails": { "type": "object", "required": [ - "reasoning_tokens" + "type", + "security_scheme" ], "properties": { - "reasoning_tokens": { - "$ref": "#/components/schemas/OpenAI.integer" + "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" }, - "OpenAI.ResponseWebSearchCallCompletedEvent": { + "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", - "output_index", - "item_id", - "sequence_number" + "openapi" ], "properties": { "type": { "type": "string", "enum": [ - "response.web_search_call.completed" + "openapi" ], - "description": "The type of the event. Always `response.web_search_call.completed`.", - "x-stainless-const": true + "description": "The object type, which is always 'openapi'." }, - "output_index": { + "openapi": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/OpenApiFunctionDefinition" } ], - "description": "The index of the output item that the web search call is associated with." + "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" + ] }, - "item_id": { + "call_id": { "type": "string", - "description": "Unique ID for the output item associated with the web search call." + "description": "The unique ID of the tool call generated by the model." }, - "sequence_number": { + "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/OpenAI.integer" + "$ref": "#/components/schemas/ToolCallStatus" } ], - "description": "The sequence number of the web search call being processed." + "description": "The status of the tool call." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "An OpenAPI tool call." }, - "OpenAI.ResponseWebSearchCallInProgressEvent": { + "OpenApiToolCallOutput": { "type": "object", "required": [ "type", - "output_index", - "item_id", - "sequence_number" + "call_id", + "name", + "status" ], "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 + "openapi_call_output" + ] }, - "output_index": { + "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/OpenAI.integer" + "$ref": "#/components/schemas/ToolCallOutputContent" } ], - "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." + "description": "The output from the OpenAPI tool call." }, - "sequence_number": { + "status": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/ToolCallStatus" } ], - "description": "The sequence number of the web search call being processed." + "description": "The status of the tool call." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output of an OpenAPI tool call." }, - "OpenAI.ResponseWebSearchCallSearchingEvent": { + "OrpoTrainingConfiguration": { "type": "object", "required": [ - "type", - "output_index", - "item_id", - "sequence_number" + "algorithm" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "response.web_search_call.searching" + "orpo" ], - "description": "The type of the event. Always `response.web_search_call.searching`.", - "x-stainless-const": true + "description": "Training algorithm, always 'orpo'." }, - "output_index": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "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." + "description": "LoRA adapter configuration." }, - "sequence_number": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "The sequence number of the web search call being processed." + "description": "Evaluation configuration." } }, - "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" - } + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" + } + ], + "description": "Odds ratio preference optimization training recipe." }, - "OpenAI.ScreenshotParam": { + "OtlpTelemetryEndpoint": { "type": "object", "required": [ - "type" + "kind", + "endpoint", + "protocol" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "screenshot" + "OTLP" ], - "description": "Specifies the event type. For a screenshot action, this property is always set to `screenshot`.", - "x-stainless-const": true, - "default": "screenshot" + "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/OpenAI.ComputerAction" + "$ref": "#/components/schemas/TelemetryEndpoint" } ], - "description": "A screenshot action.", - "title": "Screenshot" + "description": "An OTLP (OpenTelemetry Protocol) telemetry export endpoint.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } }, - "OpenAI.ScrollParam": { - "type": "object", - "required": [ - "type", - "x", - "y", - "scroll_x", - "scroll_y" + "Output": { + "type": "object", + "required": [ + "job_output_type" ], "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": { + "job_output_type": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/AssetTypes" } ], - "description": "The x-coordinate where the scroll occurred." + "description": "Specifies the type of job output." }, - "y": { + "mode": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.integer" + "$ref": "#/components/schemas/InputOutputModes" } ], - "description": "The y-coordinate where the scroll occurred." + "description": "Output Asset Delivery Mode." }, - "scroll_x": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The horizontal scroll distance." + "asset_name": { + "type": "string", + "description": "Name of the output data asset to register." }, - "scroll_y": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.integer" - } - ], - "description": "The vertical scroll distance." + "asset_version": { + "type": "string", + "description": "Version of the output data asset to register." + }, + "uri": { + "type": "string", + "description": "Output Asset URI." + }, + "base_model_id": { + "type": "string", + "description": "Base model ID. Applies to safetensors_model outputs." + }, + "description": { + "type": "string", + "description": "Description for the output." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A scroll action.", - "title": "Scroll" + "description": "Job output definition." }, - "OpenAI.SearchContextSize": { + "PageOrder": { "type": "string", "enum": [ - "low", - "medium", - "high" + "asc", + "desc" ] }, - "OpenAI.ServiceTier": { - "type": "string", - "enum": [ - "auto", - "default", - "flex", - "scale", - "priority" + "PagedConnection": { + "type": "object", + "required": [ + "value" ], - "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 + "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" }, - "OpenAI.SkillReferenceParam": { + "PagedDatasetVersion": { "type": "object", "required": [ - "type", - "skill_id" + "value" ], "properties": { - "type": { - "type": "string", - "enum": [ - "skill_reference" - ], - "description": "References a skill created with the /v1/skills endpoint.", - "x-stainless-const": true, - "default": "skill_reference" + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetVersion" + }, + "description": "The DatasetVersion items on this page" }, - "skill_id": { + "nextLink": { "type": "string", - "minLength": 1, - "maxLength": 64, - "description": "The ID of the referenced skill." + "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" }, - "version": { + "nextLink": { "type": "string", - "description": "Optional skill version. Use a positive integer or 'latest'. Omit for default." + "format": "uri", + "description": "The link to the next page of items" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ContainerSkill" - } - ] + "description": "Paged collection of Deployment items" }, - "OpenAI.SpecificApplyPatchParam": { + "PagedEvaluation": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Evaluation" + }, + "description": "The Evaluation items on this page" + }, + "nextLink": { "type": "string", - "enum": [ - "apply_patch" - ], - "description": "The tool to call. Always `apply_patch`.", - "x-stainless-const": true, - "default": "apply_patch" + "format": "uri", + "description": "The link to the next page of items" } }, - "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" + "description": "Paged collection of Evaluation items" }, - "OpenAI.SpecificFunctionShellParam": { + "PagedEvaluationRule": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationRule" + }, + "description": "The EvaluationRule items on this page" + }, + "nextLink": { "type": "string", - "enum": [ - "shell" - ], - "description": "The tool to call. Always `shell`.", - "x-stainless-const": true, - "default": "shell" + "format": "uri", + "description": "The link to the next page of items" } }, - "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" + "description": "Paged collection of EvaluationRule items" }, - "OpenAI.SummaryTextContent": { + "PagedEvaluationTaxonomy": { "type": "object", "required": [ - "type", - "text" + "value" ], "properties": { - "type": { - "type": "string", - "enum": [ - "summary_text" - ], - "description": "The type of the object. Always `summary_text`.", - "x-stainless-const": true, - "default": "summary_text" + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluationTaxonomy" + }, + "description": "The EvaluationTaxonomy items on this page" }, - "text": { + "nextLink": { "type": "string", - "description": "A summary of the reasoning output from the model so far." + "format": "uri", + "description": "The link to the next page of items" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A summary text from the model.", - "title": "Summary text" + "description": "Paged collection of EvaluationTaxonomy items" }, - "OpenAI.TextContent": { + "PagedEvaluatorVersion": { "type": "object", "required": [ - "type", - "text" + "value" ], "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ], - "x-stainless-const": true, - "default": "text" + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvaluatorVersion" + }, + "description": "The EvaluatorVersion items on this page" }, - "text": { - "type": "string" + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.MessageContent" - } - ], - "description": "A text content.", - "title": "Text Content" + "description": "Paged collection of EvaluatorVersion items" }, - "OpenAI.TextResponseFormatConfiguration": { + "PagedIndex": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfigurationType" + "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" } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "json_schema": "#/components/schemas/OpenAI.TextResponseFormatJsonSchema", - "text": "#/components/schemas/OpenAI.TextResponseFormatConfigurationResponseFormatText", - "json_object": "#/components/schemas/OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject" + "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": "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." + "description": "Paged collection of Insight items" }, - "OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject": { + "PagedManagedAgentIdentityBlueprint": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ManagedAgentIdentityBlueprint" + }, + "description": "The ManagedAgentIdentityBlueprint items on this page" + }, + "nextLink": { "type": "string", - "enum": [ - "json_object" - ], - "description": "The type of response format being defined. Always `json_object`.", - "x-stainless-const": true + "format": "uri", + "description": "The link to the next page of items" } }, - "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" + "description": "Paged collection of ManagedAgentIdentityBlueprint items" }, - "OpenAI.TextResponseFormatConfigurationResponseFormatText": { + "PagedRedTeam": { "type": "object", "required": [ - "type" + "value" ], "properties": { - "type": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RedTeam" + }, + "description": "The RedTeam items on this page" + }, + "nextLink": { "type": "string", - "enum": [ - "text" - ], - "description": "The type of response format being defined. Always `text`.", - "x-stainless-const": true + "format": "uri", + "description": "The link to the next page of items" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" - } + "description": "Paged collection of RedTeam items" + }, + "PagedSchedule": { + "type": "object", + "required": [ + "value" ], - "description": "Default response format. Used to generate text responses.", - "title": "Text" + "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" }, - "OpenAI.TextResponseFormatConfigurationType": { - "anyOf": [ - { - "type": "string" + "PagedScheduleRun": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleRun" + }, + "description": "The ScheduleRun items on this page" }, - { + "nextLink": { "type": "string", - "enum": [ - "text", - "json_schema", - "json_object" - ] + "format": "uri", + "description": "The link to the next page of items" } - ] + }, + "description": "Paged collection of ScheduleRun items" }, - "OpenAI.TextResponseFormatJsonSchema": { + "PairwisePreferenceColumnMapping": { "type": "object", "required": [ - "type", - "name", - "schema" + "prompt", + "chosen", + "rejected" ], "properties": { - "type": { + "prompt": { "type": "string", - "enum": [ - "json_schema" - ], - "description": "The type of response format being defined. Always `json_schema`.", - "x-stainless-const": true + "description": "Actual dataset column name containing prompts, for example 'prompt' or 'question'." }, - "description": { + "chosen": { "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." + "description": "Actual dataset column name containing the preferred response, for example 'chosen', 'accepted_answer', or 'good_response'." }, - "name": { + "rejected": { "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 + "description": "Actual dataset column name containing the rejected response, for example 'rejected', 'rejected_answer', or 'bad_response'." } }, - "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" + "description": "Column mapping for pairwise preference datasets. Keys are logical fields expected by preference training; values are the exact column names in the referenced dataset asset." }, - "OpenAI.Tool": { + "PairwisePreferenceDatasetConfiguration": { "type": "object", "required": [ - "type" + "train", + "columns" ], "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", - "memory_search_preview": "#/components/schemas/MemorySearchPreviewTool", - "memory_search": "#/components/schemas/MemorySearchTool", - "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" + "train": { + "type": "string", + "description": "Training dataset asset reference." + }, + "eval": { + "type": "string", + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ + { + "$ref": "#/components/schemas/PairwisePreferenceColumnMapping" + } + ], + "description": "Mapping from pairwise preference logical fields to actual dataset column names. DPO, ORPO, CPO, and SimPO require 'prompt', 'chosen', and 'rejected'." + }, + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } + ], + "description": "Conversational data formatting options." } }, - "description": "A tool that can be used to generate a response." + "description": "Dataset configuration for managed pairwise preference training." }, - "OpenAI.ToolChoiceAllowed": { + "PairwiseRewardModelTrainingDatasetConfiguration": { "type": "object", "required": [ - "type", - "mode", - "tools" + "kind", + "train", + "columns" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "allowed_tools" + "pairwise" ], - "description": "Allowed tool configuration type. Always `allowed_tools`.", - "x-stainless-const": true + "description": "Reward-model dataset kind, always 'pairwise'." }, - "mode": { + "train": { "type": "string", - "enum": [ - "auto", - "required" + "description": "Training dataset asset reference." + }, + "eval": { + "type": "string", + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ + { + "$ref": "#/components/schemas/PairwisePreferenceColumnMapping" + } ], - "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." + "description": "Mapping from pairwise reward-model logical fields to actual dataset column names. Pairwise reward-model training requires 'prompt', 'chosen', and 'rejected'." }, - "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 ```" + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } + ], + "description": "Conversational data formatting options." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/RewardModelTrainingDatasetConfiguration" } ], - "description": "Constrains the tools available to the model to a pre-defined set.", - "title": "Allowed tools" + "description": "Pairwise preference dataset for managed reward-model training." }, - "OpenAI.ToolChoiceCodeInterpreter": { + "PatchAgentRequest": { + "type": "object", + "properties": { + "agent_endpoint": { + "allOf": [ + { + "$ref": "#/components/schemas/AgentEndpointUpdate" + } + ], + "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": [ - "type" + "pendingUploadType" ], "properties": { - "type": { + "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": [ - "code_interpreter" - ] + "BlobReference" + ], + "description": "BlobReference is the only supported type." } }, - "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)." + "description": "Represents a request for a pending upload." }, - "OpenAI.ToolChoiceComputerUsePreview": { + "PendingUploadResponse": { "type": "object", "required": [ - "type" + "blobReference", + "pendingUploadId", + "pendingUploadType" ], "properties": { - "type": { + "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": [ - "computer_use_preview" - ] + "BlobReference" + ], + "description": "BlobReference is the only supported type" } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } + "description": "Represents the response for a pending upload request" + }, + "PolicyGradientTrainingAlgorithm": { + "type": "string", + "enum": [ + "rloo", + "reinforce_pp" ], - "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)." + "description": "Policy-gradient algorithm used by managed online reinforcement training." }, - "OpenAI.ToolChoiceCustom": { + "PolicyGradientTrainingJob": { "type": "object", "required": [ "type", - "name" + "algorithm", + "dataset", + "runtime" ], "properties": { "type": { "type": "string", "enum": [ - "custom" + "policy_gradient" ], - "description": "For custom tool calling, the type is always `custom`.", - "x-stainless-const": true + "description": "Managed training job type, always 'policy_gradient'." }, - "name": { - "type": "string", - "description": "The name of the custom tool to call." + "algorithm": { + "allOf": [ + { + "$ref": "#/components/schemas/PolicyGradientTrainingAlgorithm" + } + ], + "description": "Policy-gradient algorithm to run." + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/GrpoTrainingDatasetConfiguration" + } + ], + "description": "Training and optional evaluation datasets." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/PolicyGradientTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed online policy-gradient training." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "description": "Use this option to force the model to call a specific custom tool.", - "title": "Custom tool" + "description": "Request body for creating a managed online policy-gradient training job from a base model." }, - "OpenAI.ToolChoiceFileSearch": { + "PolicyGradientTrainingRuntimeConfiguration": { "type": "object", "required": [ - "type" + "judge", + "rollout" ], "properties": { - "type": { - "type": "string", - "enum": [ - "file_search" - ] + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." + }, + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." + }, + "judge": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Judge used to score generated completions during online policy-gradient training. Required for RLOO and REINFORCE++." + }, + "reference": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Reference policy used for KL anchoring." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration. Required for RLOO and REINFORCE++." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "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)." + "description": "Runtime options for managed online policy-gradient training." }, - "OpenAI.ToolChoiceFunction": { + "PpoCriticConfiguration": { "type": "object", - "required": [ - "type", - "name" - ], "properties": { - "type": { + "model": { "type": "string", - "enum": [ - "function" - ], - "description": "For function calling, the type is always `function`.", - "x-stainless-const": true + "description": "Optional critic model asset reference. If omitted, the service initializes the critic from the policy model." }, - "name": { - "type": "string", - "description": "The name of the function to call." + "value_loss_coefficient": { + "type": "number", + "format": "double", + "description": "Value loss coefficient." + }, + "gamma": { + "type": "number", + "format": "double", + "description": "GAE discount factor." + }, + "lambda": { + "type": "number", + "format": "double", + "description": "GAE lambda." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" - } - ], - "description": "Use this option to force the model to call a specific function.", - "title": "Function tool" + "description": "Critic or value model configuration for managed PPO training." }, - "OpenAI.ToolChoiceImageGeneration": { + "PpoTrainingConfiguration": { "type": "object", "required": [ - "type" + "algorithm", + "reward" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "image_generation" - ] + "ppo" + ], + "description": "Training algorithm, always 'ppo'." + }, + "reward": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Reward signal configuration." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "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)." + "description": "Proximal policy optimization training recipe." }, - "OpenAI.ToolChoiceMCP": { + "PpoTrainingJob": { "type": "object", "required": [ "type", - "server_label" + "dataset", + "runtime" ], "properties": { "type": { "type": "string", "enum": [ - "mcp" + "ppo" ], - "description": "For MCP tools, the type is always `mcp`.", - "x-stainless-const": true + "description": "Managed training job type, always 'ppo'." }, - "server_label": { - "type": "string", - "description": "The label of the MCP server to use." + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/GrpoTrainingDatasetConfiguration" + } + ], + "description": "Training and optional evaluation datasets." }, - "name": { - "type": "string", - "nullable": true + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/PpoTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed PPO." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "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" + "description": "Request body for creating a managed PPO training job from a base model." }, - "OpenAI.ToolChoiceParam": { + "PpoTrainingRuntimeConfiguration": { "type": "object", "required": [ - "type" + "judge", + "rollout" ], "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" + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." + }, + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." + }, + "judge": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Judge used to score generated completions during PPO training. Required for PPO." + }, + "reference": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Reference policy used for KL anchoring." + }, + "critic": { + "allOf": [ + { + "$ref": "#/components/schemas/PpoCriticConfiguration" + } + ], + "description": "Critic or value model configuration." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration. Required for PPO." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "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." + "description": "Runtime options for managed PPO training." }, - "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" - ] - } - ] + "PreferenceTrainingAlgorithm": { + "type": "string", + "enum": [ + "dpo", + "orpo", + "cpo", + "simpo" + ], + "description": "Preference optimization algorithm used by managed pairwise preference training." }, - "OpenAI.ToolChoiceWebSearchPreview": { + "PreferenceTrainingJob": { "type": "object", "required": [ - "type" + "type", + "algorithm", + "dataset" ], "properties": { "type": { "type": "string", "enum": [ - "web_search_preview" - ] + "preference" + ], + "description": "Managed training job type, always 'preference'." + }, + "algorithm": { + "allOf": [ + { + "$ref": "#/components/schemas/PreferenceTrainingAlgorithm" + } + ], + "description": "Preference optimization algorithm to run." + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/PairwisePreferenceDatasetConfiguration" + } + ], + "description": "Training and optional evaluation datasets." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/PreferenceTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed pairwise preference training." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "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)." + "description": "Request body for creating a managed pairwise preference training job from a base model." }, - "OpenAI.ToolChoiceWebSearchPreview20250311": { + "PreferenceTrainingRuntimeConfiguration": { + "type": "object", + "properties": { + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." + }, + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." + }, + "reference": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingReferenceConfiguration" + } + ], + "description": "Reference policy used by algorithms that require KL anchoring or a reference model." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." + } + }, + "description": "Runtime options for managed pairwise preference training." + }, + "PromptAgentDefinition": { "type": "object", "required": [ - "type" + "kind", + "model" ], "properties": { - "type": { + "kind": { "type": "string", "enum": [ - "web_search_preview_2025_03_11" + "prompt" ] - } - }, - "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" }, - { + "model": { "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", - "azure_ai_search", - "azure_function", - "bing_grounding", - "capture_structured_outputs", - "openapi", - "memory_search" - ] + "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." } - ] - }, - "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." + "allOf": [ + { + "$ref": "#/components/schemas/AgentDefinition" + } + ], + "description": "The prompt agent definition" }, - "OpenAI.TopLogProb": { + "PromptAgentDefinitionTextOptions": { "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" - } + "format": { + "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" } }, - "description": "The top log probability of a token.", - "title": "Top log probability" + "description": "Configuration options for a text response from the model. Can be plain text or structured JSON data." }, - "OpenAI.TypeParam": { + "PromptBasedEvaluatorDefinition": { "type": "object", "required": [ "type", - "text" + "prompt_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" + "prompt" + ] }, - "text": { + "prompt_text": { "type": "string", - "description": "The text to type." + "description": "The prompt text used for evaluation" } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ComputerAction" + "$ref": "#/components/schemas/EvaluatorDefinition" } ], - "description": "An action to type in text.", - "title": "Type" + "description": "Prompt-based evaluator" }, - "OpenAI.UpdateConversationBody": { + "ProtocolVersionRecord": { "type": "object", "required": [ - "metadata" + "protocol", + "version" ], "properties": { - "metadata": { - "type": "object", + "protocol": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Metadata" + "$ref": "#/components/schemas/AgentProtocol" } ], - "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." + "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." }, - "OpenAI.UrlCitationBody": { + "PyTorchDistribution": { "type": "object", "required": [ - "type", - "url", - "start_index", - "end_index", - "title" + "distribution_type" ], "properties": { - "type": { + "distribution_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" - } + "pytorch" ], - "description": "The index of the last character of the URL citation in the message." + "description": "Specifies the type of distribution framework." }, - "title": { - "type": "string", - "description": "The title of the web resource." + "process_count_per_instance": { + "type": "integer", + "format": "int32", + "description": "Number of processes per node." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Annotation" + "$ref": "#/components/schemas/DistributionConfiguration" } ], - "description": "A citation for a web resource used to generate a model response.", - "title": "URL citation" + "description": "PyTorch distribution configuration." }, - "OpenAI.VectorStoreFileAttributes": { + "QueueSettings": { "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/OpenAI.numeric" - }, - { - "type": "boolean" - } - ] + "properties": { + "job_tier": { + "type": "string", + "description": "Controls the compute job tier." + } }, - "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 + "description": "Queue settings for the job." }, - "OpenAI.WaitParam": { + "RaiConfig": { "type": "object", "required": [ - "type" + "rai_policy_name" ], "properties": { - "type": { + "rai_policy_name": { "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" + "description": "The name of the RAI policy to apply." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ComputerAction" - } - ], - "description": "A wait action.", - "title": "Wait" + "description": "Configuration for Responsible AI (RAI) content filtering and safety features." }, - "OpenAI.WebSearchActionFind": { + "RayDistribution": { "type": "object", "required": [ - "type", - "url", - "pattern" + "distribution_type" ], "properties": { - "type": { + "distribution_type": { "type": "string", "enum": [ - "find_in_page" + "ray" ], - "description": "The action type.", - "x-stainless-const": true + "description": "Specifies the type of distribution framework." }, - "url": { + "port": { + "type": "integer", + "format": "int32", + "description": "The port of the head Ray process." + }, + "address": { "type": "string", - "format": "uri", - "description": "The URL of the page searched for the pattern." + "description": "The address of the Ray head node." }, - "pattern": { + "include_dashboard": { + "type": "boolean", + "description": "Whether to start the Ray dashboard GUI." + }, + "dashboard_port": { + "type": "integer", + "format": "int32", + "description": "The port to bind the dashboard server to." + }, + "head_node_additional_args": { "type": "string", - "description": "The pattern or text to search for within the page." + "description": "Additional arguments passed to ray start on the head node." + }, + "worker_node_additional_args": { + "type": "string", + "description": "Additional arguments passed to ray start on worker nodes." + }, + "enable_remote_access_client_server": { + "type": "boolean", + "description": "Whether to expose the Ray Client server port through the AML proxy for remote access. When true, the Ray Client port is registered as an interactive endpoint, enabling remote ray.init() connections via the WebSocket-TCP bridge. When false or omitted, the Ray Client port is not accessible externally." + }, + "client_server_port": { + "type": "integer", + "format": "int32", + "description": "The port for the Ray Client server. Defaults to 10001. Only relevant when enable_remote_access_client_server is true." } }, - "description": "Action type \"find_in_page\": Searches for a pattern within a loaded page.", - "title": "Find action" + "allOf": [ + { + "$ref": "#/components/schemas/DistributionConfiguration" + } + ], + "description": "Ray distribution configuration." }, - "OpenAI.WebSearchActionOpenPage": { + "RecurrenceSchedule": { "type": "object", "required": [ "type" ], "properties": { "type": { - "type": "string", - "enum": [ - "open_page" + "allOf": [ + { + "$ref": "#/components/schemas/RecurrenceType" + } ], - "description": "The action type.", - "x-stainless-const": true - }, - "url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL opened by the model." + "description": "Recurrence type for the recurrence schedule." } }, - "description": "Action type \"open_page\" - Opens a specific URL from search results.", - "title": "Open page action" + "discriminator": { + "propertyName": "type", + "mapping": { + "Hourly": "#/components/schemas/HourlyRecurrenceSchedule", + "Daily": "#/components/schemas/DailyRecurrenceSchedule", + "Weekly": "#/components/schemas/WeeklyRecurrenceSchedule", + "Monthly": "#/components/schemas/MonthlyRecurrenceSchedule" + } + }, + "description": "Recurrence schedule model." }, - "OpenAI.WebSearchActionSearch": { + "RecurrenceTrigger": { "type": "object", "required": [ "type", - "query" + "interval", + "schedule" ], "properties": { "type": { "type": "string", "enum": [ - "search" + "Recurrence" ], - "description": "The action type.", - "x-stainless-const": true + "description": "Type of the trigger." }, - "query": { + "startTime": { "type": "string", - "description": "[DEPRECATED] The search query.", - "deprecated": true + "description": "Start time for the recurrence schedule in ISO 8601 format." }, - "queries": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The search queries.", - "title": "Search queries" + "endTime": { + "type": "string", + "description": "End time for the recurrence schedule in ISO 8601 format." }, - "sources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.WebSearchActionSearchSources" - }, - "description": "The sources used in the search.", - "title": "Web search sources" + "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." } }, - "description": "Action type \"search\" - Performs a web search query.", - "title": "Search action" - }, - "OpenAI.WebSearchActionSearchSources": { - "type": "object", - "required": [ - "type", - "url" + "allOf": [ + { + "$ref": "#/components/schemas/Trigger" + } ], - "properties": { - "type": { + "description": "Recurrence based trigger." + }, + "RecurrenceType": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", "enum": [ - "url" - ], - "x-stainless-const": true - }, - "url": { - "type": "string" + "Hourly", + "Daily", + "Weekly", + "Monthly" + ] } - } + ], + "description": "Recurrence type." }, - "OpenAI.WebSearchApproximateLocation": { + "RedTeam": { "type": "object", "required": [ - "type" + "id", + "target" ], "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "approximate" - ], - "description": "The type of location approximation. Always `approximate`.", - "x-stainless-const": true, - "default": "approximate" + "description": "Identifier of the red team run.", + "readOnly": true }, - "country": { + "displayName": { "type": "string", - "nullable": true + "description": "Name of the red-team run." }, - "region": { - "type": "string", - "nullable": true + "numTurns": { + "type": "integer", + "format": "int32", + "description": "Number of simulation rounds." }, - "city": { - "type": "string", - "nullable": true + "attackStrategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttackStrategy" + }, + "description": "List of attack strategies or nested lists of attack strategies." }, - "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": { + "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", - "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" + "description": "Application scenario for the red team operation, to generate scenario specific attacks." }, - "user_location": { + "tags": { "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.ApproximateLocation" - } - ], - "nullable": true + "additionalProperties": { + "type": "string" + }, + "description": "Red team's tags. Unlike properties, tags are fully mutable." }, - "search_context_size": { + "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/OpenAI.SearchContextSize" + "$ref": "#/components/schemas/TargetConfig" } ], - "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." + "description": "Target configuration for the red-team run." } }, - "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" + "description": "Red team details." }, - "OpenAI.WebSearchTool": { + "RedTeamEvalRunDataSource": { "type": "object", "required": [ - "type" + "type", + "item_generation_params", + "target" ], "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" - } + "azure_ai_red_team" ], - "nullable": true + "description": "The type of data source. Always `azure_ai_red_team`." }, - "user_location": { - "type": "object", + "item_generation_params": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.WebSearchApproximateLocation" + "$ref": "#/components/schemas/ItemGenerationParams" } ], - "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." + "description": "The parameters for item generation." }, - "custom_search_configuration": { + "target": { "allOf": [ { - "$ref": "#/components/schemas/WebSearchConfiguration" + "$ref": "#/components/schemas/Target" } ], - "description": "The project connections attached to this tool. There can be a maximum of 1 connection\nresource attached to the tool." + "description": "The target configuration for the evaluation." } }, "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 + "$ref": "#/components/schemas/EvalRunDataSource" } - } - }, - "OpenAI.integer": { - "type": "integer", - "format": "int64" - }, - "OpenAI.numeric": { - "type": "number", - "format": "double" + ] }, - "OpenApiAnonymousAuthDetails": { + "RedTeamItemGenerationParams": { "type": "object", "required": [ - "type" + "type", + "attack_strategies", + "num_turns" ], "properties": { "type": { "type": "string", "enum": [ - "anonymous" + "red_team" ], - "description": "The object type, which is always 'anonymous'." + "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/OpenApiAuthDetails" + "$ref": "#/components/schemas/ItemGenerationParams" } - ], - "description": "Security details for OpenApi anonymous authentication" + ] }, - "OpenApiAuthDetails": { + "RedTeamSeedPromptsItemGenerationParams": { "type": "object", "required": [ - "type" + "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/OpenApiAuthType" + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" } ], - "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": "The source of JSONL content to be processed." } }, - "description": "authentication details for OpenApiFunctionDefinition" - }, - "OpenApiAuthType": { - "anyOf": [ - { - "type": "string", - "enum": [ - "anonymous", - "project_connection", - "managed_identity" - ] - }, + "allOf": [ { - "type": "string" + "$ref": "#/components/schemas/ItemGenerationParams" } ], - "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)" + "description": "Represents the parameters for red team seed prompts item generation." }, - "OpenApiFunctionDefinition": { + "RedTeamTaxonomyItemGenerationParams": { "type": "object", "required": [ - "name", - "spec", - "auth" + "type", + "attack_strategies", + "num_turns", + "source" ], "properties": { - "name": { + "type": { "type": "string", - "description": "The name of the function to be called." + "enum": [ + "red_team_taxonomy" + ], + "description": "The type of item generation parameters, always `red_team_taxonomy`." }, - "description": { - "type": "string", - "description": "A description of what the function does, used by the model to choose when and how to call the function." + "attack_strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttackStrategy" + }, + "description": "The collection of attack strategies to be used." }, - "spec": { - "type": "object", - "additionalProperties": {}, - "description": "The openapi function shape, described as a JSON Schema object." + "num_turns": { + "type": "integer", + "format": "int32", + "description": "The number of turns allowed in the game.", + "default": 20 }, - "auth": { + "source": { "allOf": [ { - "$ref": "#/components/schemas/OpenApiAuthDetails" + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" } ], - "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 source from which JSONL content is read." } }, - "description": "The input definition information for an openapi function." + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "Represents the parameters for red team taxonomy item generation." }, - "OpenApiManagedAuthDetails": { + "ReinforcePpTrainingConfiguration": { "type": "object", "required": [ - "type", - "security_scheme" + "algorithm", + "reward" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "managed_identity" + "reinforce_pp" ], - "description": "The object type, which is always 'managed_identity'." + "description": "Training algorithm, always 'reinforce_pp'." }, - "security_scheme": { + "reward": { "allOf": [ { - "$ref": "#/components/schemas/OpenApiManagedSecurityScheme" + "$ref": "#/components/schemas/TrainingRewardConfiguration" } ], - "description": "Connection auth security details" + "description": "Reward signal configuration." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "rollout": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutConfiguration" + } + ], + "description": "Rollout generation configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenApiAuthDetails" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "Security details for OpenApi managed_identity authentication" + "description": "REINFORCE++ training recipe." }, - "OpenApiManagedSecurityScheme": { + "ResponseRetrievalItemGenerationParams": { "type": "object", "required": [ - "audience" + "type", + "max_num_turns", + "data_mapping", + "source" ], "properties": { - "audience": { + "type": { "type": "string", - "description": "Authentication scope for managed_identity auth type" + "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." } }, - "description": "Security scheme for OpenApi managed_identity authentication" + "allOf": [ + { + "$ref": "#/components/schemas/ItemGenerationParams" + } + ], + "description": "Represents the parameters for response retrieval item generation." }, - "OpenApiProjectConnectionAuthDetails": { + "RewardModelTrainingConfiguration": { "type": "object", "required": [ - "type", - "security_scheme" + "algorithm" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "project_connection" + "reward_model" ], - "description": "The object type, which is always 'project_connection'." + "description": "Training algorithm, always 'reward_model'." }, - "security_scheme": { + "lora": { "allOf": [ { - "$ref": "#/components/schemas/OpenApiProjectConnectionSecurityScheme" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "Project connection auth security details" + "description": "LoRA adapter configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenApiAuthDetails" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "Security details for OpenApi project connection authentication" + "description": "Reward model training recipe." }, - "OpenApiProjectConnectionSecurityScheme": { + "RewardModelTrainingDatasetConfiguration": { "type": "object", "required": [ - "project_connection_id" + "kind" ], "properties": { - "project_connection_id": { + "kind": { "type": "string", - "description": "Project connection id for Project Connection auth type" + "description": "Reward-model dataset kind." } }, - "description": "Security scheme for OpenApi managed_identity authentication" + "discriminator": { + "propertyName": "kind", + "mapping": { + "pairwise": "#/components/schemas/PairwiseRewardModelTrainingDatasetConfiguration", + "scored": "#/components/schemas/ScoredRewardModelTrainingDatasetConfiguration" + } + }, + "description": "Dataset configuration for managed reward-model training." }, - "OpenApiTool": { + "RewardModelTrainingJob": { "type": "object", "required": [ "type", - "openapi" + "dataset" ], "properties": { "type": { "type": "string", "enum": [ - "openapi" + "reward_model" ], - "description": "The object type, which is always 'openapi'." + "description": "Managed training job type, always 'reward_model'." }, - "openapi": { + "dataset": { "allOf": [ { - "$ref": "#/components/schemas/OpenApiFunctionDefinition" + "$ref": "#/components/schemas/RewardModelTrainingDatasetConfiguration" } ], - "description": "The openapi function definition." + "description": "Training and optional evaluation datasets." + }, + "runtime": { + "allOf": [ + { + "$ref": "#/components/schemas/RewardModelTrainingRuntimeConfiguration" + } + ], + "description": "Runtime options for managed reward-model training." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.Tool" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "description": "The input definition information for an OpenAPI tool as used to configure an agent." + "description": "Request body for creating a managed reward-model training job from a base model." }, - "OpenApiToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "name", - "arguments", - "status" - ], - "properties": { - "type": { + "RewardModelTrainingLoss": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", "enum": [ - "openapi_call" + "bradley_terry", + "regression" ] + } + ], + "description": "Loss function used for reward-model training." + }, + "RewardModelTrainingRuntimeConfiguration": { + "type": "object", + "properties": { + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." }, - "name": { - "type": "string", - "description": "The name of the OpenAPI operation being called." + "loss": { + "allOf": [ + { + "$ref": "#/components/schemas/RewardModelTrainingLoss" + } + ], + "description": "Loss function used for reward-model training." }, - "arguments": { - "type": "string", - "description": "A JSON string of the arguments to pass to the tool." + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." }, - "status": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "The status of the tool call." + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "allOf": [ + "description": "Runtime options for managed reward-model training." + }, + "RiskCategory": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "type": "string" + }, + { + "type": "string", + "enum": [ + "HateUnfairness", + "Violence", + "Sexual", + "SelfHarm", + "ProtectedMaterial", + "CodeVulnerability", + "UngroundedAttributes", + "ProhibitedActions", + "SensitiveDataLeakage", + "TaskAdherence" + ] } ], - "description": "An OpenAPI tool call." + "description": "Risk category for the attack objective." }, - "OpenApiToolCallOutput": { + "RlooTrainingConfiguration": { "type": "object", "required": [ - "type", - "call_id", - "name", - "status" + "algorithm", + "reward" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "openapi_call_output" - ] + "rloo" + ], + "description": "Training algorithm, always 'rloo'." }, - "call_id": { - "type": "string", - "description": "The unique ID of the tool call generated by the model." + "reward": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Reward signal configuration." }, - "name": { - "type": "string", - "description": "The name of the OpenAPI operation that was called." + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." }, - "output": { + "rollout": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallOutputContent" + "$ref": "#/components/schemas/TrainingRolloutConfiguration" } ], - "description": "The output from the OpenAPI tool call." + "description": "Rollout generation configuration." }, - "status": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/ToolCallStatus" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "The status of the tool call." + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "The output of an OpenAPI tool call." + "description": "REINFORCE leave-one-out training recipe." }, - "OtlpTelemetryEndpoint": { + "SASCredentials": { "type": "object", "required": [ - "kind", - "endpoint", - "protocol" + "type" ], "properties": { - "kind": { + "type": { "type": "string", "enum": [ - "OTLP" + "SAS" ], - "description": "The endpoint kind, always 'OTLP' for OpenTelemetry Protocol endpoints." + "description": "The credential type", + "readOnly": true }, - "endpoint": { + "SAS": { "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" + "description": "SAS token", + "readOnly": true } }, "allOf": [ { - "$ref": "#/components/schemas/TelemetryEndpoint" + "$ref": "#/components/schemas/BaseCredentials" } ], - "description": "An OTLP (OpenTelemetry Protocol) telemetry export endpoint.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } + "description": "Shared Access Signature (SAS) credential definition" }, - "PageOrder": { - "type": "string", - "enum": [ - "asc", - "desc" - ] + "SampleType": { + "anyOf": [ + { + "type": "string", + "enum": [ + "EvaluationResultSample" + ] + }, + { + "type": "string" + } + ], + "description": "The type of sample used in the analysis." }, - "PagedConnection": { + "SasCredential": { "type": "object", "required": [ - "value" + "sasUri", + "type" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Connection" + "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": "The Connection items on this page" + "description": "Schedule's tags. Unlike properties, tags are fully mutable." }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "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": "Paged collection of Connection items" + "description": "Schedule model." }, - "PagedDatasetVersion": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetVersion" - }, - "description": "The DatasetVersion items on this page" + "ScheduleProvisioningStatus": { + "anyOf": [ + { + "type": "string" }, - "nextLink": { + { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed" + ] } - }, - "description": "Paged collection of DatasetVersion items" + ], + "description": "Schedule provisioning status." }, - "PagedDeployment": { + "ScheduleRun": { "type": "object", "required": [ - "value" + "id", + "scheduleId", + "success", + "properties" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Deployment" - }, - "description": "The Deployment items on this page" + "id": { + "type": "string", + "description": "Identifier of the schedule run.", + "readOnly": true }, - "nextLink": { + "scheduleId": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "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": "Paged collection of Deployment items" + "description": "Schedule run model." }, - "PagedEvaluation": { + "ScheduleTask": { "type": "object", "required": [ - "value" + "type" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Evaluation" - }, - "description": "The Evaluation items on this page" + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleTaskType" + } + ], + "description": "Type of the task." }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "configuration": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Configuration for the task." } }, - "description": "Paged collection of Evaluation items" + "discriminator": { + "propertyName": "type", + "mapping": { + "Evaluation": "#/components/schemas/EvaluationScheduleTask", + "Insight": "#/components/schemas/InsightScheduleTask" + } + }, + "description": "Schedule task model." }, - "PagedEvaluationRule": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationRule" - }, - "description": "The EvaluationRule items on this page" + "ScheduleTaskType": { + "anyOf": [ + { + "type": "string" }, - "nextLink": { + { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "enum": [ + "Evaluation", + "Insight" + ] } - }, - "description": "Paged collection of EvaluationRule items" + ], + "description": "Type of the task." }, - "PagedEvaluationTaxonomy": { + "ScoredRewardModelColumnMapping": { "type": "object", "required": [ - "value" + "prompt", + "response", + "score" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluationTaxonomy" - }, - "description": "The EvaluationTaxonomy items on this page" + "prompt": { + "type": "string", + "description": "Actual dataset column name containing prompts, for example 'prompt' or 'question'." }, - "nextLink": { + "response": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "Actual dataset column name containing responses, for example 'response' or 'completion'." + }, + "score": { + "type": "string", + "description": "Actual dataset column name containing numeric reward scores, for example 'score' or 'reward'." } }, - "description": "Paged collection of EvaluationTaxonomy items" + "description": "Column mapping for scored reward-model datasets. Keys are logical fields expected by scored reward-model training; values are the exact column names in the referenced dataset asset." }, - "PagedEvaluatorVersion": { + "ScoredRewardModelTrainingDatasetConfiguration": { "type": "object", "required": [ - "value" + "kind", + "train", + "columns" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvaluatorVersion" - }, - "description": "The EvaluatorVersion items on this page" + "kind": { + "type": "string", + "enum": [ + "scored" + ], + "description": "Reward-model dataset kind, always 'scored'." }, - "nextLink": { + "train": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "Training dataset asset reference." + }, + "eval": { + "type": "string", + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ + { + "$ref": "#/components/schemas/ScoredRewardModelColumnMapping" + } + ], + "description": "Mapping from scored reward-model logical fields to actual dataset column names. Scored reward-model training requires 'prompt', 'response', and 'score'." + }, + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } + ], + "description": "Conversational data formatting options." } }, - "description": "Paged collection of EvaluatorVersion items" + "allOf": [ + { + "$ref": "#/components/schemas/RewardModelTrainingDatasetConfiguration" + } + ], + "description": "Scored response dataset for managed reward-model training." }, - "PagedIndex": { + "SessionDirectoryEntry": { "type": "object", "required": [ - "value" + "name", + "size", + "is_directory", + "modified_time" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Index" - }, - "description": "The Index items on this page" + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the file or directory." }, - "nextLink": { + "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": "string", - "format": "uri", - "description": "The link to the next page of items" + "format": "date-time", + "description": "The last modification time in UTC (ISO 8601)." } }, - "description": "Paged collection of Index items" + "description": "A single entry in a directory listing." }, - "PagedInsight": { + "SessionDirectoryListResponse": { "type": "object", "required": [ - "value" + "path", + "entries" ], "properties": { - "value": { + "path": { + "type": "string", + "description": "The path that was listed, relative to the session home directory." + }, + "entries": { "type": "array", "items": { - "$ref": "#/components/schemas/Insight" + "$ref": "#/components/schemas/SessionDirectoryEntry" }, - "description": "The Insight items on this page" - }, - "nextLink": { - "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "The directory entries." } }, - "description": "Paged collection of Insight items" + "description": "Response from listing a directory in a session sandbox." }, - "PagedManagedAgentIdentityBlueprint": { + "SessionFileWriteResponse": { "type": "object", "required": [ - "value" + "path", + "bytes_written" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ManagedAgentIdentityBlueprint" - }, - "description": "The ManagedAgentIdentityBlueprint items on this page" - }, - "nextLink": { + "path": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "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": "Paged collection of ManagedAgentIdentityBlueprint items" + "description": "Response from uploading a file to a session sandbox." }, - "PagedRedTeam": { + "SessionListResult": { "type": "object", "required": [ - "value" + "data" ], "properties": { - "value": { + "data": { "type": "array", "items": { - "$ref": "#/components/schemas/RedTeam" + "$ref": "#/components/schemas/AgentSessionResource" }, - "description": "The RedTeam items on this page" + "description": "The list of sessions." }, - "nextLink": { + "pagination_token": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "Opaque token to retrieve the next page. Null when there are no more results." } }, - "description": "Paged collection of RedTeam items" + "description": "Paged result for session list operations.", + "x-ms-foundry-meta": { + "required_previews": [ + "AgentEndpoints=V1Preview" + ] + } }, - "PagedSchedule": { + "SftTrainingColumnMapping": { "type": "object", "required": [ - "value" + "messages" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schedule" - }, - "description": "The Schedule items on this page" - }, - "nextLink": { + "messages": { "type": "string", - "format": "uri", - "description": "The link to the next page of items" + "description": "Actual dataset column name containing chat messages used for supervised fine tuning, for example 'messages' or 'conversation_json'." } }, - "description": "Paged collection of Schedule items" + "description": "Column mapping for managed SFT datasets. Keys are logical fields expected by SFT; values are the exact column names in the referenced dataset asset. The training dataset must contain chat messages for each training example." }, - "PagedScheduleRun": { + "SftTrainingConfiguration": { "type": "object", "required": [ - "value" + "algorithm" ], "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduleRun" - }, - "description": "The ScheduleRun items on this page" - }, - "nextLink": { + "algorithm": { "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": { + "enum": [ + "sft" + ], + "description": "Training algorithm, always 'sft'." + }, + "lora": { "allOf": [ { - "$ref": "#/components/schemas/AgentEndpointUpdate" + "$ref": "#/components/schemas/TrainingLoraConfiguration" } ], - "description": "The endpoint configuration for the agent" + "description": "LoRA adapter configuration." }, - "agent_card": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/AgentCardUpdate" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "Optional agent card for the agent" + "description": "Evaluation configuration." } }, - "x-ms-foundry-meta": { - "required_previews": [ - "AgentEndpoints=V1Preview" - ] - } + "allOf": [ + { + "$ref": "#/components/schemas/TrainingConfiguration" + } + ], + "description": "Supervised fine-tuning recipe." }, - "PendingUploadRequest": { + "SftTrainingDatasetConfiguration": { "type": "object", "required": [ - "pendingUploadType" + "train", + "columns" ], "properties": { - "pendingUploadId": { + "train": { "type": "string", - "description": "If PendingUploadId is not provided, a random GUID will be used." + "description": "Training dataset asset reference." }, - "connectionName": { + "eval": { "type": "string", - "description": "Azure Storage Account connection name to use for generating temporary SAS token" + "description": "Optional evaluation dataset asset reference." }, - "pendingUploadType": { - "type": "string", - "enum": [ - "BlobReference" - ], - "description": "BlobReference is the only supported type." - } - }, - "description": "Represents a request for a pending upload." - }, - "PendingUploadResponse": { - "type": "object", - "required": [ - "blobReference", - "pendingUploadId", - "pendingUploadType" - ], - "properties": { - "blobReference": { + "columns": { "allOf": [ { - "$ref": "#/components/schemas/BlobReference" + "$ref": "#/components/schemas/SftTrainingColumnMapping" } ], - "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" + "description": "Mapping from SFT logical fields to actual dataset column names. SFT requires the 'messages' logical field." }, - "pendingUploadType": { - "type": "string", - "enum": [ - "BlobReference" + "data_format": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" + } ], - "description": "BlobReference is the only supported type" + "description": "Conversational data formatting options." } }, - "description": "Represents the response for a pending upload request" + "description": "Dataset configuration for managed supervised fine tuning." }, - "PromptAgentDefinition": { + "SftTrainingJob": { "type": "object", "required": [ - "kind", - "model" + "type", + "dataset" ], "properties": { - "kind": { + "type": { "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" - } + "sft" ], - "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." + "description": "Managed training job type, always 'sft'." }, - "tool_choice": { - "anyOf": [ - { - "type": "string" - }, + "dataset": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.ToolChoiceParam" + "$ref": "#/components/schemas/SftTrainingDatasetConfiguration" } ], - "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." + "description": "Training and optional evaluation datasets." }, - "text": { + "runtime": { "allOf": [ { - "$ref": "#/components/schemas/PromptAgentDefinitionTextOptions" + "$ref": "#/components/schemas/SftTrainingRuntimeConfiguration" } ], - "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." + "description": "Runtime options for managed SFT." } }, "allOf": [ { - "$ref": "#/components/schemas/AgentDefinition" + "$ref": "#/components/schemas/ModelTrainingJobCreate" } ], - "description": "The prompt agent definition" + "description": "Request body for creating a managed SFT training job from a base model." }, - "PromptAgentDefinitionTextOptions": { + "SftTrainingRuntimeConfiguration": { "type": "object", "properties": { - "format": { - "$ref": "#/components/schemas/OpenAI.TextResponseFormatConfiguration" + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework." + }, + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters passed through to the selected framework." + }, + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." + }, + "eval": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingEvalConfiguration" + } + ], + "description": "Evaluation configuration." + }, + "packaging": { + "allOf": [ + { + "$ref": "#/components/schemas/ModelTrainingPackagingConfiguration" + } + ], + "description": "Model artifact packaging options." } }, - "description": "Configuration options for a text response from the model. Can be plain text or structured JSON data." + "description": "Runtime options for managed supervised fine tuning." }, - "PromptBasedEvaluatorDefinition": { + "SharepointGroundingToolCall": { "type": "object", "required": [ "type", - "prompt_text" + "call_id", + "arguments", + "status" ], "properties": { "type": { "type": "string", "enum": [ - "prompt" + "sharepoint_grounding_preview_call" ] }, - "prompt_text": { + "call_id": { "type": "string", - "description": "The prompt text used for evaluation" + "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/EvaluatorDefinition" + "$ref": "#/components/schemas/OpenAI.OutputItem" } ], - "description": "Prompt-based evaluator" + "description": "A SharePoint grounding tool call." }, - "ProtocolVersionRecord": { + "SharepointGroundingToolCallOutput": { "type": "object", "required": [ - "protocol", - "version" + "type", + "call_id", + "status" ], "properties": { - "protocol": { + "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/AgentProtocol" + "$ref": "#/components/schemas/ToolCallOutputContent" } ], - "description": "The protocol type." + "description": "The output from the SharePoint grounding tool call." }, - "version": { - "type": "string", - "description": "The version string for the protocol, e.g. 'v0.1.1'." + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/ToolCallStatus" + } + ], + "description": "The status of the tool call." } }, - "description": "A record mapping for a single protocol and its version." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ], + "description": "The output of a SharePoint grounding tool call." }, - "RaiConfig": { + "SharepointGroundingToolParameters": { "type": "object", - "required": [ - "rai_policy_name" - ], "properties": { - "rai_policy_name": { + "name": { "type": "string", - "description": "The name of the RAI policy to apply." + "description": "Optional user-defined name for this tool or configuration." + }, + "description": { + "type": "string", + "description": "Optional user-defined description for this tool or configuration." + }, + "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": "Configuration for Responsible AI (RAI) content filtering and safety features." + "description": "The sharepoint grounding tool parameters." }, - "RecurrenceSchedule": { + "SharepointPreviewTool": { "type": "object", "required": [ - "type" + "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/RecurrenceType" + "$ref": "#/components/schemas/SharepointGroundingToolParameters" } ], - "description": "Recurrence type for the recurrence schedule." + "description": "The sharepoint grounding tool parameters." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "Hourly": "#/components/schemas/HourlyRecurrenceSchedule", - "Daily": "#/components/schemas/DailyRecurrenceSchedule", - "Weekly": "#/components/schemas/WeeklyRecurrenceSchedule", - "Monthly": "#/components/schemas/MonthlyRecurrenceSchedule" + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.Tool" } - }, - "description": "Recurrence schedule model." + ], + "description": "The input definition information for a sharepoint tool as used to configure an agent." }, - "RecurrenceTrigger": { + "SimPoTrainingConfiguration": { "type": "object", "required": [ - "type", - "interval", - "schedule" + "algorithm" ], "properties": { - "type": { + "algorithm": { "type": "string", "enum": [ - "Recurrence" + "simpo" ], - "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" + "description": "Training algorithm, always 'simpo'." }, - "interval": { - "type": "integer", - "format": "int32", - "description": "Interval for the recurrence schedule." + "lora": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingLoraConfiguration" + } + ], + "description": "LoRA adapter configuration." }, - "schedule": { + "eval": { "allOf": [ { - "$ref": "#/components/schemas/RecurrenceSchedule" + "$ref": "#/components/schemas/TrainingEvalConfiguration" } ], - "description": "Recurrence schedule for the recurrence trigger." + "description": "Evaluation configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/Trigger" + "$ref": "#/components/schemas/TrainingConfiguration" } ], - "description": "Recurrence based trigger." + "description": "Simple preference optimization training recipe." }, - "RecurrenceType": { - "anyOf": [ - { - "type": "string" + "SkillObject": { + "type": "object", + "required": [ + "object", + "skill_id", + "has_blob", + "name" + ], + "properties": { + "object": { + "allOf": [ + { + "$ref": "#/components/schemas/SkillObjectType" + } + ], + "description": "The object type, which is always 'skill'.", + "default": "skill" }, - { + "skill_id": { "type": "string", - "enum": [ - "Hourly", - "Daily", - "Weekly", - "Monthly" - ] + "description": "The unique identifier of the skill." + }, + "has_blob": { + "type": "boolean", + "description": "Whether the skill was created from a GZip 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 key-value pairs associated with the skill." } + }, + "description": "A skill object." + }, + "SkillObjectType": { + "type": "string", + "enum": [ + "skill", + "skill.deleted" ], - "description": "Recurrence type." + "description": "The object type of a skill resource." }, - "RedTeam": { + "Sku": { "type": "object", "required": [ - "id", - "target" + "capacity", + "family", + "name", + "size", + "tier" ], "properties": { - "id": { + "capacity": { + "type": "integer", + "format": "int64", + "description": "Sku capacity" + }, + "family": { "type": "string", - "description": "Identifier of the red team run.", - "readOnly": true + "description": "Sku family" }, - "displayName": { + "name": { "type": "string", - "description": "Name of the red-team run." + "description": "Sku name" }, - "numTurns": { - "type": "integer", - "format": "int32", - "description": "Number of simulation rounds." + "size": { + "type": "string", + "description": "Sku size" }, - "attackStrategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttackStrategy" - }, - "description": "List of attack strategies or nested lists of attack strategies." + "tier": { + "type": "string", + "description": "Sku tier" + } + }, + "description": "Sku information" + }, + "StructuredInputDefinition": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "A human-readable description of the input." }, - "simulationOnly": { - "type": "boolean", - "description": "Simulation-only or Simulation + Evaluation. Default false, if true the scan outputs conversation not evaluation result.", - "default": false + "default_value": { + "description": "The default value for the input if no run-time value is provided." }, - "riskCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RiskCategory" - }, - "description": "List of risk categories to generate attack objectives for." + "schema": { + "type": "object", + "additionalProperties": {}, + "description": "The JSON schema for the structured input (optional)." }, - "applicationScenario": { + "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": "Application scenario for the red team operation, to generate scenario specific attacks." + "description": "The name of the structured output." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Red team's tags. Unlike properties, tags are fully mutable." + "description": { + "type": "string", + "description": "A description of the output to emit. Used by the model to determine when to emit the output." }, - "properties": { + "schema": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Red team's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed." + "additionalProperties": {}, + "description": "The JSON schema for the structured output." }, - "status": { + "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", - "description": "Status of the red-team. It is set by service and is read-only.", - "readOnly": true + "enum": [ + "structured_outputs" + ] }, - "target": { - "allOf": [ - { - "$ref": "#/components/schemas/TargetConfig" - } - ], - "description": "Target configuration for the red-team run." + "output": { + "description": "The structured output captured during the response." } }, - "description": "Red team details." + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.OutputItem" + } + ] }, - "RedTeamEvalRunDataSource": { + "SyntheticDataGenerationPreviewEvalRunDataSource": { "type": "object", "required": [ "type", @@ -41006,14 +50820,14 @@ "type": { "type": "string", "enum": [ - "azure_ai_red_team" + "azure_ai_synthetic_data_gen_preview" ], - "description": "The type of data source. Always `azure_ai_red_team`." + "description": "The type of data source, always `azure_ai_synthetic_data_gen_preview`." }, "item_generation_params": { "allOf": [ { - "$ref": "#/components/schemas/ItemGenerationParams" + "$ref": "#/components/schemas/SyntheticDataGenerationPreviewItemGenerationParams" } ], "description": "The parameters for item generation." @@ -41025,41 +50839,67 @@ } ], "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." }, - "RedTeamItemGenerationParams": { + "SyntheticDataGenerationPreviewItemGenerationParams": { "type": "object", "required": [ "type", - "attack_strategies", - "num_turns" + "samples_count", + "model_deployment_name", + "sources" ], "properties": { "type": { "type": "string", "enum": [ - "red_team" + "synthetic_data_gen_preview" ], "description": "The type of item generation parameters." }, - "attack_strategies": { + "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/AttackStrategy" + "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" }, - "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 + "description": "The optional seed data content source files for data generation." } }, "allOf": [ @@ -41068,123 +50908,118 @@ } ] }, - "RedTeamSeedPromptsItemGenerationParams": { + "SystemData": { "type": "object", - "required": [ - "type", - "attack_strategies", - "num_turns", - "source" - ], "properties": { - "type": { + "created_by": { "type": "string", - "enum": [ - "red_team_seed_prompts" + "description": "The identity that created the resource.", + "readOnly": true + }, + "created_by_type": { + "type": "string", + "description": "The type of identity that created the resource.", + "readOnly": true + }, + "created_at": { + "allOf": [ + { + "$ref": "#/components/schemas/FoundryTimestamp" + } ], - "description": "The type of item generation parameters, always `red_team_seed_prompts`." + "description": "The timestamp of resource creation (UTC).", + "readOnly": true }, - "attack_strategies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttackStrategy" - }, - "description": "The collection of attack strategies to be used." + "last_modified_by": { + "type": "string", + "description": "The identity that last modified the resource.", + "readOnly": true }, - "num_turns": { - "type": "integer", - "format": "int32", - "description": "The number of turns allowed in the game.", - "default": 20 + "last_modified_by_type": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "readOnly": true }, - "source": { + "last_modified_at": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" + "$ref": "#/components/schemas/FoundryTimestamp" } ], - "description": "The source of JSONL content to be processed." + "description": "The timestamp of resource last modification (UTC).", + "readOnly": true } }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ], - "description": "Represents the parameters for red team seed prompts item generation." + "description": "Metadata pertaining to creation and last modification of the resource." }, - "RedTeamTaxonomyItemGenerationParams": { + "SystemMessage": { "type": "object", "required": [ - "type", - "attack_strategies", - "num_turns", - "source" + "role", + "content" ], "properties": { - "type": { + "role": { "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" - } + "system" ], - "description": "The source from which JSONL content is read." + "description": "Indicates this is a system message." + }, + "content": { + "type": "string", + "description": "Plain text instructions provided by the system to steer model behavior." } }, "allOf": [ { - "$ref": "#/components/schemas/ItemGenerationParams" + "$ref": "#/components/schemas/Message" } ], - "description": "Represents the parameters for red team taxonomy item generation." + "description": "A message authored by the system to guide model behavior." }, - "ResponseRetrievalItemGenerationParams": { + "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", - "max_num_turns", - "data_mapping", - "source" + "source", + "target" ], "properties": { "type": { "type": "string", "enum": [ - "response_retrieval" + "azure_ai_target_completions" ], - "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." + "description": "The type of data source, always `azure_ai_target_completions`." }, - "data_mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Mapping from source fields to response_id field, required for retrieving chat history." + "input_messages": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + } + ], + "description": "Input messages configuration." }, "source": { "anyOf": [ @@ -41195,40 +51030,25 @@ "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" } ], - "description": "The source from which JSONL content is read." + "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/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" - ] + "$ref": "#/components/schemas/EvalRunDataSource" } ], - "description": "Risk category for the attack objective." + "description": "Represents a data source for target-based completion evaluation configuration." }, - "SASCredentials": { + "TargetConfig": { "type": "object", "required": [ "type" @@ -41236,232 +51056,141 @@ "properties": { "type": { "type": "string", - "enum": [ - "SAS" - ], - "description": "The credential type", - "readOnly": true - }, - "SAS": { - "type": "string", - "description": "SAS token", - "readOnly": true + "description": "Type of the model configuration." } }, - "allOf": [ - { - "$ref": "#/components/schemas/BaseCredentials" - } - ], - "description": "Shared Access Signature (SAS) credential definition" - }, - "SampleType": { - "anyOf": [ - { - "type": "string", - "enum": [ - "EvaluationResultSample" - ] - }, - { - "type": "string" + "discriminator": { + "propertyName": "type", + "mapping": { + "AzureOpenAIModel": "#/components/schemas/AzureOpenAIModelConfiguration" } - ], - "description": "The type of sample used in the analysis." + }, + "description": "Abstract class for target configuration." }, - "SasCredential": { + "TargetUpdate": { "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": "The type of target." } }, - "description": "SAS Credential definition" + "discriminator": { + "propertyName": "type", + "mapping": { + "azure_ai_model": "#/components/schemas/AzureAIModelTargetUpdate", + "azure_ai_agent": "#/components/schemas/AzureAIAgentTargetUpdate" + } + }, + "description": "Base class for targets with discriminator support." }, - "Schedule": { + "TaxonomyCategory": { "type": "object", "required": [ "id", - "enabled", - "trigger", - "task", - "systemData" + "name", + "riskCategory", + "subCategories" ], "properties": { "id": { "type": "string", - "description": "Identifier of the schedule.", - "readOnly": true + "description": "Unique identifier of the taxonomy category." }, - "displayName": { + "name": { "type": "string", - "description": "Name of the schedule." + "description": "Name of the taxonomy category." }, "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." + "description": "Description of the taxonomy category." }, - "task": { + "riskCategory": { "allOf": [ { - "$ref": "#/components/schemas/ScheduleTask" + "$ref": "#/components/schemas/RiskCategory" } ], - "description": "Task for the schedule." + "description": "Risk category associated with this taxonomy category." }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" + "subCategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaxonomySubCategory" }, - "description": "Schedule's tags. Unlike properties, tags are fully mutable." + "description": "List of taxonomy sub categories." }, "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": "Additional properties for the taxonomy category." } }, - "description": "Schedule model." - }, - "ScheduleProvisioningStatus": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ - "Creating", - "Updating", - "Deleting", - "Succeeded", - "Failed" - ] - } - ], - "description": "Schedule provisioning status." + "description": "Taxonomy category definition." }, - "ScheduleRun": { + "TaxonomySubCategory": { "type": "object", "required": [ "id", - "scheduleId", - "success", - "properties" + "name", + "enabled" ], "properties": { "id": { "type": "string", - "description": "Identifier of the schedule run.", - "readOnly": true + "description": "Unique identifier of the taxonomy sub-category." }, - "scheduleId": { + "name": { "type": "string", - "description": "Identifier of the schedule." - }, - "success": { - "type": "boolean", - "description": "Trigger success status of the schedule run.", - "readOnly": true + "description": "Name of the taxonomy sub-category." }, - "triggerTime": { + "description": { "type": "string", - "description": "Trigger time of the schedule run." + "description": "Description of the taxonomy sub-category." }, - "error": { - "type": "string", - "description": "Error information for the schedule run.", - "readOnly": true + "enabled": { + "type": "boolean", + "description": "List of taxonomy items under this sub-category." }, "properties": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Properties of the schedule run.", - "readOnly": true + "description": "Additional properties for the taxonomy sub-category." } }, - "description": "Schedule run model." + "description": "Taxonomy sub-category definition." }, - "ScheduleTask": { + "TelemetryConfig": { "type": "object", "required": [ - "type" + "endpoints" ], "properties": { - "type": { - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleTaskType" - } - ], - "description": "Type of the task." - }, - "configuration": { - "type": "object", - "additionalProperties": { - "type": "string" + "endpoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TelemetryEndpoint" }, - "description": "Configuration for the task." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "Evaluation": "#/components/schemas/EvaluationScheduleTask", - "Insight": "#/components/schemas/InsightScheduleTask" + "minItems": 1, + "maxItems": 3, + "description": "Customer-supplied telemetry export endpoint configurations." } }, - "description": "Schedule task model." + "description": "Customer-supplied telemetry configuration for exporting container logs, traces, and metrics.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } }, - "ScheduleTaskType": { + "TelemetryDataKind": { "anyOf": [ { "type": "string" @@ -41469,226 +51198,231 @@ { "type": "string", "enum": [ - "Evaluation", - "Insight" + "ContainerStdoutStderr", + "ContainerOtel", + "Metrics" ] } ], - "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": "string", - "format": "date-time", - "description": "The last modification time in UTC (ISO 8601)." - } - }, - "description": "A single entry in a directory listing." + "description": "The type of telemetry data to export.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } }, - "SessionDirectoryListResponse": { + "TelemetryEndpoint": { "type": "object", "required": [ - "path", - "entries" + "kind", + "data" ], "properties": { - "path": { - "type": "string", - "description": "The path that was listed, relative to the session home directory." + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryEndpointKind" + } + ], + "description": "The telemetry export endpoint kind." }, - "entries": { + "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SessionDirectoryEntry" + "$ref": "#/components/schemas/TelemetryDataKind" }, - "description": "The directory entries." + "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." } }, - "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." + "discriminator": { + "propertyName": "kind", + "mapping": { + "OTLP": "#/components/schemas/OtlpTelemetryEndpoint" } }, - "description": "Response from uploading a file to a session sandbox." + "description": "A telemetry export endpoint configuration.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } }, - "SessionListResult": { + "TelemetryEndpointAuth": { "type": "object", "required": [ - "data" + "type" ], "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AgentSessionResource" - }, - "description": "The list of sessions." - }, - "pagination_token": { - "type": "string", - "description": "Opaque token to retrieve the next page. Null when there are no more results." + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/TelemetryEndpointAuthType" + } + ], + "description": "The authentication type." } }, - "description": "Paged result for session list operations.", + "discriminator": { + "propertyName": "type", + "mapping": { + "header": "#/components/schemas/HeaderTelemetryEndpointAuth" + } + }, + "description": "Authentication configuration for a telemetry endpoint.", "x-ms-foundry-meta": { "required_previews": [ - "AgentEndpoints=V1Preview" + "HostedAgents=V1Preview" ] } }, - "SharepointGroundingToolCall": { - "type": "object", - "required": [ - "type", - "call_id", - "arguments", - "status" - ], - "properties": { - "type": { + "TelemetryEndpointAuthType": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", "enum": [ - "sharepoint_grounding_preview_call" + "header" ] + } + ], + "description": "The type of authentication for a telemetry endpoint.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "TelemetryEndpointKind": { + "anyOf": [ + { + "type": "string" }, - "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." + "enum": [ + "OTLP" + ] } - }, - "allOf": [ + ], + "description": "The kind of telemetry export endpoint.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } + }, + "TelemetryTransportProtocol": { + "anyOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "type": "string" + }, + { + "type": "string", + "enum": [ + "Http", + "Grpc" + ] } ], - "description": "A SharePoint grounding tool call." + "description": "The transport protocol for telemetry export.", + "x-ms-foundry-meta": { + "required_previews": [ + "HostedAgents=V1Preview" + ] + } }, - "SharepointGroundingToolCallOutput": { + "TensorFlowDistribution": { "type": "object", "required": [ - "type", - "call_id", - "status" + "distribution_type" ], "properties": { - "type": { + "distribution_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" - } + "tensorflow" ], - "description": "The output from the SharePoint grounding tool call." + "description": "Specifies the type of distribution framework." }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/ToolCallStatus" - } - ], - "description": "The status of the tool call." + "worker_count": { + "type": "integer", + "format": "int32", + "description": "Number of workers. If not specified, will default to the instance count." + }, + "parameter_server_count": { + "type": "integer", + "format": "int32", + "description": "Number of parameter server tasks." } }, "allOf": [ { - "$ref": "#/components/schemas/OpenAI.OutputItem" + "$ref": "#/components/schemas/DistributionConfiguration" } ], - "description": "The output of a SharePoint grounding tool call." + "description": "TensorFlow distribution configuration." }, - "SharepointGroundingToolParameters": { + "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": "Optional user-defined name for this tool or configuration." + "description": "The name of the tool." }, "description": { "type": "string", - "description": "Optional user-defined description for this tool or configuration." - }, - "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": "A brief description of the tool's purpose." } }, - "description": "The sharepoint grounding tool parameters." + "description": "Description of a tool that can be used by an agent." }, - "SharepointPreviewTool": { + "ToolProjectConnection": { "type": "object", "required": [ - "type", - "sharepoint_grounding_preview" + "project_connection_id" ], "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." @@ -41697,524 +51431,518 @@ "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." + "project_connection_id": { + "type": "string", + "description": "A project connection in a ToolProjectConnectionList attached to this tool." } }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.Tool" - } - ], - "description": "The input definition information for a sharepoint tool as used to configure an agent." + "description": "A project connection resource." }, - "SkillObject": { + "ToolsetObject": { "type": "object", "required": [ "object", - "skill_id", - "has_blob", - "name" + "id", + "created_at", + "updated_at", + "name", + "tools" ], "properties": { "object": { - "allOf": [ - { - "$ref": "#/components/schemas/SkillObjectType" - } + "type": "string", + "enum": [ + "toolset" ], - "description": "The object type, which is always 'skill'.", - "default": "skill" + "description": "The object type, which is always 'toolset'." }, - "skill_id": { + "id": { "type": "string", - "description": "The unique identifier of the skill." + "description": "The unique identifier of the toolset." }, - "has_blob": { - "type": "boolean", - "description": "Whether the skill was created from a GZip blob package." + "created_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (seconds) when the toolset was created." + }, + "updated_at": { + "type": "integer", + "format": "unixtime", + "description": "The Unix timestamp (seconds) when the toolset was last updated." }, "name": { "type": "string", - "maxLength": 63, - "description": "The unique name of the skill." + "maxLength": 256, + "description": "The name of the toolset." }, "description": { "type": "string", - "maxLength": 1024, - "description": "A human-readable description of the skill." + "maxLength": 512, + "description": "A human-readable description of the toolset." }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Set of key-value pairs associated with the skill." + "description": "Arbitrary key-value metadata to associate with the toolset." + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAI.Tool" + }, + "description": "The list of tools contained in this toolset." } }, - "description": "A skill object." - }, - "SkillObjectType": { - "type": "string", - "enum": [ - "skill", - "skill.deleted" - ], - "description": "The object type of a skill resource." + "description": "A toolset that stores reusable tool definitions for agents." }, - "Sku": { + "TracesPreviewEvalRunDataSource": { "type": "object", "required": [ - "capacity", - "family", - "name", - "size", - "tier" + "type" ], "properties": { - "capacity": { - "type": "integer", - "format": "int64", - "description": "Sku capacity" - }, - "family": { + "type": { "type": "string", - "description": "Sku family" + "enum": [ + "azure_ai_traces_preview" + ], + "description": "The type of data source, always `azure_ai_traces_preview`." }, - "name": { - "type": "string", - "description": "Sku name" + "trace_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Collection of Agent trace identifiers that should be evaluated." }, - "size": { + "agent_id": { "type": "string", - "description": "Sku size" + "description": "The agent ID used to filter traces for evaluation." }, - "tier": { - "type": "string", - "description": "Sku tier" - } - }, - "description": "Sku information" - }, - "StructuredInputDefinition": { - "type": "object", - "properties": { - "description": { + "agent_name": { "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)." + "description": "The agent name used to filter traces for evaluation." }, - "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." + "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 }, - "description": { - "type": "string", - "description": "A description of the output to emit. Used by the model to determine when to emit the output." + "end_time": { + "type": "integer", + "format": "unixtime", + "description": "Unix timestamp (in seconds) marking the end of the trace query window. Defaults to the current time." }, - "schema": { - "type": "object", - "additionalProperties": {}, - "description": "The JSON schema for the structured output." + "max_traces": { + "type": "integer", + "format": "int32", + "description": "Sampling limit applied to traces retrieved for evaluation.", + "default": 1000 }, - "strict": { - "type": "boolean", - "nullable": true, - "description": "Whether to enforce strict validation. Default `true`." + "ingestion_delay_seconds": { + "type": "integer", + "format": "int32", + "description": "The delay to apply for ingestion when querying traces.", + "default": 300 } }, - "description": "A structured output that can be produced by the agent." - }, - "StructuredOutputsOutputItem": { - "type": "object", - "required": [ - "type", - "output" + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunDataSource" + } ], - "properties": { - "type": { + "description": "Represents a data source for evaluation runs that operate over Agent traces stored in Application Insights." + }, + "TrainingAlgorithm": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", "enum": [ - "structured_outputs" + "sft", + "dpo", + "kto", + "orpo", + "cpo", + "simpo", + "grpo", + "ppo", + "rloo", + "reinforce_pp", + "reward_model" ] - }, - "output": { - "description": "The structured output captured during the response." - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.OutputItem" } - ] + ], + "description": "Training algorithm used by a declarative training job." }, - "SyntheticDataGenerationPreviewEvalRunDataSource": { + "TrainingBuiltinRewardConfiguration": { "type": "object", "required": [ - "type", - "item_generation_params", - "target" + "kind", + "type" ], "properties": { - "type": { + "kind": { "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" - } + "builtin" ], - "description": "The parameters for item generation." + "description": "Reward or judge signal kind, always 'builtin'." }, - "target": { + "type": { "allOf": [ { - "$ref": "#/components/schemas/Target" + "$ref": "#/components/schemas/TrainingBuiltinRewardType" } ], - "description": "The target configuration for the evaluation." + "description": "Built-in reward or verifier type." }, - "input_messages": { - "allOf": [ - { - "$ref": "#/components/schemas/OpenAI.CreateEvalResponsesRunDataSourceInputMessagesTemplate" - } - ], - "description": "Input messages template configuration applicable only if target is of type 'azure_ai_model'" + "configuration": { + "type": "object", + "additionalProperties": {}, + "description": "Optional verifier configuration." } }, "allOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "$ref": "#/components/schemas/TrainingRewardConfiguration" } ], - "description": "Represents a data source for evaluation runs that evaluates based on generated synthetic data for testing purposes." + "description": "Built-in reward or verifier used as a judge." }, - "SyntheticDataGenerationPreviewItemGenerationParams": { - "type": "object", - "required": [ - "type", - "samples_count", - "model_deployment_name", - "sources" + "TrainingBuiltinRewardType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "exact_match", + "regex", + "math_equivalence", + "unit_tests" + ] + } ], + "description": "Built-in reward or verifier type." + }, + "TrainingColumnMapping": { + "type": "object", "properties": { - "type": { + "prompt": { "type": "string", - "enum": [ - "synthetic_data_gen_preview" - ], - "description": "The type of item generation parameters." + "description": "Column containing prompts." }, - "samples_count": { - "type": "integer", - "format": "int32", - "description": "The maximum number of data samples to generate." + "chosen": { + "type": "string", + "description": "Column containing chosen responses for preference training." }, - "prompt": { + "rejected": { "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." + "description": "Column containing rejected responses for preference training." }, - "model_deployment_name": { + "reference": { "type": "string", - "description": "The name of the model deployment to use for generating synthetic data." + "description": "Column containing reference answers or reward context." }, - "output_dataset_name": { + "messages": { "type": "string", - "description": "The name of the output dataset where generated synthetic data will be stored. If not provided, service generates dataset name automatically." + "description": "Column containing chat messages." }, - "output_dataset_id": { + "response": { "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 + "description": "Column containing responses for KTO or scored reward-model training." }, - "sources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" - }, - "description": "The optional seed data content source files for data generation." + "label": { + "type": "string", + "description": "Column containing binary desirability labels for KTO training." + }, + "score": { + "type": "string", + "description": "Column containing numeric reward scores for scored reward-model training." } }, - "allOf": [ - { - "$ref": "#/components/schemas/ItemGenerationParams" - } - ] + "description": "Mapping from logical training fields to columns in the dataset." }, - "SystemMessage": { + "TrainingCompositeRewardConfiguration": { "type": "object", "required": [ - "role", - "content" + "kind", + "rewards" ], "properties": { - "role": { + "kind": { "type": "string", "enum": [ - "system" + "composite" ], - "description": "Indicates this is a system message." + "description": "Reward or judge signal kind, always 'composite'." }, - "content": { - "type": "string", - "description": "Plain text instructions provided by the system to steer model behavior." + "rewards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrainingWeightedRewardConfiguration" + }, + "description": "Weighted reward signals to combine." } }, "allOf": [ { - "$ref": "#/components/schemas/Message" + "$ref": "#/components/schemas/TrainingRewardConfiguration" } ], - "description": "A message authored by the system to guide model behavior." + "description": "Composite reward or judge made from multiple weighted reward signals." }, - "Target": { + "TrainingConfiguration": { "type": "object", "required": [ - "type" + "algorithm", + "model", + "dataset" ], "properties": { - "type": { + "algorithm": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingAlgorithm" + } + ], + "description": "Training algorithm." + }, + "framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework implementation. If omitted, the service selects a compatible framework for the algorithm and records the resolved framework on the job." + }, + "resolved_framework": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingFramework" + } + ], + "description": "Training framework resolved by the service.", + "readOnly": true + }, + "framework_version": { "type": "string", - "description": "The type of target." + "description": "Version of the resolved training framework used by the service.", + "readOnly": true + }, + "model": { + "type": "string", + "description": "Base model asset reference." + }, + "dataset": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingDatasetConfiguration" + } + ], + "description": "Training and optional evaluation datasets." + }, + "hyperparameters": { + "type": "object", + "additionalProperties": {}, + "description": "Algorithm-specific hyperparameters. Strongly typed SDK helpers may project common hyperparameters into richer language-specific types." } }, "discriminator": { - "propertyName": "type", + "propertyName": "algorithm", "mapping": { - "azure_ai_model": "#/components/schemas/AzureAIModelTarget", - "azure_ai_agent": "#/components/schemas/AzureAIAgentTarget" + "sft": "#/components/schemas/SftTrainingConfiguration", + "dpo": "#/components/schemas/DpoTrainingConfiguration", + "kto": "#/components/schemas/KtoTrainingConfiguration", + "orpo": "#/components/schemas/OrpoTrainingConfiguration", + "cpo": "#/components/schemas/CpoTrainingConfiguration", + "simpo": "#/components/schemas/SimPoTrainingConfiguration", + "grpo": "#/components/schemas/GrpoTrainingConfiguration", + "ppo": "#/components/schemas/PpoTrainingConfiguration", + "rloo": "#/components/schemas/RlooTrainingConfiguration", + "reinforce_pp": "#/components/schemas/ReinforcePpTrainingConfiguration", + "reward_model": "#/components/schemas/RewardModelTrainingConfiguration" } }, - "description": "Base class for targets with discriminator support." + "description": "Declarative training recipe. When specified, command must be omitted and environment_image_reference is optional." }, - "TargetCompletionEvalRunDataSource": { + "TrainingDataFormatConfiguration": { "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": { + "chat_template": { "allOf": [ { - "$ref": "#/components/schemas/OpenAI.CreateEvalCompletionsRunDataSourceInputMessagesItemReference" + "$ref": "#/components/schemas/ChatTemplate" } ], - "description": "Input messages configuration." + "description": "Built-in chat template to apply to the dataset." }, - "source": { - "anyOf": [ - { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileContentSource" - }, + "chat_template_path": { + "type": "string", + "description": "Path to a custom chat template relative to the job's code directory." + } + }, + "description": "Formatting options for conversational training data." + }, + "TrainingDatasetConfiguration": { + "type": "object", + "required": [ + "train" + ], + "properties": { + "train": { + "type": "string", + "description": "Training dataset asset reference." + }, + "eval": { + "type": "string", + "description": "Optional evaluation dataset asset reference." + }, + "columns": { + "allOf": [ { - "$ref": "#/components/schemas/OpenAI.EvalJsonlFileIdSource" + "$ref": "#/components/schemas/TrainingColumnMapping" } ], - "description": "The source configuration for inline or file data." + "description": "Mapping from training fields to dataset columns." }, - "target": { + "data_format": { "allOf": [ { - "$ref": "#/components/schemas/Target" + "$ref": "#/components/schemas/TrainingDataFormatConfiguration" } ], - "description": "The target configuration for the evaluation." + "description": "Conversational data formatting options." } }, - "allOf": [ - { - "$ref": "#/components/schemas/EvalRunDataSource" - } - ], - "description": "Represents a data source for target-based completion evaluation configuration." + "description": "Dataset configuration for a declarative training job." }, - "TargetConfig": { + "TrainingDeploymentRewardConfiguration": { "type": "object", "required": [ - "type" + "kind", + "deployment" ], "properties": { - "type": { + "kind": { "type": "string", - "description": "Type of the model configuration." + "enum": [ + "deployment" + ], + "description": "Reward or judge signal kind, always 'deployment'." + }, + "deployment": { + "type": "string", + "description": "Model deployment name or resource reference used as the judge." + }, + "rubric": { + "type": "string", + "description": "Rubric or scoring instruction for the judge deployment." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "AzureOpenAIModel": "#/components/schemas/AzureOpenAIModelConfiguration" + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" } - }, - "description": "Abstract class for target configuration." + ], + "description": "Model deployment used as an LLM judge." }, - "TargetUpdate": { + "TrainingEntryPointReference": { "type": "object", "required": [ - "type" + "entry_point" ], "properties": { - "type": { + "entry_point": { "type": "string", - "description": "The type of target." + "description": "Path to the Python callable in module/file.py:function format." } }, - "discriminator": { - "propertyName": "type", - "mapping": { - "azure_ai_model": "#/components/schemas/AzureAIModelTargetUpdate", - "azure_ai_agent": "#/components/schemas/AzureAIAgentTargetUpdate" + "description": "Reference to a Python callable relative to the job's code directory." + }, + "TrainingEvalBenchmark": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "enum": [ + "gsm8k", + "mmlu", + "humaneval", + "mbpp", + "arc", + "hellaswag" + ] } - }, - "description": "Base class for targets with discriminator support." + ], + "description": "Built-in evaluation benchmark." }, - "TaxonomyCategory": { + "TrainingEvalConfiguration": { "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": { + "benchmark": { "allOf": [ { - "$ref": "#/components/schemas/RiskCategory" + "$ref": "#/components/schemas/TrainingEvalBenchmark" } ], - "description": "Risk category associated with this taxonomy category." + "description": "Named built-in benchmark. Mutually exclusive with dataset." }, - "subCategories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaxonomySubCategory" - }, - "description": "List of taxonomy sub categories." + "dataset": { + "type": "string", + "description": "Custom evaluation dataset asset reference. Mutually exclusive with benchmark." }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Additional properties for the taxonomy category." + "every_n_steps": { + "type": "integer", + "format": "int32", + "description": "Evaluation frequency in training steps. Omit for end-of-training only." } }, - "description": "Taxonomy category definition." + "description": "Evaluation configuration for a declarative training job." }, - "TaxonomySubCategory": { + "TrainingEvaluatorRewardConfiguration": { "type": "object", "required": [ - "id", - "name", - "enabled" + "kind", + "evaluator" ], "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the taxonomy sub-category." - }, - "name": { + "kind": { "type": "string", - "description": "Name of the taxonomy sub-category." + "enum": [ + "evaluator" + ], + "description": "Reward or judge signal kind, always 'evaluator'." }, - "description": { + "evaluator": { "type": "string", - "description": "Description of the taxonomy sub-category." - }, - "enabled": { - "type": "boolean", - "description": "List of taxonomy items under this sub-category." + "description": "Evaluator asset reference." }, - "properties": { + "input_mapping": { "type": "object", "additionalProperties": { "type": "string" }, - "description": "Additional properties for the taxonomy sub-category." + "description": "Optional evaluator input mapping." } }, - "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." + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" } - }, - "description": "Customer-supplied telemetry configuration for exporting container logs, traces, and metrics.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } + ], + "description": "Foundry evaluator used as a judge." }, - "TelemetryDataKind": { + "TrainingFramework": { "anyOf": [ { "type": "string" @@ -42222,135 +51950,112 @@ { "type": "string", "enum": [ - "ContainerStdoutStderr", - "ContainerOtel", - "Metrics" + "trl", + "verl", + "open_rlhf", + "nemo_rl", + "slime", + "torch_forge" ] } ], - "description": "The type of telemetry data to export.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } + "description": "Training framework used to lower a declarative training job into an execution command." }, - "TelemetryEndpoint": { + "TrainingFunctionRewardConfiguration": { "type": "object", "required": [ "kind", - "data" + "function" ], "properties": { "kind": { - "allOf": [ - { - "$ref": "#/components/schemas/TelemetryEndpointKind" - } + "type": "string", + "enum": [ + "function" ], - "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" - ] + "description": "Reward or judge signal kind, always 'function'." }, - "auth": { + "function": { "allOf": [ { - "$ref": "#/components/schemas/TelemetryEndpointAuth" + "$ref": "#/components/schemas/TrainingEntryPointReference" } ], - "description": "Optional authentication configuration." + "description": "Python callable used to compute reward scores." } }, - "discriminator": { - "propertyName": "kind", - "mapping": { - "OTLP": "#/components/schemas/OtlpTelemetryEndpoint" + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" } - }, - "description": "A telemetry export endpoint configuration.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } + ], + "description": "Python callable used as a judge." }, - "TelemetryEndpointAuth": { + "TrainingInlineFunctionConfiguration": { "type": "object", "required": [ - "type" + "def" ], "properties": { - "type": { + "def": { + "type": "string", + "description": "Python function definition." + }, + "runtime": { "allOf": [ { - "$ref": "#/components/schemas/TelemetryEndpointAuthType" + "$ref": "#/components/schemas/TrainingInlineFunctionRuntime" } ], - "description": "The authentication type." - } - }, - "discriminator": { - "propertyName": "type", - "mapping": { - "header": "#/components/schemas/HeaderTelemetryEndpointAuth" + "description": "Runtime dependencies for the inline function." } }, - "description": "Authentication configuration for a telemetry endpoint.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } + "description": "Inline Python function definition for custom training logic." }, - "TelemetryEndpointAuthType": { - "anyOf": [ - { - "type": "string" - }, - { + "TrainingInlineFunctionRewardConfiguration": { + "type": "object", + "required": [ + "kind", + "inline_function" + ], + "properties": { + "kind": { "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" + "inline_function" + ], + "description": "Reward or judge signal kind, always 'inline_function'." }, + "inline_function": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingInlineFunctionConfiguration" + } + ], + "description": "Inline Python function used to compute reward scores." + } + }, + "allOf": [ { - "type": "string", - "enum": [ - "OTLP" - ] + "$ref": "#/components/schemas/TrainingRewardConfiguration" } ], - "description": "The kind of telemetry export endpoint.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } + "description": "Inline Python function used as a judge." }, - "TelemetryTransportProtocol": { + "TrainingInlineFunctionRuntime": { + "type": "object", + "properties": { + "pip": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Pip packages to install before invoking the inline function." + } + }, + "description": "Python runtime dependencies for an inline function." + }, + "TrainingJobInclude": { "anyOf": [ { "type": "string" @@ -42358,196 +52063,306 @@ { "type": "string", "enum": [ - "Http", - "Grpc" + "latest_attempt", + "input_datasets", + "output_datasets", + "execution_definition", + "resolved_specification", + "parameters", + "settings", + "services", + "log_files", + "job_cost", + "compute_request", + "compute" ] } ], - "description": "The transport protocol for telemetry export.", - "x-ms-foundry-meta": { - "required_previews": [ - "HostedAgents=V1Preview" - ] - } + "description": "Optional related training job data to include in a get response." }, - "ToolCallOutputContent": { - "anyOf": [ - { + "TrainingJobService": { + "type": "object", + "properties": { + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/JobServiceType" + } + ], + "description": "Service type.", + "readOnly": true + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Service port.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Service status.", + "readOnly": true + }, + "error": { "type": "object", - "additionalProperties": {} + "additionalProperties": {}, + "description": "Terminal error for the service, if any.", + "readOnly": true }, - { - "type": "string" + "endpoint": { + "type": "string", + "format": "uri", + "description": "Service endpoint URI.", + "readOnly": true }, - { - "type": "array", - "items": {} + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Additional service properties.", + "readOnly": true } - ], - "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." + }, + "description": "Service endpoint details for a training job." }, - "ToolDescription": { + "TrainingJobServiceCollection": { "type": "object", + "required": [ + "services" + ], "properties": { - "name": { - "type": "string", - "description": "The name of the tool." - }, - "description": { - "type": "string", - "description": "A brief description of the tool's purpose." + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TrainingJobService" + }, + "description": "Services keyed by service name.", + "readOnly": true } }, - "description": "Description of a tool that can be used by an agent." + "description": "Services exposed by a training job." }, - "ToolProjectConnection": { + "TrainingLoraConfiguration": { "type": "object", "required": [ - "project_connection_id" + "rank" ], "properties": { - "name": { - "type": "string", - "description": "Optional user-defined name for this tool or configuration." + "rank": { + "type": "integer", + "format": "int32", + "description": "Low-rank dimension." }, - "description": { - "type": "string", - "description": "Optional user-defined description for this tool or configuration." + "alpha": { + "type": "integer", + "format": "int32", + "description": "LoRA scaling factor.", + "default": 16 }, - "project_connection_id": { + "dropout": { + "type": "number", + "format": "double", + "description": "Dropout applied to adapter inputs.", + "default": 0.05 + }, + "target_modules": { "type": "string", - "description": "A project connection in a ToolProjectConnectionList attached to this tool." + "description": "Linear layers that receive adapters. Use 'auto' to let the framework choose defaults.", + "default": "auto" + }, + "quantize": { + "type": "boolean", + "description": "Whether to enable QLoRA 4-bit base weight loading.", + "default": false } }, - "description": "A project connection resource." + "description": "LoRA adapter configuration for parameter-efficient fine tuning." }, - "ToolsetObject": { + "TrainingModelRewardConfiguration": { "type": "object", "required": [ - "object", - "id", - "created_at", - "updated_at", - "name", - "tools" + "kind", + "model" ], "properties": { - "object": { + "kind": { "type": "string", "enum": [ - "toolset" + "model" ], - "description": "The object type, which is always 'toolset'." - }, - "id": { - "type": "string", - "description": "The unique identifier of the toolset." - }, - "created_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (seconds) when the toolset was created." - }, - "updated_at": { - "type": "integer", - "format": "unixtime", - "description": "The Unix timestamp (seconds) when the toolset was last updated." - }, - "name": { - "type": "string", - "maxLength": 256, - "description": "The name of the toolset." + "description": "Reward or judge signal kind, always 'model'." }, - "description": { + "model": { "type": "string", - "maxLength": 512, - "description": "A human-readable description of the toolset." - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Arbitrary key-value metadata to associate with the toolset." - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAI.Tool" - }, - "description": "The list of tools contained in this toolset." + "description": "Reward model asset reference used to compute scores." } }, - "description": "A toolset that stores reusable tool definitions for agents." + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Learned reward model used as a judge." }, - "TracesPreviewEvalRunDataSource": { + "TrainingRewardConfiguration": { "type": "object", "required": [ - "type" + "kind" ], "properties": { - "type": { + "kind": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardKind" + } + ], + "description": "Reward or judge signal kind." + } + }, + "discriminator": { + "propertyName": "kind", + "mapping": { + "model": "#/components/schemas/TrainingModelRewardConfiguration", + "function": "#/components/schemas/TrainingFunctionRewardConfiguration", + "inline_function": "#/components/schemas/TrainingInlineFunctionRewardConfiguration", + "builtin": "#/components/schemas/TrainingBuiltinRewardConfiguration", + "evaluator": "#/components/schemas/TrainingEvaluatorRewardConfiguration", + "deployment": "#/components/schemas/TrainingDeploymentRewardConfiguration", + "composite": "#/components/schemas/TrainingCompositeRewardConfiguration" + } + }, + "description": "Reward or judge signal configuration for reinforcement or reward model training." + }, + "TrainingRewardKind": { + "anyOf": [ + { + "type": "string" + }, + { "type": "string", "enum": [ - "azure_ai_traces_preview" + "model", + "function", + "inline_function", + "builtin", + "evaluator", + "deployment", + "composite" + ] + } + ], + "description": "Reward or judge signal kind." + }, + "TrainingRolloutConfiguration": { + "type": "object", + "required": [ + "engine" + ], + "properties": { + "engine": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRolloutEngine" + } ], - "description": "The type of data source, always `azure_ai_traces_preview`." + "description": "Rollout inference engine." }, - "trace_ids": { + "num_generations": { + "type": "integer", + "format": "int32", + "description": "Number of completions to generate for each prompt." + }, + "max_prompt_length": { + "type": "integer", + "format": "int32", + "description": "Maximum prompt length in tokens." + }, + "max_completion_length": { + "type": "integer", + "format": "int32", + "description": "Maximum completion length in tokens." + }, + "temperature": { + "type": "number", + "format": "double", + "description": "Sampling temperature for rollout generation." + }, + "top_p": { + "type": "number", + "format": "double", + "description": "Nucleus sampling probability for rollout generation." + }, + "stop": { "type": "array", "items": { "type": "string" }, - "description": "Collection of Agent trace identifiers that should be evaluated." - }, - "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." + "description": "Stop sequences for rollout generation." }, - "lookback_hours": { + "batch_size": { "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": { - "type": "integer", - "format": "unixtime", - "description": "Unix timestamp (in seconds) marking the end of the trace query window. Defaults to the current time." + "description": "Rollout batch size." }, - "max_traces": { + "seed": { "type": "integer", "format": "int32", - "description": "Sampling limit applied to traces retrieved for evaluation.", - "default": 1000 + "description": "Random seed for rollout generation." }, - "ingestion_delay_seconds": { + "tensor_parallel_size": { "type": "integer", "format": "int32", - "description": "The delay to apply for ingestion when querying traces.", - "default": 300 + "description": "Tensor parallel size used by the rollout engine.", + "default": 1 + }, + "gpu_memory_utilization": { + "type": "number", + "format": "double", + "description": "GPU memory utilization target for the rollout engine, between 0.0 and 1.0." } }, - "allOf": [ + "description": "Rollout generation configuration for online reinforcement learning." + }, + "TrainingRolloutEngine": { + "anyOf": [ { - "$ref": "#/components/schemas/EvalRunDataSource" + "type": "string" + }, + { + "type": "string", + "enum": [ + "vllm", + "sglang", + "hf", + "megatron_inference" + ] } ], - "description": "Represents a data source for evaluation runs that operate over Agent traces stored in Application Insights." + "description": "Inference engine used for rollout generation during online reinforcement learning." + }, + "TrainingWeightedRewardConfiguration": { + "type": "object", + "required": [ + "reward" + ], + "properties": { + "reward": { + "allOf": [ + { + "$ref": "#/components/schemas/TrainingRewardConfiguration" + } + ], + "description": "Reward signal." + }, + "weight": { + "type": "number", + "format": "double", + "description": "Weight applied to this reward signal.", + "default": 1 + } + }, + "description": "Weighted reward signal used in a composite judge." }, "TreatmentEffectType": { "anyOf": [ diff --git a/specification/ai-foundry/data-plane/Foundry/README.md b/specification/ai-foundry/data-plane/Foundry/readme.md similarity index 95% rename from specification/ai-foundry/data-plane/Foundry/README.md rename to specification/ai-foundry/data-plane/Foundry/readme.md index 1a2a1e0646f1..c5cae3b41aac 100644 --- a/specification/ai-foundry/data-plane/Foundry/README.md +++ b/specification/ai-foundry/data-plane/Foundry/readme.md @@ -1,5 +1,9 @@ + + # Foundry data-plane TypeSpec +> see https://aka.ms/autorest + This folder contains the TypeSpec for all data-plane REST APIs of the Foundry service. ## Contributing 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 ad4c5f3050f8..a2cea4b6f37b 100644 --- a/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp +++ b/specification/ai-foundry/data-plane/Foundry/relocate-beta-operations.tsp @@ -1,5 +1,5 @@ -// This file moves all beta operations (preview routes) from the Azure.AI.Projects namespace to -// a new namespace Azure.AI.Projects.Beta, thus creating a sub-client ".beta" in the emitted SDKs. +// This file moves operations assigned to the beta SDK surface from the Azure.AI.Projects namespace +// to a new namespace Azure.AI.Projects.Beta, thus creating a sub-client ".beta" in the emitted SDKs. // It is imported by the client.tsp file, which is used for emitting the Python and JS clients. // See https://azure.github.io/typespec-azure/docs/howtos/generate-client-libraries/03client/#move-all-operations-to-root-client @@ -75,3 +75,207 @@ interface Toolsets {} @@clientLocation(Azure.AI.Projects.Toolsets.getToolset, Toolsets); @@clientLocation(Azure.AI.Projects.Toolsets.listToolsets, Toolsets); @@clientLocation(Azure.AI.Projects.Toolsets.deleteToolset, Toolsets); + +interface Models {} +@@clientLocation(Azure.AI.Projects.Models.createTrainingJob, Models); +@@clientLocation(Azure.AI.Projects.Models.createSftTrainingJob, Models); +@@clientLocation(Azure.AI.Projects.Models.createPreferenceTrainingJob, Models); +@@clientLocation(Azure.AI.Projects.Models.createKtoTrainingJob, Models); +@@clientLocation(Azure.AI.Projects.Models.createRewardModelTrainingJob, + Models +); +@@clientLocation(Azure.AI.Projects.Models.createGrpoTrainingJob, Models); +@@clientLocation(Azure.AI.Projects.Models.createPolicyGradientTrainingJob, + Models +); +@@clientLocation(Azure.AI.Projects.Models.createPpoTrainingJob, Models); +@@clientLocation(Azure.AI.Projects.Models.getTrainingOperationResult, Models); + +namespace Mlflow { + interface Experiments {} + interface Runs {} + interface Metrics {} + interface Artifacts {} + interface RegisteredModels {} + interface ModelVersions {} +} + +@@clientLocation(Azure.AI.Projects.Mlflow.Experiments.create, + Mlflow.Experiments +); +@@clientLocation(Azure.AI.Projects.Mlflow.Experiments.get, Mlflow.Experiments); +@@clientLocation(Azure.AI.Projects.Mlflow.Experiments.getByName, + Mlflow.Experiments +); +@@clientLocation(Azure.AI.Projects.Mlflow.Experiments.list, Mlflow.Experiments); +@@clientLocation(Azure.AI.Projects.Mlflow.Experiments.search, + Mlflow.Experiments +); +@@clientLocation(Azure.AI.Projects.Mlflow.Experiments.update, + Mlflow.Experiments +); +@@clientLocation(Azure.AI.Projects.Mlflow.Experiments.delete, + Mlflow.Experiments +); +@@clientLocation(Azure.AI.Projects.Mlflow.Experiments.restore, + Mlflow.Experiments +); +@@clientLocation(Azure.AI.Projects.Mlflow.Experiments.setTag, + Mlflow.Experiments +); + +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.create, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.get, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.search, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.update, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.delete, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.restore, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.logBatch, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.logMetric, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.logParameter, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.setTag, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.deleteTag, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.logModel, Mlflow.Runs); +@@clientLocation(Azure.AI.Projects.Mlflow.Runs.logInputs, Mlflow.Runs); + +@@clientLocation(Azure.AI.Projects.Mlflow.Metrics.getHistory, Mlflow.Metrics); + +@@clientLocation(Azure.AI.Projects.Mlflow.Artifacts.list, Mlflow.Artifacts); + +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.create, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.update, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.delete, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.get, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.list, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.search, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.setTag, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.deleteTag, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.getLatestVersions, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.getLatestVersionsNameInBody, + Mlflow.RegisteredModels +); +@@clientLocation(Azure.AI.Projects.Mlflow.RegisteredModels.rename, + Mlflow.RegisteredModels +); + +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.create, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.update, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.transitionStage, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.delete, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.get, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.search, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.searchWithFilter, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.getDownloadUri, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.setTag, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.deleteTag, + Mlflow.ModelVersions +); +@@clientLocation(Azure.AI.Projects.Mlflow.ModelVersions.getStorageLocationUri, + Mlflow.ModelVersions +); + +interface TrainingJobs {} + +@@clientLocation(Azure.AI.Projects.TrainingJobs.create, TrainingJobs); +@@clientLocation(Azure.AI.Projects.TrainingJobs.list, TrainingJobs); +@@clientLocation(Azure.AI.Projects.TrainingJobs.get, TrainingJobs); +@@clientLocation(Azure.AI.Projects.TrainingJobs.beginDelete, TrainingJobs); +@@clientLocation(Azure.AI.Projects.TrainingJobs.beginCancel, TrainingJobs); +@@clientLocation(Azure.AI.Projects.TrainingJobs.showServices, TrainingJobs); + +@@clientLocation(Azure.AI.Projects.TrainingJobOperations.getOperationResult, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobOperations.getOperationStatus, + TrainingJobs +); + +@@clientLocation(Azure.AI.Projects.TrainingJobAttempts.listAttempts, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttempts.getAttempt, + TrainingJobs +); + +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptArtifacts.listAttemptArtifacts, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptArtifacts.getAttemptArtifactMetadata, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptArtifacts.getAttemptArtifactContentInfo, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptArtifacts.getAttemptArtifactContentInfoByPrefix, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptArtifacts.downloadAttemptArtifact, + TrainingJobs +); + +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptMetrics.listAttemptMetrics, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptMetrics.getAttemptMetricLastValues, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptMetrics.getAttemptMetric, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptMetrics.getAttemptMetricAggregates, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptMetrics.getAttemptMetricSamples, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptMetrics.getAttemptMetricSample, + TrainingJobs +); + +@@clientLocation(Azure.AI.Projects.TrainingJobOutputs.listOutputs, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobOutputs.getOutput, TrainingJobs); + +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptOutputs.listAttemptOutputs, + TrainingJobs +); +@@clientLocation(Azure.AI.Projects.TrainingJobAttemptOutputs.getAttemptOutput, + TrainingJobs +); diff --git a/specification/ai-foundry/data-plane/Foundry/src/common/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/common/models.tsp index 6948ebbcedf0..bb100e0da927 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/common/models.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/common/models.tsp @@ -68,6 +68,7 @@ union FoundryFeaturesOptInKeys { memory_stores_v1_preview: "MemoryStores=V1Preview", toolset_v1_preview: "Toolsets=V1Preview", agent_endpoint_v1_preview: "AgentEndpoints=V1Preview", + training_jobs_v1_preview: "TrainingJobs=V1Preview", } alias WithRequiredFoundryPreviewHeader = { diff --git a/specification/ai-foundry/data-plane/Foundry/src/common/readme.md b/specification/ai-foundry/data-plane/Foundry/src/common/readme.md new file mode 100644 index 000000000000..a5b0649b6161 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/src/common/readme.md @@ -0,0 +1,7 @@ + + +# Foundry Common TypeSpec + +> see https://aka.ms/autorest + +Shared models and service configuration for the Foundry data-plane TypeSpec project. diff --git a/specification/ai-foundry/data-plane/Foundry/src/mlflow/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/mlflow/models.tsp new file mode 100644 index 000000000000..fe160595fce4 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/src/mlflow/models.tsp @@ -0,0 +1,89 @@ +namespace Azure.AI.Projects.Mlflow; + +using TypeSpec.Http; + +@doc("Generic MLflow compatibility request payload.") +model MlflowPayload { + ...Record; +} + +@doc("Generic MLflow compatibility response payload.") +model MlflowResponse { + ...Record; +} + +alias MlflowPaginationQueryParameters = { + @doc("Maximum number of items to return.") + @query max_results?: int32; + + @doc("Token used to retrieve the next page of results.") + @query page_token?: string; +}; + +alias MlflowExperimentQueryParameters = { + @doc("MLflow experiment identifier.") + @query experiment_id?: string; + + @doc("MLflow experiment name.") + @query experiment_name?: string; +}; + +alias MlflowExperimentListQueryParameters = MlflowPaginationQueryParameters & { + @doc("Experiment lifecycle stage filter.") + @query view_type?: string; +}; + +alias MlflowRunQueryParameters = { + @doc("MLflow run identifier.") + @query run_id?: string; + + @doc("MLflow run UUID.") + @query run_uuid?: string; +}; + +alias MlflowRegisteredModelQueryParameters = { + @doc("Registered model name.") + @query name?: string; +}; + +alias MlflowRegisteredModelSearchQueryParameters = MlflowPaginationQueryParameters & { + @doc("Registered model search filter.") + @query filter?: string; +}; + +alias MlflowRegisteredModelLatestVersionsQueryParameters = MlflowRegisteredModelQueryParameters & { + @doc("Model version stages to include.") + @query stages?: string[]; +}; + +alias MlflowModelVersionQueryParameters = { + @doc("Registered model name.") + @query name?: string; + + @doc("Model version.") + @query version?: string; +}; + +alias MlflowModelVersionSearchQueryParameters = MlflowPaginationQueryParameters & { + @doc("Model version search filter.") + @query filter?: string; + + @doc("Model version ordering expression.") + @query order_by?: string; +}; + +alias MlflowArtifactListQueryParameters = MlflowRunQueryParameters & { + @doc("Artifact path to list.") + @query path?: string; +}; + +alias MlflowMetricHistoryQueryParameters = MlflowRunQueryParameters & { + @doc("Metric key.") + @query metric_key?: string; + + @doc("Maximum number of metric points to return.") + @query max_results?: int32; + + @doc("Token used to retrieve the next page of metric points.") + @query page_token?: string; +}; \ No newline at end of file diff --git a/specification/ai-foundry/data-plane/Foundry/src/mlflow/readme.md b/specification/ai-foundry/data-plane/Foundry/src/mlflow/readme.md new file mode 100644 index 000000000000..d6a8944f8a83 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/src/mlflow/readme.md @@ -0,0 +1,7 @@ + + +# Foundry MLflow TypeSpec + +> see https://aka.ms/autorest + +MLflow routes and models for the Foundry data-plane TypeSpec project. diff --git a/specification/ai-foundry/data-plane/Foundry/src/mlflow/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/mlflow/routes.tsp new file mode 100644 index 000000000000..af78ba158dc4 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/src/mlflow/routes.tsp @@ -0,0 +1,443 @@ +import "./models.tsp"; +import "../common/models.tsp"; + +using TypeSpec.Http; + +namespace Azure.AI.Projects.Mlflow; + +@tag("MLflow Experiments") +@route("/mlflow/api/2.0/mlflow/experiments") +interface Experiments { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Create an MLflow experiment.") + @post + @route("create") + create is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get an MLflow experiment by ID.") + @get + @route("get") + get is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowExperimentQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get an MLflow experiment by name.") + @get + @route("get-by-name") + getByName is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowExperimentQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("List MLflow experiments.") + @get + @route("list") + list is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowExperimentListQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Search MLflow experiments.") + @post + @route("search") + search is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Update MLflow experiment metadata.") + @post + @route("update") + update is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Delete an MLflow experiment.") + @post + @route("delete") + delete is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Restore a deleted MLflow experiment.") + @post + @route("restore") + restore is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Set an MLflow experiment tag.") + @post + @route("set-experiment-tag") + setTag is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; +} + + +@tag("MLflow Runs") +@route("/mlflow/api/2.0/mlflow/runs") +interface Runs { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Create an MLflow run.") + @post + @route("create") + create is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get an MLflow run.") + @get + @route("get") + get is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowRunQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Search MLflow runs.") + @post + @route("search") + search is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Update MLflow run metadata or status.") + @post + @route("update") + update is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Delete an MLflow run.") + @post + @route("delete") + delete is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Restore a deleted MLflow run.") + @post + @route("restore") + restore is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Log a batch of metrics, parameters, and tags to an MLflow run.") + @post + @route("log-batch") + logBatch is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Log one metric to an MLflow run.") + @post + @route("log-metric") + logMetric is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Log one parameter to an MLflow run.") + @post + @route("log-parameter") + logParameter is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Set an MLflow run tag.") + @post + @route("set-tag") + setTag is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Delete an MLflow run tag.") + @post + @route("delete-tag") + deleteTag is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Log MLflow model metadata.") + @post + @route("log-model") + logModel is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Log MLflow run input relationships.") + @post + @route("log-inputs") + logInputs is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; +} + +@tag("MLflow Metrics") +interface Metrics { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get MLflow metric history.") + @get + @route("/mlflow/api/2.0/mlflow/metrics/get-history") + getHistory is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowMetricHistoryQueryParameters, + MlflowResponse + >; +} + +@tag("MLflow Artifacts") +interface Artifacts { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("List MLflow artifacts.") + @get + @route("/mlflow/api/2.0/mlflow/artifacts/list") + list is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowArtifactListQueryParameters, + MlflowResponse + >; +} + +@tag("MLflow Registered Models") +@route("/mlflow/api/2.0/mlflow/registered-models") +interface RegisteredModels { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Create an MLflow registered model.") + @post + @route("create") + create is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Update an MLflow registered model.") + @patch + @route("update") + update is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Delete an MLflow registered model.") + @delete + @route("delete") + delete is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get an MLflow registered model.") + @get + @route("get") + get is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowRegisteredModelQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("List MLflow registered models.") + @get + @route("list") + list is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowPaginationQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Search MLflow registered models.") + @get + @route("search") + search is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowRegisteredModelSearchQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Set an MLflow registered-model tag.") + @post + @route("set-tag") + setTag is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Delete an MLflow registered-model tag.") + @delete + @route("delete-tag") + deleteTag is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get latest versions for an MLflow registered model.") + @get + @route("get-latest-versions") + getLatestVersions is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowRegisteredModelLatestVersionsQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get latest versions for an MLflow registered model with the model name in the request body.") + @post + @route("get-latest-versions") + getLatestVersionsNameInBody is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Rename an MLflow registered model.") + @post + @route("rename") + rename is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; +} + +@tag("MLflow Model Versions") +@route("/mlflow/api/2.0/mlflow/model-versions") +interface ModelVersions { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Create an MLflow model version.") + @post + @route("create") + create is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Update an MLflow model version.") + @patch + @route("update") + update is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Transition an MLflow model version stage.") + @post + @route("transition-stage") + transitionStage is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Delete an MLflow model version.") + @delete + @route("delete") + delete is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get an MLflow model version.") + @get + @route("get") + get is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowModelVersionQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Search MLflow model versions.") + @get + @route("search") + search is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowModelVersionSearchQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Search MLflow model versions with search options in the request body.") + @post + @route("search") + searchWithFilter is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get an MLflow model version download URI.") + @get + @route("get-download-uri") + getDownloadUri is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowModelVersionQueryParameters, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Set an MLflow model-version tag.") + @post + @route("set-tag") + setTag is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Delete an MLflow model-version tag.") + @delete + @route("delete-tag") + deleteTag is Azure.AI.Projects.FoundryDataPlaneOperation< + { @bodyRoot payload: MlflowPayload }, + MlflowResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "MLflow compatibility route" + @doc("Get an MLflow model version storage location URI.") + @get + @route("get-storage-location-uri") + getStorageLocationUri is Azure.AI.Projects.FoundryDataPlaneOperation< + MlflowModelVersionQueryParameters, + MlflowResponse + >; +} \ No newline at end of file diff --git a/specification/ai-foundry/data-plane/Foundry/src/models/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/models/models.tsp new file mode 100644 index 000000000000..b82629bf2ee3 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/src/models/models.tsp @@ -0,0 +1,638 @@ +import "../common/models.tsp"; +import "../training_jobs/models.tsp"; + +using TypeSpec.Rest; + +namespace Azure.AI.Projects; + +@doc("Compute placement for a managed model training job.") +model ModelTrainingComputeConfiguration { + @doc("Compute resource ID used to run the managed training job.") + id: string; + + @doc("Compute resource configuration for the managed training job.") + resources?: JobResourceConfiguration; + + @doc("Number of GPUs requested by the managed training job.") + gpu_count?: int32; + + @doc("Distribution configuration for the managed training job.") + distribution?: DistributionConfiguration; + + @doc("Queue settings for the managed training job.") + queue_settings?: QueueSettings; + + @doc("ARM resource ID of a user-assigned managed identity attached to the Foundry project.") + user_assigned_identity_id?: string; +} + +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" +@doc("Model asset produced by managed model training.") +@Rest.resource("models") +model Model { + @doc("Asset ID, a unique identifier for the model asset.") + @visibility(Lifecycle.Read) + id?: string; + + @doc("The name of the model asset.") + @visibility(Lifecycle.Read) + @key + name: string; + + @doc("The version of the model asset.") + @visibility(Lifecycle.Read) + version: string; + + @doc("The model asset description text.") + @visibility(Lifecycle.Read) + description?: string; + + @doc("Tags associated with the model asset.") + @visibility(Lifecycle.Read) + tags?: Record; + + @doc("URI of the registered model artifact.") + @visibility(Lifecycle.Read) + uri?: string; + + @doc("Base model used to create this model, when the model was produced by managed training.") + @visibility(Lifecycle.Read) + base_model?: string; + + @doc("Backing training job that produced this model, when available.") + @visibility(Lifecycle.Read) + training_job?: string; +} + +@doc("Status of a managed model training operation.") +union ModelTrainingOperationStatus { + queued: "queued", + in_progress: "in_progress", + + @Azure.Core.lroSucceeded + succeeded: "succeeded", + + @Azure.Core.lroFailed + failed: "failed", + + @Azure.Core.lroCanceled + canceled: "canceled", +} + +@doc("Status resource for a managed model training operation.") +model ModelTrainingOperation { + @doc("Operation identifier for the managed model training request.") + operation_id: string; + + @doc("Managed model training operation status.") + @Azure.Core.lroStatus + status: ModelTrainingOperationStatus; + + @doc("The model produced by managed training when the operation succeeds.") + @Azure.Core.lroResult + result?: Model; + + @doc("Error object that describes the failure when status is 'failed'.") + @Azure.Core.lroErrorResult + error?: ApiError; +} + +@doc("Column mapping for managed SFT datasets. Keys are logical fields expected by SFT; values are the exact column names in the referenced dataset asset. The training dataset must contain chat messages for each training example.") +model SftTrainingColumnMapping { + @doc("Actual dataset column name containing chat messages used for supervised fine tuning, for example 'messages' or 'conversation_json'.") + messages: string; +} + +@doc("Dataset configuration for managed supervised fine tuning.") +model SftTrainingDatasetConfiguration { + @doc("Training dataset asset reference.") + train: string; + + @doc("Optional evaluation dataset asset reference.") + eval?: string; + + @doc("Mapping from SFT logical fields to actual dataset column names. SFT requires the 'messages' logical field.") + columns: SftTrainingColumnMapping; + + @doc("Conversational data formatting options.") + data_format?: TrainingDataFormatConfiguration; +} + +@doc("Column mapping for managed online RL prompt datasets. Keys are logical fields expected by GRPO, RLOO, REINFORCE++, and PPO; values are the exact column names in the referenced dataset asset. The training dataset must contain prompts; reference answers or reward context can be passed to the judge.") +model GrpoTrainingColumnMapping { + @doc("Actual dataset column name containing prompts for rollout generation, for example 'prompt', 'question', or 'problem'.") + prompt: string; + + @doc("Actual dataset column name containing reference answers or reward context passed to the judge, for example 'answer' or 'reference'.") + reference?: string; +} + +@doc("Dataset configuration for managed GRPO training.") +model GrpoTrainingDatasetConfiguration { + @doc("Training dataset asset reference.") + train: string; + + @doc("Optional evaluation dataset asset reference.") + eval?: string; + + @doc("Mapping from online RL logical fields to actual dataset column names. GRPO, policy-gradient, and PPO require the 'prompt' logical field and can optionally map 'reference'.") + columns: GrpoTrainingColumnMapping; + + @doc("Conversational data formatting options.") + data_format?: TrainingDataFormatConfiguration; +} + +@doc("Preference optimization algorithm used by managed pairwise preference training.") +union PreferenceTrainingAlgorithm { + @doc("Direct preference optimization.") + dpo: "dpo", + + @doc("Odds ratio preference optimization.") + orpo: "orpo", + + @doc("Contrastive preference optimization.") + cpo: "cpo", + + @doc("Simple preference optimization.") + simpo: "simpo", +} + +@doc("Policy-gradient algorithm used by managed online reinforcement training.") +union PolicyGradientTrainingAlgorithm { + @doc("REINFORCE leave-one-out.") + rloo: "rloo", + + @doc("REINFORCE++.") + reinforce_pp: "reinforce_pp", +} + +@doc("Column mapping for pairwise preference datasets. Keys are logical fields expected by preference training; values are the exact column names in the referenced dataset asset.") +model PairwisePreferenceColumnMapping { + @doc("Actual dataset column name containing prompts, for example 'prompt' or 'question'.") + prompt: string; + + @doc("Actual dataset column name containing the preferred response, for example 'chosen', 'accepted_answer', or 'good_response'.") + chosen: string; + + @doc("Actual dataset column name containing the rejected response, for example 'rejected', 'rejected_answer', or 'bad_response'.") + rejected: string; +} + +@doc("Dataset configuration for managed pairwise preference training.") +model PairwisePreferenceDatasetConfiguration { + @doc("Training dataset asset reference.") + train: string; + + @doc("Optional evaluation dataset asset reference.") + eval?: string; + + @doc("Mapping from pairwise preference logical fields to actual dataset column names. DPO, ORPO, CPO, and SimPO require 'prompt', 'chosen', and 'rejected'.") + columns: PairwisePreferenceColumnMapping; + + @doc("Conversational data formatting options.") + data_format?: TrainingDataFormatConfiguration; +} + +@doc("Column mapping for KTO feedback datasets. Keys are logical fields expected by KTO; values are the exact column names in the referenced dataset asset.") +model KtoFeedbackColumnMapping { + @doc("Actual dataset column name containing prompts, for example 'prompt' or 'question'.") + prompt: string; + + @doc("Actual dataset column name containing responses, for example 'response', 'completion', or 'answer'.") + response: string; + + @doc("Actual dataset column name containing the binary desirability label, for example 'label' or 'is_desirable'.") + label: string; +} + +@doc("Dataset configuration for managed KTO training.") +model KtoTrainingDatasetConfiguration { + @doc("Training dataset asset reference.") + train: string; + + @doc("Optional evaluation dataset asset reference.") + eval?: string; + + @doc("Mapping from KTO logical fields to actual dataset column names. KTO requires 'prompt', 'response', and 'label'.") + columns: KtoFeedbackColumnMapping; + + @doc("Conversational data formatting options.") + data_format?: TrainingDataFormatConfiguration; +} + +@doc("Column mapping for scored reward-model datasets. Keys are logical fields expected by scored reward-model training; values are the exact column names in the referenced dataset asset.") +model ScoredRewardModelColumnMapping { + @doc("Actual dataset column name containing prompts, for example 'prompt' or 'question'.") + prompt: string; + + @doc("Actual dataset column name containing responses, for example 'response' or 'completion'.") + response: string; + + @doc("Actual dataset column name containing numeric reward scores, for example 'score' or 'reward'.") + score: string; +} + +#suppress "@azure-tools/typespec-azure-core/no-string-discriminator" "Use an extensible union for forward-compatible reward-model dataset shapes." +@doc("Dataset configuration for managed reward-model training.") +@discriminator("kind") +model RewardModelTrainingDatasetConfiguration { + @doc("Reward-model dataset kind.") + kind: string; +} + +@doc("Pairwise preference dataset for managed reward-model training.") +model PairwiseRewardModelTrainingDatasetConfiguration + extends RewardModelTrainingDatasetConfiguration { + @doc("Reward-model dataset kind, always 'pairwise'.") + kind: "pairwise"; + + @doc("Training dataset asset reference.") + train: string; + + @doc("Optional evaluation dataset asset reference.") + eval?: string; + + @doc("Mapping from pairwise reward-model logical fields to actual dataset column names. Pairwise reward-model training requires 'prompt', 'chosen', and 'rejected'.") + columns: PairwisePreferenceColumnMapping; + + @doc("Conversational data formatting options.") + data_format?: TrainingDataFormatConfiguration; +} + +@doc("Scored response dataset for managed reward-model training.") +model ScoredRewardModelTrainingDatasetConfiguration + extends RewardModelTrainingDatasetConfiguration { + @doc("Reward-model dataset kind, always 'scored'.") + kind: "scored"; + + @doc("Training dataset asset reference.") + train: string; + + @doc("Optional evaluation dataset asset reference.") + eval?: string; + + @doc("Mapping from scored reward-model logical fields to actual dataset column names. Scored reward-model training requires 'prompt', 'response', and 'score'.") + columns: ScoredRewardModelColumnMapping; + + @doc("Conversational data formatting options.") + data_format?: TrainingDataFormatConfiguration; +} + +#suppress "@azure-tools/typespec-azure-core/no-string-discriminator" "Use an extensible union for forward-compatible reference policy kinds." +@doc("Reference policy used for preference optimization or online reinforcement training.") +@discriminator("kind") +model ModelTrainingReferenceConfiguration { + @doc("Reference policy kind.") + kind: string; +} + +@doc("Use the submitted base model as the reference policy.") +model BaseModelReferenceConfiguration + extends ModelTrainingReferenceConfiguration { + @doc("Reference policy kind, always 'base_model'.") + kind: "base_model"; +} + +@doc("Use an explicit model as the reference policy.") +model ExplicitModelReferenceConfiguration + extends ModelTrainingReferenceConfiguration { + @doc("Reference policy kind, always 'model'.") + kind: "model"; + + @doc("Reference model asset URI.") + `model`: string; +} + +@doc("Disable reference policy or KL anchoring.") +model NoReferenceConfiguration extends ModelTrainingReferenceConfiguration { + @doc("Reference policy kind, always 'none'.") + kind: "none"; +} + +@doc("Output packaging for a managed model training job.") +union ModelTrainingPackagingMode { + @doc("Register a merged full model.") + merged_model: "merged_model", + + @doc("Register only the adapter weights.") + adapter: "adapter", + + @doc("Register both merged model and adapter weights.") + model_and_adapter: "model_and_adapter", +} + +@doc("Model artifact packaging options.") +model ModelTrainingPackagingConfiguration { + @doc("How the trained model artifact should be packaged.") + mode?: ModelTrainingPackagingMode = ModelTrainingPackagingMode.merged_model; +} + +@doc("Loss function used for reward-model training.") +union RewardModelTrainingLoss { + string, + + @doc("Bradley-Terry pairwise ranking loss.") + bradley_terry: "bradley_terry", + + @doc("Regression loss over numeric scores.") + regression: "regression", +} + +@doc("Critic or value model configuration for managed PPO training.") +model PpoCriticConfiguration { + @doc("Optional critic model asset reference. If omitted, the service initializes the critic from the policy model.") + `model`?: string; + + @doc("Value loss coefficient.") + value_loss_coefficient?: float64; + + @doc("GAE discount factor.") + gamma?: float64; + + @doc("GAE lambda.") + lambda?: float64; +} + +@doc("Runtime options for managed supervised fine tuning.") +model SftTrainingRuntimeConfiguration { + @doc("Training framework implementation. If omitted, the service selects a compatible framework.") + framework?: TrainingFramework; + + @doc("Algorithm-specific hyperparameters passed through to the selected framework.") + hyperparameters?: Record; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; + + @doc("Model artifact packaging options.") + packaging?: ModelTrainingPackagingConfiguration; +} + +@doc("Runtime options for managed pairwise preference training.") +model PreferenceTrainingRuntimeConfiguration { + @doc("Training framework implementation. If omitted, the service selects a compatible framework.") + framework?: TrainingFramework; + + @doc("Algorithm-specific hyperparameters passed through to the selected framework.") + hyperparameters?: Record; + + @doc("Reference policy used by algorithms that require KL anchoring or a reference model.") + reference?: ModelTrainingReferenceConfiguration; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; + + @doc("Model artifact packaging options.") + packaging?: ModelTrainingPackagingConfiguration; +} + +@doc("Runtime options for managed KTO training.") +model KtoTrainingRuntimeConfiguration { + @doc("Training framework implementation. If omitted, the service selects a compatible framework.") + framework?: TrainingFramework; + + @doc("Algorithm-specific hyperparameters passed through to the selected framework.") + hyperparameters?: Record; + + @doc("Weight applied to desirable examples.") + desirable_weight?: float64; + + @doc("Weight applied to undesirable examples.") + undesirable_weight?: float64; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; + + @doc("Model artifact packaging options.") + packaging?: ModelTrainingPackagingConfiguration; +} + +@doc("Runtime options for managed reward-model training.") +model RewardModelTrainingRuntimeConfiguration { + @doc("Training framework implementation. If omitted, the service selects a compatible framework.") + framework?: TrainingFramework; + + @doc("Algorithm-specific hyperparameters passed through to the selected framework.") + hyperparameters?: Record; + + @doc("Loss function used for reward-model training.") + loss?: RewardModelTrainingLoss; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; + + @doc("Model artifact packaging options.") + packaging?: ModelTrainingPackagingConfiguration; +} + +@doc("Runtime options for managed GRPO training.") +model GrpoTrainingRuntimeConfiguration { + @doc("Training framework implementation. If omitted, the service selects a compatible framework.") + framework?: TrainingFramework; + + @doc("Algorithm-specific hyperparameters passed through to the selected framework.") + hyperparameters?: Record; + + @doc("Judge used to score generated completions during GRPO training. Required for GRPO.") + judge: TrainingRewardConfiguration; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Rollout generation configuration.") + rollout?: TrainingRolloutConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; + + @doc("Reference policy used for KL anchoring.") + reference?: ModelTrainingReferenceConfiguration; + + @doc("Model artifact packaging options.") + packaging?: ModelTrainingPackagingConfiguration; +} + +@doc("Runtime options for managed online policy-gradient training.") +model PolicyGradientTrainingRuntimeConfiguration { + @doc("Training framework implementation. If omitted, the service selects a compatible framework.") + framework?: TrainingFramework; + + @doc("Algorithm-specific hyperparameters passed through to the selected framework.") + hyperparameters?: Record; + + @doc("Judge used to score generated completions during online policy-gradient training. Required for RLOO and REINFORCE++.") + judge: TrainingRewardConfiguration; + + @doc("Reference policy used for KL anchoring.") + reference?: ModelTrainingReferenceConfiguration; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Rollout generation configuration. Required for RLOO and REINFORCE++.") + rollout: TrainingRolloutConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; + + @doc("Model artifact packaging options.") + packaging?: ModelTrainingPackagingConfiguration; +} + +@doc("Runtime options for managed PPO training.") +model PpoTrainingRuntimeConfiguration { + @doc("Training framework implementation. If omitted, the service selects a compatible framework.") + framework?: TrainingFramework; + + @doc("Algorithm-specific hyperparameters passed through to the selected framework.") + hyperparameters?: Record; + + @doc("Judge used to score generated completions during PPO training. Required for PPO.") + judge: TrainingRewardConfiguration; + + @doc("Reference policy used for KL anchoring.") + reference?: ModelTrainingReferenceConfiguration; + + @doc("Critic or value model configuration.") + critic?: PpoCriticConfiguration; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Rollout generation configuration. Required for PPO.") + rollout: TrainingRolloutConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; + + @doc("Model artifact packaging options.") + packaging?: ModelTrainingPackagingConfiguration; +} + +#suppress "@azure-tools/typespec-azure-core/no-string-discriminator" "Use an extensible string discriminator for managed model training job types." +@doc("Base request body for creating a managed training job from a base model.") +@discriminator("type") +model ModelTrainingJobCreate { + @doc("Managed training job type.") + type: string; + + @doc("Optional name of the model to create. If omitted, the service generates one.") + name?: string; + + @doc("Optional version of the model to create. If omitted, the service generates one.") + version?: string; + + @doc("Optional description for the model to create.") + description?: string; + + @doc("Optional tags for the model to create.") + tags?: Record; + + @doc("Base model asset reference.") + `model`: string; + + @doc("Compute placement for the managed training job.") + compute: ModelTrainingComputeConfiguration; +} + +@doc("Request body for creating a managed SFT training job from a base model.") +model SftTrainingJob extends ModelTrainingJobCreate { + @doc("Managed training job type, always 'sft'.") + type: "sft"; + + @doc("Training and optional evaluation datasets.") + dataset: SftTrainingDatasetConfiguration; + + @doc("Runtime options for managed SFT.") + runtime?: SftTrainingRuntimeConfiguration; +} + +@doc("Request body for creating a managed pairwise preference training job from a base model.") +model PreferenceTrainingJob extends ModelTrainingJobCreate { + @doc("Managed training job type, always 'preference'.") + type: "preference"; + + @doc("Preference optimization algorithm to run.") + algorithm: PreferenceTrainingAlgorithm; + + @doc("Training and optional evaluation datasets.") + dataset: PairwisePreferenceDatasetConfiguration; + + @doc("Runtime options for managed pairwise preference training.") + runtime?: PreferenceTrainingRuntimeConfiguration; +} + +@doc("Request body for creating a managed KTO training job from a base model.") +model KtoTrainingJob extends ModelTrainingJobCreate { + @doc("Managed training job type, always 'kto'.") + type: "kto"; + + @doc("Training and optional evaluation datasets.") + dataset: KtoTrainingDatasetConfiguration; + + @doc("Runtime options for managed KTO.") + runtime?: KtoTrainingRuntimeConfiguration; +} + +@doc("Request body for creating a managed reward-model training job from a base model.") +model RewardModelTrainingJob extends ModelTrainingJobCreate { + @doc("Managed training job type, always 'reward_model'.") + type: "reward_model"; + + @doc("Training and optional evaluation datasets.") + dataset: RewardModelTrainingDatasetConfiguration; + + @doc("Runtime options for managed reward-model training.") + runtime?: RewardModelTrainingRuntimeConfiguration; +} + +@doc("Request body for creating a managed GRPO training job from a base model.") +model GrpoTrainingJob extends ModelTrainingJobCreate { + @doc("Managed training job type, always 'grpo'.") + type: "grpo"; + + @doc("Training and optional evaluation datasets.") + dataset: GrpoTrainingDatasetConfiguration; + + @doc("Runtime options for managed GRPO.") + runtime: GrpoTrainingRuntimeConfiguration; +} + +@doc("Request body for creating a managed online policy-gradient training job from a base model.") +model PolicyGradientTrainingJob extends ModelTrainingJobCreate { + @doc("Managed training job type, always 'policy_gradient'.") + type: "policy_gradient"; + + @doc("Policy-gradient algorithm to run.") + algorithm: PolicyGradientTrainingAlgorithm; + + @doc("Training and optional evaluation datasets.") + dataset: GrpoTrainingDatasetConfiguration; + + @doc("Runtime options for managed online policy-gradient training.") + runtime: PolicyGradientTrainingRuntimeConfiguration; +} + +@doc("Request body for creating a managed PPO training job from a base model.") +model PpoTrainingJob extends ModelTrainingJobCreate { + @doc("Managed training job type, always 'ppo'.") + type: "ppo"; + + @doc("Training and optional evaluation datasets.") + dataset: GrpoTrainingDatasetConfiguration; + + @doc("Runtime options for managed PPO.") + runtime: PpoTrainingRuntimeConfiguration; +} diff --git a/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp new file mode 100644 index 000000000000..a0c5c174256a --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/src/models/routes.tsp @@ -0,0 +1,174 @@ +import "./models.tsp"; +import "../common/models.tsp"; +import "../training_jobs/models.tsp"; + +using TypeSpec.Http; +using Azure.Core; + +namespace Azure.AI.Projects; + +alias ModelTrainingAcceptedResponse = Foundations.AcceptedResponse & + ModelTrainingOperation & + Foundations.LongRunningStatusLocation; + +@tag("Models") +interface Models { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Managed model training is a product action that creates an underlying training job resource." + @doc("Create a model by running managed model training.") + @post + @route("/models:create_training_job") + @pollingOperation(Models.getTrainingOperationResult) + createTrainingJob is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("Idempotency key used to safely retry managed model training.") + @header("Operation-Id") + operation_id?: string; + + @doc("The managed model training job to create.") + @bodyRoot + job: ModelTrainingJobCreate; + }, + ModelTrainingAcceptedResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Managed model training is a product action that creates an underlying training job resource." + @doc("Create a model by running managed supervised fine-tuning.") + @overload(Models.createTrainingJob) + @pollingOperation(Models.getTrainingOperationResult) + createSftTrainingJob is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("Idempotency key used to safely retry managed model training.") + @header("Operation-Id") + operation_id?: string; + + @doc("The managed SFT model training job to create.") + @bodyRoot + job: SftTrainingJob; + }, + ModelTrainingAcceptedResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Managed model training is a product action that creates an underlying training job resource." + @doc("Create a model by running managed pairwise preference training.") + @overload(Models.createTrainingJob) + @pollingOperation(Models.getTrainingOperationResult) + createPreferenceTrainingJob is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("Idempotency key used to safely retry managed model training.") + @header("Operation-Id") + operation_id?: string; + + @doc("The managed pairwise preference model training request.") + @bodyRoot + job: PreferenceTrainingJob; + }, + ModelTrainingAcceptedResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Managed model training is a product action that creates an underlying training job resource." + @doc("Create a model by running managed KTO training.") + @overload(Models.createTrainingJob) + @pollingOperation(Models.getTrainingOperationResult) + createKtoTrainingJob is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("Idempotency key used to safely retry managed model training.") + @header("Operation-Id") + operation_id?: string; + + @doc("The managed KTO model training request.") + @bodyRoot + job: KtoTrainingJob; + }, + ModelTrainingAcceptedResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Managed model training is a product action that creates an underlying training job resource." + @doc("Create a reward model by running managed reward-model training.") + @overload(Models.createTrainingJob) + @pollingOperation(Models.getTrainingOperationResult) + createRewardModelTrainingJob is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("Idempotency key used to safely retry managed model training.") + @header("Operation-Id") + operation_id?: string; + + @doc("The managed reward-model training request.") + @bodyRoot + job: RewardModelTrainingJob; + }, + ModelTrainingAcceptedResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Managed model training is a product action that creates an underlying training job resource." + @doc("Create a model by running managed GRPO training.") + @overload(Models.createTrainingJob) + @pollingOperation(Models.getTrainingOperationResult) + createGrpoTrainingJob is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("Idempotency key used to safely retry managed model training.") + @header("Operation-Id") + operation_id?: string; + + @doc("The managed GRPO model training request.") + @bodyRoot + job: GrpoTrainingJob; + }, + ModelTrainingAcceptedResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Managed model training is a product action that creates an underlying training job resource." + @doc("Create a model by running managed online policy-gradient training.") + @overload(Models.createTrainingJob) + @pollingOperation(Models.getTrainingOperationResult) + createPolicyGradientTrainingJob is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("Idempotency key used to safely retry managed model training.") + @header("Operation-Id") + operation_id?: string; + + @doc("The managed online policy-gradient model training request.") + @bodyRoot + job: PolicyGradientTrainingJob; + }, + ModelTrainingAcceptedResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Managed model training is a product action that creates an underlying training job resource." + @doc("Create a model by running managed PPO training.") + @overload(Models.createTrainingJob) + @pollingOperation(Models.getTrainingOperationResult) + createPpoTrainingJob is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("Idempotency key used to safely retry managed model training.") + @header("Operation-Id") + operation_id?: string; + + @doc("The managed PPO model training request.") + @bodyRoot + job: PpoTrainingJob; + }, + ModelTrainingAcceptedResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Foundry model training operations are exposed as product-action polling routes under models." + @doc("Poll the result of a managed model training operation.") + @get + @route("/models/operations/{operation_id}/result") + getTrainingOperationResult is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The managed model training operation identifier.") + @path + operation_id: string; + }, + ModelTrainingOperation + >; +} diff --git a/specification/ai-foundry/data-plane/Foundry/src/servicepatterns.tsp b/specification/ai-foundry/data-plane/Foundry/src/servicepatterns.tsp index 3d90d8860881..c4cbaf3d4408 100644 --- a/specification/ai-foundry/data-plane/Foundry/src/servicepatterns.tsp +++ b/specification/ai-foundry/data-plane/Foundry/src/servicepatterns.tsp @@ -2,6 +2,10 @@ using Azure.ClientGenerator.Core; namespace Azure.AI.Projects; +@doc("Unix timestamp in seconds used by Foundry data-plane resources.") +@encode(DateTimeKnownEncoding.unixTimestamp, int64) +scalar FoundryTimestamp extends utcDateTime; + @doc("Defines the request parameters for the createOrUpdateVersion operations.") model InputParameters< TEntityType extends Reflection.Model, diff --git a/specification/ai-foundry/data-plane/Foundry/src/training_jobs/models.tsp b/specification/ai-foundry/data-plane/Foundry/src/training_jobs/models.tsp new file mode 100644 index 000000000000..97a0b0220b68 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/src/training_jobs/models.tsp @@ -0,0 +1,1803 @@ +// cSpell:ignore Chatml Grpo Kahneman Mbpp Mmlu Nemo Orpo QLoRA Rlhf Rloo SGLang Tversky VERL Vllm + +import "../common/models.tsp"; +import "../common/service.tsp"; +import "../servicepatterns.tsp"; + +using TypeSpec.Http; + +namespace Azure.AI.Projects; + +#suppress "@azure-tools/typespec-azure-core/no-string-discriminator" "Use an extensible union instead of a plain string" +@doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null.") +@discriminator("distribution_type") +model DistributionConfiguration { + @doc("Specifies the type of distribution framework.") + distribution_type: string; +} + +@doc("PyTorch distribution configuration.") +model PyTorchDistribution extends DistributionConfiguration { + @doc("Specifies the type of distribution framework.") + distribution_type: "pytorch"; + + @doc("Number of processes per node.") + process_count_per_instance?: int32; +} + +@doc("MPI distribution configuration.") +model MpiDistribution extends DistributionConfiguration { + @doc("Specifies the type of distribution framework.") + distribution_type: "mpi"; + + @doc("Number of processes per MPI node.") + process_count_per_node?: int32; +} + +@doc("TensorFlow distribution configuration.") +model TensorFlowDistribution extends DistributionConfiguration { + @doc("Specifies the type of distribution framework.") + distribution_type: "tensorflow"; + + @doc("Number of workers. If not specified, will default to the instance count.") + worker_count?: int32; + + @doc("Number of parameter server tasks.") + parameter_server_count?: int32; +} + +@doc("Ray distribution configuration.") +model RayDistribution extends DistributionConfiguration { + @doc("Specifies the type of distribution framework.") + distribution_type: "ray"; + + @doc("The port of the head Ray process.") + port?: int32; + + @doc("The address of the Ray head node.") + address?: string; + + @doc("Whether to start the Ray dashboard GUI.") + include_dashboard?: boolean; + + @doc("The port to bind the dashboard server to.") + dashboard_port?: int32; + + @doc("Additional arguments passed to ray start on the head node.") + head_node_additional_args?: string; + + @doc("Additional arguments passed to ray start on worker nodes.") + worker_node_additional_args?: string; + + @doc("Whether to expose the Ray Client server port through the AML proxy for remote access. When true, the Ray Client port is registered as an interactive endpoint, enabling remote ray.init() connections via the WebSocket-TCP bridge. When false or omitted, the Ray Client port is not accessible externally.") + enable_remote_access_client_server?: boolean; + + @doc("The port for the Ray Client server. Defaults to 10001. Only relevant when enable_remote_access_client_server is true.") + client_server_port?: int32; +} + +@doc("Enum to determine the input/output data delivery mode.") +union InputOutputModes { + string, + + @doc("Read-only mount mode.") + read_only_mount: "read_only_mount", + + @doc("Read-write mount mode.") + read_write_mount: "read_write_mount", + + @doc("Download mode.") + download: "download", + + @doc("Direct mode.") + direct: "direct", + + @doc("Upload mode.") + upload: "upload", +} + +@doc("Type of job input/output asset.") +union AssetTypes { + string, + + @doc("URI file asset.") + uri_file: "uri_file", + + @doc("URI folder asset.") + uri_folder: "uri_folder", + + @doc("Safetensors model asset.") + safetensors_model: "safetensors_model", + + @doc("Literal value (inputs only).") + literal: "literal", +} + +@doc("Job input definition.") +model Input { + @doc("Specifies the type of job input.") + job_input_type: AssetTypes; + + @doc("Input Asset URI. Required for uri_file, uri_folder, and safetensors_model types.") + uri?: string; + + @doc("Input Asset Delivery Mode. Applies to uri-based inputs.") + mode?: InputOutputModes; + + @doc("Literal value. Required for literal type.") + value?: string; +} + +@doc("Job output definition.") +model Output { + @doc("Specifies the type of job output.") + job_output_type: AssetTypes; + + @doc("Output Asset Delivery Mode.") + mode?: InputOutputModes; + + @doc("Name of the output data asset to register.") + asset_name?: string; + + @doc("Version of the output data asset to register.") + asset_version?: string; + + @doc("Output Asset URI.") + uri?: string; + + @doc("Base model ID. Applies to safetensors_model outputs.") + base_model_id?: string; + + @doc("Description for the output.") + description?: string; +} + +#suppress "@azure-tools/typespec-azure-core/no-string-discriminator" "Use an extensible union instead of a plain string" +@doc("Nodes that user would like to start the service on.") +@discriminator("nodes_value_type") +model NodeCollection { + @doc("Type of the Nodes value.") + nodes_value_type: string; +} + +@doc("All nodes means the service will be running on all of the nodes of the job.") +model AllNodes extends NodeCollection { + @doc("Type of the Nodes value.") + nodes_value_type: "all"; +} + +@doc("Job service endpoint type.") +union JobServiceType { + string, + + @doc("Studio endpoint.") + studio: "studio", + + @doc("Experiment tracking endpoint.") + tracking: "tracking", +} + +@doc("Job endpoint definition.") +model JobService { + @doc("Endpoint type.") + job_service_type?: JobServiceType; + + @doc("Port for endpoint.") + port?: int32; + + @doc("Url for endpoint.") + endpoint?: url; + + @doc("Additional properties to set on the endpoint.") + properties?: Record; + + @doc("Nodes that user would like to start the service on. If Nodes is not set or set to null, the service will only be started on leader node.") + nodes?: AllNodes; + + @doc("Status of endpoint.") + @visibility(Lifecycle.Read) + status?: string; + + @doc("Any error in the service.") + @visibility(Lifecycle.Read) + error_message?: string; +} + +@doc("Compute Resource configuration for the job.") +model JobResourceConfiguration { + @doc("Optional number of instances or nodes used by the compute target.") + instance_count?: int32; + + @doc("Optional type of VM used as supported by the compute target.") + instance_type?: string; + + @doc("Additional properties bag.") + properties?: Record; + + @doc("Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes).") + shm_size?: string; + + @doc("Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types.") + docker_args?: string; +} + +@doc("Command Job limit class.") +model CommandJobLimits { + @doc("JobLimit type.") + job_limits_type: "command"; + + @doc("The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds.") + @encode(DurationKnownEncoding.ISO8601) + timeout?: duration; +} + +@doc("Queue settings for the job.") +model QueueSettings { + @doc("Controls the compute job tier.") + job_tier?: string; +} + +@doc("Training algorithm used by a declarative training job.") +union TrainingAlgorithm { + string, + + @doc("Supervised fine tuning.") + sft: "sft", + + @doc("Direct preference optimization.") + dpo: "dpo", + + @doc("Kahneman-Tversky optimization.") + kto: "kto", + + @doc("Odds ratio preference optimization.") + orpo: "orpo", + + @doc("Contrastive preference optimization.") + cpo: "cpo", + + @doc("Simple preference optimization.") + simpo: "simpo", + + @doc("Group relative policy optimization.") + grpo: "grpo", + + @doc("Proximal policy optimization.") + ppo: "ppo", + + @doc("REINFORCE leave-one-out.") + rloo: "rloo", + + @doc("REINFORCE++.") + reinforce_pp: "reinforce_pp", + + @doc("Reward model training.") + reward_model: "reward_model", +} + +@doc("Training framework used to lower a declarative training job into an execution command.") +union TrainingFramework { + string, + + @doc("TRL framework.") + trl: "trl", + + @doc("VERL framework.") + verl: "verl", + + @doc("OpenRLHF framework.") + open_rlhf: "open_rlhf", + + @doc("NeMo RL framework.") + nemo_rl: "nemo_rl", + + @doc("Slime framework.") + slime: "slime", + + @doc("TorchForge framework.") + torch_forge: "torch_forge", +} + +@doc("Training framework supported by the interactive Ray job convenience model.") +union InteractiveRayJobFramework { + @doc("Slime framework.") + slime: "slime", + + @doc("VERL framework.") + verl: "verl", +} + +@doc("Chat template used to format conversational training data.") +union ChatTemplate { + string, + + @doc("ChatML template.") + chatml: "chatml", + + @doc("Llama 3 chat template.") + llama_3: "llama_3", + + @doc("Zephyr chat template.") + zephyr: "zephyr", + + @doc("Gemma chat template.") + gemma: "gemma", + + @doc("Phi 3 chat template.") + phi_3: "phi_3", +} + +@doc("Mapping from logical training fields to columns in the dataset.") +model TrainingColumnMapping { + @doc("Column containing prompts.") + prompt?: string; + + @doc("Column containing chosen responses for preference training.") + chosen?: string; + + @doc("Column containing rejected responses for preference training.") + rejected?: string; + + @doc("Column containing reference answers or reward context.") + reference?: string; + + @doc("Column containing chat messages.") + messages?: string; + + @doc("Column containing responses for KTO or scored reward-model training.") + response?: string; + + @doc("Column containing binary desirability labels for KTO training.") + label?: string; + + @doc("Column containing numeric reward scores for scored reward-model training.") + score?: string; +} + +@doc("Formatting options for conversational training data.") +model TrainingDataFormatConfiguration { + @doc("Built-in chat template to apply to the dataset.") + chat_template?: ChatTemplate; + + @doc("Path to a custom chat template relative to the job's code directory.") + chat_template_path?: string; +} + +@doc("Dataset configuration for a declarative training job.") +model TrainingDatasetConfiguration { + @doc("Training dataset asset reference.") + train: string; + + @doc("Optional evaluation dataset asset reference.") + eval?: string; + + @doc("Mapping from training fields to dataset columns.") + columns?: TrainingColumnMapping; + + @doc("Conversational data formatting options.") + data_format?: TrainingDataFormatConfiguration; +} + +@doc("Reference to a Python callable relative to the job's code directory.") +model TrainingEntryPointReference { + @doc("Path to the Python callable in module/file.py:function format.") + entry_point: string; +} + +@doc("Python runtime dependencies for an inline function.") +model TrainingInlineFunctionRuntime { + @doc("Pip packages to install before invoking the inline function.") + pip?: string[]; +} + +@doc("Inline Python function definition for custom training logic.") +model TrainingInlineFunctionConfiguration { + @doc("Python function definition.") + def: string; + + @doc("Runtime dependencies for the inline function.") + runtime?: TrainingInlineFunctionRuntime; +} + +@doc("Reward or judge signal kind.") +union TrainingRewardKind { + string, + + @doc("Learned reward model judge.") + `model`: "model", + + @doc("Python callable judge.") + function: "function", + + @doc("Inline Python callable judge.") + inline_function: "inline_function", + + @doc("Built-in reward or verifier judge.") + builtin: "builtin", + + @doc("Foundry evaluator judge.") + evaluator: "evaluator", + + @doc("Model deployment judge.") + deployment: "deployment", + + @doc("Composite judge.") + composite: "composite", +} + +@doc("Reward or judge signal configuration for reinforcement or reward model training.") +@discriminator("kind") +model TrainingRewardConfiguration { + @doc("Reward or judge signal kind.") + kind: TrainingRewardKind; +} + +@doc("Learned reward model used as a judge.") +model TrainingModelRewardConfiguration extends TrainingRewardConfiguration { + @doc("Reward or judge signal kind, always 'model'.") + kind: "model"; + + @doc("Reward model asset reference used to compute scores.") + `model`: string; +} + +@doc("Python callable used as a judge.") +model TrainingFunctionRewardConfiguration extends TrainingRewardConfiguration { + @doc("Reward or judge signal kind, always 'function'.") + kind: "function"; + + @doc("Python callable used to compute reward scores.") + function: TrainingEntryPointReference; +} + +@doc("Inline Python function used as a judge.") +model TrainingInlineFunctionRewardConfiguration + extends TrainingRewardConfiguration { + @doc("Reward or judge signal kind, always 'inline_function'.") + kind: "inline_function"; + + @doc("Inline Python function used to compute reward scores.") + inline_function: TrainingInlineFunctionConfiguration; +} + +@doc("Built-in reward or verifier type.") +union TrainingBuiltinRewardType { + string, + + @doc("Exact string match verifier.") + exact_match: "exact_match", + + @doc("Regular expression verifier.") + regex: "regex", + + @doc("Math equivalence verifier.") + math_equivalence: "math_equivalence", + + @doc("Unit test verifier for code generation tasks.") + unit_tests: "unit_tests", +} + +@doc("Built-in reward or verifier used as a judge.") +model TrainingBuiltinRewardConfiguration extends TrainingRewardConfiguration { + @doc("Reward or judge signal kind, always 'builtin'.") + kind: "builtin"; + + @doc("Built-in reward or verifier type.") + type: TrainingBuiltinRewardType; + + @doc("Optional verifier configuration.") + configuration?: Record; +} + +@doc("Foundry evaluator used as a judge.") +model TrainingEvaluatorRewardConfiguration extends TrainingRewardConfiguration { + @doc("Reward or judge signal kind, always 'evaluator'.") + kind: "evaluator"; + + @doc("Evaluator asset reference.") + evaluator: string; + + @doc("Optional evaluator input mapping.") + input_mapping?: Record; +} + +@doc("Model deployment used as an LLM judge.") +model TrainingDeploymentRewardConfiguration + extends TrainingRewardConfiguration { + @doc("Reward or judge signal kind, always 'deployment'.") + kind: "deployment"; + + @doc("Model deployment name or resource reference used as the judge.") + deployment: string; + + @doc("Rubric or scoring instruction for the judge deployment.") + rubric?: string; +} + +@doc("Weighted reward signal used in a composite judge.") +model TrainingWeightedRewardConfiguration { + @doc("Reward signal.") + reward: TrainingRewardConfiguration; + + @doc("Weight applied to this reward signal.") + weight?: float64 = 1.0; +} + +@doc("Composite reward or judge made from multiple weighted reward signals.") +model TrainingCompositeRewardConfiguration extends TrainingRewardConfiguration { + @doc("Reward or judge signal kind, always 'composite'.") + kind: "composite"; + + @doc("Weighted reward signals to combine.") + rewards: TrainingWeightedRewardConfiguration[]; +} + +@doc("LoRA adapter configuration for parameter-efficient fine tuning.") +model TrainingLoraConfiguration { + @doc("Low-rank dimension.") + rank: int32; + + @doc("LoRA scaling factor.") + alpha?: int32 = 16; + + @doc("Dropout applied to adapter inputs.") + dropout?: float64 = 0.05; + + @doc("Linear layers that receive adapters. Use 'auto' to let the framework choose defaults.") + target_modules?: string = "auto"; + + @doc("Whether to enable QLoRA 4-bit base weight loading.") + quantize?: boolean = false; +} + +@doc("Inference engine used for rollout generation during online reinforcement learning.") +union TrainingRolloutEngine { + string, + + @doc("vLLM inference engine.") + vllm: "vllm", + + @doc("SGLang inference engine.") + sglang: "sglang", + + @doc("Hugging Face generate-based inference.") + hf: "hf", + + @doc("Megatron-Core native inference.") + megatron_inference: "megatron_inference", +} + +@doc("Rollout generation configuration for online reinforcement learning.") +model TrainingRolloutConfiguration { + @doc("Rollout inference engine.") + engine: TrainingRolloutEngine; + + @doc("Number of completions to generate for each prompt.") + num_generations?: int32; + + @doc("Maximum prompt length in tokens.") + max_prompt_length?: int32; + + @doc("Maximum completion length in tokens.") + max_completion_length?: int32; + + @doc("Sampling temperature for rollout generation.") + temperature?: float64; + + @doc("Nucleus sampling probability for rollout generation.") + top_p?: float64; + + @doc("Stop sequences for rollout generation.") + stop?: string[]; + + @doc("Rollout batch size.") + batch_size?: int32; + + @doc("Random seed for rollout generation.") + seed?: int32; + + @doc("Tensor parallel size used by the rollout engine.") + tensor_parallel_size?: int32 = 1; + + @doc("GPU memory utilization target for the rollout engine, between 0.0 and 1.0.") + gpu_memory_utilization?: float64; +} + +@doc("Built-in evaluation benchmark.") +union TrainingEvalBenchmark { + string, + + @doc("Grade School Math 8K benchmark.") + gsm8k: "gsm8k", + + @doc("Massive Multitask Language Understanding benchmark.") + mmlu: "mmlu", + + @doc("Human-written code generation benchmark.") + humaneval: "humaneval", + + @doc("Mostly Basic Python Programs benchmark.") + mbpp: "mbpp", + + @doc("AI2 Reasoning Challenge benchmark.") + arc: "arc", + + @doc("HellaSwag commonsense inference benchmark.") + hellaswag: "hellaswag", +} + +@doc("Evaluation configuration for a declarative training job.") +model TrainingEvalConfiguration { + @doc("Named built-in benchmark. Mutually exclusive with dataset.") + benchmark?: TrainingEvalBenchmark; + + @doc("Custom evaluation dataset asset reference. Mutually exclusive with benchmark.") + dataset?: string; + + @doc("Evaluation frequency in training steps. Omit for end-of-training only.") + every_n_steps?: int32; +} + +#suppress "@azure-tools/typespec-azure-core/no-string-discriminator" "Use an extensible union for forward-compatible training algorithms." +@doc("Declarative training recipe. When specified, command must be omitted and environment_image_reference is optional.") +@discriminator("algorithm") +model TrainingConfiguration { + @doc("Training algorithm.") + algorithm: TrainingAlgorithm; + + @doc("Training framework implementation. If omitted, the service selects a compatible framework for the algorithm and records the resolved framework on the job.") + framework?: TrainingFramework; + + @doc("Training framework resolved by the service.") + @visibility(Lifecycle.Read) + resolved_framework?: TrainingFramework; + + @doc("Version of the resolved training framework used by the service.") + @visibility(Lifecycle.Read) + framework_version?: string; + + @doc("Base model asset reference.") + `model`: string; + + @doc("Training and optional evaluation datasets.") + dataset: TrainingDatasetConfiguration; + + @doc("Algorithm-specific hyperparameters. Strongly typed SDK helpers may project common hyperparameters into richer language-specific types.") + hyperparameters?: Record; +} + +@doc("Supervised fine-tuning recipe.") +model SftTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'sft'.") + algorithm: "sft"; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Direct preference optimization training recipe.") +model DpoTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'dpo'.") + algorithm: "dpo"; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Kahneman-Tversky optimization training recipe.") +model KtoTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'kto'.") + algorithm: "kto"; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Odds ratio preference optimization training recipe.") +model OrpoTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'orpo'.") + algorithm: "orpo"; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Contrastive preference optimization training recipe.") +model CpoTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'cpo'.") + algorithm: "cpo"; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Simple preference optimization training recipe.") +model SimPoTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'simpo'.") + algorithm: "simpo"; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Group relative policy optimization training recipe.") +model GrpoTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'grpo'.") + algorithm: "grpo"; + + @doc("Reward signal configuration.") + reward: TrainingRewardConfiguration; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Rollout generation configuration.") + rollout?: TrainingRolloutConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Proximal policy optimization training recipe.") +model PpoTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'ppo'.") + algorithm: "ppo"; + + @doc("Reward signal configuration.") + reward: TrainingRewardConfiguration; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Rollout generation configuration.") + rollout?: TrainingRolloutConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("REINFORCE leave-one-out training recipe.") +model RlooTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'rloo'.") + algorithm: "rloo"; + + @doc("Reward signal configuration.") + reward: TrainingRewardConfiguration; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Rollout generation configuration.") + rollout?: TrainingRolloutConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("REINFORCE++ training recipe.") +model ReinforcePpTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'reinforce_pp'.") + algorithm: "reinforce_pp"; + + @doc("Reward signal configuration.") + reward: TrainingRewardConfiguration; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Rollout generation configuration.") + rollout?: TrainingRolloutConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Reward model training recipe.") +model RewardModelTrainingConfiguration extends TrainingConfiguration { + @doc("Training algorithm, always 'reward_model'.") + algorithm: "reward_model"; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Declarative training recipe for an interactive Ray job. The framework is limited to Slime and VERL.") +model InteractiveRayJobTrainingConfiguration { + @doc("Training algorithm.") + algorithm: TrainingAlgorithm; + + @doc("Training framework implementation for the interactive Ray job.") + framework: InteractiveRayJobFramework; + + @doc("Base model asset reference.") + `model`: string; + + @doc("Training and optional evaluation datasets.") + dataset: TrainingDatasetConfiguration; + + @doc("Algorithm-specific hyperparameters.") + hyperparameters?: Record; + + @doc("Reward or judge signal configuration for reinforcement or reward model training.") + reward?: TrainingRewardConfiguration; + + @doc("LoRA adapter configuration.") + lora?: TrainingLoraConfiguration; + + @doc("Rollout generation configuration.") + rollout?: TrainingRolloutConfiguration; + + @doc("Evaluation configuration.") + eval?: TrainingEvalConfiguration; +} + +@doc("Metadata pertaining to creation and last modification of the resource.") +model SystemData { + @doc("The identity that created the resource.") + @visibility(Lifecycle.Read) + created_by?: string; + + @doc("The type of identity that created the resource.") + @visibility(Lifecycle.Read) + created_by_type?: string; + + @doc("The timestamp of resource creation (UTC).") + @visibility(Lifecycle.Read) + created_at?: FoundryTimestamp; + + @doc("The identity that last modified the resource.") + @visibility(Lifecycle.Read) + last_modified_by?: string; + + @doc("The type of identity that last modified the resource.") + @visibility(Lifecycle.Read) + last_modified_by_type?: string; + + @doc("The timestamp of resource last modification (UTC).") + @visibility(Lifecycle.Read) + last_modified_at?: FoundryTimestamp; +} + +@doc("Type of a job.") +union JobType { + string, + + @doc("Command job.") + command: "command", +} + +#suppress "@azure-tools/typespec-azure-core/no-string-discriminator" "Use an extensible union instead of a plain string" +@doc("Base properties of a Job.") +@discriminator("job_type") +model JobProperties { + @doc("Job type.") + job_type: string; +} + +@doc("Properties of a Command Job.") +model CommandJob extends JobProperties { + @doc("Job type.") + job_type: "command"; + + @doc("The command to execute on startup of the job. Required when training is not specified, and must be omitted when training is specified.") + command?: string; + + @doc("ACR path or Azure ML environment reference. Required when training is not specified.") + environment_image_reference?: string; + + @doc("Declarative training recipe. When specified, the service compiles the recipe into the command and environment used for execution.") + training?: TrainingConfiguration; + + @doc("Display name of job.") + display_name?: string; + + @doc("The asset description text.") + description?: string; + + @doc("Tag dictionary. Tags can be added, removed, and updated.") + tags?: Record; + + @doc("The asset property dictionary.") + properties?: Record; + + @doc("Code asset reference.") + code_id?: string; + + @doc("Compute resource ID.") + compute_id: string; + + @doc("Mapping of input data bindings used in the job.") + inputs?: Record; + + @doc("Mapping of output data bindings used in the job.") + outputs?: Record; + + @doc("Environment variables included in the job.") + environment_variables?: Record; + + @doc("Compute Resource configuration for the job.") + resources?: JobResourceConfiguration; + + @doc("Number of GPUs requested by the training job.") + gpu_count?: int32; + + @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.") + distribution?: DistributionConfiguration; + + @doc("Command Job limit.") + limits?: CommandJobLimits; + + @doc("Queue settings for the job.") + queue_settings?: QueueSettings; + + @doc("user-assigned managed identity") + user_assigned_identity_id?: string; + + @doc("Status of the job.") + @visibility(Lifecycle.Read) + status?: string; +} + +@doc("Properties of an interactive Ray training job. This is an SDK convenience shape for creating a command job with Ray distribution.") +model InteractiveRayJobProperties { + @doc("Job type, always 'command'.") + job_type: "command"; + + @doc("The command to execute on startup of the interactive Ray job. Required when training is not specified, and must be omitted when training is specified.") + command?: string; + + @doc("ACR path or Azure ML environment reference. Required when training is not specified.") + environment_image_reference?: string; + + @doc("Declarative training recipe for Slime or VERL running on Ray.") + training?: InteractiveRayJobTrainingConfiguration; + + @doc("Display name of job.") + display_name?: string; + + @doc("The asset description text.") + description?: string; + + @doc("Tag dictionary. Tags can be added, removed, and updated.") + tags?: Record; + + @doc("The asset property dictionary.") + properties?: Record; + + @doc("Code asset reference.") + code_id?: string; + + @doc("Compute resource ID.") + compute_id: string; + + @doc("Mapping of input data bindings used in the job.") + inputs?: Record; + + @doc("Mapping of output data bindings used in the job.") + outputs?: Record; + + @doc("Environment variables included in the job.") + environment_variables?: Record; + + @doc("Compute Resource configuration for the job.") + resources?: JobResourceConfiguration; + + @doc("Number of GPUs requested by the training job.") + gpu_count?: int32; + + @doc("Ray distribution configuration for the interactive job.") + distribution: RayDistribution; + + @doc("Command Job limit.") + limits?: CommandJobLimits; + + @doc("Queue settings for the job.") + queue_settings?: QueueSettings; + + @doc("User-assigned managed identity.") + user_assigned_identity_id?: string; +} + +@doc("Training job resource.") +@Rest.resource("training_jobs") +model Job { + @doc("The name of the training job. This is case-sensitive.") + @key("name") + @visibility(Lifecycle.Read) + name: string; + + @doc("The resource ID.") + @visibility(Lifecycle.Read) + id?: string; + + @doc("The resource type.") + @visibility(Lifecycle.Read) + type?: string; + + ...CommandJob; + + @doc("The latest execution attempt for the job. This field is omitted unless requested with include=latest_attempt. The same attempt resource is available from /training_jobs/{job_name}/attempts/latest.") + @visibility(Lifecycle.Read) + latest_attempt?: JobAttempt; + + @doc("Input dataset lineage recorded for the job. This field is omitted unless requested with include=input_datasets.") + @visibility(Lifecycle.Read) + input_datasets?: Record[]; + + @doc("Output dataset lineage recorded for the job. This field is omitted unless requested with include=output_datasets.") + @visibility(Lifecycle.Read) + output_datasets?: Record[]; + + @doc("Backend execution definition used to run the job. This field is omitted unless requested with include=execution_definition.") + @visibility(Lifecycle.Read) + execution_definition?: Record; + + @doc("Backend-resolved job specification. This field is omitted unless requested with include=resolved_specification.") + @visibility(Lifecycle.Read) + resolved_specification?: Record; + + @doc("Parameters recorded for the job. This field is omitted unless requested with include=parameters.") + @visibility(Lifecycle.Read) + parameters?: Record; + + @doc("Settings recorded for the job. This field is omitted unless requested with include=settings.") + @visibility(Lifecycle.Read) + settings?: Record; + + @doc("Service endpoints for the current job run. This field is omitted unless requested with include=services.") + @visibility(Lifecycle.Read) + services?: Record; + + @doc("Log file URI metadata for the job. This field is omitted unless requested with include=log_files.") + @visibility(Lifecycle.Read) + log_files?: Record; + + @doc("Job cost summary. This field is omitted unless requested with include=job_cost.") + @visibility(Lifecycle.Read) + job_cost?: Record; + + @doc("Compute request recorded for the job. This field is omitted unless requested with include=compute_request.") + @visibility(Lifecycle.Read) + compute_request?: Record; + + @doc("Compute record for the job. This field is omitted unless requested with include=compute.") + @visibility(Lifecycle.Read) + compute?: Record; + + @doc("Metadata pertaining to creation and last modification of the resource.") + @visibility(Lifecycle.Read) + system_data?: SystemData; +} + +@doc("Request body for creating a training job.") +model JobCreate { + @doc("The name of the training job. This is case-sensitive.") + name: string; + + ...CommandJob; +} + +@doc("Request body for creating an interactive Ray training job. This SDK convenience model uses the same /training_jobs create operation as other command jobs.") +model InteractiveRayJob { + @doc("The name of the interactive Ray job. This is case-sensitive.") + name: string; + + ...InteractiveRayJobProperties; +} + +@doc("Response returned when a job delete operation is accepted asynchronously.") +model JobDeleteAcceptedResponse { + @statusCode statusCode: 202; + + @doc("URL to poll for the final result of the delete operation.") + @header("Location") + location: string; + + @doc("URL to poll for the status of the delete operation.") + @header("Operation-Location") + operation_location?: string; + + @doc("Suggested delay in seconds before polling.") + @header("Retry-After") + retry_after?: int32; +} + +@doc("Response returned when a job cancel operation is accepted asynchronously.") +model JobCancelAcceptedResponse { + @statusCode statusCode: 202; + + @doc("URL to poll for the final result of the cancel operation.") + @header("Location") + location: string; + + @doc("URL to poll for the status of the cancel operation.") + @header("Operation-Location") + operation_location?: string; + + @doc("Suggested delay in seconds before polling.") + @header("Retry-After") + retry_after?: int32; +} + +@doc("Status of an asynchronous training job operation.") +union JobOperationStatus { + string, + + @doc("Operation is being processed.") + in_progress: "in_progress", + + @doc("Operation is deleting resources.") + deleting: "deleting", + + @doc("Operation completed successfully.") + succeeded: "succeeded", + + @doc("Operation failed.") + failed: "failed", + + @doc("Operation was canceled.") + canceled: "canceled", +} + +@doc("Error details for an asynchronous training job operation.") +model JobOperationError { + @doc("Machine-readable error code.") + code?: string; + + @doc("Human-readable error message.") + message?: string; + + @doc("Additional error information.") + details?: Record; +} + +@doc("Asynchronous training job operation resource.") +model JobOperationResource { + @doc("Operation resource ID.") + @visibility(Lifecycle.Read) + id?: string; + + @doc("Operation name.") + @visibility(Lifecycle.Read) + name?: string; + + @doc("Operation status.") + @visibility(Lifecycle.Read) + status: JobOperationStatus; + + @doc("Operation result properties.") + @visibility(Lifecycle.Read) + properties?: Record; + + @doc("Operation start time.") + @visibility(Lifecycle.Read) + started_at?: FoundryTimestamp; + + @doc("Operation end time.") + @visibility(Lifecycle.Read) + ended_at?: FoundryTimestamp; + + @doc("Operation completion percentage from 0 to 100.") + @visibility(Lifecycle.Read) + percent_complete?: float64; + + @doc("Operation error information.") + @visibility(Lifecycle.Read) + error?: JobOperationError; +} + +@doc("Response returned when a training job operation is still in progress.") +model JobOperationAcceptedResponse { + @statusCode statusCode: 202; + + @doc("URL to poll for the operation result.") + @header("Location") + location?: string; + + @doc("URL to poll for the operation status.") + @header("Operation-Location") + operation_location?: string; +} + +@doc("Specifies which jobs to include in a list result based on their lifecycle state.") +union ListViewType { + string, + + @doc("Show only active (non-archived) jobs.") + active_only: "active_only", + + @doc("Show only archived jobs.") + archived_only: "archived_only", + + @doc("Show all jobs regardless of archived state.") + all: "all", +} + +@doc("Status of a job execution attempt.") +union JobAttemptStatus { + string, + + @doc("The attempt is queued.") + queued: "queued", + + @doc("The attempt is running.") + running: "running", + + @doc("The attempt completed successfully.") + completed: "completed", + + @doc("The attempt failed.") + failed: "failed", + + @doc("The attempt was canceled.") + canceled: "canceled", +} + +@doc("Warning emitted during a job attempt.") +model JobAttemptWarning { + @doc("Machine-readable warning code.") + code?: string; + + @doc("Human-readable warning message.") + message?: string; + + @doc("Additional warning details.") + details?: Record; +} + +@doc("Error emitted during a job attempt.") +model JobAttemptError { + @doc("Machine-readable error code.") + code?: string; + + @doc("Human-readable error message.") + message?: string; + + @doc("Additional error details.") + details?: Record; +} + +@doc("Service endpoint details for a training job.") +model TrainingJobService { + @doc("Service type.") + @visibility(Lifecycle.Read) + type?: JobServiceType; + + @doc("Service port.") + @visibility(Lifecycle.Read) + port?: int32; + + @doc("Service status.") + @visibility(Lifecycle.Read) + status?: string; + + @doc("Terminal error for the service, if any.") + @visibility(Lifecycle.Read) + error?: Record; + + @doc("Service endpoint URI.") + @visibility(Lifecycle.Read) + endpoint?: url; + + @doc("Additional service properties.") + @visibility(Lifecycle.Read) + properties?: Record; +} + +@doc("Services exposed by a training job.") +model TrainingJobServiceCollection { + @doc("Services keyed by service name.") + @visibility(Lifecycle.Read) + services: Record; +} + +@doc("The response data for a requested list of training job items.") +model TrainingJobPagedResult { + ...AgentsPagedResult; + + @doc("Opaque cursor to pass as the next request's after value when has_more is true.") + @visibility(Lifecycle.Read) + next_after?: string; +} + +@doc("Compute placement details for a job attempt.") +model JobAttemptComputeDetails { + @doc("Virtual machine size used for this attempt.") + @visibility(Lifecycle.Read) + vm_size?: string; + + @doc("Instance type used for this attempt.") + @visibility(Lifecycle.Read) + instance_type?: string; + + @doc("Number of instances allocated to this attempt.") + @visibility(Lifecycle.Read) + instance_count?: int32; + + @doc("Number of GPUs allocated to this attempt.") + @visibility(Lifecycle.Read) + gpu_count?: int32; + + @doc("Region where this attempt was placed.") + @visibility(Lifecycle.Read) + region?: string; + + @doc("Additional backend-specific compute placement properties.") + @visibility(Lifecycle.Read) + properties?: Record; +} + +@doc("One execution attempt of a training job.") +model JobAttempt { + @doc("The attempt identifier.") + @visibility(Lifecycle.Read) + id: string; + + @doc("The RunHistory run identifier backing this attempt.") + @visibility(Lifecycle.Read) + run_id?: string; + + @doc("The job name this attempt belongs to.") + @visibility(Lifecycle.Read) + job_name: string; + + @doc("The data container identifier backing this attempt's artifacts and metrics.") + @visibility(Lifecycle.Read) + data_container_id?: string; + + @doc("Backend attempt sequence number.") + @visibility(Lifecycle.Read) + sequence_number?: int64; + + @doc("The attempt status.") + @visibility(Lifecycle.Read) + status?: JobAttemptStatus; + + @doc("Additional status reason.") + @visibility(Lifecycle.Read) + status_reason?: string; + + @doc("Time the attempt started.") + @visibility(Lifecycle.Read) + started_at?: FoundryTimestamp; + + @doc("Time the attempt ended.") + @visibility(Lifecycle.Read) + ended_at?: FoundryTimestamp; + + @doc("Most recent time the attempt started running.") + @visibility(Lifecycle.Read) + last_started_at?: FoundryTimestamp; + + @doc("Total compute duration consumed by the attempt.") + @visibility(Lifecycle.Read) + @encode(DurationKnownEncoding.ISO8601) + compute_duration?: duration; + + @doc("Current active compute duration for a running attempt.") + @visibility(Lifecycle.Read) + @encode(DurationKnownEncoding.ISO8601) + current_compute_time?: duration; + + @doc("Queueing details associated with the attempt.") + @visibility(Lifecycle.Read) + queueing_info?: Record; + + @doc("Compute details associated with the attempt.") + @visibility(Lifecycle.Read) + compute_details?: JobAttemptComputeDetails; + + @doc("Terminal error for the attempt, if any.") + @visibility(Lifecycle.Read) + error?: JobAttemptError; + + @doc("Warnings emitted for the attempt.") + @visibility(Lifecycle.Read) + warnings?: JobAttemptWarning[]; + + @doc("Whether this attempt is the current attempt for the job.") + @visibility(Lifecycle.Read) + is_latest?: boolean; +} + +@doc("Type of a job artifact.") +union JobArtifactType { + string, + + @doc("A file artifact.") + file: "file", + + @doc("A directory artifact.") + directory: "directory", +} + +@doc("Storage path details for an artifact.") +model JobArtifactDataPath { + @doc("Datastore containing the artifact content.") + @visibility(Lifecycle.Read) + datastore_name?: string; + + @doc("Path relative to the datastore root.") + @visibility(Lifecycle.Read) + relative_path?: string; + + @doc("SQL path information, when the artifact is backed by SQL storage.") + @visibility(Lifecycle.Read) + sql_data_path?: Record; +} + +@doc("Metadata for an artifact produced by or attached to a job.") +model JobArtifact { + @doc("Backend artifact identifier.") + @visibility(Lifecycle.Read) + artifact_id?: string; + + @doc("Artifact origin.") + @visibility(Lifecycle.Read) + origin?: string; + + @doc("Artifact container name.") + @visibility(Lifecycle.Read) + container?: string; + + @doc("Artifact path relative to the job artifact root.") + @visibility(Lifecycle.Read) + path: string; + + @doc("Artifact entity tag.") + @visibility(Lifecycle.Read) + etag?: string; + + @doc("Artifact type.") + @visibility(Lifecycle.Read) + type: JobArtifactType; + + @doc("Artifact size in bytes.") + @visibility(Lifecycle.Read) + size?: int64; + + @doc("Time the artifact was created.") + @visibility(Lifecycle.Read) + created_at?: FoundryTimestamp; + + @doc("Time the artifact was last updated.") + @visibility(Lifecycle.Read) + updated_at?: FoundryTimestamp; + + @doc("Storage path details for the artifact.") + @visibility(Lifecycle.Read) + data_path?: JobArtifactDataPath; + + @doc("Artifact tags.") + @visibility(Lifecycle.Read) + tags?: Record; +} + +@doc("Content access information for a job artifact.") +model JobArtifactContentInfo { + @doc("Artifact origin.") + @visibility(Lifecycle.Read) + origin?: string; + + @doc("Artifact container name.") + @visibility(Lifecycle.Read) + container?: string; + + @doc("Artifact path relative to the job artifact root.") + @visibility(Lifecycle.Read) + path: string; + + @doc("Download URI for the artifact content.") + @visibility(Lifecycle.Read) + content_uri: url; + + @doc("MIME type of the content.") + @visibility(Lifecycle.Read) + content_type?: string; + + @doc("Content length in bytes, when known.") + @visibility(Lifecycle.Read) + content_length?: int64; + + @doc("Time the content URI expires.") + @visibility(Lifecycle.Read) + expires_at?: FoundryTimestamp; + + @doc("Artifact tags.") + @visibility(Lifecycle.Read) + tags?: Record; +} + +@doc("The kind of metric emitted by a job.") +union JobMetricType { + string, + + @doc("Scalar metric values.") + `scalar`: "scalar", + + @doc("Table metric values.") + table: "table", + + @doc("Image metric values.") + image: "image", +} + +@doc("One property in a metric schema.") +model JobMetricSchemaProperty { + @doc("Metric schema property identifier.") + @visibility(Lifecycle.Read) + property_id?: string; + + @doc("Metric schema property name.") + @visibility(Lifecycle.Read) + name?: string; + + @doc("Metric schema property type.") + @visibility(Lifecycle.Read) + type?: string; +} + +@doc("Full metric schema metadata.") +model JobMetricSchema { + @doc("Number of properties in the schema.") + @visibility(Lifecycle.Read) + num_properties?: int32; + + @doc("Metric schema properties.") + @visibility(Lifecycle.Read) + properties?: JobMetricSchemaProperty[]; +} + +@doc("Metadata for a metric emitted by a job or run.") +model JobMetric { + @doc("Metric name.") + @visibility(Lifecycle.Read) + name: string; + + @doc("Run identifier that emitted the metric.") + @visibility(Lifecycle.Read) + run_id?: string; + + @doc("Data container identifier that stores the metric.") + @visibility(Lifecycle.Read) + data_container_id?: string; + + @doc("Metric type.") + @visibility(Lifecycle.Read) + metric_type?: JobMetricType; + + @doc("Metric description.") + @visibility(Lifecycle.Read) + description?: string; + + @doc("Metric label.") + @visibility(Lifecycle.Read) + label?: string; + + @doc("Number of metric cells.") + @visibility(Lifecycle.Read) + num_cells?: int32; + + @doc("Metric data location.") + @visibility(Lifecycle.Read) + data_location?: string; + + @doc("Column metadata for structured metric values.") + @visibility(Lifecycle.Read) + columns?: Record; + + @doc("Full metric schema metadata.") + @visibility(Lifecycle.Read) + schema?: JobMetricSchema; +} + +@doc("A metric data point.") +model JobMetricPoint { + @doc("Metric identifier.") + @visibility(Lifecycle.Read) + metric_id?: string; + + @doc("Metric name.") + @visibility(Lifecycle.Read) + name?: string; + + @doc("Run identifier that emitted the metric.") + @visibility(Lifecycle.Read) + run_id?: string; + + @doc("Data container identifier that stores the metric.") + @visibility(Lifecycle.Read) + data_container_id?: string; + + @doc("Metric type.") + @visibility(Lifecycle.Read) + metric_type?: JobMetricType; + + @doc("Metric description.") + @visibility(Lifecycle.Read) + description?: string; + + @doc("Metric label.") + @visibility(Lifecycle.Read) + label?: string; + + @doc("Number of metric cells.") + @visibility(Lifecycle.Read) + num_cells?: int32; + + @doc("Metric data location.") + @visibility(Lifecycle.Read) + data_location?: string; + + @doc("Full metric schema metadata.") + @visibility(Lifecycle.Read) + schema?: JobMetricSchema; + + @doc("Metric step.") + @visibility(Lifecycle.Read) + step?: int64; + + @doc("Time the metric point was created.") + @visibility(Lifecycle.Read) + created_at?: FoundryTimestamp; + + @doc("Metric data values.") + @visibility(Lifecycle.Read) + data?: Record; +} + +@doc("Latest value for a metric.") +model JobMetricLastValue { + @doc("Metric name.") + @visibility(Lifecycle.Read) + name: string; + + @doc("Latest metric point.") + @visibility(Lifecycle.Read) + value?: JobMetricPoint; +} + +@doc("Aggregated values for a metric.") +model JobMetricAggregate { + @doc("Metric name.") + @visibility(Lifecycle.Read) + name: string; + + @doc("Aggregate window start.") + @visibility(Lifecycle.Read) + started_at?: FoundryTimestamp; + + @doc("Aggregate window end.") + @visibility(Lifecycle.Read) + ended_at?: FoundryTimestamp; + + @doc("Aggregate values.") + @visibility(Lifecycle.Read) + values?: Record; +} + +@doc("Sampled values for a metric.") +model JobMetricSample { + @doc("Metric name.") + @visibility(Lifecycle.Read) + name: string; + + @doc("Sampled metric points.") + @visibility(Lifecycle.Read) + points: JobMetricPoint[]; +} + +@doc("Named output produced by a job.") +model JobOutputReference { + @doc("Output name.") + @visibility(Lifecycle.Read) + name: string; + + @doc("Output asset type.") + @visibility(Lifecycle.Read) + type?: AssetTypes; + + @doc("Output delivery mode.") + @visibility(Lifecycle.Read) + mode?: InputOutputModes; + + @doc("Output storage URI.") + @visibility(Lifecycle.Read) + uri?: string; + + @doc("Registered asset name, if the output produced an asset.") + @visibility(Lifecycle.Read) + asset_name?: string; + + @doc("Registered asset version, if the output produced an asset.") + @visibility(Lifecycle.Read) + asset_version?: string; + + @doc("Base model ID for model outputs.") + @visibility(Lifecycle.Read) + base_model_id?: string; + + @doc("Output description.") + @visibility(Lifecycle.Read) + description?: string; +} + +alias JobForwardPageQueryParameters = { + ...PageLimitQueryParameter; + ...PageAfterQueryParameter; +}; + +alias JobOrderedPageQueryParameters = JobForwardPageQueryParameters & { + ...PageOrderQueryParameter; +}; + +alias JobContinuationListQueryParameters = { + ...PageAfterQueryParameter; +}; + +alias JobPagedListQueryParameters = JobForwardPageQueryParameters; + +alias JobArtifactListQueryParameters = JobPagedListQueryParameters & { + @doc("Artifact path prefix to list.") + @query + path_prefix?: string; +}; + +alias JobMetricListQueryParameters = JobPagedListQueryParameters; + +alias JobArtifactContentInfoByPrefixQueryParameters = { + @doc("Artifact path prefix to list download information for. If omitted, download information is returned for the artifact root.") + @query + path_prefix?: string; + + ...PageAfterQueryParameter; +}; + +alias JobServicesQueryParameters = { + @doc("Node identifier whose service endpoints should be returned. If omitted, leader-node services are returned.") + @query + node_id?: int32; +}; + +alias JobMetricQueryParameters = { + @doc("Start of the metric time range.") + @query + started_at?: FoundryTimestamp; + + @doc("End of the metric time range.") + @query + ended_at?: FoundryTimestamp; + + @doc("Minimum metric step to include.") + @query + min_step?: int64; + + @doc("Maximum metric step to include.") + @query + max_step?: int64; + + @doc("Maximum number of metric points to return.") + @query + limit?: int32; +}; diff --git a/specification/ai-foundry/data-plane/Foundry/src/training_jobs/readme.md b/specification/ai-foundry/data-plane/Foundry/src/training_jobs/readme.md new file mode 100644 index 000000000000..129b4b5355e9 --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/src/training_jobs/readme.md @@ -0,0 +1,7 @@ + + +# Foundry Training Jobs TypeSpec + +> see https://aka.ms/autorest + +Training job models and routes for the Foundry data-plane TypeSpec project. diff --git a/specification/ai-foundry/data-plane/Foundry/src/training_jobs/routes.tsp b/specification/ai-foundry/data-plane/Foundry/src/training_jobs/routes.tsp new file mode 100644 index 000000000000..d1aee830e30b --- /dev/null +++ b/specification/ai-foundry/data-plane/Foundry/src/training_jobs/routes.tsp @@ -0,0 +1,578 @@ +import "./models.tsp"; +import "../common/models.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using Azure.Core.Traits; + +namespace Azure.AI.Projects; + +alias TrainingJobsPreviewHeader = WithRequiredFoundryPreviewHeader; + +alias JobsFilterQueryParams = { + @doc("Filter by job type (e.g. 'Command').") + @query + job_type?: JobType; + + @doc("Filter jobs by tag in the format 'key=value' (e.g., 'framework=pytorch').") + @query + tag?: string; + + @doc("Specifies which view type to apply when listing jobs.") + @query + list_view_type?: ListViewType; + + @doc("Comma-separated user property names and optionally values. Example: prop1,prop2=value2.") + @query + properties?: string; + + ...JobOrderedPageQueryParameters; +}; + +@doc("Optional related training job data to include in a get response.") +union TrainingJobInclude { + string, + + @doc("Inline the latest execution attempt. The same data is available from /training_jobs/{job_name}/attempts/latest.") + latest_attempt: "latest_attempt", + + @doc("Inline input dataset lineage recorded for the training job.") + input_datasets: "input_datasets", + + @doc("Inline output dataset lineage recorded for the training job.") + output_datasets: "output_datasets", + + @doc("Inline the backend execution definition used to run the training job.") + execution_definition: "execution_definition", + + @doc("Inline the backend-resolved job specification.") + resolved_specification: "resolved_specification", + + @doc("Inline parameters recorded for the training job.") + parameters: "parameters", + + @doc("Inline settings recorded for the training job.") + settings: "settings", + + @doc("Inline service endpoints for the current training job run.") + services: "services", + + @doc("Inline log file URI metadata for the training job.") + log_files: "log_files", + + @doc("Inline the job cost summary.") + job_cost: "job_cost", + + @doc("Inline the compute request recorded for the training job.") + compute_request: "compute_request", + + @doc("Inline the compute record for the training job.") + compute: "compute", +} + +alias TrainingJobGetQueryParams = { + ...TrainingJobsPreviewHeader; + + @doc("Additional related data to include in the response. Values are comma-separated expansion names such as latest_attempt, input_datasets, output_datasets, execution_definition, services, log_files, and job_cost.") + @query + include?: TrainingJobInclude; +}; + +@doc("Training job attempt identifier. Use 'latest' for the latest attempt.") +union JobAttemptIdentifier { + string, + + @doc("The latest training job attempt.") + latest: "latest", +} + +@tag("TrainingJobs") +interface TrainingJobs { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "We need explicit definition for header support" + @doc("List training jobs.") + @get + @route("/training_jobs") + @list + list is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + JobsFilterQueryParams, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "We need explicit definition for header support" + @doc("Get a training job by name.") + @get + @route("/training_jobs/{job_name}") + get is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("Additional related data to include in the response. Values are comma-separated expansion names such as latest_attempt, input_datasets, output_datasets, execution_definition, services, log_files, and job_cost.") + @query + include?: TrainingJobInclude; + }, + OkResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Job services are projected from run history service instances." + @doc("List service endpoints for the current view of a training job.") + @get + @route("/training_jobs/{job_name}/services") + showServices is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + ...JobServicesQueryParameters; + }, + TrainingJobServiceCollection + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Jobs use Operation-Id based idempotent submission." + @doc("Create and execute a model training job.") + @post + @route("/training_jobs") + create is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("Idempotency key used to safely retry job creation.") + @header("Operation-Id") + operation_id?: string; + + @doc("The training job to create.") + @bodyRoot + job: JobCreate; + }, + ResourceCreatedResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "LRO delete returns 202 with Location and Operation-Location headers for polling, or 204 when job not found" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "Delete LRO returns 202 with Location header, 204 with no body" + @doc("Delete a training job by name. Returns 202 Accepted with Location and Operation-Location headers to poll for completion, or 204 if the job does not exist.") + @delete + @route("/training_jobs/{job_name}") + beginDelete is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + }, + JobDeleteAcceptedResponse | Http.NoContentResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "LRO cancel returns 200 synchronously or 202 with Location and Operation-Location headers for async polling" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "Cancel LRO returns 200 or 202 with Location header, no body" + @doc("Cancel a training job by name. Returns 200 if cancelled immediately, or 202 Accepted with Location and Operation-Location headers to poll for completion.") + @post + @route("/training_jobs/{job_name}:cancel") + beginCancel is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + }, + Http.OkResponse | JobCancelAcceptedResponse + >; +} // interface TrainingJobs + +@tag("TrainingJobs") +interface TrainingJobOperations { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Foundry job operations are exposed as data-plane polling routes under training_jobs." + #suppress "@azure-tools/typespec-azure-core/no-response-body" "The operation result route can return 202/200 with no body or a terminal operation resource." + @doc("Poll the result of an asynchronous training job operation.") + @get + @route("/training_jobs/operations/{operation_id}/result") + getOperationResult is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The operation identifier returned by a training job create, cancel, or delete request.") + @path + operation_id: string; + }, + JobOperationResource | JobOperationAcceptedResponse | Http.OkResponse + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Foundry job operations are exposed as data-plane polling routes under training_jobs." + #suppress "@azure-tools/typespec-azure-core/no-response-body" "The operation status route can return 200 with no body or an operation resource." + @doc("Poll the status of an asynchronous training job operation.") + @get + @route("/training_jobs/operations/{operation_id}/status") + getOperationStatus is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The operation identifier returned by a training job create, cancel, or delete request.") + @path + operation_id: string; + }, + JobOperationResource | Http.OkResponse + >; +} + +@tag("TrainingJobs") +interface TrainingJobAttempts { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Job attempts are projected from job execution history." + @doc("List attempts for a training job.") + @get + @route("/training_jobs/{job_name}/attempts") + listAttempts is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + ...JobContinuationListQueryParameters; + }, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Job attempts are projected from job execution history." + @doc("Get one attempt for a training job.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}") + getAttempt is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + }, + JobAttempt + >; +} + +@tag("TrainingJobs") +interface TrainingJobAttemptArtifacts { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt artifacts are projected from the attempt data container." + @doc("List artifacts for a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/artifacts") + listAttemptArtifacts is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + ...JobArtifactListQueryParameters; + }, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt artifacts are projected from the attempt data container." + @doc("Get metadata for an artifact from a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/metadata") + getAttemptArtifactMetadata is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + @doc("The artifact path.") + @query + path: string; + }, + JobArtifact + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt artifacts are projected from the attempt data container." + @doc("Get download information for an artifact from a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/content_info") + getAttemptArtifactContentInfo is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + @doc("The artifact path.") + @query + path: string; + }, + JobArtifactContentInfo + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt artifacts are projected from the attempt data container." + @doc("List download information for artifacts under a path prefix from a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/content_info_by_prefix") + getAttemptArtifactContentInfoByPrefix is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + ...JobArtifactContentInfoByPrefixQueryParameters; + }, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt artifacts are projected from the attempt data container." + #suppress "@azure-tools/typespec-azure-core/byos" "Job artifact content is produced by the job and streamed back to the caller." + @doc("Download artifact content from a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/artifacts/content") + downloadAttemptArtifact is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + @doc("The artifact path.") + @query + path: string; + }, + bytes + >; +} + +@tag("TrainingJobs") +interface TrainingJobAttemptMetrics { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt metrics are projected from the attempt data container." + @doc("List metrics emitted by a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/metrics") + listAttemptMetrics is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + ...JobMetricListQueryParameters; + }, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt metrics are projected from the attempt data container." + @doc("Get latest metric values for a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/metrics/last_values") + getAttemptMetricLastValues is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + }, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt metrics are projected from the attempt data container." + @doc("Get the full history for a metric from a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}") + getAttemptMetric is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + @doc("The metric name.") + @path + metric_name: string; + + ...JobMetricQueryParameters; + }, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt metrics are projected from the attempt data container." + @doc("Get aggregate metric values from a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}/aggregates") + getAttemptMetricAggregates is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + @doc("The metric name.") + @path + metric_name: string; + + ...JobMetricQueryParameters; + }, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt metrics are projected from the attempt data container." + @doc("Get sampled metric values from a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}/samples") + getAttemptMetricSamples is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + @doc("The metric name.") + @path + metric_name: string; + + ...JobMetricQueryParameters; + }, + JobMetricSample + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt metrics are projected from the attempt data container." + @doc("Get one sampled value or window from a training job attempt. Use 'latest' for the latest attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/metrics/{metric_name}/sample") + getAttemptMetricSample is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + @doc("The metric name.") + @path + metric_name: string; + + ...JobMetricQueryParameters; + }, + JobMetricSample + >; +} + +@tag("TrainingJobs") +interface TrainingJobOutputs { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Job outputs are projected from job outputs and asset relationships." + @doc("List outputs produced by a training job.") + @get + @route("/training_jobs/{job_name}/outputs") + listOutputs is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + }, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Job outputs are projected from job outputs and asset relationships." + @doc("Get one output produced by a training job.") + @get + @route("/training_jobs/{job_name}/outputs/{output_name}") + getOutput is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The output name.") + @path + output_name: string; + }, + JobOutputReference + >; +} + +@tag("TrainingJobs") +interface TrainingJobAttemptOutputs { + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt outputs are projected from attempt output state and asset relationships." + @doc("List outputs produced by a specific training job attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/outputs") + listAttemptOutputs is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + }, + TrainingJobPagedResult + >; + + #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Attempt outputs are projected from attempt output state and asset relationships." + @doc("Get one output produced by a specific training job attempt.") + @get + @route("/training_jobs/{job_name}/attempts/{attempt_id}/outputs/{output_name}") + getAttemptOutput is FoundryDataPlaneRequiredPreviewOperation< + FoundryFeaturesOptInKeys.training_jobs_v1_preview, + { + @doc("The training job name.") + @path + job_name: string; + + @doc("The attempt identifier, or 'latest' for the latest attempt.") + @path + attempt_id: JobAttemptIdentifier; + + @doc("The output name.") + @path + output_name: string; + }, + JobOutputReference + >; +} diff --git a/specification/ai-foundry/data-plane/Foundry/suppressions.yaml b/specification/ai-foundry/data-plane/Foundry/suppressions.yaml index 3df715fb59aa..d47085fee29b 100644 --- a/specification/ai-foundry/data-plane/Foundry/suppressions.yaml +++ b/specification/ai-foundry/data-plane/Foundry/suppressions.yaml @@ -9,6 +9,19 @@ - "." - "**" +# Added: 2026-05-05 +- tool: TypeSpecValidation + reason: > + Foundry TypeSpec validation integration is still in progress. The service + currently emits OpenAPI 3 and keeps SDK-specific projections nested under + the service TypeSpec tree. + paths: + - "." + - src/sdk-agents + - src/sdk-extensions-openai + - src/sdk-projects-agents + - src/sdk-service-agents-contracts + # Prior suppression currently superseded by the above: # - tool: TypeSpecValidation