diff --git a/config/base-llamacpp.settings.json b/config/base-llamacpp.settings.json new file mode 100644 index 00000000..48de05dc --- /dev/null +++ b/config/base-llamacpp.settings.json @@ -0,0 +1,10 @@ +{ + "env": { + "ANTHROPIC_BASE_URL": "http://127.0.0.1:8080", + "ANTHROPIC_AUTH_TOKEN": "llamacpp", + "ANTHROPIC_MODEL": "llama3-8b", + "ANTHROPIC_DEFAULT_OPUS_MODEL": "llama3-70b", + "ANTHROPIC_DEFAULT_SONNET_MODEL": "llama3-8b", + "ANTHROPIC_DEFAULT_HAIKU_MODEL": "llama3-2b" + } +} diff --git a/src/api/services/provider-presets.ts b/src/api/services/provider-presets.ts index 510246e4..97760b24 100644 --- a/src/api/services/provider-presets.ts +++ b/src/api/services/provider-presets.ts @@ -58,6 +58,18 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [ category: 'recommended', requiresApiKey: false, }, + { + id: 'llamacpp', + name: 'llama.cpp (Local)', + description: 'Local inference via llama.cpp (LLaMA models)', + baseUrl: 'http://127.0.0.1:8080', + defaultProfileName: 'llamacpp', + defaultModel: 'llama3-8b', + apiKeyPlaceholder: 'llamacpp', + apiKeyHint: 'Run llama.cpp server: ./server --host 0.0.0.0 --port 8080 -m model.gguf', + category: 'recommended', + requiresApiKey: false, + }, // Alternative providers { id: 'glm', diff --git a/src/commands/help-command.ts b/src/commands/help-command.ts index ae632fb9..201849af 100644 --- a/src/commands/help-command.ts +++ b/src/commands/help-command.ts @@ -128,6 +128,7 @@ Run ${color('ccs config', 'command')} for web dashboard`.trim(); ['ccs glmt', 'GLM with thinking mode'], ['ccs kimi', 'Kimi for Coding (API key)'], ['ccs ollama', 'Local Ollama (http://localhost:11434)'], + ['ccs llamacpp', 'Local llama.cpp (http://127.0.0.1:8080)'], ['ccs ollama-cloud', 'Ollama Cloud (API key required)'], ['', ''], // Spacer ['ccs api create', 'Create custom API profile'], diff --git a/ui/bun.lock b/ui/bun.lock index 2756da98..c2e29de1 100644 --- a/ui/bun.lock +++ b/ui/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "ui", diff --git a/ui/src/lib/provider-presets.ts b/ui/src/lib/provider-presets.ts index d6d35486..1ce5274a 100644 --- a/ui/src/lib/provider-presets.ts +++ b/ui/src/lib/provider-presets.ts @@ -60,6 +60,21 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [ apiKeyHint: 'No API key required for local Ollama', category: 'recommended', }, + // Recommended - llama.cpp (Local) + { + id: 'llamacpp', + name: 'llama.cpp (Local)', + description: 'Local inference via llama.cpp (LLaMA models)', + baseUrl: 'http://127.0.0.1:8080', + defaultProfileName: 'llamacpp', + badge: 'Local', + featured: true, + defaultModel: 'llama3-8b', + requiresApiKey: false, + apiKeyPlaceholder: 'llamacpp', + apiKeyHint: 'Run llama.cpp server: ./server --host 0.0.0.0 --port 8080 -m model.gguf', + category: 'recommended', + }, // Alternative providers - GLM/GLMT/Kimi { id: 'glm',