fix(web): correct Add Provider form to match fleet-settings DTO (#626)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
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:
@@ -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" },
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -16,16 +16,13 @@ export interface FleetProvider {
|
||||
}
|
||||
|
||||
export interface CreateFleetProviderRequest {
|
||||
providerType: "ollama" | "openai" | "claude";
|
||||
name: string;
|
||||
displayName: string;
|
||||
config: {
|
||||
endpoint?: string;
|
||||
apiKey?: string;
|
||||
models?: string[];
|
||||
timeout?: number;
|
||||
};
|
||||
isDefault?: boolean;
|
||||
isEnabled?: boolean;
|
||||
type: string;
|
||||
baseUrl?: string;
|
||||
apiKey?: string;
|
||||
apiType?: string;
|
||||
models?: FleetProviderModel[];
|
||||
}
|
||||
|
||||
export interface UpdateFleetProviderRequest {
|
||||
|
||||
Reference in New Issue
Block a user