Skip to content

feat(adapters): improved context management#3040

Closed
olimorris wants to merge 7 commits intomainfrom
feat/context-management
Closed

feat(adapters): improved context management#3040
olimorris wants to merge 7 commits intomainfrom
feat/context-management

Conversation

@olimorris
Copy link
Copy Markdown
Owner

@olimorris olimorris commented Apr 16, 2026

Description

This PR will add the ability for CodeCompanion to manage context when it approaches a token value or context window percentage. This should prevent chats from becoming unusable or context rot setting in.

TBU.

Summary of changes

  • Anthropic: The adapter has been overhauled to include much larger max_tokens parameters as well as conform to various changes that Anthropic brought in with the 4.6 models

AI Usage

None

Related Issue(s)

Screenshots

Checklist

  • I've read the contributing guidelines and have adhered to them in this PR
  • I confirm that this PR has been majority created by me, and not AI (unless stated in the "AI Usage" section above)
  • I've run make all to ensure docs are generated, tests pass and StyLua has formatted the code
  • (optional) I've added test coverage for this fix/feature
  • (optional) I've updated the README and/or relevant docs pages

@olimorris
Copy link
Copy Markdown
Owner Author

olimorris commented Apr 16, 2026

@copilot resolve the merge conflicts in this pull request

Nice one Copilot:

2026-04-16 17_20_54 - Google Chrome@2x

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 16, 2026

Deploying codecompanion with  Cloudflare Pages  Cloudflare Pages

Latest commit: 50d24b2
Status: ✅  Deploy successful!
Preview URL: https://f93705b2.codecompanion.pages.dev
Branch Preview URL: https://feat-context-management.codecompanion.pages.dev

View logs

@olimorris olimorris closed this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant