Open mauricekleine opened 3 weeks ago
can you share the tools you're using?
@lgrammel they're tools that call other LLMs, like so:
export const myTool = tool({
description: "...",
execute: async (args) => {
const result = await generateText({
model: vertex,
prompt: "..."
system: "..."
});
return { text: result.text };
},
parameters: z.object({ ... })
});
Description
When using the vertexProvider (
import { createVertex } from '@ai-sdk/google-vertex';
) and setting maxSteps to any number,streamText
always runs exactly the number ofmaxSteps
defined, even if it leads to repetitive tool calls with the same argumentsCode example
No response
Additional context
No response