mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-12 22:42:13 +02:00
style: simplify LLM model terminology in UI
This commit is contained in:
parent
d2cf3fb3b7
commit
000c2d9b5b
18 changed files with 32 additions and 32 deletions
|
|
@ -34,7 +34,7 @@ export const createNewLLMConfigMutationAtom = atomWithMutation((get) => {
|
|||
});
|
||||
},
|
||||
onError: (error: Error) => {
|
||||
toast.error(error.message || "Failed to create LLM model");
|
||||
toast.error(error.message || "Failed to create model");
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ export const defaultSystemInstructionsAtom = atomWithQuery(() => {
|
|||
});
|
||||
|
||||
/**
|
||||
* Query atom for the dynamic LLM model catalogue.
|
||||
* Query atom for the dynamic model catalogue.
|
||||
* Fetched from the backend (which proxies OpenRouter's public API).
|
||||
* Falls back to the static hardcoded list on error.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ export function ModelSelector({
|
|||
}}
|
||||
>
|
||||
<Plus className="size-4 text-primary" />
|
||||
<span className="text-sm font-medium">Add LLM Model</span>
|
||||
<span className="text-sm font-medium">Add Model</span>
|
||||
</Button>
|
||||
</div>
|
||||
</CommandList>
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
|
|||
onClick={openNewDialog}
|
||||
className="gap-2 bg-white text-black hover:bg-neutral-100 dark:bg-white dark:text-black dark:hover:bg-neutral-200"
|
||||
>
|
||||
Add LLM Model
|
||||
Add Model
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -252,11 +252,11 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
|
|||
<div>
|
||||
<Card className="border-0 bg-transparent shadow-none">
|
||||
<CardContent className="flex flex-col items-center justify-center py-10 md:py-16 text-center">
|
||||
<h3 className="text-sm md:text-base font-semibold mb-2">No LLM Models Yet</h3>
|
||||
<h3 className="text-sm md:text-base font-semibold mb-2">No Models Yet</h3>
|
||||
<p className="text-[11px] md:text-xs text-muted-foreground max-w-sm mb-4">
|
||||
{canCreate
|
||||
? "Add your first LLM model to power document summarization, chat, and other agent capabilities"
|
||||
: "No LLM models have been added to this space yet. Contact a space owner to add one"}
|
||||
? "Add your first model to power document summarization, chat, and other agent capabilities"
|
||||
: "No models have been added to this space yet. Contact a space owner to add one"}
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
@ -420,7 +420,7 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
|
|||
>
|
||||
<AlertDialogContent className="select-none">
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>Delete LLM Model</AlertDialogTitle>
|
||||
<AlertDialogTitle>Delete Model</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
Are you sure you want to delete{" "}
|
||||
<span className="font-semibold text-foreground">{configToDelete?.name}</span>? This
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ SurfSense uses [pytest](https://docs.pytest.org/) with two test layers: **unit**
|
|||
|
||||
- **PostgreSQL + pgvector** running locally (database `surfsense_test` will be used)
|
||||
- **`REGISTRATION_ENABLED=TRUE`** in your `.env` (this is the default)
|
||||
- A working LLM model with a valid API key in `global_llm_config.yaml` (for integration tests)
|
||||
- A working model with a valid API key in `global_llm_config.yaml` (for integration tests)
|
||||
|
||||
No Redis or Celery is required — integration tests use an inline task dispatcher.
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ export interface LLMModel {
|
|||
contextWindow?: string;
|
||||
}
|
||||
|
||||
// Comprehensive LLM models database organized by provider
|
||||
// Comprehensive models database organized by provider
|
||||
export const LLM_MODELS: LLMModel[] = [
|
||||
// OpenAI
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,14 +41,14 @@ export const liteLLMProviderEnum = z.enum([
|
|||
export type LiteLLMProvider = z.infer<typeof liteLLMProviderEnum>;
|
||||
|
||||
/**
|
||||
* NewLLMConfig - combines LLM model settings with prompt configuration
|
||||
* NewLLMConfig - combines model settings with prompt configuration
|
||||
*/
|
||||
export const newLLMConfig = z.object({
|
||||
id: z.number(),
|
||||
name: z.string().max(100),
|
||||
description: z.string().max(500).nullable().optional(),
|
||||
|
||||
// LLM Model Configuration
|
||||
// Model Configuration
|
||||
provider: liteLLMProviderEnum,
|
||||
custom_provider: z.string().max(100).nullable().optional(),
|
||||
model_name: z.string().max(100),
|
||||
|
|
@ -148,7 +148,7 @@ export const globalNewLLMConfig = z.object({
|
|||
name: z.string(),
|
||||
description: z.string().nullable().optional(),
|
||||
|
||||
// LLM Model Configuration (no api_key)
|
||||
// Model Configuration (no api_key)
|
||||
provider: z.string(), // String because YAML doesn't enforce enum, "AUTO" for Auto mode
|
||||
custom_provider: z.string().nullable().optional(),
|
||||
model_name: z.string(),
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class NewLLMConfigApiService {
|
|||
};
|
||||
|
||||
/**
|
||||
* Get the dynamic LLM model catalogue (sourced from OpenRouter API)
|
||||
* Get the dynamic model catalogue (sourced from OpenRouter API)
|
||||
*/
|
||||
getModels = async () => {
|
||||
return baseApiService.get(`/api/v1/models`, getModelListResponse);
|
||||
|
|
|
|||
|
|
@ -737,7 +737,7 @@
|
|||
"nav_general": "General",
|
||||
"nav_general_desc": "Name, description & basic info",
|
||||
"nav_agent_configs": "Agent Configs",
|
||||
"nav_agent_configs_desc": "LLM models with prompts & citations",
|
||||
"nav_agent_configs_desc": "Models with prompts & citations",
|
||||
"nav_role_assignments": "Role Assignments",
|
||||
"nav_role_assignments_desc": "Assign configs to agent roles",
|
||||
"nav_image_models": "Image Models",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue