Skip to content

Allow users to configure the autoCondenseContext threshold #3672

@canrobins13

Description

@canrobins13

What problem does this proposed feature solve?

Currently the autoCondenseContext experimental feature is run when the context window is almost full. Some users might be more cost savvy or have other reasons to condense the context window more aggressively. We could allow users to configure this threshold to run condense operations earlier (e.g. 50%)

Describe the proposed solution in detail

Add a configuration option for the autoCondenseContext threshold. If this threshold of the context window is reached, we run the condense operation.

Technical considerations or implementation details (optional)

Currently summarizeConversation is called in the truncateConversationIfNeeded in sliding-window/index.ts. The logic there to check if the context window is full is a little convoluted; we could add an earlier and simpler check against the new configured threshold.

Describe alternatives considered (if any)

A manual trigger is proposed here: #3671 but I think both would be good

Additional Context & Mockups

No response

Proposal Checklist

  • I have searched existing Issues and Discussions to ensure this proposal is not a duplicate.
  • This proposal is for a specific, actionable change intended for implementation (not a general idea).
  • I understand that this proposal requires review and approval before any development work begins.

Are you interested in implementing this feature if approved?

  • Yes, I would like to contribute to implementing this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions