Skip to content

[Bug] Pressing "Switch Back" on a chat that was originally started with a local model, loads the model with 4096 context. #10338

Closed

Description

@jimster480

Unsloth
Unsloth Version
v0.1.806-beta
Package Version
2026.9.2
llama.cpp Version
b10798-mix-659e406

Hardware
GPU 0
AMD Radeon PRO W7900 · 45 GiB
GPU 1
AMD Radeon PRO W7500 · 8 GiB
ROCm
7.13.99004

Image Image Image ^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

Activity

  1. added
    feature request
    on Sep 5, 2026
  2. claxman commented on Sep 7, 2026

    @claxman
    Contributor

    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.

  3. claxman commented on Sep 8, 2026

    @claxman
    Contributor

    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.

  4. danielhanchen commented on Oct 5, 2026

    @danielhanchen
    Member

    Fixed by #10447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfeature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions