Files
daily_stock_analysis/requirements.txt
subaoyan16 3d890a0731 fix: 将 litellm 依赖窗口收敛到已验证上界(排除 1.99.0 回归) (#2320)
* Exclude litellm 1.99.0 from allowed versions

litellm 1.99.0 (released 2026-09-01T00:42:41Z) now forwards the
prompt_cache_key argument to the OpenAI provider. The provider cache
contract test asserts the key is not passed through without verified
capture, so CI backend-tests (3/3) and the downstream backend-gate
went red on every branch right after the release, unrelated to any
code change.

Local capture server reproduction: with 1.98.0 the captured request
body carries no prompt_cache_key; with 1.99.0 it carries
prompt_cache_key=cache-key. This one-line exclusion follows the
existing quarantine pattern for 1.82.7 / 1.82.8 and keeps the tested
behaviour until the contract is adapted deliberately.

* Bound litellm below the 1.99.0 behavioral change

Pin the dependency window to a verified upper bound (latest 1.98.x)
instead of quarantining only 1.99.0, and sync every doc that hardcodes
the litellm constraint string so docs cannot drift from requirements.txt
again.

* Sync .env.example runtime constraint comment to the litellm upper bound
2026-09-01 19:22:45 +08:00

75 lines
3.6 KiB
Plaintext

# ===================================
# Daily Stock Analysis - dependencies
# ===================================
# Core dependencies
python-dotenv>=1.0.0 # Environment variable configuration
tenacity>=8.2.0 # Retry support with exponential backoff
sqlalchemy>=2.0.0 # ORM database access
schedule>=1.2.0 # Scheduled task runner
exchange-calendars>=4.13.0 # Trading calendars; 4.5.x is incompatible with pandas 3 Timedelta "T"
# Data source dependencies, ordered by fallback priority
efinance>=0.5.5 # Priority 0: East Money data source https://github.com/Micro-sheep/efinance
akshare>=1.12.0 # Priority 1: East Money crawler data source
tushare>=1.4.0 # Priority 2: Tushare Pro API
pytdx>=1.72 # Priority 2: Tongdaxin quote servers
baostock>=0.8.0 # Priority 3: Baostock data
yfinance>=0.2.0 # Priority 4: Yahoo Finance (Fallback)
# Longbridge 4.x Linux wheels currently require manylinux_2_39; Docker uses bookworm/glibc 2.36.
# Priority 5: Docker/Linux fallback SDK.
longbridge==0.2.74; platform_system == "Linux" and python_version < "3.12"
# Priority 5: Longbridge OpenAPI SDK with OAuth support.
longbridge>=4.0.5,<5; platform_system != "Linux" or python_version >= "3.12"
tickflow>=0.1.24 # TickFlow official SDK; 0.1.24 verified for klines/get batch quotes/universes
futu-api==10.8.6808 # Futu OpenAPI SDK for read-only --portfolio futu holdings import
# The screening engine is maintained in src/services/screening.
# Feishu
lark-oapi>=1.0.0 # Feishu API
# Data processing
pandas>=2.0.0 # Data analysis
pypinyin>=0.50.0 # Name-to-code resolver (pinyin matching)
openpyxl>=3.1.0 # Excel (.xlsx) parsing for import
numpy>=1.24.0 # Numeric computing
json-repair>=0.55.1 # JSON repair
orjson>=3.10,<4 # LiteLLM runtime JSON dependency; explicitly bundled in desktop builds
# AI analysis
# Keep the historical minimum version while excluding quarantined builds and avoiding future major breaks.
litellm>=1.80.10,!=1.82.7,!=1.82.8,<1.99.0 # Unified LLM client (Gemini/Anthropic/OpenAI/DeepSeek etc.)
tiktoken>=0.8.0,<0.12.0 # BPE tokenizer for LLM token counting (pin <0.12 to avoid plugin registration issues, #537)
openai>=1.0.0 # OpenAI SDK (transitive dependency of litellm, kept explicit)
PyYAML>=6.0 # YAML parser for LITELLM_CONFIG support
# Search engines for stock news
tavily-python>=0.3.0 # Tavily Search API
google-search-results>=2.4.0 # SerpAPI
# Network requests
requests>=2.31.0 # HTTP requests
markdown2>=2.4.0 # Markdown to HTML
imgkit>=1.2.0 # Markdown to image; requires wkhtmltopdf
fake-useragent>=1.4.0 # Random User-Agent support
httpx[socks] # HTTP client with SOCKS proxy support; optional OpenAI dependency
dingtalk-stream >= 0.24.3 # DingTalk Stream SDK
# Database
# SQLite is built into Python and does not need an extra package
# Discord bot
discord.py>=2.0.0 # Discord bot development library
PyNaCl>=1.5.0 # Discord Interaction/Webhook Ed25519 signature verification
# Web Content Extraction
newspaper3k>=0.2.8 # Article extraction
lxml_html_clean # Fix for lxml.html.clean ImportError in newer lxml versions
# Report template engine (Report Engine P0)
jinja2>=3.1.0 # Jinja2 template engine for report rendering
# FastAPI Web framework
fastapi>=0.109.0 # Modern Python Web framework
uvicorn[standard]>=0.27.0 # ASGI server
python-multipart>=0.0.6 # FastAPI File/Form upload support