Add free-LLM sentiment tier above FinBERT/VADER#1
Open
beepboop2025 wants to merge 1 commit into
Open
Conversation
Vendor free_llm_router and layer an LLM sentiment tier on top of the existing FinBERT -> XLM-RoBERTa -> VADER chain in processors/sentiment.py. The LLM returns financial sentiment with direction (bullish/bearish), which keyword/FinBERT scoring conflates with tone. Falls through to the existing chain on any failure, so reliability is unchanged. - Sync asyncio.run bridge (Celery workers have no running loop). - Enabled by default when the package is present; FREE_LLM_ENABLED=false to disable. - .env.example documents per-provider keys. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Adds an optional LLM sentiment tier on top of the existing FinBERT → XLM-RoBERTa → VADER chain, powered by a vendored
free_llm_router(perpetually-free providers).Why
Keyword/FinBERT scoring conflates tone with market direction — e.g. "rate hike" reads positive in tone but is bearish for equities. The LLM returns explicit
direction(bullish/bearish/neutral) alongside the score.Behavior
asyncio.runbridge (Celery workers have no running event loop).FREE_LLM_ENABLED=falsedisables it.Verified
Compiles clean; router internals smoke-tested. Not yet exercised with live keys.
🤖 Generated with Claude Code