Reapply "fix(ai): own Anthropic SSE parsing to avoid SDK JSON.parse hard-failures"

This reverts commit fc9220d2de.
This commit is contained in:
Mario Zechner
2026-04-21 23:42:19 +02:00
parent fc9220d2de
commit e58d631c89
12 changed files with 430 additions and 124 deletions

View File

@@ -229,7 +229,7 @@ describe("AI Providers Empty Message Tests", () => {
});
describe.skipIf(!process.env.ANTHROPIC_API_KEY)("Anthropic Provider Empty Messages", () => {
const llm = getModel("anthropic", "claude-3-5-haiku-20241022");
const llm = getModel("anthropic", "claude-haiku-4-5");
it("should handle empty content array", { retry: 3, timeout: 30000 }, async () => {
await testEmptyMessage(llm);
@@ -453,7 +453,7 @@ describe("AI Providers Empty Message Tests", () => {
// =========================================================================
describe("Anthropic OAuth Provider Empty Messages", () => {
const llm = getModel("anthropic", "claude-3-5-haiku-20241022");
const llm = getModel("anthropic", "claude-haiku-4-5");
it.skipIf(!anthropicOAuthToken)("should handle empty content array", { retry: 3, timeout: 30000 }, async () => {
await testEmptyMessage(llm, { apiKey: anthropicOAuthToken });