diff --git a/frontend/src/app/modules/agents/services/llm.service.spec.ts b/frontend/src/app/modules/agents/services/llm.service.spec.ts index 745edbda..357911d2 100644 --- a/frontend/src/app/modules/agents/services/llm.service.spec.ts +++ b/frontend/src/app/modules/agents/services/llm.service.spec.ts @@ -1,10 +1,9 @@ import { TestBed } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { LlmService, LLM } from './llm.service'; -import {environment} from "../../../../environments/environment"; -const LLM_LIST_API_URL = `${environment.apiBaseUrl}llms/list`; +const LLM_LIST_API_URL = `/api/llms/list`; describe('LlmService', () => { let service: LlmService; diff --git a/src/llm/services/mock-llm.ts b/src/llm/services/mock-llm.ts index 41769b21..af16cfcb 100644 --- a/src/llm/services/mock-llm.ts +++ b/src/llm/services/mock-llm.ts @@ -121,14 +121,15 @@ export class MockLLM extends BaseLLM { } } +export const mockLLM = new MockLLM(); + export function mockLLMRegistry(): Record LLM> { return { - 'mock:mock': () => new MockLLM(), + // Tests need the same instance returned + 'mock:mock': () => mockLLM, }; } -export const mockLLM = new MockLLM(); - export function mockLLMs(): AgentLLMs { return { easy: mockLLM,