Skip to content

Commit 02210a1

Browse files
authored
chore(anthropic): add temperature test (#9363)
1 parent b401680 commit 02210a1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,6 +1518,18 @@ describe("Sonnet 4.5", () => {
15181518

15191519
expect(response.content.length).toBeGreaterThan(0);
15201520
});
1521+
1522+
// https://github.com/langchain-ai/langchainjs/issues/9258
1523+
it("works when passing topP arg", async () => {
1524+
const model = new ChatAnthropic({
1525+
model: "claude-sonnet-4-5-20250929",
1526+
topP: 0.99,
1527+
});
1528+
const response = await model.invoke(
1529+
"Please respond to this message simply with: Hello"
1530+
);
1531+
expect(response.content.length).toBeGreaterThan(0);
1532+
});
15211533
});
15221534

15231535
it("won't modify structured output content if outputVersion is set", async () => {

0 commit comments

Comments
 (0)