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
{{ message }}
Repository navigation
[Bug] Pressing "Switch Back" on a chat that was originally started with a local model, loads the model with 4096 context. #10338
^This is what happens after the old model is loaded. It has 4096 Context (which is being rounded to 4.1k in the top of the chat).
Also notice how the total tokens in the chat are not calculated now.
Which relates to https://github.com//issues/10337
Taking this. handleSwitchBackToChatModel (chat-page.tsx:3708) calls stageOrLoad with selection.config ?? rememberedConfigFor, and rememberedConfigFor (line 2408) resolves through resolveInitialConfig. use-chat-model-runtime.ts:1670 clears customContextLength on the model switch. I will put up a PR.
Remaining half after #10447. ChatModelNotice line 85 still checks selectableModelIds.has(createdModel.modelId), and in chat-page.tsx that set is built from models, loraModels, and externalModels ids only, so a snapshot-path id fails the check. I have not reproduced it in a live Switch Back yet. I will add the repo id match plus a node test that fails on current main.
Activity
claxman commentedon Sep 7, 2026
Taking this. handleSwitchBackToChatModel (chat-page.tsx:3708) calls stageOrLoad with selection.config ?? rememberedConfigFor, and rememberedConfigFor (line 2408) resolves through resolveInitialConfig. use-chat-model-runtime.ts:1670 clears customContextLength on the model switch. I will put up a PR.
claxman commentedon Sep 8, 2026
Remaining half after #10447.
ChatModelNoticeline 85 still checksselectableModelIds.has(createdModel.modelId), and in chat-page.tsx that set is built frommodels,loraModels, andexternalModelsids only, so a snapshot-path id fails the check. I have not reproduced it in a live Switch Back yet. I will add the repo id match plus a node test that fails on current main.danielhanchen commentedon Oct 5, 2026
Fixed by #10447