feat(api): add llama.cpp support as local model provider

- Add llamacpp provider preset to provider-presets.ts
- Add base-llamacpp.settings.json configuration
- Update help-command.ts with ccs llamacpp documentation
- Update UI provider presets for dashboard parity

llama.cpp is a popular C++ inference engine for LLaMA models.
This complements existing Ollama support for local inference.

Usage: ccs llamacpp (requires llama.cpp server on port 8080)

Closes #690
This commit is contained in:
Huynh Duc Dung
2026-03-05 12:29:49 +08:00
parent 24b03121fd
commit 0ca6428554
5 changed files with 39 additions and 0 deletions
+10
View File
@@ -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"
}
}
+12
View File
@@ -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',
+1
View File
@@ -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'],
+1
View File
@@ -1,5 +1,6 @@
{
"lockfileVersion": 1,
"configVersion": 0,
"workspaces": {
"": {
"name": "ui",
+15
View File
@@ -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',