Spaces:
Running
Running
Commit History
8 days ago
-
feat: 10 free upgrades — streaming upload, cache invalidation, hybrid search, ONNX reranker, SQLAlchemy pool tuning, batch embed cache, semantic chunking, Prometheus histograms, DLQ auto-retry, structured logging+OTel
AkshayM3e047b8
-
Tune Presidio: strict mode masks names+orgs for NDA, light mode skips them for research
AkshayM073907c -
Swap pdfplumber → pypdf for upload parsing (3x faster text extraction)
AkshayMa965d17
-
Handle null content in LLM response (NoneType len error)
AkshayM102af7a -
Auto-fallback to mercury when minimax fails (chat + stream)
AkshayMed71b77 -
Skip PERSON/LOCATION/ORG in PII masking — only mask contact & financial IDs
AkshayMebf84fb -
Safe minimax defaults: no thinking, temp=0.3, max_tokens=4096
AkshayM536fca2 -
Profile-aware API key: mercury uses INCEPTION_API_KEY, minimax uses LLM_API_KEY
AkshayMfe833f1 -
Minimax uses LLM_BASE_URL env var; mercury always uses inceptionlabs.ai
AkshayMe2b443d -
Remove LLM_BASE_URL env override — use profile's own base_url
AkshayM08f6f02 -
Keep only mercury + minimax profiles; remove custom profile logic entirely
AkshayM980aa8d -
Drop custom profile as default — always default to mercury; minimax remains selectable
AkshayM17b877a -
Speed up analyze: use black_box mode (no thinking, 2K tokens) instead of white_box
AkshayM3a19fe3 -
Simplify document_agent: drop JSON parsing, return raw LLM output; fix llm.py syntax errors
AkshayM7fdb111 -
feat: query-driven analyze + context window bump
AkshayM- Analyze prompt now instructs LLM to skip 'summary' unless the question asks for one; output keys directly match the query topic. - Fallback summary derived from question text if LLM omits it. - Mercury analyze max_tokens: 4096 -> 8192 - Minimax/custom analyze max_tokens: 8192 -> 16384 (leverages 1M ctx)4127275 -
fix: thinking.type enabled for analyze mode + status event
AkshayMTwo remaining 'adaptive' references in analyze modes (minimax + custom) are now 'enabled'. Added SSE status event with reasoning-wait message displayed before streaming begins.84db387 -
fix: increase httpx timeout 120s -> 300s/600s for thinking models
AkshayMthinking.enabled can cause 30-60s silence before first token while model reasons. Streaming bumped to 600s, chat to 300s.6addc68 -
fix: thinking.type enabled instead of adaptive for NVIDIA API
AkshayMNVIDIA's proxy validates thinking.type as enabled/disabled (unlike MiniMax native API which accepts adaptive).1c1c87d -
feat: minimax temp=0.1 + thinking adaptive + json output for analyze
AkshayMminimax profile: temp 0.3->0.1, thinking.type=adaptive enabled on all modes for full reasoning power, white_box max_tokens 8192->16384. mercury profile: added response_format json_object to analyze mode. custom profile (env-driven): same tuning as minimax.28a6ad4
-
fix: handle LLM_BASE_URL with or without /chat/completions suffix
AkshayMStrip trailing /chat/completions from base_url so the code's own append logic doesn't create a doubled path (e.g. /v1/chat/completions/chat/completions).cc8bded -
feat: provider-based LLM profiles + per-request model switching
AkshayMllm.py: refactored into profile-based architecture with 7 built-in profiles (mercury, gpt5-mini, gpt5, claude-haiku, claude-opus, openrouter, minimax). Dynamic custom profile from LLM_MODEL/LLM_BASE_URL env vars. chat()/astream() accept mode instead of individual params. document_agent.py: all LLM calls use mode-based dispatch. Added apply_profile() for per-request provider switching. schemas.py: model field on QueryRequest and AnalyzeRequest. main.py: GET /llm/profiles endpoint passes model to analyze_document.9a38dd4 -
feat: add page_width/page_height to citations for frontend bbox scaling + combined bbox+dimension extraction
AkshayM2c0e3a3 -
fix: use pdfplumber text for chunking to ensure accurate page numbers for citations
AkshayM247a9a5 -
fix: tune Mercury 2 params — use valid temp range (0.5-0.75), instant reasoning for black-box, high for white-box, reasoning_summary=false for factual paths
AkshayM835aa37 -
fix: keep MarkItDown for chunking, pass pdfplumber page texts separately so page numbers align for bbox extraction
AkshayMe01df47 -
feat: per-mode reasoning_effort (high for white_box/analyze) + max_tokens 5120
AkshayM964389b
-
fix: handle None text in guardrails check_input (crashed on analyze with null question)
AkshayM3556ab7 -
feat: on-demand pdfplumber bbox extraction for citation highlighting
AkshayM49aaae7
-
feat: harden prompt injection guardrails with 11 detection layers + fix missing guardrails on /analyze
AkshayM4eb6f45
-
perf: upgrade embedding to all-mpnet-base-v2, add cross-encoder reranker, LRU cache, enable PII by default
AkshayM9147527
-
production hardening: circuit breakers, graceful degradation, health checks, parallel uploads, HF Spaces deploy config
AkshayMfc2fe9f
-
feat: /analyze now fairly samples all selected documents, adds cross_document_comparison + per_document_summary fields to response
AkshayMcd3b9ef -
fix: enable NeMo Guardrails with correct parameters.api_key/parameters.base_url, add PII detection to guardrails flow, set PII_ENABLED=true
AkshayM6ca471b -
fix: correct Inception API base URL (inceptionlabs.ai, not inception.ai)
AkshayM288a113 -
fix: add generic LLM_API_KEY/LLM_BASE_URL/LLM_MODEL for any OpenAI-compatible API; fall back from broken api.inception.ai
AkshayM5e9bd07 -
fix: handle LLM connection errors gracefully (SSL/connect errors → 502); convert Analyze 500 → 502 with clear message
AkshayM5d8e007 -
fix: 15 critical/high bugs across codebase
AkshayMCRITICAL: - Wrong import path .async_worker -> ..services.async_worker (Qdrant.py) - search() called run_sync() without await (always crashed) - CancelledError leaves jobs dangling in non-terminal stage HIGH: - circuit_breaker race: state mutations outside lock - llm.py: r.text on async httpx response crashes on error - llm.py: max_tokens=0 silently overridden to 2048 - llm.py: import json inside hot SSE loop - cache.py: MemoryBackend.set() ignores ttl parameter - cache.py: get_or_compute fails on sync callables - bootstrap.py: DB init runs twice (first attempt crashes) - shutdown.py: begin_shutdown races with begin_request - document_agent.py: cost double-counts answer tokens - document_agent.py: multi-hop retrieval asks same question every hop - document_agent.py: stream_query lacks multi-hop and cost_usd - main.py: json.dumps empty list stored as None - main.py: response uses request data instead of DB data - main.py: cloudinary 'skipped' mislabels actual failures - job_queue.py: l…da3be01
-
fix models.py: match Neon schema varchar sizes, add email unique constraint
AkshayM167c070