GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fetched documentation exeeds context window limit - Automatic truncation possible? · Issue #1212 · anomalyco/opencode

Fetched documentation exeeds context window limit - Automatic truncation possible? #1212

New issue
Copy link
New issue
Copy link
Closed
Closed
Fetched documentation exeeds context window limit - Automatic truncation possible?#1212
Copy link
Assignees
thdxr

Description

@WismutHansen
WismutHansen
opened on Jul 22, 2025
Issue body actions

When opencode pulls documentation from websites, the resulting response can sometimes exceed the context length of the current model in use (currently Claude sonnet 4 for me). It's impossible to continue this sessions in this case. Manually editing the sessions logs and removing the content makes it possible to resume the session.

Could we implement a token counter that considers how many tokens are left in a given session and truncates the fetched content to a size that still fits the context window (including a short hint for the model)?

Here is the error message for reference:

AI_APICallError: input length and max_tokens exceed context limit: 184714 + 32000 > 200000, decrease input length or max_tokens and try again

Activity

  1. thdxr
    self-assigned this
    on Jul 22, 2025
  2. isaacraja commented on Jul 25, 2025

    @isaacraja
    isaacraja
    on Jul 25, 2025
    More actions

    I see a similiar error message on retrieving from docs from web. AI_APICallError: input length and max_tokens exceed context limit: 190641 + 32000 > 200000, decrease input length or max_tokens and try again

  3. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    rekram1-node
    on Dec 28, 2025
    Member
    More actions

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

  4. rekram1-node
    closed this as completedon Dec 28, 2025
  5. bussard76
    added a commit that references this issue on May 12, 2026

    refactor(app-settings): isolate authorized folders panel (anomalyco#1212

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

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.