Skip to content

LM Studio, Qwen 3 Coder, MacOS: ERROR: The number of tokens to keep from the initial prompt is greater than the context length. #2259

@RokitDan

Description

@RokitDan

When trying to run /init inside of my vue project, local instance of Qwen 3 running via LM Studio does not respond. Running opencode run "Hi" --print-logs in terminal returns:

ERROR 2025-08-26T18:34:58 +5ms service=default name=TypeError message="The number of tokens to keep from the initial prompt is greater than the context length. Try to load the model with a larger context length, or provide a shorter input" is not an Object. (evaluating '"name" in input') fatal

Here is my opencode.json:

Image

Here is token settings for Qwen3 in LM Studio

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions