fix(ai): Deduplicate models and add Anthropic aliases
- Add proper Anthropic model aliases (claude-opus-4-1, claude-sonnet-4-0, etc.) - Deduplicate models when same ID appears in both models.dev and OpenRouter - models.dev takes priority over OpenRouter for duplicate IDs - Fix test to use correct claude-3-5-haiku-latest alias - Reduces Anthropic models from 11 to 10 (removed duplicate)
This commit is contained in:
@@ -538,4 +538,32 @@ describe("AI Providers E2E Tests", () => {
|
||||
await multiTurn(llm, {reasoningEffort: "medium"});
|
||||
});
|
||||
});
|
||||
|
||||
describe.skipIf(!process.env.ANTHROPIC_API_KEY)("Anthropic Provider (Haiku 3.5)", () => {
|
||||
let llm: AnthropicLLM;
|
||||
|
||||
beforeAll(() => {
|
||||
llm = createLLM("anthropic", "claude-3-5-haiku-latest");
|
||||
});
|
||||
|
||||
it("should complete basic text generation", async () => {
|
||||
await basicTextGeneration(llm);
|
||||
});
|
||||
|
||||
it("should handle tool calling", async () => {
|
||||
await handleToolCall(llm);
|
||||
});
|
||||
|
||||
it("should handle streaming", async () => {
|
||||
await handleStreaming(llm);
|
||||
});
|
||||
|
||||
it("should handle thinking mode", async () => {
|
||||
await handleThinking(llm, {thinking: {enabled: true}}, false);
|
||||
});
|
||||
|
||||
it("should handle multi-turn with thinking and tools", async () => {
|
||||
await multiTurn(llm, {thinking: {enabled: true}});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user