mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat: add useApiSettings hook for managing API settings, including providers, endpoints, cache, and model pools
- Implemented hooks for CRUD operations on providers and endpoints. - Added cache management hooks for cache stats and settings. - Introduced model pool management hooks for high availability and load balancing. - Created localization files for English and Chinese translations of API settings.
This commit is contained in:
335
ccw/frontend/src/locales/en/api-settings.json
Normal file
335
ccw/frontend/src/locales/en/api-settings.json
Normal file
@@ -0,0 +1,335 @@
|
||||
{
|
||||
"title": "API Settings",
|
||||
"description": "Manage LiteLLM providers, endpoints, cache settings, and model pools",
|
||||
"tabs": {
|
||||
"providers": "Providers",
|
||||
"endpoints": "Endpoints",
|
||||
"cache": "Cache",
|
||||
"modelPools": "Model Pools",
|
||||
"cliSettings": "CLI Settings"
|
||||
},
|
||||
"providers": {
|
||||
"title": "Providers",
|
||||
"description": "Configure API provider credentials and multi-key settings",
|
||||
"stats": {
|
||||
"total": "Total Providers",
|
||||
"enabled": "Enabled"
|
||||
},
|
||||
"actions": {
|
||||
"add": "Add Provider",
|
||||
"edit": "Edit Provider",
|
||||
"delete": "Delete Provider",
|
||||
"test": "Test Connection",
|
||||
"multiKeySettings": "Multi-Key Settings",
|
||||
"syncToCodexLens": "Sync to CodexLens",
|
||||
"manageModels": "Manage Models",
|
||||
"addModel": "Add Model"
|
||||
},
|
||||
"deleteConfirm": "Are you sure you want to delete the provider \"{name}\"?",
|
||||
"emptyState": {
|
||||
"title": "No Providers Found",
|
||||
"message": "Add a provider to configure API credentials and models."
|
||||
},
|
||||
"apiFormat": "API Format",
|
||||
"openaiCompatible": "OpenAI Compatible",
|
||||
"customFormat": "Custom Format",
|
||||
"apiFormatHint": "Most providers use OpenAI-compatible format",
|
||||
"displayName": "Display Name",
|
||||
"apiKey": "API Key",
|
||||
"useEnvVar": "Use environment variable (e.g., ${OPENAI_API_KEY})",
|
||||
"apiBaseUrl": "API Base URL",
|
||||
"preview": "Preview",
|
||||
"enableProvider": "Enable this provider",
|
||||
"advancedSettings": "Advanced Settings",
|
||||
"timeout": "Timeout",
|
||||
"timeoutHint": "Request timeout in seconds (default: 300)",
|
||||
"maxRetries": "Max Retries",
|
||||
"organization": "Organization",
|
||||
"organizationHint": "OpenAI-specific organization ID",
|
||||
"apiVersion": "API Version",
|
||||
"apiVersionHint": "Azure-specific API version (e.g., 2024-02-01)",
|
||||
"rpm": "RPM",
|
||||
"tpm": "TPM",
|
||||
"unlimited": "Unlimited",
|
||||
"proxy": "Proxy URL",
|
||||
"customHeaders": "Custom Headers",
|
||||
"customHeadersHint": "JSON format, e.g., {\"X-Custom\": \"value\"}",
|
||||
"testConnection": "Test Connection",
|
||||
"connectionSuccess": "Connection successful",
|
||||
"connectionFailed": "Connection failed",
|
||||
"addProviderFirst": "Please add a provider first",
|
||||
"saveProviderFirst": "Please save the provider first",
|
||||
"llmModels": "LLM Models",
|
||||
"embeddingModels": "Embedding Models",
|
||||
"rerankerModels": "Reranker Models",
|
||||
"noModels": "No models configured for this provider",
|
||||
"selectProvider": "Select Provider",
|
||||
"selectProviderHint": "Choose a provider to view and manage their models",
|
||||
"modelSettings": "Model Settings",
|
||||
"deleteModel": "Delete Model",
|
||||
"multiKeySettings": "Multi-Key Settings",
|
||||
"keyLabel": "Key Label",
|
||||
"keyValue": "Key Value",
|
||||
"keyWeight": "Weight",
|
||||
"routingStrategy": "Routing Strategy",
|
||||
"healthCheck": "Health Check",
|
||||
"healthStatus": "Health Status",
|
||||
"lastCheck": "Last check",
|
||||
"lastError": "Last error",
|
||||
"lastLatency": "Latency",
|
||||
"cooldown": "Cooldown",
|
||||
"consecutiveFailures": "Failures",
|
||||
"inCooldown": "In cooldown",
|
||||
"healthy": "Healthy",
|
||||
"unhealthy": "Unhealthy",
|
||||
"unknown": "Unknown",
|
||||
"justNow": "just now",
|
||||
"minutesAgo": "m ago",
|
||||
"hoursAgo": "h ago",
|
||||
"daysAgo": "d ago",
|
||||
"seconds": "seconds",
|
||||
"testKey": "Test Key",
|
||||
"addKey": "Add Key",
|
||||
"enableKey": "Enable",
|
||||
"disableKey": "Disable",
|
||||
"deleteKey": "Delete Key",
|
||||
"simpleShuffle": "Simple Shuffle",
|
||||
"weighted": "Weighted",
|
||||
"latencyBased": "Latency Based",
|
||||
"costBased": "Cost Based",
|
||||
"leastBusy": "Least Busy",
|
||||
"enableHealthCheck": "Enable health checks",
|
||||
"checkInterval": "Check interval (seconds)",
|
||||
"cooldownPeriod": "Cooldown period (seconds)",
|
||||
"failureThreshold": "Failure threshold",
|
||||
"addLlmModel": "Add LLM Model",
|
||||
"addEmbeddingModel": "Add Embedding Model",
|
||||
"addRerankerModel": "Add Reranker Model",
|
||||
"selectFromPresets": "Select from presets",
|
||||
"customModel": "Custom model...",
|
||||
"modelId": "Model ID",
|
||||
"modelName": "Model Name",
|
||||
"modelSeries": "Model Series",
|
||||
"contextWindow": "Context Window",
|
||||
"capabilities": "Capabilities",
|
||||
"streaming": "Streaming",
|
||||
"functionCalling": "Function Calling",
|
||||
"vision": "Vision",
|
||||
"embeddingMaxTokens": "Max Tokens",
|
||||
"rerankerTopK": "Top K",
|
||||
"rerankerTopKHint": "Number of results to return",
|
||||
"embeddingDimensions": "Dimensions",
|
||||
"description": "Description",
|
||||
"optional": "Optional",
|
||||
"modelIdExists": "Model ID already exists",
|
||||
"useModelTreeToManage": "Use provider card to manage models",
|
||||
"endpointPreview": "Endpoint Preview",
|
||||
"modelBaseUrlOverride": "Base URL Override",
|
||||
"modelBaseUrlHint": "Override base URL for this model",
|
||||
"basicInfo": "Basic Information",
|
||||
"endpointSettings": "Endpoint Settings",
|
||||
"apiBaseUpdated": "Base URL updated"
|
||||
},
|
||||
"endpoints": {
|
||||
"title": "Endpoints",
|
||||
"description": "Configure custom API endpoints with caching strategies",
|
||||
"stats": {
|
||||
"totalEndpoints": "Total Endpoints",
|
||||
"cachedEndpoints": "Cached Endpoints"
|
||||
},
|
||||
"actions": {
|
||||
"add": "Add Endpoint",
|
||||
"edit": "Edit Endpoint",
|
||||
"delete": "Delete Endpoint",
|
||||
"enable": "Enable",
|
||||
"disable": "Disable"
|
||||
},
|
||||
"deleteConfirm": "Are you sure you want to delete the endpoint \"{id}\"?",
|
||||
"emptyState": {
|
||||
"title": "No Endpoints Found",
|
||||
"message": "Add an endpoint to configure custom API mappings."
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"endpointIdHint": "Unique CLI identifier (e.g., my-gpt4o)",
|
||||
"name": "Name",
|
||||
"provider": "Provider",
|
||||
"model": "Model",
|
||||
"noModelsConfigured": "No models configured for this provider",
|
||||
"selectModel": "Select a model...",
|
||||
"cacheStrategy": "Cache Strategy",
|
||||
"enableContextCaching": "Enable context caching",
|
||||
"cacheTTL": "Cache TTL (minutes)",
|
||||
"cacheMaxSize": "Max Size (KB)",
|
||||
"autoCachePatterns": "Auto-cache patterns",
|
||||
"filePatternsHint": "Comma-separated glob patterns (e.g., *.md,*.ts)",
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled",
|
||||
"noEndpoints": "No Endpoints Configured",
|
||||
"noEndpointsHint": "Add an endpoint to create custom API mappings with caching.",
|
||||
"providerBased": "Provider-based",
|
||||
"direct": "Direct",
|
||||
"off": "Off"
|
||||
},
|
||||
"cache": {
|
||||
"title": "Cache",
|
||||
"description": "Manage global cache settings and view cache statistics",
|
||||
"settings": {
|
||||
"title": "Cache Settings",
|
||||
"globalCache": "Global Cache",
|
||||
"enableGlobalCaching": "Enable global caching",
|
||||
"cacheDirectory": "Cache directory",
|
||||
"maxSize": "Max total size (MB)",
|
||||
"cacheUsage": "Cache usage",
|
||||
"cacheEntries": "Cache entries",
|
||||
"cacheSize": "Cache size",
|
||||
"used": "used",
|
||||
"total": "total",
|
||||
"actions": "Cache Actions",
|
||||
"clearCache": "Clear Cache",
|
||||
"confirmClearCache": "Are you sure you want to clear the cache? This will remove all cached entries."
|
||||
},
|
||||
"statistics": {
|
||||
"title": "Cache Statistics",
|
||||
"cachedEntries": "Cached Entries",
|
||||
"storageUsed": "Storage Used",
|
||||
"totalSize": "Total Size"
|
||||
},
|
||||
"actions": {
|
||||
"clear": "Clear Cache",
|
||||
"confirmClear": "Are you sure you want to clear the cache?"
|
||||
},
|
||||
"messages": {
|
||||
"cacheCleared": "Cache cleared",
|
||||
"cacheSettingsUpdated": "Cache settings updated"
|
||||
}
|
||||
},
|
||||
"modelPools": {
|
||||
"title": "Model Pools",
|
||||
"description": "Configure model pools for high availability and load balancing",
|
||||
"stats": {
|
||||
"total": "Total Pools",
|
||||
"enabled": "Enabled"
|
||||
},
|
||||
"actions": {
|
||||
"add": "Add Model Pool",
|
||||
"edit": "Edit Model Pool",
|
||||
"delete": "Delete Model Pool",
|
||||
"autoDiscover": "Auto-Discover"
|
||||
},
|
||||
"deleteConfirm": "Are you sure you want to delete the model pool \"{name}\"?",
|
||||
"emptyState": {
|
||||
"title": "No Model Pools Found",
|
||||
"message": "Add a model pool to enable high availability and load balancing."
|
||||
},
|
||||
"modelType": "Model Type",
|
||||
"embedding": "Embedding",
|
||||
"llm": "LLM",
|
||||
"reranker": "Reranker",
|
||||
"targetModel": "Target Model",
|
||||
"selectTargetModel": "Select target model...",
|
||||
"strategy": "Strategy",
|
||||
"roundRobin": "Round Robin",
|
||||
"latencyAware": "Latency Aware",
|
||||
"weightedRandom": "Weighted Random",
|
||||
"poolEnabled": "Pool Enabled",
|
||||
"autoDiscover": "Auto-discover providers",
|
||||
"excludedProviders": "Excluded Providers",
|
||||
"defaultCooldown": "Default Cooldown (s)",
|
||||
"defaultConcurrent": "Default Concurrent",
|
||||
"discoveredProviders": "Discovered Providers",
|
||||
"excludeProvider": "Exclude",
|
||||
"includeProvider": "Include",
|
||||
"noProvidersFound": "No providers found offering this model",
|
||||
"poolSaved": "Model pool saved",
|
||||
"embeddingPoolDesc": "Configure model pools for high availability and load balancing across multiple providers",
|
||||
"embeddingPool": "Embedding Pool",
|
||||
"discovered": "Discovered",
|
||||
"providers": "providers"
|
||||
},
|
||||
"cliSettings": {
|
||||
"title": "CLI Settings",
|
||||
"description": "Configure CLI tool settings and modes",
|
||||
"stats": {
|
||||
"total": "Total Settings",
|
||||
"enabled": "Enabled"
|
||||
},
|
||||
"actions": {
|
||||
"add": "Add CLI Settings",
|
||||
"edit": "Edit CLI Settings",
|
||||
"delete": "Delete CLI Settings"
|
||||
},
|
||||
"deleteConfirm": "Are you sure you want to delete the CLI settings \"{name}\"?",
|
||||
"emptyState": {
|
||||
"title": "No CLI Settings Found",
|
||||
"message": "Add CLI settings to configure tool-specific options."
|
||||
},
|
||||
"mode": "Mode",
|
||||
"providerBased": "Provider-based",
|
||||
"direct": "Direct",
|
||||
"authToken": "Auth Token",
|
||||
"baseUrl": "Base URL",
|
||||
"model": "Model"
|
||||
},
|
||||
"ccwLitellm": {
|
||||
"title": "CCW-LiteLLM Package",
|
||||
"description": "Manage ccw-litellm Python package installation",
|
||||
"status": {
|
||||
"installed": "Installed",
|
||||
"notInstalled": "Not Installed",
|
||||
"version": "Version"
|
||||
},
|
||||
"actions": {
|
||||
"install": "Install",
|
||||
"uninstall": "Uninstall",
|
||||
"refreshStatus": "Refresh Status"
|
||||
},
|
||||
"messages": {
|
||||
"installSuccess": "ccw-litellm installed successfully",
|
||||
"installFailed": "Failed to install ccw-litellm",
|
||||
"uninstallSuccess": "ccw-litellm uninstalled successfully",
|
||||
"uninstallFailed": "Failed to uninstall ccw-litellm"
|
||||
}
|
||||
},
|
||||
"common": {
|
||||
"save": "Save",
|
||||
"cancel": "Cancel",
|
||||
"confirm": "Confirm",
|
||||
"delete": "Delete",
|
||||
"edit": "Edit",
|
||||
"add": "Add",
|
||||
"close": "Close",
|
||||
"loading": "Loading...",
|
||||
"error": "Error",
|
||||
"success": "Success",
|
||||
"warning": "Warning",
|
||||
"optional": "Optional",
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled",
|
||||
"searchPlaceholder": "Search...",
|
||||
"noResults": "No results found",
|
||||
"actions": "Actions",
|
||||
"name": "Name",
|
||||
"description": "Description",
|
||||
"type": "Type",
|
||||
"status": "Status"
|
||||
},
|
||||
"messages": {
|
||||
"settingsSaved": "Settings saved successfully",
|
||||
"settingsDeleted": "Settings deleted successfully",
|
||||
"providerSaved": "Provider saved successfully",
|
||||
"providerDeleted": "Provider deleted successfully",
|
||||
"providerUpdated": "Provider updated successfully",
|
||||
"endpointSaved": "Endpoint saved successfully",
|
||||
"endpointDeleted": "Endpoint deleted successfully",
|
||||
"confirmDeleteProvider": "Are you sure you want to delete this provider?",
|
||||
"confirmDeleteEndpoint": "Are you sure you want to delete this endpoint?",
|
||||
"confirmClearCache": "Are you sure you want to clear the cache?",
|
||||
"invalidJsonHeaders": "Invalid JSON format for custom headers",
|
||||
"failedToLoad": "Failed to load data",
|
||||
"noProviders": "No Providers",
|
||||
"noProvidersHint": "Add a provider to get started with API configuration.",
|
||||
"noEndpoints": "No Endpoints",
|
||||
"noEndpointsHint": "Add an endpoint to create custom API mappings.",
|
||||
"configSynced": "Configuration synced to YAML file"
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@
|
||||
"overview": "Overview",
|
||||
"settings": "Settings",
|
||||
"models": "Models",
|
||||
"search": "Search",
|
||||
"advanced": "Advanced"
|
||||
},
|
||||
"overview": {
|
||||
@@ -46,6 +47,19 @@
|
||||
"lastCheck": "Last Check Time"
|
||||
}
|
||||
},
|
||||
"index": {
|
||||
"operationComplete": "Index Operation Complete",
|
||||
"operationFailed": "Index Operation Failed",
|
||||
"noProject": "No Project Selected",
|
||||
"noProjectDesc": "Please open a project to perform index operations.",
|
||||
"starting": "Starting index operation...",
|
||||
"cancelFailed": "Failed to cancel operation",
|
||||
"unknownError": "An unknown error occurred",
|
||||
"complete": "Complete",
|
||||
"failed": "Failed",
|
||||
"cancelled": "Cancelled",
|
||||
"inProgress": "In Progress"
|
||||
},
|
||||
"settings": {
|
||||
"currentCount": "Current Index Count",
|
||||
"currentWorkers": "Current Workers",
|
||||
@@ -114,6 +128,8 @@
|
||||
"advanced": {
|
||||
"warningTitle": "Sensitive Operations Warning",
|
||||
"warningMessage": "Modifying environment variables may affect CodexLens operation. Ensure you understand each variable's purpose.",
|
||||
"loadError": "Failed to load environment variables",
|
||||
"loadErrorDesc": "Unable to fetch environment configuration. Please check if CodexLens is properly installed.",
|
||||
"currentVars": "Current Environment Variables",
|
||||
"settingsVars": "Settings Variables",
|
||||
"customVars": "Custom Variables",
|
||||
@@ -170,9 +186,35 @@
|
||||
"title": "CodexLens Not Installed",
|
||||
"description": "Please install CodexLens to use model management features."
|
||||
},
|
||||
"error": {
|
||||
"title": "Failed to load models",
|
||||
"description": "Unable to fetch model list. Please check if CodexLens is properly installed."
|
||||
},
|
||||
"empty": {
|
||||
"title": "No models found",
|
||||
"description": "Try adjusting your search or filter criteria"
|
||||
"description": "No models are available. Try downloading models from the list.",
|
||||
"filtered": "No models match your filter",
|
||||
"filteredDesc": "Try adjusting your search or filter criteria"
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"type": "Search Type",
|
||||
"content": "Content Search",
|
||||
"files": "File Search",
|
||||
"symbol": "Symbol Search",
|
||||
"mode": "Mode",
|
||||
"mode.semantic": "Semantic (default)",
|
||||
"mode.exact": "Exact (FTS)",
|
||||
"mode.fuzzy": "Fuzzy",
|
||||
"query": "Query",
|
||||
"queryPlaceholder": "Enter search query...",
|
||||
"button": "Search",
|
||||
"searching": "Searching...",
|
||||
"results": "Results",
|
||||
"resultsCount": "results",
|
||||
"notInstalled": {
|
||||
"title": "CodexLens Not Installed",
|
||||
"description": "Please install CodexLens to use semantic code search features."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user