fix(web): correct Add Provider form to match fleet-settings DTO (#626)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #626.
This commit is contained in:
2026-03-01 20:00:50 +00:00
committed by jason.woltje
parent 3607554902
commit e898551814
3 changed files with 40 additions and 40 deletions

View File

@@ -34,25 +34,27 @@ describe("createFleetProvider", (): void => {
vi.mocked(client.apiPost).mockResolvedValueOnce({ id: "provider-1" } as never);
await createFleetProvider({
providerType: "openai",
name: "openai-main",
displayName: "OpenAI Main",
config: {
endpoint: "https://api.openai.com/v1",
apiKey: "sk-test",
models: ["gpt-4.1-mini", "gpt-4o-mini"],
},
isEnabled: true,
type: "openai",
baseUrl: "https://api.openai.com/v1",
apiKey: "sk-test",
models: [
{ id: "gpt-4.1-mini", name: "gpt-4.1-mini" },
{ id: "gpt-4o-mini", name: "gpt-4o-mini" },
],
});
expect(client.apiPost).toHaveBeenCalledWith("/api/fleet-settings/providers", {
providerType: "openai",
name: "openai-main",
displayName: "OpenAI Main",
config: {
endpoint: "https://api.openai.com/v1",
apiKey: "sk-test",
models: ["gpt-4.1-mini", "gpt-4o-mini"],
},
isEnabled: true,
type: "openai",
baseUrl: "https://api.openai.com/v1",
apiKey: "sk-test",
models: [
{ id: "gpt-4.1-mini", name: "gpt-4.1-mini" },
{ id: "gpt-4o-mini", name: "gpt-4o-mini" },
],
});
});
});