VS Code Extensions
A

AI Profiles

by Harasya

Manage AI profiles and launch opencode with different configurations. Originally part of Devstack — works standalone.

Downloads

1

Rating

(0)

Version

1.0.50

Last updated

Jul 29, 2026

Manage multiple opencode API key profiles and launch opencode directly from VS Code.

Originally built for Devstack — works perfectly standalone with any VS Code setup.

Features

Core

  • Rich WebView UI — two-panel sidebar with profile list, search, and detail view
  • Launch opencode — pick a profile, terminal opens with the right model, API key, and env vars
  • Multi-model profiles — add multiple models per profile; pick one at launch time
  • CRUD profiles — create, edit, delete from sidebar or Command Palette
  • Search & filter — type to filter by name, provider, or model
  • Status bar — shows active profile name; click to quickly switch and launch

Token & Cost Optimization

  • RTK Token Saver (always-on) — auto-compresses and prunes tool_result before sending to the LLM, saving ~40-60% on context tokens
  • Caveman Mode — controls how concise LLM responses should be (6 levels, from 0% to ~80% token savings):
    Level Description Estimated Savings
    0 — Off Full output with greetings and sign-offs 0%
    1 — Mild Shorter replies, no greetings ~15%
    2 — Compact Bullet points, no unnecessary prose ~30%
    3 — Terse Shorthand, code-only when sufficient ~50%
    4 — Minimal Facts and code only ~65%
    5 — Caveman Telegraphic: keywords, code, facts ~80%

Reliability

  • Health Check — pre-launch provider verification pings the API to confirm the key is valid before launching
  • Fallback Chain — if the primary provider is down, automatically falls back to a backup profile
  • Quota Tracking — set monthly spending limits per profile with a visual progress bar

Configuration

  • Scan & Import — detects existing opencode configs from ~/.config/opencode/ and ~/.local/share/opencode/
  • OpenCode Config Editor — read-only viewer for opencode.jsonc and auth.json inside VS Code
  • Project binding — associate a profile with a specific project path for quick access
  • Shared storage — uses ~/.ai-profiles/profiles.json, compatible with other tools that read the same file

Commands

Command Description
AI Profiles: Select Profile & Launch Pick a profile from the list and launch opencode
AI Profiles: Create Profile Wizard: name, provider, API key, model, caveman mode, quota
AI Profiles: Edit Profile Change name, API key, model, project path, caveman mode
AI Profiles: Delete Profile Select a profile and confirm deletion
AI Profiles: Scan & Import Config Find and import opencode configs from disk
AI Profiles: Refresh Reload all profiles from file
AI Profiles: OpenCode Config Editor View opencode.jsonc and auth.json
AI Profiles: Manage Fallback Chain Configure fallback profiles in priority order

Usage

  1. Launch opencodeCmd+Shift+PAI Profiles: Select Profile & Launch → pick a profile
  2. Add a profile manually — click + in the sidebar or run AI Profiles: Create Profile
  3. Import existing configsAI Profiles: Scan & Import Config — detects all opencode accounts on your machine
  4. Edit/delete — click Edit/Del in the detail view or use Command Palette
  5. Search — type in the search box to filter by name, provider, or model
  6. Fallback chainAI Profiles: Manage Fallback Chain to set backup profiles
  7. Caveman mode — set during create/edit; the higher the level, the fewer tokens the LLM uses per response

Supported Providers

Provider Environment Variable
OpenCode Go Built-in (via auth.json)
DeepSeek DEEPSEEK_API_KEY
Anthropic ANTHROPIC_API_KEY
OpenAI OPENAI_API_KEY
Google GOOGLE_API_KEY
Groq GROQ_API_KEY
Together TOGETHER_API_KEY
Custom User-defined env var name

Installation

From VS Code Marketplace

Open the Extensions panel (Cmd+Shift+X), search "AI Profiles", and click Install.

From Open VSX

Available at open-vsx.org/extension/harasya/ai-profiles. Works on VS Code, VSCodium, and other Open VSX-compatible editors.

Manual (from VSIX)

code --install-extension ai-profiles-1.0.49.vsix

Build from source

git clone https://github.com/harasya/devstack
cd devstack/vscode-extension
npm install
npm run compile
npx @vscode/vsce package

Or use the Devstack desktop app: Settings → VS Code Extension → Build VSIX.

Data Storage

Profiles are stored in ~/.ai-profiles/profiles.json:

[
  {
    "id": "uuid",
    "name": "My Profile",
    "provider": "opencode-go",
    "apiKey": "sk-...",
    "models": ["opencode-go/deepseek-v4-flash"],
    "projectPath": "/path/to/project",
    "cavemanLevel": 2,
    "notes": "Optional notes",
    "createdAt": 1700000000000,
    "lastUsed": 1700000000,
    "rtkEnabled": true,
    "monthlyLimit": 10,
    "monthlyUsed": 3.5,
    "quotaResetDay": 1,
    "fallbackProfiles": ["other-profile-id"]
  }
]

Technical Notes

  • RTK (Real-time Token Saver) is always active — it sets compaction: { auto: true, prune: true } in the generated opencode.jsonc config so the LLM receives compressed tool results.
  • Caveman Mode injects an instruction field into the opencode config with increasingly terse system prompts.
  • Health checks run before each launch when a fallback chain is configured. If the primary provider fails, the first healthy fallback is used automatically.
  • Multi-key support for opencode-go: the extension temporarily swaps the API key in auth.json before launching, then the next launch overwrites it again.

AI Profiles was originally created for Devstack — a modern local web development environment manager.

Related extensions