Skip to content

Commit 5470a13

Browse files
authored
Add new step details activity RunStepDetailsActivity (#36187)
* Add new step details activity RunStepDetailsActivity * Change default ersions for python and C# * Fix activities name * Fix * apply change to all versions. * Revert "apply change to all versions." This reverts commit de37f6a. * Fix comment
1 parent db8b6e1 commit 5470a13

File tree

2 files changed

+210
-3
lines changed

2 files changed

+210
-3
lines changed

specification/ai/Azure.AI.Agents/run_steps/models.tsp

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ union RunStepType {
104104

105105
@doc("Represents a run step that calls tools.")
106106
toolCalls: "tool_calls",
107+
108+
@doc("Represents a run step with activities information.")
109+
@added(Versions.v2025_05_15_preview)
110+
activities: "activities",
107111
}
108112

109113
@discriminator("type")
@@ -144,6 +148,17 @@ model RunStepMessageCreationReference {
144148
messageId: string;
145149
}
146150

151+
@doc("The detailed information associated with a run step activities.")
152+
@added(Versions.v2025_05_15_preview)
153+
model RunStepActivityDetails extends RunStepDetails {
154+
@doc("The object type, which is always 'activities'.")
155+
type: RunStepType.activities;
156+
157+
@encodedName("application/json", "activities")
158+
@doc("A list of activities for this run step.")
159+
activities: RunStepDetailsActivity[];
160+
}
161+
147162
@doc("Possible values for the status of a run step.")
148163
@added(Versions.v2025_05_01)
149164
union RunStepStatus {
@@ -331,7 +346,7 @@ model RunStepDeltaCodeInterpreterToolCall extends RunStepDeltaToolCall {
331346
codeInterpreter?: RunStepDeltaCodeInterpreterDetailItemObject;
332347
}
333348

334-
/** Represents the function data in a streaming run step MCP call.* */
349+
/** Represents the function data in a streaming run step MCP call. */
335350
@added(Versions.v2025_05_15_preview)
336351
model RunStepDeltaMcpToolCall extends RunStepDeltaToolCall {
337352
/** The object type, which is always "mcp". */
@@ -465,3 +480,56 @@ union RunAdditionalFieldList {
465480
/** File search result content. */
466481
FileSearchContents: "step_details.tool_calls[*].file_search.results[*].content",
467482
}
483+
484+
/** Represents the list of activities, associated with the given step. */
485+
@added(Versions.v2025_05_15_preview)
486+
model RunStepDetailsActivity {
487+
@doc("The activity type, which is always 'mcp_list_tools'.")
488+
type: "mcp_list_tools";
489+
490+
@doc("The activity ID.")
491+
id: string;
492+
493+
@doc("Server label.")
494+
@encodedName("application/json", "server_label")
495+
serverLabel: string;
496+
497+
@doc("The supported function list.")
498+
tools: Record<ActivityFunctionDefinition>;
499+
}
500+
501+
@doc("The activity definition information for a function.")
502+
@added(Versions.v2025_05_15_preview)
503+
model ActivityFunctionDefinition {
504+
@doc("A description of what the function does, used by the model to choose when and how to call the function.")
505+
description?: string;
506+
507+
@doc("The parameters the functions accepts, described as a JSON Schema object.")
508+
parameters: ActivityFunctionParameters;
509+
}
510+
511+
@doc("The parameters used for activity function definition.")
512+
@added(Versions.v2025_05_15_preview)
513+
model ActivityFunctionParameters {
514+
@doc("The parameter type, it is always object.")
515+
type: "object";
516+
517+
@doc("The dictionary of function arguments.")
518+
properties: Record<FunctionArgument>;
519+
520+
@doc("The list of the required parameters.")
521+
required: string[];
522+
523+
@doc("If true the function has additional parameters.")
524+
additionalProperties?: boolean;
525+
}
526+
527+
@doc("The function argument and description.")
528+
@added(Versions.v2025_05_15_preview)
529+
model FunctionArgument {
530+
@doc("The type of an argument, for example 'string' or 'number'.")
531+
type: string;
532+
533+
@doc("The argument description.")
534+
description?: string;
535+
}

specification/ai/data-plane/Azure.AI.Agents/preview/2025-05-15-preview/azure-ai-agents.json

Lines changed: 141 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2759,6 +2759,62 @@
27592759
}
27602760
}
27612761
},
2762+
"ActivityFunctionDefinition": {
2763+
"type": "object",
2764+
"description": "The activity definition information for a function.",
2765+
"properties": {
2766+
"description": {
2767+
"type": "string",
2768+
"description": "A description of what the function does, used by the model to choose when and how to call the function."
2769+
},
2770+
"parameters": {
2771+
"$ref": "#/definitions/ActivityFunctionParameters",
2772+
"description": "The parameters the functions accepts, described as a JSON Schema object."
2773+
}
2774+
},
2775+
"required": [
2776+
"parameters"
2777+
]
2778+
},
2779+
"ActivityFunctionParameters": {
2780+
"type": "object",
2781+
"description": "The parameters used for activity function definition.",
2782+
"properties": {
2783+
"type": {
2784+
"type": "string",
2785+
"description": "The parameter type, it is always object.",
2786+
"enum": [
2787+
"object"
2788+
],
2789+
"x-ms-enum": {
2790+
"modelAsString": false
2791+
}
2792+
},
2793+
"properties": {
2794+
"type": "object",
2795+
"description": "The dictionary of function arguments.",
2796+
"additionalProperties": {
2797+
"$ref": "#/definitions/FunctionArgument"
2798+
}
2799+
},
2800+
"required": {
2801+
"type": "array",
2802+
"description": "The list of the required parameters.",
2803+
"items": {
2804+
"type": "string"
2805+
}
2806+
},
2807+
"additionalProperties": {
2808+
"type": "boolean",
2809+
"description": "If true the function has additional parameters."
2810+
}
2811+
},
2812+
"required": [
2813+
"type",
2814+
"properties",
2815+
"required"
2816+
]
2817+
},
27622818
"Agent": {
27632819
"type": "object",
27642820
"description": "Represents an agent that can call the model and use tools.",
@@ -4520,6 +4576,23 @@
45204576
]
45214577
}
45224578
},
4579+
"FunctionArgument": {
4580+
"type": "object",
4581+
"description": "The function argument and description.",
4582+
"properties": {
4583+
"type": {
4584+
"type": "string",
4585+
"description": "The type of an argument, for example 'string' or 'number'."
4586+
},
4587+
"description": {
4588+
"type": "string",
4589+
"description": "The argument description."
4590+
}
4591+
},
4592+
"required": [
4593+
"type"
4594+
]
4595+
},
45234596
"FunctionDefinition": {
45244597
"type": "object",
45254598
"description": "The input definition information for a function.",
@@ -6242,6 +6315,28 @@
62426315
"metadata"
62436316
]
62446317
},
6318+
"RunStepActivityDetails": {
6319+
"type": "object",
6320+
"description": "The detailed information associated with a run step activities.",
6321+
"properties": {
6322+
"activities": {
6323+
"type": "array",
6324+
"description": "A list of activities for this run step.",
6325+
"items": {
6326+
"$ref": "#/definitions/RunStepDetailsActivity"
6327+
}
6328+
}
6329+
},
6330+
"required": [
6331+
"activities"
6332+
],
6333+
"allOf": [
6334+
{
6335+
"$ref": "#/definitions/RunStepDetails"
6336+
}
6337+
],
6338+
"x-ms-discriminator-value": "activities"
6339+
},
62456340
"RunStepAzureAISearchToolCall": {
62466341
"type": "object",
62476342
"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.",
@@ -6868,7 +6963,7 @@
68686963
},
68696964
"RunStepDeltaMcpToolCall": {
68706965
"type": "object",
6871-
"description": "Represents the function data in a streaming run step MCP call.*",
6966+
"description": "Represents the function data in a streaming run step MCP call.",
68726967
"properties": {
68736968
"index": {
68746969
"type": "integer",
@@ -7021,6 +7116,44 @@
70217116
"type"
70227117
]
70237118
},
7119+
"RunStepDetailsActivity": {
7120+
"type": "object",
7121+
"description": "Represents the list of activities, associated with the given step.",
7122+
"properties": {
7123+
"type": {
7124+
"type": "string",
7125+
"description": "The activity type, which is always 'mcp_list_tools'.",
7126+
"enum": [
7127+
"mcp_list_tools"
7128+
],
7129+
"x-ms-enum": {
7130+
"modelAsString": false
7131+
}
7132+
},
7133+
"id": {
7134+
"type": "string",
7135+
"description": "The activity ID."
7136+
},
7137+
"server_label": {
7138+
"type": "string",
7139+
"description": "Server label.",
7140+
"x-ms-client-name": "serverLabel"
7141+
},
7142+
"tools": {
7143+
"type": "object",
7144+
"description": "The supported function list.",
7145+
"additionalProperties": {
7146+
"$ref": "#/definitions/ActivityFunctionDefinition"
7147+
}
7148+
}
7149+
},
7150+
"required": [
7151+
"type",
7152+
"id",
7153+
"server_label",
7154+
"tools"
7155+
]
7156+
},
70247157
"RunStepError": {
70257158
"type": "object",
70267159
"description": "The error information associated with a failed run step.",
@@ -7461,7 +7594,8 @@
74617594
"description": "The possible types of run steps.",
74627595
"enum": [
74637596
"message_creation",
7464-
"tool_calls"
7597+
"tool_calls",
7598+
"activities"
74657599
],
74667600
"x-ms-enum": {
74677601
"name": "RunStepType",
@@ -7476,6 +7610,11 @@
74767610
"name": "toolCalls",
74777611
"value": "tool_calls",
74787612
"description": "Represents a run step that calls tools."
7613+
},
7614+
{
7615+
"name": "activities",
7616+
"value": "activities",
7617+
"description": "Represents a run step with activities information."
74797618
}
74807619
]
74817620
}

0 commit comments

Comments
 (0)