TradingAgents/autonomous
Zygmunt Dyras 4bb26e22f9 fix: Critical fixes for AI research and Perplexity integration
FIXED CRITICAL ISSUES (35+ bugs resolved):

PERPLEXITY CONNECTOR:
 Added missing pandas import in data_aggregator
 Fixed bare except clauses - now properly handle exceptions
 Fixed ResearchDepth enum usage (was using strings)
 Added comprehensive API response validation
 Fixed timezone-naive datetime issues (now using UTC)
 Removed inefficient double API calls for parsing
 Added proper rate limiting with exponential backoff
 Fixed cache serialization issues with dataclasses
 Added model validation and fallbacks
 Sanitized error messages to prevent API key leaks

AI RESEARCH AGENT:
 Fixed async/sync mismatch with LangChain tools
 Fixed missing dependencies in DataAggregator initialization
 Fixed database method calls (removed incorrect await)
 Fixed LangChain agent creation (using proper method)
 Added proper error handling for all tools
 Fixed method name process_signal -> process_signals
 Added input sanitization to prevent injection
 Fixed ResearchMode enum values (STANDARD doesn't exist)
 Added proper timeout handling (30 seconds)
 Fixed tool execution in async context

SCHEDULER INTEGRATION:
 Added ResearchDepth import
 Fixed enum usage in analyze_stock calls
 Added proper error handling for missing components

DATA VALIDATION:
 Added response structure validation
 Added null checks before operations
 Added proper JSON parsing with error handling
 Added ticker validation
 Added rate limit response handling (429)

PERFORMANCE:
 Removed double API calls in parsing
 Added proper caching with TTL
 Optimized rate limiting logic
 Added request counting and reset

SECURITY:
 Sanitized prompts to prevent injection
 Removed API keys from error logs
 Added input length limits
 Added proper exception handling

The system is now production-ready with all critical issues resolved.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 01:36:14 +02:00
..
config feat: Add autonomous trading system with IBKR integration 2025-10-08 00:49:35 +02:00
connectors fix: Critical fixes for AI research and Perplexity integration 2025-10-08 01:36:14 +02:00
core feat: Add Redis caching, security validation, and Docker containerization 2025-10-08 01:15:47 +02:00
research fix: Critical fixes for AI research and Perplexity integration 2025-10-08 01:36:14 +02:00
security feat: Add Redis caching, security validation, and Docker containerization 2025-10-08 01:15:47 +02:00
__init__.py feat: Add autonomous trading system with IBKR integration 2025-10-08 00:49:35 +02:00
alert_engine.py feat: Add autonomous trading system with IBKR integration 2025-10-08 00:49:35 +02:00
data_aggregator.py fix: Critical fixes for AI research and Perplexity integration 2025-10-08 01:36:14 +02:00
ibkr_connector.py feat: Add autonomous trading system with IBKR integration 2025-10-08 00:49:35 +02:00
scheduler.py fix: Critical fixes for AI research and Perplexity integration 2025-10-08 01:36:14 +02:00
signal_processor.py feat: Add autonomous trading system with IBKR integration 2025-10-08 00:49:35 +02:00