continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
13.24k stars 917 forks source link

Allow changing context length per chat session #1546

Open AriMKatz opened 2 weeks ago

AriMKatz commented 2 weeks ago

Validations

Problem

Newer models like sonnet 3.5 do well across almost the entire context window, but I might not want to use it for every chat.

Solution

Please allow dynamically setting context window.

Right now only can change in model load https://github.com/continuedev/continue/issues/1364

Also, does the context provider account for this?

sestinj commented 2 weeks ago

@AriMKatz The best way to solve this is probably to make two separate copies of your model, each with a different "contextLength" parameter

After context providers resolve their contents, we then do prompt pruning to fit it into the context window, so context providers like @ codebase don't take into account contextLength by themselves

Seems like what you might want is the ability to have @ codebase automatically grab more results when you're using the longer context model?

AriMKatz commented 2 weeks ago

Model copying sounds fine.

"

Seems like what you might want is the ability to have @ codebase automatically grab more results when you're using the longer context model?

Yes exactly