Skip to content

Context window size indicator shows incorrect value after switching models in VSCode companion #2515

@tanzhenxin

Description

@tanzhenxin

What happened?

When using the VSCode companion extension, switching models via the model selector causes the "context left" indicator in the bottom bar to display an incorrect context window size. The total context window size shown does not match the actual context window of the newly selected model.

Steps to reproduce:

  1. Open Qwen Code in the VSCode companion extension
  2. Start a chat session — note the context left indicator at the bottom bar shows the correct value
  3. Switch to a different model using the model selector
  4. Observe the context left indicator — the total context window size is now incorrect

Workaround: Opening a new chat tab resets the context indicator to the correct value for the current model.

What did you expect to happen?

After switching models, the context left indicator should immediately update to reflect the new model's correct context window size.

Client information

Affected component: VSCode IDE Companion extension

Anything else we need to know?

  • The issue only affects the context left indicator display; actual model behavior and context limit work correctly after switching.
  • Opening a new chat tab always shows the correct context window size, so the issue is specific to in-place model switching within an existing tab.

Metadata

Metadata

Assignees

Labels

type/bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions