Unable to upload files
Before submitting your bug report
- [x] I believe this is a bug. I'll try to join the Continue Discord for questions
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows
- Continue version: pre-release 1.1.53
- IDE version:VSCode 1.101.2
- Model: llama3.1:8b
- config:
name: Local Setup
version: 1.0.0
schema: v1
models:
- name: Nomic Embed Text
provider: ollama
model: nomic-embed-text:v1.5
roles:
- embed
- name: Qwen2.5-Coder 3B
provider: ollama
model: qwen2.5-coder:3b
roles:
- autocomplete
- name: Autodetect
provider: ollama
model: AUTODETECT
- name: My Voyage Reranker
provider: voyage
model: rerank-2
roles:
- rerank
rules:
- Give concise responses
context:
- provider: code
- provider: docs
- provider: diff
- provider: terminal
- provider: problems
- provider: folder
- provider: codebase
- provider: web
params:
n: 2
- provider: url
- provider: search
I have set OLLAMA CONTEXT LENGTH to be 16384.
Description
Unable to upload files using context provider, always errors out with "File exceeds context length" - File is 140.7 KB which exceeds the allowed context length and cannot be processed by the model. This is not even a large file, 140 KB is quite small. It can be easily processed by locally deployed open web ui with the same model, seems like an issue with continue itself.
Is it a text file? How many characters does the file have? Does the same issue happen when using other models (e.g. any of OpenAI, Anthropic, Gemini etc)?
I am seeing the same issue, trying to find the correct configuration to set the context length for file context.
Maybe this workaround works for me (parameter: contextLength ), check the comment in this issue :
https://github.com/continuedev/continue/issues/5291#issuecomment-2823869610
models:
- name: Gemma 3 27B
provider: ollama
model: gemma3:27b
defaultCompletionOptions:
contextLength: 131072
roles:
- chat
- edit
- apply
c0b611e7de75:/# ollama show gemma3:27b
Model
architecture gemma3
parameters 27.4B
context length 131072
embedding length 5376
quantization Q4_K_M