fix(ai): ignore unknown anthropic sse events

closes #3708
This commit is contained in:
Mario Zechner
2026-04-25 16:57:03 +02:00
parent 953f89fbe9
commit 3e7ffff184
9 changed files with 99 additions and 13 deletions

View File

@@ -72,7 +72,7 @@ describe("lazy provider module loading", () => {
it("loads only the Anthropic SDK when calling the root lazy wrapper", () => {
const result = runProbe(`
const model = {
id: "claude-sonnet-4-20250514",
id: "claude-sonnet-4-6",
name: "Claude Sonnet 4",
api: "anthropic-messages",
provider: "anthropic",
@@ -92,7 +92,7 @@ describe("lazy provider module loading", () => {
it("loads only the Anthropic SDK when dispatching through streamSimple", () => {
const result = runProbe(`
const model = mod.getModel("anthropic", "claude-sonnet-4-20250514");
const model = mod.getModel("anthropic", "claude-sonnet-4-6");
const context = { messages: [{ role: "user", content: "hi" }] };
await mod.streamSimple(model, context).result();
`);