From c065824d0275e16084139db2e062c087b31bdf5f Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Tue, 9 Dec 2025 08:11:58 +0000 Subject: [PATCH] feat: add get LLM configs request/response schemas --- .../contracts/types/llm-config.types.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/surfsense_web/contracts/types/llm-config.types.ts b/surfsense_web/contracts/types/llm-config.types.ts index 5095e3469..745817425 100644 --- a/surfsense_web/contracts/types/llm-config.types.ts +++ b/surfsense_web/contracts/types/llm-config.types.ts @@ -1,4 +1,5 @@ import { z } from "zod"; +import { paginationQueryParams } from "."; export const liteLLMProviderEnum = z.enum([ "OPENAI", @@ -85,9 +86,25 @@ export const createLLMConfigRequest = llmConfig.pick({ export const createLLMConfigResponse = llmConfig; +/** + * Get LLM configs + */ +export const getLLMConfigsRequest = z.object({ + queryParams: paginationQueryParams + .pick({ skip: true, limit: true }) + .extend({ + search_space_id: z.number().or(z.string()), + }) + .nullish(), +}); + +export const getLLMConfigsResponse = z.array(llmConfig); + export type LLMConfig = z.infer; export type LiteLLMProvider = z.infer; export type GlobalLLMConfig = z.infer; export type GetGlobalLLMConfigsResponse = z.infer; export type CreateLLMConfigRequest = z.infer; export type CreateLLMConfigResponse = z.infer; +export type GetLLMConfigsRequest = z.infer; +export type GetLLMConfigsResponse = z.infer;