fix(confidence-engine): retain successful provider path
This commit is contained in:
@@ -14,7 +14,7 @@ describe("OllamaLlmProvider chat capability detection", () => {
|
||||
|
||||
try {
|
||||
const { getProvider } = await import("@/lib/llm/provider.js");
|
||||
await getProvider().generateReconstruction("prompt", "configured-model");
|
||||
const result = await getProvider().generateReconstruction("prompt", "configured-model");
|
||||
|
||||
expect(JSON.parse(fetchSpy.mock.calls[0][1].body)).toMatchObject({
|
||||
model: "configured-model",
|
||||
@@ -23,6 +23,10 @@ describe("OllamaLlmProvider chat capability detection", () => {
|
||||
expect(fetchSpy.mock.calls[0][0]).toBe("http://ollama.test/api/chat");
|
||||
expect(fetchSpy.mock.calls[1][0]).toBe("http://ollama.test/api/chat");
|
||||
expect(fetchSpy.mock.calls[1][0]).not.toContain("/api/generate");
|
||||
expect(result).toMatchObject({
|
||||
response: {},
|
||||
providerApiPath: "/api/chat",
|
||||
});
|
||||
} finally {
|
||||
vi.unstubAllGlobals();
|
||||
if (originalBaseUrl === undefined) delete process.env.OLLAMA_BASE_URL;
|
||||
|
||||
Reference in New Issue
Block a user