Add universal max_output_tokens and thinking_budget support for agents
Unify model configuration across insights and agents by adding support
for max_output_tokens and thinking_budget in agent frontmatter and
runtime config. These parameters now work consistently with the existing
generate() functions.
Changes:
- Extract max_output_tokens (replaces max_tokens) in all provider run_agent()
- Extract thinking_budget from config in Google and Anthropic providers
- Google: uses explicit budget or -1 (dynamic) if not specified
- Anthropic: uses explicit budget or computes default via existing logic
- OpenAI: uses max_output_tokens only (no thinking_budget support)
- Add helper functions to eliminate duplicated token/budget calculation
- Update all tests from max_tokens to max_output_tokens
- Document new fields in CORTEX.md, APPS.md, and PROMPT_TEMPLATES.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>