Spaces:
Running
Running
Commit History
Yesterday
-
fix: prevent reeval 60m timeouts, prioritize Flint for Skeptic, and clean docs
0ea8d95
5 days ago
-
fix(debate): ask the skeptic for three sentences and call ERNIE first
A longer ask left the message body empty. ERNIE wrote the bear case in that body on a hunt-sized bull case, with Super VL and Flint behind it. Co-authored-by: Cursor <cursoragent@cursor.com>527f69d -
fix(debate): use the free models that wrote a bear case on the VPS
Super VL, ERNIE, and Flint returned a real skeptical answer. Gemma, Lightning, and the router did not. Co-authored-by: Cursor <cursoragent@cursor.com>a0ccb41
6 days ago
-
fix(debate): start the skeptic on the free router instead of Gemma
Gemma's shared pool can refuse a whole hunt, so the skeptic now tries the router, then Lightning, then Gemma before the single-analyst fallback. Co-authored-by: Cursor <cursoragent@cursor.com>d406c40 -
fix(debate): take turns on the free tier instead of camping on one model
Four regions were calling Gemma together and then falling back onto the pitcher's model, so the skeptic and judge never ran. Co-authored-by: Cursor <cursoragent@cursor.com>9a0c3ef -
fix(llm): read LangChain content blocks as text
A model refusal now arrives as a list of blocks. Treating that list as a string made the fallback chain skip a live model. Co-authored-by: Cursor <cursoragent@cursor.com>7d8c688
10 days ago
-
feat: attribution-weighted scoring, drawdown reeval, live free-model filter, and HF sync
e960af1
-
fix(framework): populate proposal.md fields on the paths that actually run
Cisco PonceThe structured framework fields were being dropped on every common path: - reeval single-LLM branch returned no 'structured' key -> submit_analysis got structured=None -> sparse analysis (this is the branch debate falls back to, which the last CI run hit). - whale_hunter single-LLM branch used a legacy inline 5-section prompt instead of the shared Senior Broker prompt, so framework fields were never even requested. - the debate judge prompt asked for only 5 legacy keys, so USE_DEBATE=true (the CI default) produced verdicts with empty framework fields. Also add concurrency groups to both workflows: the VPS DuckDB is single-writer and free-tier model limits are shared, so overlapping runs (scheduled + manual, observed 2026-10-12) cause lock conflicts and 429 storms.136b0f2 -
feat(llm): pick best free-tier models + add structured fallback chain
Cisco PonceLive benchmark (2026-10-12) against the OpenRouter free tier showed the old config was actively broken: - nemotron-3.5-lightning (chain head + debate pitcher) returned empty/ truncated completions and rate-limited constantly. - inclusionai/ling-3.0-flash-sante:free was de-listed (404). - STRUCTURED_MODEL (dots-3-note) is token-hungry and truncated at low budget. Changes: - MODEL_CHAIN: ultra-550b, super-120b, dots-3-note, openrouter/free (strongest reasoners first; dead + broken entries removed). - STRUCTURED_MODEL -> super-120b (fastest schema-valid JSON). - add STRUCTURED_CHAIN + invoke_structured(); agent/reeval/whale_hunter now fall back across structured models instead of dropping to free text (and losing the proposal.md framework fields) when one model 429s. - debate: PITCHER default -> ultra-550b; fix fallback-equals-primary bug via _fallback_for(). - docs updated to match.f8615d8
-
fix(debate): raise judge token cap + skip token-limited models
The free Dots3 Note judge model burned its 4096 completion-token cap on reasoning (3328 tokens) before emitting JSON, triggering a parse failure. - raise judge max_tokens to 8192 (structured + plain-JSON paths) - treat 'length limit' / parse failures as fatal for that model and jump to the next fallback instead of retrying the same exhausted model - trim judge prompt (bull/bear 2500, SEC 1500) to reduce token pressure5558ac2 -
fix(debate): stop judge verdict being dropped by LangGraph state schema
Root cause of the production 'NoneType' has no attribute 'verdict': judge_node always produced a valid InvestmentVerdict, but LangGraph silently dropped '_structured_result' because it was not declared in DebateState. whale_hunter/agent then crashed on result.verdict (None) and fell back to single-LLM, so the debate NEVER succeeded. - declare _structured_result in DebateState so the verdict flows through - harden judge: retry empty (None) structured output per model with backoff - judge walks a fallback chain of structured-capable models (3 distinct role models preserved: pitcher=Nemotron 3.5, skeptic=Nemotron Super, judge=Dots3 Note), then parses plain-LLM JSON as last resort - guard empty completions in pitcher/skeptic resilient calls - update README to reflect the real judge model (Dots3 Note)06bc648 -
fix(international): normalize UK per-share metrics + feed real value data to all regions
- P0: normalize UK EPS/book/price (pence->pounds) in analyst_node so the Graham number isn't inflated ~100x; also normalize 52W range in prompt - P0: inject currency-labelled value snapshot (revenue/cash/debt/ratio/EV) into analyst + debate prompts for ALL regions, not just US - P1: remove Finnhub '.'-guards; switch insider feed to global insider-transactions endpoint so non-US symbols get real data - P1: pre-validate Brave tickers (drop zero-cap) + expand seed pools - P2: gatekeeper market-cap size filter now converts native currency to USD - add 40-test suite covering all improvements7d2fdd1
-
fix(llm): update OpenRouter model chain to currently-available free models
All 5 previously configured free-tier models (stepfun/step-3.5-flash, z-ai/glm-4.5-air, arcee-ai/trinity-*, nvidia/nemotron-3-nano-30b-a3b, meta-llama/llama-3.3-70b-instruct) returned 404 — no longer on the free tier, silently breaking the analyst/structured-output pipeline. New chain (verified live via OpenRouter API 2026-09): - nvidia/nemotron-3.5-lightning:free (primary, clean tool-calling) - nvidia/nemotron-3-super-120b-a12b:free - dots-studio/dots-3-note-preview:free - inclusionai/ling-3.0-flash-sante:free - openrouter/free (resilient router catch-all) STRUCTURED_MODEL -> nemotron-3.5-lightning:free (reliable finish_reason=tool_calls for InvestmentVerdict structured output). Updated debate defaults, EVAL_MODEL, model benchmark list, and docs.8005d62
-
fix(llm): use verified free models to avoid Venice/Google rate limits
- Replaced OpenRouter models handled by Venice (Llama, Mistral, Qwen, Hermes) which hit 402 USD spend limits. - Replaced Google AI Studio models (Gemma) which hit global 429s. - Updated MODEL_CHAIN and debate defaults to use StepFun, GLM 4.5 Air, Trinity Large, Trinity Mini, and Nemotron which successfully passed live API tests.9b1451e -
fix(llm): replace failing free models with high-context alternatives
- Removed Mistral which was hitting 402 USD spend limits on Venice - Downgraded Gemma which was constantly hitting 429 limits - Added Hermes 3 405B, Qwen 3 Coder, and GLM 4.5 Air to fallback chain - Updated debate agents to use Qwen 3 (Pitcher) and Hermes 3 (Skeptic) by defaulta0243a3 -
fix(debate): exponential backoffs for 429 rate limits
The debate nodes were instantly retrying fallback models upon getting a 429 on the primary model, effectively flooding OpenRouter and tripping global rate limits. - Implemented _resilient_llm_call with 15s->30s->45s exponential backoff - Increased LangGraph judge node _debate_retry to start at 15.0s48954f1 -
fix: resolve rate limits and token exhaustion
- src/llm.py: Swapped Nemotron (reasoning) for Llama 3.3 as primary and STRUCTURED_MODEL - src/llm.py: Increased 429 backoff from 2s to 8s (8 req/min free tier) - src/agents/debate.py: Added 10s delay between debate nodes + Llama 3.3 fallbacks - src/reeval_portfolio.py: Increased inter-ticker delay from 2s to 15s28d9630
-
feat: Sprint 9 — Execution & Quality Control
Pre-Sprint Bug Fixes: - Fix double-header in verdict reports (strip LLM-embedded headers) - Fix structured output token limit (get_structured_llm with max_tokens=4096) - Fix fallback path skipping Kelly (compute position sizing in except block) Epic 1 — Grading Engine: - scripts/build_golden_dataset.py: curate 50 LangSmith traces into Dataset - scripts/evaluators.py: 5 evaluators (catalyst grounding, company identity, format, verdict validity, Kelly math) - scripts/run_evals.py: evaluation runner for LangSmith Experiments Epic 2 — Alpaca Paper Trading: - src/broker/alpaca.py: order router, submission, status tracking - Wire Alpaca execution into portfolio_tracker.py - Update VPS schema + API with order_id, fill_price, broker_status Epic 3 — Intraday Catalyst Triggers: - vps/catalyst_poll.py: polling daemon (volume, price, insider triggers) - GitHub Actions repository_dispatch for catalyst-alert events - whale_hunter.py CATALYST_TICKER env var for single-ticker mode Epic 4 — Multi…645673f
-
feat: LangGraph best-practices refactor (Sprint 8 Epics 2-3-4)
- Fix state mutation anti-pattern: all 4 workflow agent nodes + debug wrappers now return partial dicts instead of mutating state - Add Annotated reducers (operator.add) to candidates/candidate_scores list fields in AgentState - Replace deprecated set_entry_point / set_conditional_entry_point with START edges across agent.py, whale_hunter.py, workflow.py - Refactor gatekeeper routing to Command pattern, removing separate check_status functions in agent.py and whale_hunter.py - Add InMemorySaver checkpointer to all 3 graph compile() calls with thread_id config on every invoke/ainvoke - Add RetryPolicy(max_attempts=3) to all graph nodes and recursion_limit=30 to all invoke calls - Add InvestmentVerdict Pydantic model (src/models/verdict.py) with structured output via with_structured_output, graceful fallback to plain LLM - Simplify portfolio_tracker verdict parsing when structured_verdict is provided - Clean up requirements.txt: LangChain 1.0 LTS range pinning, remove …d5ba3a3
-
Initial Deploy (Clean)
a2cbcac