mirror of
https://github.com/farcasclaudiu/TradingAgents.git
synced 2026-06-22 09:01:24 +03:00
4016fd4efa
Default config had backend_url='https://api.openai.com/v1' which was forwarded to every provider client, including Google. ChatGoogleGenerativeAI constructed requests against that base, producing malformed URLs like https://api.openai.com/v1/v1beta/models/gemini-2.5-flash:generateContent that 404 with empty body. Discovered while running propagate() against Gemini end-to-end. The structured-output smoke worked because that path constructed the LLM without going through the factory and without forwarding backend_url; propagate() goes through TradingAgentsGraph.__init__ which forwards config['backend_url'] to every provider. Fix: default to None. Each provider client falls back to its own endpoint (api.openai.com for OpenAI via _PROVIDER_CONFIG, Gemini's default for Google, and so on). The CLI flow already sets backend_url explicitly per provider when the user picks one, so that path is unchanged. Verified: full propagate() now passes end-to-end on both OpenAI gpt-5.4-mini and Gemini gemini-3-flash-preview, with all nine structure/log/signal checks green for each.