Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 69 additions & 1 deletion specification/ai/Azure.AI.Agents/run_steps/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ union RunStepType {

@doc("Represents a run step that calls tools.")
toolCalls: "tool_calls",

@doc("Represents a run step with activities information.")
@added(Versions.v2025_05_15_preview)
activities: "activities",
}

@discriminator("type")
Expand Down Expand Up @@ -144,6 +148,17 @@ model RunStepMessageCreationReference {
messageId: string;
}

@doc("The detailed information associated with a run step activities.")
@added(Versions.v2025_05_15_preview)
model RunStepActivityDetails extends RunStepDetails {
@doc("The object type, which is always 'activities'.")
type: RunStepType.activities;

@encodedName("application/json", "activities")
@doc("A list of activities for this run step.")
activities: RunStepDetailsActivity[];
}

@doc("Possible values for the status of a run step.")
@added(Versions.v2025_05_01)
union RunStepStatus {
Expand Down Expand Up @@ -331,7 +346,7 @@ model RunStepDeltaCodeInterpreterToolCall extends RunStepDeltaToolCall {
codeInterpreter?: RunStepDeltaCodeInterpreterDetailItemObject;
}

/** Represents the function data in a streaming run step MCP call.* */
/** Represents the function data in a streaming run step MCP call. */
@added(Versions.v2025_05_15_preview)
model RunStepDeltaMcpToolCall extends RunStepDeltaToolCall {
/** The object type, which is always "mcp". */
Expand Down Expand Up @@ -465,3 +480,56 @@ union RunAdditionalFieldList {
/** File search result content. */
FileSearchContents: "step_details.tool_calls[*].file_search.results[*].content",
}

/** Represents the list of activities, associated with the given step. */
@added(Versions.v2025_05_15_preview)
model RunStepDetailsActivity {
@doc("The activity type, which is always 'mcp_list_tools'.")
type: "mcp_list_tools";

@doc("The activity ID.")
id: string;

@doc("Server label.")
@encodedName("application/json", "server_label")
serverLabel: string;

@doc("The supported function list.")
tools: Record<ActivityFunctionDefinition>;
}

@doc("The activity definition information for a function.")
@added(Versions.v2025_05_15_preview)
model ActivityFunctionDefinition {
@doc("A description of what the function does, used by the model to choose when and how to call the function.")
description?: string;

@doc("The parameters the functions accepts, described as a JSON Schema object.")
parameters: ActivityFunctionParameters;
}

@doc("The parameters used for activity function definition.")
@added(Versions.v2025_05_15_preview)
model ActivityFunctionParameters {
@doc("The parameter type, it is always object.")
type: "object";

@doc("The dictionary of function arguments.")
properties: Record<FunctionArgument>;

@doc("The list of the required parameters.")
required: string[];

@doc("If true the function has additional parameters.")
additionalProperties?: boolean;
}

@doc("The function argument and description.")
@added(Versions.v2025_05_15_preview)
model FunctionArgument {
@doc("The type of an argument, for example 'string' or 'number'.")
type: string;

@doc("The argument description.")
description?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2759,6 +2759,62 @@
}
}
},
"ActivityFunctionDefinition": {
"type": "object",
"description": "The activity definition information for a function.",
"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."
},
"parameters": {
"$ref": "#/definitions/ActivityFunctionParameters",
"description": "The parameters the functions accepts, described as a JSON Schema object."
}
},
"required": [
"parameters"
]
},
"ActivityFunctionParameters": {
"type": "object",
"description": "The parameters used for activity function definition.",
"properties": {
"type": {
"type": "string",
"description": "The parameter type, it is always object.",
"enum": [
"object"
],
"x-ms-enum": {
"modelAsString": false
}
},
"properties": {
"type": "object",
"description": "The dictionary of function arguments.",
"additionalProperties": {
"$ref": "#/definitions/FunctionArgument"
}
},
"required": {
"type": "array",
"description": "The list of the required parameters.",
"items": {
"type": "string"
}
},
"additionalProperties": {
"type": "boolean",
"description": "If true the function has additional parameters."
}
},
"required": [
"type",
"properties",
"required"
]
},
"Agent": {
"type": "object",
"description": "Represents an agent that can call the model and use tools.",
Expand Down Expand Up @@ -4520,6 +4576,23 @@
]
}
},
"FunctionArgument": {
"type": "object",
"description": "The function argument and description.",
"properties": {
"type": {
"type": "string",
"description": "The type of an argument, for example 'string' or 'number'."
},
"description": {
"type": "string",
"description": "The argument description."
}
},
"required": [
"type"
]
},
"FunctionDefinition": {
"type": "object",
"description": "The input definition information for a function.",
Expand Down Expand Up @@ -6242,6 +6315,28 @@
"metadata"
]
},
"RunStepActivityDetails": {
"type": "object",
"description": "The detailed information associated with a run step activities.",
"properties": {
"activities": {
"type": "array",
"description": "A list of activities for this run step.",
"items": {
"$ref": "#/definitions/RunStepDetailsActivity"
}
}
},
"required": [
"activities"
],
"allOf": [
{
"$ref": "#/definitions/RunStepDetails"
}
],
"x-ms-discriminator-value": "activities"
},
"RunStepAzureAISearchToolCall": {
"type": "object",
"description": "A record of a call to an Azure AI Search tool, issued by the model in evaluation of a defined tool, that represents\nexecuted Azure AI search.",
Expand Down Expand Up @@ -6868,7 +6963,7 @@
},
"RunStepDeltaMcpToolCall": {
"type": "object",
"description": "Represents the function data in a streaming run step MCP call.*",
"description": "Represents the function data in a streaming run step MCP call.",
"properties": {
"index": {
"type": "integer",
Expand Down Expand Up @@ -7021,6 +7116,44 @@
"type"
]
},
"RunStepDetailsActivity": {
"type": "object",
"description": "Represents the list of activities, associated with the given step.",
"properties": {
"type": {
"type": "string",
"description": "The activity type, which is always 'mcp_list_tools'.",
"enum": [
"mcp_list_tools"
],
"x-ms-enum": {
"modelAsString": false
}
},
"id": {
"type": "string",
"description": "The activity ID."
},
"server_label": {
"type": "string",
"description": "Server label.",
"x-ms-client-name": "serverLabel"
},
"tools": {
"type": "object",
"description": "The supported function list.",
"additionalProperties": {
"$ref": "#/definitions/ActivityFunctionDefinition"
}
}
},
"required": [
"type",
"id",
"server_label",
"tools"
]
},
"RunStepError": {
"type": "object",
"description": "The error information associated with a failed run step.",
Expand Down Expand Up @@ -7461,7 +7594,8 @@
"description": "The possible types of run steps.",
"enum": [
"message_creation",
"tool_calls"
"tool_calls",
"activities"
],
"x-ms-enum": {
"name": "RunStepType",
Expand All @@ -7476,6 +7610,11 @@
"name": "toolCalls",
"value": "tool_calls",
"description": "Represents a run step that calls tools."
},
{
"name": "activities",
"value": "activities",
"description": "Represents a run step with activities information."
}
]
}
Expand Down
Loading