wedgecheck/requirements.txt
caelum0x 31f2a18133 feat: deploy live, free LLM path via portfolio relay, fix missing ddgs dep
OpenRouter credits are still exhausted, but that's no longer the real
blocker: OPENAI_BASE_URL now points at this portfolio's free Cloudflare
Workers AI relay (ai-relay-worker) instead, which needed two real fixes to
work with gpt-researcher:

- app/llm_compat.py (opt-in via WEDGECHECK_NON_STREAMING_LLM=1): the relay
  always answers stream:true with one flat JSON body (no real SSE), which
  broke gpt-researcher's forced-streaming report writer ("No generation
  chunks were returned"). Patches ChatOpenAI.astream to fall back to a
  single ainvoke() wrapped as a one-chunk stream.
- EMBEDDING=custom:bge against the relay's new /v1/embeddings route (added
  to ai-relay-worker separately) instead of the paid
  openai:text-embedding-3-small default -- avoids a torch/sentence-
  transformers dependency entirely.

Live-verified end-to-end, repeatedly, against the real code path: the
existing cited-sources retry/fail-loud logic in app/brief.py correctly
discards an LLM-written report and raises WedgecheckResearchError whenever
the free duckduckgo retriever returns zero real sources on every attempt,
rather than ever serving an unsourced brief.

Also fixes a real deploy-time bug found live: gpt-researcher's duckduckgo
retriever lazily imports ddgs but doesn't declare it as a dependency --
requirements.txt (pinned from a dev .venv that happened to already have it
installed) was missing it, which 502'd in production until added.

Deployed to https://wedgecheck.ereboslab.com (Docker on the Oracle box).
2026-10-29 03:25:10 +03:00

15 lines
478 B
Plaintext

fastapi==0.162.0
uvicorn==0.54.0
gpt-researcher==0.15.1
# gpt-researcher's duckduckgo retriever imports this at call time (lazy
# `check_pkg`/`import ddgs`) but does not declare it as its own dependency --
# missing it reproduced live as a 502 on the deployed box (2026-10-29):
# "Unable to import ddgs. Please install with `pip install -U ddgs`".
ddgs==9.16.1
python-dotenv==1.2.4
requests==2.34.2
beautifulsoup4==4.15.0
jinja2==3.1.6
python-multipart==0.0.32
pydantic==2.14.1