AI Providers¶
JSAT supports six AI backends. The right one is selected automatically based on what is available, but you can override it at any time.
Provider Overview¶
| Bob Shell CLI | jsat ai use bob | Free tier | bob binary |
| Provider | Switch command | Cost | Needs |
|---|---|---|---|
| Claude Code CLI | jsat ai use claude-cli |
Free tier | claude binary |
| Anthropic API | jsat ai use anthropic |
Paid | ANTHROPIC_API_KEY |
| OpenAI | jsat ai use openai |
Paid | OPENAI_API_KEY |
| Google Gemini | jsat ai use gemini |
Paid | GEMINI_API_KEY |
| Ollama (local) | jsat ai use ollama |
Free | ollama serve + model |
| LM Studio (local) | jsat ai use lmstudio |
Free | LM Studio running |
Check What Is Available¶
Example output:
JSAT AI Providers
┌──────────────────────┬──────────────┬──────┬────────────────────────┐
│ Provider │ Status │ Free │ Notes / Models │
├──────────────────────┼──────────────┼──────┼────────────────────────┤
│ claude (active) │ ✓ available │ yes │ claude binary found │
│ anthropic │ ✓ key set │ no │ claude-sonnet-4-6 │
│ ollama │ ✓ running │ yes │ llama3.2, phi3:mini │
│ openai │ ✗ no key │ no │ set OPENAI_API_KEY │
│ lmstudio │ ✗ not running│ yes │ not running │
└──────────────────────┴──────────────┴──────┴────────────────────────┘
Currently configured: claude_cli / claude-sonnet-4-6
Claude Code CLI (Recommended)¶
The Claude Code CLI (claude binary) is the default provider when it is installed. No API key is required — JSAT calls claude as a subprocess.
Install¶
Activate¶
JSAT auto-detects the claude binary. No configuration needed. To set it explicitly:
This sets:
Verify¶
Inside the shell¶
Anthropic API¶
Bob Shell CLI¶
Bob Shell is an IBM AI-powered terminal assistant that provides interactive coding assistance with multiple modes.
Install¶
Activate¶
JSAT auto-detects the bob binary. No configuration needed. To set it explicitly:
This sets:
Available Modes¶
Bob Shell supports four interaction modes:
plan— Planning and design modecode— Code implementation modeadvanced— Advanced code mode with more tools (default)ask— Question and answer mode
Verify¶
Inside the shell¶
Open a Bob Shell session directly¶
Use the Anthropic API directly (requires a paid API key).
Install¶
Set API key¶
Activate¶
Available models: claude-sonnet-4-6 (default), claude-haiku-4-5-20251001, claude-opus-4-8.
Use a specific model:
Verify¶
Inside the shell¶
OpenAI¶
Use GPT-4o or GPT-4o Mini.
Install¶
Set API key¶
Activate¶
Default model: gpt-4o-mini.
Verify¶
Inside the shell¶
Open a GPT session directly¶
Google Gemini¶
JSAT connects to Gemini via its OpenAI-compatible endpoint.
Set API key¶
Get a key from aistudio.google.com:
Activate¶
This sets the provider to openai_compat with base_url pointed at:
Available models: gemini-1.5-flash (default, fast), gemini-1.5-pro (higher quality).
Verify¶
Inside the shell¶
Ollama (Local, Free)¶
Ollama runs open-weight models locally. No API key, no data sent externally.
Install¶
Download the installer from ollama.ai.
Pull a model¶
ollama pull llama3.2 # 4 GB — good general quality
ollama pull phi3:mini # 2 GB — fast, lower RAM usage
ollama pull qwen2.5-coder:7b # 4 GB — code-focused
Start the server¶
JSAT checks http://localhost:11434 on startup. If Ollama is running, it is auto-selected when no cloud provider is configured.
Activate¶
List pulled models¶
Verify¶
Open an Ollama session¶
Inside the shell¶
LM Studio (Local, Free)¶
LM Studio lets you download and run models from Hugging Face with a local OpenAI-compatible API.
Install¶
Download from lmstudio.ai.
Load a model in LM Studio, then start the local server (usually at http://localhost:1234).
Activate¶
This sets the provider to openai_compat with base_url: http://localhost:1234/v1. JSAT will use whatever model LM Studio has loaded.
List loaded models¶
Verify¶
Inside the shell¶
Auto-Detection Priority¶
When no provider is explicitly configured, JSAT probes all backends on startup and picks the best available one in this priority order:
- Claude Code CLI (
claudebinary found on PATH) - Bob Shell CLI (
bobbinary found on PATH) - Anthropic API (
ANTHROPIC_API_KEYset) - OpenAI API (
OPENAI_API_KEYset) - Google Gemini (
GEMINI_API_KEYorGOOGLE_API_KEYset) - Ollama (reachable at
localhost:11434) - LM Studio (reachable at
localhost:1234)
If none are reachable, JSAT runs without AI (graph queries only, no natural language).
Switching Providers¶
From the CLI¶
Update .jsat/config.yaml and test:
From inside the JSAT shell¶
> switch claude
> switch claude-api
> switch claude-cli
> switch bob
> switch bob-cli
> switch gpt
> switch gpt4mini
> switch ollama
> switch phi
> switch llama
> switch gemini
> switch gemini-pro
> switch haiku
> switch opus
> switch lmstudio
With the Python SDK¶
from jsat import JSAT
js = JSAT(repo=".")
js.switch_ai("ollama", model="phi3:mini")
# Or set at construction
js = JSAT(repo=".", ai_provider="anthropic", model="claude-haiku-4-5-20251001")
Provider Configuration Reference¶
All AI settings live under the ai: key in .jsat/config.yaml:
ai:
provider: ollama # ollama | anthropic | openai | openai_compat | none
model: llama3.2
base_url: null # set for lmstudio / gemini / custom endpoints
max_tokens: 8192
temperature: 0.1
timeout_seconds: 120
retry_attempts: 3
For Gemini:
ai:
provider: openai_compat
model: gemini-1.5-flash
base_url: https://generativelanguage.googleapis.com/v1beta/openai
For LM Studio:
The ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY environment variables are read at runtime. Do not put API keys in config.yaml.