Skip to content

Limit response size for github_list_releases tool to prevent context overruns #83

@blinkagent

Description

@blinkagent

Problem

The github_list_releases tool can return excessively large responses that cause the model to exceed context limits, resulting in "Input is too long for requested model" errors in brand new chats.

Root Cause

When fetching releases with include_body_and_assets: true, the tool can return massive amounts of data, especially for repositories with:

  • Many releases
  • Large release notes/bodies
  • Many assets per release

This causes the entire conversation to exceed the model's context window even at the start of a chat.

Proposed Solution

Implement size limits for the github_list_releases tool:

  1. Limit release body length: Truncate release notes to a reasonable length (e.g., 500-1000 chars) with an indicator that content was truncated
  2. Limit asset details: Either exclude asset details by default or limit the number of assets returned per release
  3. Reduce default page size: Lower the per_page default or maximum to prevent fetching too many releases at once
  4. Add warning in tool output: If response is truncated, indicate this to the model so it knows data is incomplete

Example Error

Reported error: "Input is too long for requested model" on a fresh chat after the tool fetched release data.

Additional Context

This affects user experience significantly as it can make Blink unusable for certain queries about repositories with extensive release histories.

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