agent.generate() with maxTokens set is ignored and defaults to 4096
It seems that maxTokens is totally ignored and defaulted to 4096 when I tried to increase the maxTokens.
The code below doesn't respect the maxTokens:
The code below will respect the max tokens but setting
modelSettings.maxOutputTokens is undocumented on https://mastra.ai/en/reference/agents/generate#options:
I can reproduce this with Vertex AI Anthropic and OpenAI.Reference: Agent.generate() | Agents | Mastra Docs
Documentation for the
Agent.generate() method in Mastra agents, which enables non-streaming generation of responses with enhanced capabilities.1 Reply
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/9499
GitHub
[DISCORD:1433094638071185591] agent.generate() with maxTokens set i...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1433094638071185591 It seems that maxTokens is totally ignored and defaulted to 4096 when I tried to incre...