From 0b2c4f545aba2bd430d8387cc5d3ccfca654fd1d Mon Sep 17 00:00:00 2001 From: Joseph Magly <1159087+jmagly@users.noreply.github.com> Date: Thu, 9 Jul 2026 10:42:33 -0400 Subject: [PATCH] fix: clarify local LLM setup --- README.md | 1 + src/config/index.ts | 3 +++ src/setup.ts | 20 +++++--------------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 100acde..274fabf 100755 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ Or run it **fully offline** on your own model — no key, no cloud. Defaults to ollama serve && ollama pull llama3 # or an OpenAI-compatible server export TEMPEST_LOCAL_BASE_URL=http://localhost:11434/api # LM Studio: http://localhost:1234/v1 export TEMPEST_LOCAL_MODEL=llama3 +npm run build # only needed from a git clone npx tempest # → "Change default provider" → local ``` diff --git a/src/config/index.ts b/src/config/index.ts index b1b9ea3..c710051 100755 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -802,6 +802,9 @@ class ConfigManager { case 'codex': this.config.set('defaultModel', this.config.get('codex').defaultModel); break; + case 'local': + this.config.set('defaultModel', process.env.TEMPEST_LOCAL_MODEL?.trim() || 'llama3'); + break; } } diff --git a/src/setup.ts b/src/setup.ts index cabf850..b2802b7 100755 --- a/src/setup.ts +++ b/src/setup.ts @@ -281,13 +281,14 @@ async function runSetup(): Promise { 'Welcome to T3MP3ST Setup', `This wizard will help you configure T3MP3ST for first use. -You'll need an API key from one of these providers: +You can use a local model with no API key, or add a key from one of these providers: +• ${chalk.cyan('Local')} - Ollama / LM Studio / vLLM via TEMPEST_LOCAL_BASE_URL • ${chalk.cyan('OpenRouter')} (recommended) - Access multiple models • ${chalk.cyan('Anthropic')} - Direct Claude access • ${chalk.cyan('OpenAI')} - GPT models The setup will guide you through: -1. Adding your API key(s) +1. Adding API key(s), if you use a hosted provider 2. Selecting your default provider and model 3. Configuring basic settings`, 'cyan' @@ -365,12 +366,11 @@ async function setupApiKeys(): Promise { { type: 'checkbox', name: 'providers', - message: 'Which API keys would you like to configure?', + message: 'Which hosted API keys would you like to configure? Leave empty to use a local model only.', choices: [ { name: `OpenRouter ${hasApiKey('openrouter') ? chalk.green('(configured)') : chalk.yellow('(recommended)')}`, value: 'openrouter', - checked: !hasApiKey('openrouter'), }, { name: `Venice ${hasApiKey('venice') ? chalk.green('(configured)') : ''}`, @@ -409,22 +409,12 @@ async function setupApiKeys(): Promise { async function setupProvider(): Promise { const configuredProviders = []; + configuredProviders.push({ name: 'Local model (Ollama / LM Studio / vLLM, no API key)', value: 'local' }); if (hasApiKey('openrouter')) configuredProviders.push({ name: 'OpenRouter', value: 'openrouter' }); if (hasApiKey('venice')) configuredProviders.push({ name: 'Venice', value: 'venice' }); if (hasApiKey('anthropic')) configuredProviders.push({ name: 'Anthropic', value: 'anthropic' }); if (hasApiKey('openai')) configuredProviders.push({ name: 'OpenAI', value: 'openai' }); - if (configuredProviders.length === 0) { - showWarning('No API keys configured. Please add at least one API key first.'); - return; - } - - if (configuredProviders.length === 1) { - config.setDefaultProvider(configuredProviders[0].value as any); - showSuccess(`Default provider set to: ${configuredProviders[0].name}`); - return; - } - const { provider } = await inquirer.prompt([ { type: 'list',