fix(ai-providers): change generateObject mode from 'tool' to 'auto' for better provider compatibility

Fixes Perplexity research role failing with 'tool-mode object generation' error

The hardcoded 'tool' mode was incompatible with providers like Perplexity that support structured JSON output but not function calling/tool use

Using 'auto' mode allows the AI SDK to choose the best approach for each provider
This commit is contained in:
Eyal Toledano
2025-06-07 15:02:48 -04:00
parent 7db7cf3859
commit f533fd0931
7 changed files with 1688 additions and 2477 deletions

File diff suppressed because one or more lines are too long