Skip to content

Commit 4319335

Browse files
auto apply header
1 parent 1cc168b commit 4319335

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

libs/providers/langchain-anthropic/src/tools/memory.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ import type { MemoryTool20250818Options } from "./types.js";
1616
* import { ChatAnthropic, memory_20250818 } from "@langchain/anthropic";
1717
*
1818
* const llm = new ChatAnthropic({
19-
* model: "claude-sonnet-4-5-20250929",
20-
* clientOptions: {
21-
* defaultHeaders: {
22-
* "anthropic-beta": "context-management-2025-06-27",
23-
* },
24-
* },
19+
* model: "claude-sonnet-4-5-20250929"
2520
* });
2621
*
2722
* const memory = memory_20250818({

libs/providers/langchain-anthropic/src/tools/tests/memory.int.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,6 @@ class MockMemoryFileSystem {
168168
const createModel = () =>
169169
new ChatAnthropic({
170170
model: "claude-sonnet-4-5-20250929",
171-
clientOptions: {
172-
defaultHeaders: {
173-
"anthropic-beta": "context-management-2025-06-27",
174-
},
175-
},
176171
});
177172

178173
describe("Anthropic Memory Tool Integration Tests", () => {

libs/providers/langchain-anthropic/src/utils/tools.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ export const AnthropicToolExtrasSchema = z.object({
5353
export const ANTHROPIC_TOOL_BETAS: Record<string, string> = {
5454
tool_search_tool_regex_20251119: "advanced-tool-use-2025-11-20",
5555
tool_search_tool_bm25_20251119: "advanced-tool-use-2025-11-20",
56+
memory_20250818: "context-management-2025-06-27",
5657
};

0 commit comments

Comments
 (0)