🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
feat(llm-connections): default and custom models for TypeSafe connections (#17881)
Hassieb Pakzaddab0b84f4cca
diff --git a/packages/shared/src/server/llm/types.ts b/packages/shared/src/server/llm/types.tsindex 15d5aaab69..76391febbf 100644--- a/packages/shared/src/server/llm/types.ts+++ b/packages/shared/src/server/llm/types.ts@@ -472,7 +472,7 @@ export const googleAIStudioModels = ["gemini-1.5-flash-8b",] as const;-export const typeSafeModels = ["jev-1.13.0", "jev-latest"] as const;+export const typeSafeModels = ["jev-latest"] as const;/*** Providers that serve Jev through TypeSafe's `/v1/systemone` API. A TypeSafediff --git a/web/src/features/public-api/components/CreateLLMApiKeyForm.tsx b/web/src/features/public-api/components/CreateLLMApiKeyForm.tsxindex 67914765a3..88235d8ced 100644--- a/web/src/features/public-api/components/CreateLLMApiKeyForm.tsx+++ b/web/src/features/public-api/components/CreateLLMApiKeyForm.tsx@@ -417,7 +417,8 @@ export function CreateLLMApiKeyForm({adapter === LLMAdapter.OpenAI ||adapter === LLMAdapter.Anthropic ||adapter === LLMAdapter.VertexAI ||- adapter === LLMAdapter.GoogleAIStudio;+ adapter === LLMAdapter.GoogleAIStudio ||+ adapter === LLMAdapter.TypeSafe;const { fields, append, remove } = useFieldArray({control: form.control,@@ -1306,10 +1307,8 @@ export function CreateLLMApiKeyForm({{isCustomModelsRequired(currentAdapter) &&renderCustomModelsField()}- {/* Extra headers - main section for adapters without advanced settings */}- {[LLMAdapter.Azure, LLMAdapter.TypeSafe].includes(- currentAdapter,- ) && renderExtraHeadersField()}+ {/* Extra headers - show for Azure in main section (Azure has no advanced settings) */}+ {currentAdapter === LLMAdapter.Azure && renderExtraHeadersField()}{hasAdvancedSettings(currentAdapter) && (<div className="flex items-center">@@ -1336,37 +1335,39 @@ export function CreateLLMApiKeyForm({{hasAdvancedSettings(currentAdapter) && showAdvancedSettings && (<div className="space-y-4 border-t pt-4">- {/* baseURL */}- <FormField- control={form.control}- name="baseURL"- render={({ field }) => (- <FormItem>- <FormLabel>API Base URL</FormLabel>- <FormDescription>- Leave blank to use the default base URL for the given- LLM adapter.{" "}- {currentAdapter === LLMAdapter.OpenAI && (- <span>- OpenAI default: https://api.openai.com/v1- </span>- )}- {currentAdapter === LLMAdapter.Anthropic && (- <span>- Anthropic default: https://api.anthropic.com- (excluding /v1/messages)- </span>- )}- </FormDescription>+ {/* baseURL: TypeSafe sets it through the upstream cards */}+ {currentAdapter !== LLMAdapter.TypeSafe && (+ <FormField+ control={form.control}+ name="baseURL"+ render={({ field }) => (+ <FormItem>+ <FormLabel>API Base URL</FormLabel>+ <FormDescription>+ Leave blank to use the default base URL for the+ given LLM adapter.{" "}+ {currentAdapter === LLMAdapter.OpenAI && (+ <span>+ OpenAI default: https://api.openai.com/v1+ </span>+ )}+ {currentAdapter === LLMAdapter.Anthropic && (+ <span>+ Anthropic default: https://api.anthropic.com+ (excluding /v1/messages)+ </span>+ )}+ </FormDescription>- <FormControl>- <Input {...field} placeholder="default" />- </FormControl>+ <FormControl>+ <Input {...field} placeholder="default" />+ </FormControl>- <FormMessage />- </FormItem>- )}- />+ <FormMessage />+ </FormItem>+ )}+ />+ )}{/* VertexAI Location */}{currentAdapter === LLMAdapter.VertexAI && (@@ -1422,9 +1423,11 @@ export function CreateLLMApiKeyForm({)}{/* Extra Headers */}- {[LLMAdapter.OpenAI, LLMAdapter.Anthropic].includes(- currentAdapter,- ) && renderExtraHeadersField()}+ {[+ LLMAdapter.OpenAI,+ LLMAdapter.Anthropic,+ LLMAdapter.TypeSafe,+ ].includes(currentAdapter) && renderExtraHeadersField()}{/* With default models */}<FormField