Token Limit Error When Using Custom Qwen Model #6252
Replies: 5 comments
-
I seem to be getting the same for Mistral codestral-latest as well: |
Beta Was this translation helpful? Give feedback.
-
This happens when the context window of the model you are using is not recognized (defaults to 4095). This will be alleviated with the following this week: I will also add codestral, and qwen models to the default config. For now, you can also specify the max context tokens via agent/preset. |
Beta Was this translation helpful? Give feedback.
-
I am also experiencing this issue in librechat when using
The relevant part from my - name: 'LM Studio'
apiKey: 'not-needed'
baseURL: 'http://host.docker.internal:1234/v1'
models:
default: ['qwen3-30b-a3b-thinking-2507-mlx']
fetch: true
titleConvo: true
titleModel: 'deepseek/deepseek-chat-v3-0324:free'
modelDisplayLabel: 'LM Studio' Just installed LibreChat yesterday via docker. |
Beta Was this translation helpful? Give feedback.
-
I'm having it on qwen3-coder and gpt-oss... very small limit. can't fit a 450-line JS file... The latest message token count is too long, exceeding the token limit, or your token limit parameters are misconfigured, adversely affecting the context window. More info: 3873 / 3686. 3686 tokens is very small. |
Beta Was this translation helpful? Give feedback.
-
Have there been any updates on this? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
When utilizing the custom Qwen model, whether set as a custom endpoint in YAML or included in the models list compatible with OpenAI, an error occurs when starting a new session and sending a "hi" message. The error message indicates that the token count of the latest message exceeds the limit: "Token count for the latest message is too long, exceeding the limit (4959 / 4095)." This issue did not exist in the previous version released approximately three months ago and only began occurring after the recent update yesterday.
Please let me know if you need any modifications or additional details!
Here is my console's error:
Here is my yaml:
Version Information
ghcr.io/danny-avila/librechat-dev latest 59660cbf7aa2 19 hours ago 872MB
ghcr.io/danny-avila/librechat-rag-api-dev-lite latest 6550e7ddf180 42 hours ago 1.3GB
Steps to Reproduce
What browsers are you seeing the problem on?
No response
Relevant log output
Screenshots
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions