unsloth/studio/backend
danielhanchen a92f462df3 Studio: read Deep Research synthesis context from the inference orchestrator
Make the adaptive synthesis-evidence budget actually engage in the normal Studio
architecture. _loaded_context_length read core.inference.inference, the low-level backend that
lives in the model subprocess and stays unpopulated in the main web process where the research
supervisor runs, so it returned None and the budget silently fell back to the 32000 character
cap (leaving the report exposed to the truncation this was meant to fix). Read the inference
orchestrator instead, and the llama.cpp backend for GGUF, mirroring
routes.inference._monitor_context_length so the budget sizes to the context the API layer
serves. Verified on a running server: at a 12288 token load the probe now reports 12288 and the
budget adapts to 24576 characters instead of the 32000 fallback.

Also:
- Reserve context for the generated report as well as the prompt scaffolding (raise the reserve
  to 4096 tokens) so evidence does not crowd out the output on a small window.
- Honor a numeric UNSLOTH_RESEARCH_AUTO_SCRAPE by passing the per-run maxAutoScrape as the page
  cap to the scraper, instead of always reading the maximum.
- Guard the web-RAG connection acquisition so a get_connection failure returns the documented
  empty result rather than propagating.
- Add a synthesis-context test that patches the real backend accessor (not the probe itself) so
  the production wiring is exercised, plus a scrape page-cap test.
2026-07-21 11:05:19 +00:00
..
assets Add DeepSeek-V4-Flash-GGUF to Studio with none/high/max reasoning (#6908) 2026-07-07 06:13:43 -07:00
auth Studio: make the Cloudflare tunnel opt-in (off by default) (#7046) 2026-07-15 06:13:25 -07:00
core Studio: read Deep Research synthesis context from the inference orchestrator 2026-07-21 11:05:19 +00:00
hub Studio: don't re-download updated GGUFs on load (#7209) 2026-07-17 19:05:46 -03:00
loggers Studio: quiet noisy logs, log real progress, and speed up Windows/macOS dataset prep (#7087) 2026-07-15 06:49:52 -07:00
models Studio: make the Cloudflare tunnel opt-in (off by default) (#7046) 2026-07-15 06:13:25 -07:00
plugins Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
requirements Studio: exclude mlx-lm 0.31.3 (broke gemma4/qwen3_5 QK-norm load on Apple Silicon) (#6803) 2026-07-06 19:40:06 -07:00
routes Studio: fit Deep Research synthesis evidence to loaded context, add opt-in web grounding 2026-07-21 05:46:14 +00:00
state Studio: shareable per-checkpoint preview links (#6486) 2026-06-24 06:31:53 -07:00
storage [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-07-19 11:48:07 +00:00
tests Studio: read Deep Research synthesis context from the inference orchestrator 2026-07-21 11:05:19 +00:00
utils fix(mlx): relax context-store timeout by default (#7141) 2026-07-17 17:13:19 -03:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_platform_compat.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
cloudflare_tunnel.py Reap Studio child processes when the parent dies abnormally (#6425) 2026-06-18 05:51:22 -07:00
colab.py Studio: make the Cloudflare tunnel opt-in (off by default) (#7046) 2026-07-15 06:13:25 -07:00
main.py Merge remote-tracking branch 'origin/main' into feature/deep-research 2026-07-19 09:27:41 +03:00
mcp_server.py feat(studio): expose an opt-in MCP control plane (#7191) 2026-07-17 16:50:39 -07:00
run.py Studio: don't apply nest_asyncio on plain CLI starts (breaks asyncio on Python 3.14+) (#7186) 2026-07-17 16:27:28 -07:00
startup_banner.py Fix Windows Studio UTF-8 startup handling (#6614) 2026-07-01 13:47:33 +01:00