Debug pass: fix extract_text_keywords_mcp invalid-JS customScript, point Ollama delegation tools to shadow-death (real data, no simulation)

This commit is contained in:
drjones
2026-08-14 02:09:50 +00:00
parent 1d2c5092ea
commit 870440c23d
4 changed files with 13 additions and 13 deletions

View File

@@ -16,7 +16,7 @@ export const LOCAL_MODEL_TOOLS: ToolDefinition[] = [
description: 'Ollama model tag to invoke (e.g., "llama3.2:1b", "llama3.2:3b", "deepseek-r1:1.5b", "qwen2.5-coder:1.5b", "phi3.5", "mistral:7b"). Defaults to "llama3.2:1b".',
},
systemPrompt: { type: 'string', description: 'Optional system instructions for the sub-model.' },
endpoint: { type: 'string', description: 'Ollama host endpoint URL. Defaults to "http://localhost:11434".' },
endpoint: { type: 'string', description: 'Ollama host endpoint URL. Defaults to "http://10.30.20.128:11434".' },
temperature: { type: 'number', description: 'Sampling temperature (0.0 to 1.0).' },
format: { type: 'string', enum: ['json', 'text'], description: 'Optional output formatting (e.g. "json" for structured data).' },
},
@@ -38,7 +38,7 @@ export const LOCAL_MODEL_TOOLS: ToolDefinition[] = [
type: 'string',
description: 'Local vision model name (e.g., "llava", "llama3.2-vision", "minicpm-v", "bakllava", "qwen2-vl"). Defaults to "llama3.2-vision".',
},
endpoint: { type: 'string', description: 'Ollama host endpoint URL. Defaults to "http://localhost:11434".' },
endpoint: { type: 'string', description: 'Ollama host endpoint URL. Defaults to "http://10.30.20.128:11434".' },
},
required: ['imageUrlOrBase64'],
},
@@ -58,7 +58,7 @@ export const LOCAL_MODEL_TOOLS: ToolDefinition[] = [
type: 'string',
description: 'Local embedding model name (e.g., "nomic-embed-text", "bge-m3", "all-minilm", "snowflake-arctic-embed", "mxbai-embed-large"). Defaults to "nomic-embed-text".',
},
endpoint: { type: 'string', description: 'Ollama host endpoint URL. Defaults to "http://localhost:11434".' },
endpoint: { type: 'string', description: 'Ollama host endpoint URL. Defaults to "http://10.30.20.128:11434".' },
},
required: ['text'],
},
@@ -77,7 +77,7 @@ export const LOCAL_MODEL_TOOLS: ToolDefinition[] = [
enum: ['list_models', 'running_vram_models', 'gpu_telemetry', 'ping_endpoint'],
description: 'Management action to perform.',
},
endpoint: { type: 'string', description: 'Ollama host endpoint URL. Defaults to "http://localhost:11434".' },
endpoint: { type: 'string', description: 'Ollama host endpoint URL. Defaults to "http://10.30.20.128:11434".' },
},
required: ['action'],
},
@@ -151,7 +151,7 @@ export async function executeLocalModelTool(toolName: string, args: any): Promis
prompt,
model = 'llama3.2:1b',
systemPrompt,
endpoint = 'http://localhost:11434',
endpoint = 'http://10.30.20.128:11434',
temperature = 0.7,
format,
} = args;
@@ -228,7 +228,7 @@ export async function executeLocalModelTool(toolName: string, args: any): Promis
imageUrlOrBase64,
prompt = 'Describe this image in detail, extract any visible text, and detect key objects.',
model = 'llama3.2-vision',
endpoint = 'http://localhost:11434',
endpoint = 'http://10.30.20.128:11434',
} = args;
const cleanEndpoint = endpoint.replace(/\/+$/, '');
@@ -308,7 +308,7 @@ export async function executeLocalModelTool(toolName: string, args: any): Promis
text,
compareText,
model = 'nomic-embed-text',
endpoint = 'http://localhost:11434',
endpoint = 'http://10.30.20.128:11434',
} = args;
const cleanEndpoint = endpoint.replace(/\/+$/, '');
@@ -385,7 +385,7 @@ export async function executeLocalModelTool(toolName: string, args: any): Promis
// 4. OLLAMA GPU & MODEL MANAGER
case 'ollama_gpu_model_manager': {
const { action = 'list_models', endpoint = 'http://localhost:11434' } = args;
const { action = 'list_models', endpoint = 'http://10.30.20.128:11434' } = args;
const cleanEndpoint = endpoint.replace(/\/+$/, '');
let isLive = false;
let livePayload: any = null;