Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

8.5 KB
Raw Blame

LDR's web layer now runs on FastAPI and Uvicorn instead of Flask's WSGI stack. The web-layer change itself adds no database schema migration, but the release also ships data-repair database revisions newer than 0030, the newest revision v1.10.7 recognizes, so take a verified offline backup before upgrading. See the upgrade and rollback guide, which also shows how to find the release's newest revision. Operators and custom API clients should prepare for these compatibility changes:

  • Deployments where a trusted reverse proxy terminates TLS must set TRUST_PROXY_HEADERS=true and prevent direct access to the backend. This lets LDR use the externally visible HTTPS scheme for secure cookies, HSTS, and WebSocket origin checks. Rate-limit client-IP extraction has a separate trust rule for private or loopback proxy peers, so a single proxy must overwrite, never append, X-Forwarded-For and X-Real-IP. A proxy that connects from a public or carrier-grade-NAT address and sends X-Real-IP without X-Forwarded-For is no longer trusted for it, because X-Real-IP is now read only from a private, loopback or link-local peer (the previous release read it from any peer): set LDR_SERVER_FORWARDED_ALLOW_IPS to that proxy's IP address, or all its clients share one rate-limit bucket. A chain of proxies (CDN → nginx) needs more: see "Proxy chains" in docs/deployment/reverse-proxy.md.
  • Socket.IO moved from /socket.io to /ws/socket.io. Update custom clients and explicit reverse-proxy location rules. The bundled UI is already updated.
  • Direct, non-container launches bind to 127.0.0.1 by default instead of 0.0.0.0. Set LDR_WEB_HOST=0.0.0.0 when remote access is intentional. The Dockerfile and Docker Compose configuration already set this for containers.
  • Users must sign in again after upgrading. As with any LDR server restart, the in-memory session store is cleared; Flask and Starlette session cookies also use incompatible formats.
  • Startup now fails if LDR cannot read or create its persistent session key. Fix the data-directory permissions or key-file contents before upgrading.
  • Session-authenticated POST /api/v1/quick_summary, /generate_report and /analyze_documents clients must now send a CSRF token. v1.x exempted these endpoints, so tokenless calls worked; fetch the token from GET /auth/csrf-token after signing in. A missing or invalid token returns
  • CSRF failures on all other endpoints now return 403 instead of 400, including POST /api/v1/research/{id}/export/{format}. Those endpoints already required a token in v1.x.
  • The CSRF token must be sent in a header for multipart requests. v1.x read the token from any form field, including multipart parts. A csrf_token form field is now honored only in application/x-www-form-urlencoded bodies of 256 KB or less; otherwise only the X-CSRFToken or X-CSRF-Token header counts, and a multipart request without it returns 403.
  • Date fields are ISO 8601 rather than RFC-822 HTTP dates: timestamp in GET /api/research/{id}/logs, time in the log entries of GET /history/logs/{id} and GET /history/details/{id}, and published_date in GET /library/api/documents (now YYYY-MM-DD). Update clients that parse these fields.
  • Malformed numeric API path parameters now return 422 rather than 404. Clients that classify missing resources by status should treat 422 as a validation error, for example on numeric benchmark-run or resource IDs.
  • GET /settings now redirects with 307 to /settings/. Custom clients that do not follow redirects should request the trailing-slash path.
  • Rate-limit storage now prefers RATE_LIMIT_STORAGE_URI. The former RATELIMIT_STORAGE_URL name remains supported as a fallback, so existing deployments do not need an immediate configuration change.
  • The duplicate legacy /api/news/* API was removed. Migrating to the /news/api/* contract is not a mechanical prefix replacement:
    • GET /api/news/subscriptions → GET /news/api/subscriptions/current
    • POST /api/news/subscriptions → POST /news/api/subscribe
    • POST /api/news/feedback → POST /news/api/vote (the JSON body is unchanged)
    • POST /api/news/research → POST /news/api/research/{card_id}
    • PATCH /api/news/subscriptions/{id} has no replacement; use PUT /news/api/subscriptions/{id}.
    • Feed queries rename search_strategy to strategy.
    • Subscription creation JSON renames type to subscription_type.
    • Subscription creation silently ignores source_research_id.
    • Successful subscription creation now returns 200 instead of 201.
    • Subscription updates rename query_or_topic to query and refresh_interval_minutes to refresh_minutes; direct subscription_type and status updates are no longer available. Successful deletes return a message field instead of deleted.
  • Context-overflow endpoints moved: /metrics/api/context-overflow is now /api/context-overflow, and /metrics/api/research/{id}/context-overflow is now /api/research/{id}/context-overflow.
  • GET /news/health now requires authentication. Monitoring should use the public GET /api/v1/health liveness endpoint instead. An unauthenticated browser-style request to /news/health redirects to the login page, so a monitor that follows redirects can otherwise see a meaningless 200 response.
  • Custom setting keys containing / no longer work with the single-key settings API. Built-in settings are unaffected. Compatibility restoration is tracked in #6056.
  • Several HTTP error contracts changed: unauthenticated /auth/integrity-check and /notes/api/notes/ask-context responses use {"detail": ...} rather than {"error": ...}; JSON clients requesting /auth/change-password with Accept: application/json receive 401 rather than 302; /metrics/api/cost-analytics returns 500 rather than a successful empty result on server errors; and the Zotero collections/groups endpoints return 400 when the integration is disabled or its API key is missing.
  • Benchmark starts now share a limit of three requests per minute across /benchmark/api/start and /benchmark/api/start-simple; excess requests receive 429.
  • Uvicorn allows at most 10 seconds for in-flight requests to finish during graceful shutdown. Long-lived streams may then be closed.

Rollback: Never start v1.10.7 against the upgraded databases. Each sign-in it attempts there makes a forced backup that keeps one file per user, which replaces the user's automatic pre-migration backup with a copy of the upgraded database, and then fails migration-version lookup. The new release does not keep that pre-migration backup either: with the default backup.max_count of 1, the user's login backup on a later UTC day replaces it with a copy of the upgraded database, and a password change deletes it. Copy each user's pre-migration backup from encrypted_databases/backups/ to storage outside the data directory immediately after that user's first sign-in on the new release, and in any case before any downgrade attempt. Raising backup.max_count and backup.max_age_days before upgrading only delays the replacement: the user's first sign-in on the backup.max_count-th later UTC day on which they sign in still deletes it, as does the first login backup after it is older than backup.max_age_days, whichever comes first, and a password change deletes it at any time. To roll back, stop the upgraded application, restore the matching pre-upgrade data backup and deploy the previous image or package with its own configuration and lockfile. The new revisions' downgrades do not undo their data repairs (for example, 0031 does not restore discarded duplicate setting rows or the original values of repaired settings), so they are not a data-restore operation. A backup restore also omits writes made after that backup. Rolling back requires users to sign in again. Restore custom Socket.IO clients and reverse-proxy rules to /socket.io; if you adopted RATE_LIMIT_STORAGE_URI, also restore or retain RATELIMIT_STORAGE_URL with the same value, which the Flask release reads. TRUST_PROXY_HEADERS can remain set, but the Flask release ignores it; keep the same reverse-proxy isolation and direct-access controls in place. As with any server restart, in-progress work may be marked failed.