mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-11 00:24:08 +00:00
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:
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -58,6 +58,18 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
|||||||
category: 'recommended',
|
category: 'recommended',
|
||||||
requiresApiKey: false,
|
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
|
// Alternative providers
|
||||||
{
|
{
|
||||||
id: 'glm',
|
id: 'glm',
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ Run ${color('ccs config', 'command')} for web dashboard`.trim();
|
|||||||
['ccs glmt', 'GLM with thinking mode'],
|
['ccs glmt', 'GLM with thinking mode'],
|
||||||
['ccs kimi', 'Kimi for Coding (API key)'],
|
['ccs kimi', 'Kimi for Coding (API key)'],
|
||||||
['ccs ollama', 'Local Ollama (http://localhost:11434)'],
|
['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)'],
|
['ccs ollama-cloud', 'Ollama Cloud (API key required)'],
|
||||||
['', ''], // Spacer
|
['', ''], // Spacer
|
||||||
['ccs api create', 'Create custom API profile'],
|
['ccs api create', 'Create custom API profile'],
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
|
"configVersion": 0,
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ui",
|
"name": "ui",
|
||||||
|
|||||||
@@ -60,6 +60,21 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
|
|||||||
apiKeyHint: 'No API key required for local Ollama',
|
apiKeyHint: 'No API key required for local Ollama',
|
||||||
category: 'recommended',
|
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
|
// Alternative providers - GLM/GLMT/Kimi
|
||||||
{
|
{
|
||||||
id: 'glm',
|
id: 'glm',
|
||||||
|
|||||||
Reference in New Issue
Block a user