GA Release

The Multi-Agent WebGPU Engine & Interactions API are now generally available.

Part 3: Connecting Ollama, LM Studio, OpenRouter, Groq & Any OpenAI-Compatible API

Step-by-step instructions for linking local LLM servers and third-party API providers.

Category: Getting Started • Read Time: 22 min read • Updated: August 2026

1. The Big Idea — One Format to Rule Them All

Almost every AI server today speaks the exact same standard protocol: OpenAI-compatible REST API.

Whether it's Ollama on your laptop, LM Studio on your desktop, Groq's ultra-fast cloud, OpenRouter with 200+ models behind one key, Mistral, DeepSeek API, or local vLLM / LocalAI instances — they all answer at an HTTP endpoint ending in /v1/chat/completions and expect:

1. Base URL e.g. http://127.0.0.1:11434/v1 or https://api.groq.com/openai/v1
2. Model ID e.g. qwen2.5-coder:7b, llama-3.3-70b-versatile
3. API Key gsk_... or not-needed for local endpoints

Accelerated Logic AI allows you to configure unlimited custom endpoints. Once added, they behave identically to built-in models: you can equip them, activate them, hot-swap mid-chat, or include them in fallback chains.

2. Ollama — Run Models on Your Own Hardware (100% Private)

What it is: Ollama executes open-weight models directly on your local CPU or GPU. Zero data leaves your machine. Free, uncapped, and works completely offline.

Installation & Pulling Models:
  1. Download and install from ollama.com (Mac, Windows, Linux).
  2. Open your terminal and pull a model:
    ollama pull llama3.2
    ollama pull qwen2.5-coder:7b
    ollama pull llava
⚠️ The Critical Step Everyone Misses — CORS Configuration

Browsers prevent web applications from connecting to local ports by default. If you run default ollama serve without CORS enabled, Accelerated Logic AI will show "Disconnected".

Start Ollama with CORS origins enabled:

Mac / Linux Terminal:
OLLAMA_ORIGINS="*" ollama serve
Windows PowerShell:
$env:OLLAMA_ORIGINS="*"; ollama serve

If socket in use: Right-click Ollama llama icon in system tray -> Quit Ollama, then run command again.

Windows Command Prompt (cmd):
set OLLAMA_ORIGINS=* && ollama serve

Verify: Open http://127.0.0.1:11434 in your browser. It should say "Ollama is running".

Adding to Accelerated Logic AI:
  1. Open Model Organizer -> Select Provider Ollama.
  2. Click View Local Models. Connected indicator turns green when detected.
  3. Your installed models (e.g. qwen2.5-coder:7b) appear in the list. Click Equip.
  4. You can also type any model name and click Pull to download directly within Accelerated Logic AI with real-time progress indicators.

3. LM Studio — Desktop GUI for Local Models

LM Studio offers a rich visual desktop interface for running GGUF local models.

  1. Download LM Studio and load a model (e.g. Llama 3.2 3B Instruct).
  2. Go to the Local Server tab on the left.
  3. Ensure CORS is enabled in settings (toggle Enable CORS on).
  4. Click Start Server (default runs at http://localhost:1234/v1).
  5. In Accelerated Logic AI: Go to Model Organizer -> OpenAI Compatible -> Base URL: http://localhost:1234/v1 -> enter exact Model ID -> Add.

4. OpenRouter — One Key for 200+ Frontier Models

OpenRouter provides unified proxy routing to Claude, GPT-4o, Llama 405B, DeepSeek, Qwen, and Mistral through a single API key.

  1. Create an API key at openrouter.ai.
  2. In Accelerated Logic AI: Open Model Organizer -> OpenAI Compatible -> select provider preset OpenRouter.
  3. Base URL auto-fills to https://openrouter.ai/api/v1.
  4. Paste your API key (sk-or-v1-...).
  5. Click Fetch Models to dynamically load 200+ available models in a dropdown, or enter Model IDs like anthropic/claude-3.5-sonnet or deepseek/deepseek-r1.

5. Groq — Ultra-Fast Hardware Inference

Groq delivers high-speed inference (300-800 tokens/sec) on Llama and Qwen open models.

  1. Get a free key from console.groq.com (gsk_...).
  2. Select preset Groq in Model Organizer (Base URL: https://api.groq.com/openai/v1).
  3. Enter Model IDs such as llama-3.3-70b-versatile or qwen/qwen3-32b and save.

6. Other Compatible Endpoints & URL Cleaning

  • Together AI: Base URL https://api.together.xyz/v1
  • Mistral API: Base URL https://api.mistral.ai/v1
  • DeepSeek API: Base URL https://api.deepseek.com/v1
  • Custom vLLM / LocalAI: Select Custom Endpoint, enter your URL (e.g. http://192.168.1.10:8000/v1).

💡 Automatic URL Cleaning: If you accidentally paste a full endpoint like .../v1/chat/completions, Accelerated Logic AI automatically strips redundant path segments and trailing slashes.

7. Managing Custom Models (Equip, Duplicate, Edit, Delete)

All custom providers appear in the Configured Custom Models manager.

Equip & Hot-Swap

Clicking Equip adds the model to your active toolbox and sets it as active in your composer.

1-Click Duplicate

Duplicate any custom endpoint configuration to quickly adjust provider keys or test secondary endpoints.

8. Privacy & Cost Comparison

Provider Type Privacy Level Cost Best Used For
Ollama / LM Studio 100% Air-Gapped (Local RAM) Free Confidential code, offline work
Groq / Mistral Encrypted Cloud Transit Pay per token / Free tier Ultra-fast agent loops
OpenRouter Unified Router Proxy Unified Account Billing Model comparison & rare models

9. Mixed Content & CORS Gotchas — Troubleshooting

Error 1: Mixed Content Error (HTTPS vs HTTP)

Hosted HTTPS apps cannot directly fetch unencrypted http://localhost endpoints in some browser security policies.

Fix: Enable CORS properly, run local development server with npm run dev, or use cloud endpoints (Groq/OpenRouter) when on hosted previews.

Error 2: CORS Network Error / Failed to Fetch

Server rejected request origin header.

Fix: For Ollama, launch with OLLAMA_ORIGINS="*" ollama serve. For LM Studio, turn on "Enable CORS".

Error 3: 401 Invalid API Key / 404 Model Not Found

Ensure API key has no trailing spaces. For model IDs, verify exact tag (e.g. qwen2.5-coder:7b) via ollama list.

10. Practical Power-User Stack & Fallback Chains

Recommended Multi-Model Setup:
  • ollama:qwen2.5-coder:7b — Private local coding
  • groq:llama-3.3-70b — High-speed general assistant
  • openrouter:claude-3.5-sonnet — Complex reasoning when stuck
  • puter:deepseek-v4-flash — Free backup
Fallback Chain Setup:

In Settings -> Model Organizer -> Fallback Chains: Set Primary: Claude via OpenRouter -> Fallback 1: Groq Llama -> Fallback 2: Local Ollama.

If your primary key hits rate limits, Accelerated Logic AI seamlessly retries downstream models automatically.