reasoning.
I keep getting this bug and have tried half a dozen ways to fix it.
error: "Failed to call Mastra API: 500 {"error":"Item 'fc_031d6eace4abadf400693a6e6dfee0819483eb692d981939e4' of type 'function_call' was provided without its required 'reasoning' item: 'rs_031d6eace4abadf400693a6e6d21a4819498e67c3629ca6444'.","stack":"Error: Item 'fc_031d6eace4abadf400693a6e6dfee0819483eb692d981939e4' of type 'function_call' was provided without its required 'reasoning' item: 'rs_031d6eace4abadf400693a6e6d21a4819498e67c3629ca6444'.\n at handleError (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:37647:9)\n at generateHandler (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:39001:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)\n at async file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:37287:9\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)\n at async Mastra.server.middleware (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6349:7)\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)"}",
}
Any ideas what could be the root here. Trying to move to 5.1-mini to get better results for one of our agents.
error: "Failed to call Mastra API: 500 {"error":"Item 'fc_031d6eace4abadf400693a6e6dfee0819483eb692d981939e4' of type 'function_call' was provided without its required 'reasoning' item: 'rs_031d6eace4abadf400693a6e6d21a4819498e67c3629ca6444'.","stack":"Error: Item 'fc_031d6eace4abadf400693a6e6dfee0819483eb692d981939e4' of type 'function_call' was provided without its required 'reasoning' item: 'rs_031d6eace4abadf400693a6e6d21a4819498e67c3629ca6444'.\n at handleError (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:37647:9)\n at generateHandler (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:39001:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)\n at async file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:37287:9\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)\n at async Mastra.server.middleware (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6349:7)\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)\n at async dispatch (file:///Users/altonwells/Documents/GitHub/consul-agent/apps/agents/.mastra/output/index.mjs:6656:17)"}",
}
Any ideas what could be the root here. Trying to move to 5.1-mini to get better results for one of our agents.