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 bf2053e140
commit 9eb3842f04
8 changed files with 1346 additions and 1245 deletions

File diff suppressed because it is too large Load Diff