TauricResearch - #1211
Open
saoudanas1-ui wants to merge 173 commits into
Open
Conversation
…ricResearch#331) Release v0.2.0: Multi-Provider LLM Support
…chain-core-vulnerability security: Patch LangGrinch vulnerability (CVE-2025-68664) (TauricResearch#335)
- 修正了fundamentals_report从news_report获取数据的问题 - 确保fundamentals_report正确使用fundamentals_report数据源
…undamental-report fix(risk_manager): use correct state key for fundamentals report
* fix: pass max_debate_rounds and max_risk_discuss_rounds config to ConditionalLogic * use config values
Prevents UnicodeEncodeError on Windows where the default encoding (cp1252/gbk) cannot handle Unicode characters in LLM output. Closes TauricResearch#77, closes TauricResearch#114, closes TauricResearch#126, closes TauricResearch#215, closes TauricResearch#332
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.
LLMs (especially smaller models) sometimes pass multiple indicator names as a single comma-separated string instead of making separate tool calls. Split and process each individually at the tool boundary.
Seven error-handling paths used console.print() but console was never imported, causing NameError on invalid user input.
Add _clean_dataframe() to normalize stock DataFrames before stockstats: coerce invalid dates/prices, drop rows missing Close, fill price gaps. Also add on_bad_lines="skip" to all cached CSV reads.
- OpenAI: add GPT-5.4, GPT-5.4 Pro; remove o-series and legacy GPT-4o - Anthropic: add Claude Opus 4.6, Sonnet 4.6; remove legacy 4.1/4.0/3.x - Google: add Gemini 3.1 Pro, 3.1 Flash Lite; remove deprecated gemini-3-pro-preview and Gemini 2.0 series - xAI: clean up model list to match current API - Simplify UnifiedChatOpenAI GPT-5 temperature handling - Add missing tradingagents/__init__.py (fixes pip install building)
- Add http_client and http_async_client parameters to all LLM clients - OpenAIClient, GoogleClient, AnthropicClient now support custom httpx clients - Fixes SSL certificate verification errors on Windows Conda environments - Users can now pass custom httpx.Client with verify=False or custom certs Fixes TauricResearch#369
…l-http-client-support fix: add http_client support for SSL certificate customization
Enable use_responses_api for native OpenAI provider, which supports reasoning_effort with function tools across all model families. Removes the UnifiedChatOpenAI subclass workaround. Closes TauricResearch#403
- Point requirements.txt to pyproject.toml as single source of truth - Resolve welcome.txt path relative to module for CLI portability - Include cli/static files in package build - Extract shared normalize_content for OpenAI Responses API and Gemini 3 list-format responses into base_client.py - Update README install and CLI usage instructions
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.
…ified-tickers fix: preserve exchange-qualified tickers across agent prompts
…analyst status tracking
Add quality guidance to the narrative field so the sentiment report stays informative and substantive, with each point adding new signal for the trader.
Label each OpenRouter model prompt by mode (quick/deep) like the other providers, so the two consecutive selections are distinguishable. Populate the dropdown with the newest models from mainstream chat providers rather than the universal-newest (which surfaced niche/experimental releases); Custom ID still reaches anything. Cancelled required prompts now exit cleanly instead of crashing, and the output-language prompt falls back to English.
Interactive selections and flag defaults overrode TRADINGAGENTS_* env vars. Rule: an explicit env value or CLI flag wins; otherwise the env-applied default is kept. - Research depth: skip the prompt when both round-count env vars are set, and stop overwriting them (TauricResearch#977). - Checkpoint: --checkpoint/--no-checkpoint is tri-state; omitting it keeps TRADINGAGENTS_CHECKPOINT_ENABLED (TauricResearch#976). - Docker ollama: use TRADINGAGENTS_LLM_PROVIDER + OLLAMA_BASE_URL, not a bare LLM_PROVIDER the overlay never reads (TauricResearch#975). - Reasoning/thinking knobs: settable via env; the prompt is skipped when set. - Effort gating: forward effort only to models that accept it (Anthropic Opus 4.5+/Sonnet 4.6+, OpenAI reasoning models); drop it elsewhere. - Boolean env values: raise a named error on invalid input instead of silently becoming False.
Trim each provider to current-generation models and drop the special-casing they required: - OpenAI: remove gpt-4.1 (deprecated; the only non-reasoning model). - Anthropic: remove Claude Sonnet 4.5 (legacy; the only Sonnet that 400s on effort). - Google: remove the Gemini 2.5 line (superseded by 3.x). - Gemini client: drop the integer thinking_budget mapping; 3.x takes the string thinking_level directly. Effort/reasoning gates stay as defense in depth for custom model IDs. All kept IDs verified against live APIs.
Optional enrichment vendors (FRED macro, Polymarket events) raised on a bad LLM indicator, a missing key, or a network blip, which aborted the whole run. - Router: mark macro_data and prediction_markets optional; a sole-vendor failure returns a sentinel instead of re-raising. Core categories still raise. - FRED: reject a descriptive phrase up front and return guidance instead of 400ing the API; an unknown series returns a not-found message, not a crash.
The yfinance news fetch queried the raw ticker while every other path uses the canonical symbol, so broker/forex/crypto aliases silently returned no news. Normalize it (XAUUSD -> GC=F) and keep the user's ticker in the report header.
…ing models - Local servers (LM Studio, vLLM) reject the object-form tool_choice langchain sends for function calling. The generic openai_compatible provider now binds the schema as a tool without forcing tool_choice. - A structured call can return no parsed result (a thinking model answering in plain text); fall back to free text with a clear reason instead of an opaque render error.
Nodes after the trader do not append to messages, so the debug stream reprinted the same trailing message once per node. Print it only when it changes; the returned state is unchanged.
A weak model can write a placeholder ('None', 'N/A') into an optional price
field, tripping schema validation. Coerce null-ish strings to None on the
trader/PM float fields; real numeric strings still parse.
The knob was accepted but inert — analysts run strictly sequentially and the value was never used. Remove it rather than ship a misleading config key. Parallel analyst execution is tracked for v0.3 (TauricResearch#634/TauricResearch#671/TauricResearch#487).
The committed lockfile is not consumed by the pip-based install or CI; it only drifts. A deliberate dependency upgrade, if wanted, is its own scoped PR.
… API The per-section markdown report tree was written only by the CLI, so programmatic (TradingAgentsGraph) runs produced no saved reports. - Extract the writer into tradingagents/reporting.write_report_tree. - The CLI's save_report_to_disk delegates to it (no behavior change). - Add TradingAgentsGraph.save_reports(final_state, ticker) so headless/API callers get the same report tree, defaulting under results_dir.
The date hint sat at the end of each analyst's system prompt, after a long indicator block, so weaker models anchored to their training cutoff when generating tool-call date ranges. Lead each prompt with it instead.
A key left blank in a .env (var present but empty) bypassed the placeholder, so local runs diverged from CI. Use 'or' instead of a .get default.
…script The README reproducibility example named gpt-4.1 and the structured-output smoke script listed gemini-2.5-flash / deepseek-chat / qwen-plus / grok-4 — all retired from the catalog. Generalize the note and refresh the smoke defaults.
- CI gate, unified verified data-access contract, provider and data-vendor registry - env-over-CLI config precedence, current-generation model catalog - programmatic report output, plus sweep fixes for data and structured output
- the payload is a JSON string, so the dict-only guard skipped filtering and future-dated reports leaked into historical runs, breaking the TauricResearch#475 guarantee - parse before filtering; non-JSON bodies and an unset curr_date pass through TauricResearch#1115
- prompt advertised get_news(query, ...) but the tool takes a ticker, so the model hallucinated free-text query calls - advertise get_news(ticker, start_date, end_date) TauricResearch#1116
- should_continue_debate (2 edges) and should_continue_risk_analysis (3 edges) each returned more targets than any one edge mapped; a fall-through under prompt/i18n/refactor drift crashed LangGraph mid-run - share a complete DEBATE_PATH_MAP / RISK_ANALYSIS_PATH_MAP across every edge TauricResearch#1088
…udget - checkpoint resume keyed only by ticker+date silently continued the old graph under a different analyst selection / depth / asset mode; fold a run signature into the thread id TauricResearch#1089 - add llm_max_retries + TRADINGAGENTS_LLM_MAX_RETRIES, forwarded to every provider when set (int-coerced, rejects negatives/booleans), so a 429 burst can't abort a run TauricResearch#1091
- crypto reached StockTwits as Yahoo's BTC-USD (404) instead of BTC.X, and Reddit searched the dashed pair that barely matches; both now resolve the base via a shared crypto_base() helper, restoring crypto sentiment - also fixes a StockTwits resilience test class that pytest never collected TauricResearch#1113
- pass the token to ChatBedrockConverse as api_key so langchain-aws prefers bearer auth and an ambient AWS_PROFILE can't override it; no AWS access keys required TauricResearch#1103
- refresh the Anthropic lineup to the current GA set (Fable 5, Opus 4.8, Sonnet 5, Opus 4.7, Haiku 4.5) - extend the effort gate to single-number Claude 5 IDs (claude-sonnet-5, claude-fable-5) so their effort setting is honored
- correctness/stability patch: look-ahead filter, router crash-safety, checkpoint identity, crypto sentiment sources, configurable retries, Bedrock API-key auth - adds Claude Sonnet 5 / Fable 5 support
- the upper bound was inclusive, so an article stamped exactly midnight after end_date leaked into a historical run - flat epoch timestamps were parsed in host-local time and offset-aware stamps had tzinfo stripped without converting, making filtering machine-dependent - normalize every operand to UTC and use a half-open [start, end + 1 day) TauricResearch#1126
- the per-day cache was reused unconditionally, so a run started before the day's bar was final served that snapshot to every later run, feeding a stale close into technical analysis - a present row is not sufficient either, since Yahoo publishes a partial intraday candle; a TTL now governs every current-day cache while historical caches stay immutable TauricResearch#1150
…ceback - Windows terminals without a console buffer raised NoConsoleScreenBufferError before the first prompt, surfacing a raw traceback with no guidance - gate the Windows-only import on sys.platform so a broken prompt_toolkit still surfaces there, and the handler stays inert on other platforms TauricResearch#1138
- with_structured_output binds a single tool (the schema), so a primed model emitted an unknown web_search call and the attempt was discarded for a free-text retry, costing an extra round trip and the typed output - drop the tool-range wording from the no-tool sentiment analyst and state the constraint once via a shared NO_EXTERNAL_TOOLS TauricResearch#1130
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.