Hello,
- I used the following example to create an Azure Foundry Agent with an Azure Function:
GitHub - Azure-Samples/azure-functions-ai-services-agent-python: Sample to show using Azure Functions to run action functions from Azure AI Services - I asked the agent a question that uses the function: “What is the weather in NY?”
- I then used the listRunSteps method to retrieve run steps:
try {
let steps = await client.agents.listRunSteps(threadId, run.id)
console.dir(steps)
} catch (error: any) {
console.log('step error')
console.dir(error)
}
I received the following exception:
Error: Unknown run step type: tool_calls
at convertRunStepDetailsOutput (http://localhost:5174/node_modules/.vite/deps/@azure_ai-projects.js?v=b13bba88:1440:13)
at convertRunStepOutput (http://localhost:5174/node_modules/.vite/deps/@azure_ai-projects.js?v=b13bba88:1431:232)
at Array.map (<anonymous>)
at convertOpenAIPageableListOfRunStepOutput (http://localhost:5174/node_modules/.vite/deps/@azure_ai-projects.js?v=b13bba88:1606:69)
at listRunSteps (http://localhost:5174/node_modules/.vite/deps/@azure_ai-projects.js?v=b13bba88:3638:10)
at async getAIMessages (http://localhost:5174/src/services/assistantApi.ts?t=1745580343934:118:21)
at async getAIResponse (http://localhost:5174/src/services/assistantApi.ts?t=1745580343934:150:20)
at async http://localhost:5174/src/services/assistantApi.ts?t=1745580343934:300:32
at async http://localhost:5174/src/components/Chat/Chat.tsx?t=1745580343934:46:9
at async http://localhost:5174/src/components/Chat/Chat.tsx?t=1745580343934:131:13
Note that the Python version of this API works correctly:
list_run_steps
Also, if the run does not use a function, this exception does not occur.