Skip to content

Deepseek V4 Flash Free is showing "Bad Request: {"detail":"Invalid request. Please check the parameters and try again. Details: The input (514881 tokens) is longer than the model's context length (262144 tokens)."}" #35991

Closed as not planned

Description

@evsphereofficial

Description

I opened opencode,
Selected the Deepseek V4 Flash Free
And When I sent any message it showed me the error Bad Request: {"detail":"Invalid request. Please check the parameters and try again. Details: The input (514881 tokens) is longer than the model's context length (262144 tokens)."}

When Deepseek v4 Flash Free supported 1M Context and even now it works partially but fails again

Plugins

No Plugins

OpenCode version

1.17.14

Steps to reproduce

  1. Open OpenCode
  2. Choose Deepseek V4 Flash Free
  3. Choose a session which has context window of over 265K Tokens
  4. Send Any User Message
  5. You get the error Bad Request: {"detail":"Invalid request. Please check the parameters and try again. Details: The input (514881 tokens) is longer than the model's context length (262144 tokens)."}

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. github-actions commented on Jul 9, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is specifically about the model's context window being misconfigured in OpenCode (set to 262k instead of the advertised 1M), #27929 is the most relevant prior report.

  2. evsphereofficial commented on Jul 9, 2026

    @evsphereofficial
    Author

    Did it fixed?

  3. github-actions commented on Sep 8, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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