mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-01 17:17:24 -04:00
Root cause: AI models were hallucinating signature/job_id/today_date values and passing them in tool calls. The ContextInjector was checking "if param not in request.args" before injecting, which failed when AI provided (incorrect) values. Fix: Always override context parameters, never trust AI-provided values. Evidence from logs: - ContextInjector had correct values (self.signature=gpt-5, job_id=6dabd9e6...) - But AI was passing signature=None or hallucinated values like "fundamental-bot-v1" - After injection, args showed the AI's (wrong) values, not the interceptor's This ensures runtime context is ALWAYS injected regardless of what the AI sends. Fixes #TBD