| 69 | buildApiHandler: vi.fn().mockImplementation((config) => { |
| 70 | // Return different model info based on the provider and model |
| 71 | const getModelInfo = () => { |
| 72 | if (config.apiProvider === "anthropic" && config.apiModelId === "claude-3-5-sonnet-20241022") { |
| 73 | return { |
| 74 | id: "claude-3-5-sonnet-20241022", |
| 75 | info: { |
| 76 | supportsReasoningBudget: true, |
| 77 | requiredReasoningBudget: true, |
| 78 | }, |
| 79 | } |
| 80 | } |
| 81 | // Default fallback |
| 82 | return { |
| 83 | id: config.apiModelId || "claude-sonnet-4-5", |
| 84 | info: { |
| 85 | supportsReasoningBudget: false, |
| 86 | requiredReasoningBudget: false, |
| 87 | }, |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | return { |
| 92 | getModel: vi.fn().mockReturnValue(getModelInfo()), |