Feat/anthropic beta#17647
Draft
eneufeld wants to merge 5 commits into
Draft
Conversation
155f3de to
ce21984
Compare
Provider-agnostic infrastructure for server-side compaction: - ai-core: `serverSideCompactionSupport` capability on model metadata (propagated to the frontend); `CompactionSettings` carried verbatim on the request; `resolveCompactionDefault` (global preference folded with the per-provider override) and the capability-gated `resolveServerSideCompaction`; the global `ai-features.serverSideCompaction` preference; opaque `CompactionResponsePart` / `CompactionMessage` marker types. - ai-chat: persisted `CompactionChatResponseContent` (+ deserializer), agent stream-to-content mapping, per-session `commonSettings.compaction` copied verbatim onto the request (the agent reads no preference). - ai-chat-ui: inline compaction marker renderer, token-usage tooltip (cumulative usage + "compacted Nx"), and the per-session tri-state control. - ai-ide / ai-copilot / ai-ollama: tolerate the compaction marker (ignore foreign-provider markers in Chat Completions / Ollama conversion). Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
Declare the capability (= useResponseApi), fold the global and per-provider preferences into the model's default enablement, enable `context_management` compaction on Responses requests when active, capture the streamed compaction item, and replay it via transcript prefix-drop. Chat Completions ignores it. Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
Declare the capability (Opus/Sonnet 4.6+ heuristic), fold the global and per-provider preferences into the model's default enablement, route active requests through the Beta Messages API with the compact-2026-01-12 beta and the compact_20260112 edit, capture the streamed compaction block, and replay it while keeping surrounding history. Default path unchanged. Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
Integrate Anthropic's memory tool (memory_20250818) into the Anthropic model provider. When enabled, models store and consult information across conversations in local memory files via the SDK's BetaLocalFilesystemMemoryTool. The tool is injected directly by the model (not a user-selectable tool provider) and gated by two preferences: `ai-features.anthropic.memoryTool` (on/off) and `ai-features.anthropic.memoryToolFolder` (storage folder, relative to the workspace root or absolute). Commands run directly on the backend, bypassing tool confirmation. When the memory tool or server-side compaction is active, requests route through the Beta Messages API; otherwise the stable path is unchanged. Session-scoped guidance is appended as a trailing (non-cached) system block. Also bumps @anthropic-ai/sdk to ^0.104.0, adds the @theia/workspace dependency, and adds tests for the executor and model integration.
ce21984 to
6f050a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Allows to activate two Anthropic features:
How to test
Follow-ups
Breaking changes
Attribution
Review checklist
nlsservice (for details, please see the Internationalization/Localization section in the Coding Guidelines)Reminder for reviewers