You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(learn): add Fast/Smart model switcher for tutor chat
Tutor chat was hardcoded to gemini-2.5-pro (MODEL_SMART) in start_session,
chat, and action -- great for reasoning quality, sluggish enough that
users felt blocked. Adds a per-user UI toggle in the chat TopBar so the
student decides when speed matters.
Backend: StartSessionBody / ChatBody / ActionBody accept optional
model_pref ("fast" | "smart"). New _resolve_tutor_model maps "fast" ->
MODEL_DEFAULT (gemini-2.5-flash), "smart" -> MODEL_SMART (gemini-2.5-pro),
unknown / missing -> fast. The default is fast on both sides so first-time
chats are snappy by default; users opt in to Smart when they want depth.
Frontend: new ModelToggle component (mirrors SharedContextToggle's
look-and-feel and localStorage-persisted hook pattern, key
sapling_model_pref). Mounted in the chat header next to the Class intel
toggle. modelPref is threaded through startSession, sendChat, and
learnAction.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments