TradingAgents/docs
ahmet guzererler 2145b04318
fix: graceful LLM 404 handling + per-tier fallback model config (#108)
* fix: per-tier fallback LLM for provider 404/policy errors

- tool_runner: catch status_code==404 from chain.invoke(), re-raise as
  RuntimeError with actionable message (OpenRouter privacy URL + env var hint)
- langgraph_engine: wrap astream_events in try/except, detect policy errors
  and re-raise with model/provider context
- langgraph_engine: _run_one_ticker distinguishes policy 404s (logger.error,
  no traceback) from real bugs (logger.exception with traceback); if fallback
  is configured, rebuilds pipeline with fallback model tier and retries
- langgraph_engine: add _is_policy_error() and _build_fallback_config() helpers
- default_config: add quick/mid/deep_think_fallback_llm + _provider keys
  (TRADINGAGENTS_QUICK_THINK_FALLBACK_LLM etc.)
- .env.example: document new fallback env vars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: ADR 017 LLM policy fallback, correct ADR 016 findings, update CLAUDE.md

- docs/agent/decisions/017: add ADR for per-tier LLM fallback design decision
- docs/agent/decisions/016: correct 3 inaccurate review findings — list_pm_decisions
  ObjectId projection, created_at datetime type, and base_dir pointer handling are
  all already correctly implemented in PR#106
- CLAUDE.md: add Per-Tier Fallback LLM section and _is_policy_error critical pattern
- CURRENT_STATE.md: update milestone and recent progress for PR#106/107/108 merges

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:19:08 +01:00
..
agent fix: graceful LLM 404 handling + per-tier fallback model config (#108) 2026-03-25 11:19:08 +01:00
portfolio Add stop_loss and take_profit fields to Trade entries in database, API, and UI 2026-03-23 21:12:01 +00:00
FINANCIAL_TOOLS_ANALYSIS.md Add financial tools analysis doc and fix YoY revenue growth bug in TTM analysis 2026-03-21 16:57:21 +00:00
agent_dataflow.md feat(scanner): Finviz smart money scanner + Golden Overlap strategy 2026-03-24 16:03:17 +01:00
finnhub_evaluation.md feat: Finnhub integration layer, 141 tests, and vendor evaluation report (#16) 2026-03-18 11:28:43 +01:00
testing.md Fix: websocket emits "Run completed." on failed runs, masking errors in frontend (#102) 2026-03-24 18:06:48 +01:00
upstream_pr_review.md docs: add upstream PR review with evaluations and recommendations (2026-03-23) 2026-03-23 11:53:53 +00:00