Adds Bright Data as a new data vendor for news, sentiment, and insider
transaction data. Uses SERP API for Google search results and Web
Unlocker for full article content in clean markdown format.
New features:
- bright_data vendor for get_news, get_global_news, get_insider_transactions
- New get_social_sentiment tool that scrapes Reddit, Twitter/X, and forums
for actual retail investor discussions (Bright Data exclusive)
- Social media analyst agent gains get_social_sentiment when bright_data
is configured, giving it real social data for the first time
- Automatic fallback on rate limits, same as Alpha Vantage
Usage:
export BRIGHT_DATA_API_KEY=your_key
config["data_vendors"]["news_data"] = "bright_data"
No changes to agent prompts, graph structure, or debate logic.
Drop-in vendor, zero breaking changes.
Add effort parameter (high/medium/low) for Claude 4.5+ and 4.6 models,
consistent with OpenAI reasoning_effort and Google thinking_level.
Also add content normalization for Anthropic responses.
InvestDebateState was missing bull_history, bear_history, judge_decision.
RiskDebateState was missing aggressive_history, conservative_history,
neutral_history, latest_speaker, judge_decision. This caused KeyError
in _log_state() and reflection, especially with edge-case config values.
Prevents UnicodeEncodeError on Windows where the default encoding
(cp1252/gbk) cannot handle Unicode characters in LLM output.
Closes#77, closes#114, closes#126, closes#215, closes#332
- Add StatsCallbackHandler for tracking LLM calls, tool calls, and tokens
- Integrate callbacks into TradingAgentsGraph and all LLM clients
- Dynamic agent/report counts based on selected analysts
- Fix report completion counting (tied to agent completion)