unsloth/studio/backend/core/inference
Neodon c027ec192e
fix(studio): ensure first chat tool call starts in session sandbox (#4810)
Fixes #4809

On a new Studio chat, the first tool call could start before the frontend
initializes the thread ID. That meant the first request could go out without
a session_id, so the backend started the tool in the shared sandbox root
instead of the chat's session sandbox.

Frontend:
- Eagerly initialize the thread when switching to a new chat
- Resolve the thread ID once at request time and keep it stable through
  async model-load waits
- Disable ActiveThreadSync during new-chat initialization to prevent
  stale thread IDs from being written back
- Add error handling for thread initialization failures
- Clear activeThreadId on all compare-mode entry paths to prevent
  cross-session leakage
- Fix exitCompare to restore context usage from the saved view
- Coerce falsy thread IDs to undefined for consistent backend/frontend
  fallback behavior
- Use _default as the image sessionId fallback to match the backend

Backend:
- Use ~/studio_sandbox/_default when a request arrives without a session_id
2026-04-03 11:44:22 -07:00
..
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_html_to_md.py fix: studio web search SSL failures and empty page content (#4754) 2026-04-01 06:12:02 -07:00
audio_codecs.py studio: per-model inference defaults, GGUF slider fix, reasoning toggle (#4325) 2026-03-16 06:37:55 -07:00
defaults.py UI Changes (#4782) 2026-04-02 08:05:55 -07:00
inference.py [studio] multi gpu: revert to balanced for inference. (#4698) 2026-03-31 01:24:41 -07:00
llama_cpp.py feat(studio): differentiate web search and URL fetch in chat tool UI (#4802) 2026-04-03 05:03:27 -07:00
orchestrator.py fix(studio): prioritize curated defaults over HF download ranking in Recommended (#4792) 2026-04-02 10:46:53 -07:00
tools.py fix(studio): ensure first chat tool call starts in session sandbox (#4810) 2026-04-03 11:44:22 -07:00
worker.py studio: reuse HF cached repo casing to prevent duplicate downloads (#4822) 2026-04-03 05:48:24 -07:00