Portable AI configuration for opencode CLI
Zero API keys · 12 verified models · 27 providers · All tested
opencode ·
Quick Start ·
Features ·
Keyless Models ·
All Providers ·
Commands ·
Skills ·
Failover ·
FAQ
📑 Table of Contents
curl -sL https://raw.githubusercontent.com/bulbaczPL/opencode-portable/main/setup.sh | bashThen run:
opencodeRequirements: Linux or WSL, internet connection (required at all times — all models run in the cloud via G4F + Pollinations). Everything else auto-installs.
Tip
Run opencode directly after install — the default model gpt-4o-mini works immediately via local G4F. No API keys needed.
|
|
These models work right now, with zero configuration, no API key.
| Provider | Models | Tested | Notes |
|---|---|---|---|
| G4F (local, Docker) | gpt-4o-mini gpt-4o gpt-4 deepseek-r1 o1 o3-mini command-a command-r command-r-plus command-r7b aria r1-1776 |
✅ live curl test (31/31 tests) | 12 text models — requires G4F running on localhost:1337 |
| Pollinations.ai | GPT-OSS 20B (tool-capable, reasoning) |
✅ live curl test | 1 concurrent request per IP — text.pollinations.ai |
Warning
The following providers were previously listed as keyless but are currently broken (verified July 2026):
- Kilo Gateway — connection timeout
- OVHcloud AI Endpoints — HTTP 404
- ApiAirforce — requires auth (401)
- KeylessAI — Cloudflare 1042 error
- LLM7.io — HTTP 405
- AI Horde — dead endpoint
How to start G4F:
# Option A: Docker (recommended)
docker run -d --name g4f --rm -p 1337:1337 python:3.12-slim sh -c \
"pip install -q g4f==7.7.2 nest-asyncio2 && \
python3 -c 'from g4f.api import run_api; run_api(port=1337, host=\"0.0.0.0\")'"
# Option B: Direct Python
python3 -c "from g4f.api import run_api; run_api(port=1337)"| Color | Meaning |
|---|---|
| 🟢 | Keyless — no API key needed |
| 🟡 | Free tier — API key required, no credit card |
| 🔴 | Broken — kept for reference |
| Provider | Tier | Models | Key needed |
|---|---|---|---|
| G4F (local) | 🟢 | 12 verified text models (31/31 tests ✅) | — |
| Pollinations.ai | 🟢 | GPT-OSS 20B | — |
| Groq | 🟡 | Llama 3.3, Gemma 2, Mixtral, DeepSeek-R1-distill | Free key |
| Cerebras | 🟡 | Llama, Qwen (fastest inference) | Free key |
| Mistral | 🟡 | Mistral Small, Codestral | Free key |
| NVIDIA NIM | 🟡 | 100+ models, Nemotron 3, Llama | Free key |
| OpenRouter | 🟡 | ~22 free models (:free suffix) |
Free key |
| Cloudflare Workers AI | 🟡 | 50+ models, Kimi K2.6, Llama, GPT-OSS | Free key |
| Together AI | 🟡 | Llama 3.3, Qwen, Gemma 4, GPT-OSS | Free key |
| SambaNova | 🟡 | DeepSeek V3.1, Llama 3.3, GPT-OSS | Free key |
| Hugging Face | 🟡 | DeepSeek V3, Llama 3.3, Phi-3.5 | Free key |
| GitHub Models | 🟡 | GPT-5, GPT-4.1, o4-mini, Llama 4 | Free key |
| DeepSeek | 🟡 | DeepSeek V4 Flash, V4 Pro | Free key |
| Scaleway | 🟡 | Llama 3.3, Qwen Coder, Mistral, DeepSeek R1 | Free key |
| Cohere | 🟡 | Command A+, Command A, Command R+ | Free trial |
| SiliconFlow | 🟡 | Qwen 3 8B, DeepSeek R1 Distill | Free key |
| Z.AI (Zhipu) | 🟡 | GLM 4.7 Flash, GLM 4.6V Flash | Free key |
| ModelScope | 🟡 | Qwen 3.5 35B, Qwen 3.5 27B | Free key |
| DashScope | 🟡 | Qwen 3.6 27B, Qwen 2.5 Coder 32B | Free key |
| Ollama Cloud | 🟡 | GPT-OSS 120B, DeepSeek V3.1, Qwen3 Coder | Free key |
| FreeTheAi | 🟡 | GPT-OSS 20B, Llama 3.3, Qwen3 Coder | Discord key |
| Aion Labs | 🟡 | Aion 2.5, Aion-RP 1.0 | Free key |
| Token-Free Gateway | 🟡 | Claude, ChatGPT, Gemini, DeepSeek, Grok | Browser login |
| Kilo Gateway | 🔴 | — | — |
| OVHcloud | 🔴 | — | — |
| ApiAirforce | 🔴 | — | — |
| smanx-free | 🔴 | — | — |
Available in opencode TUI. Type /help to see all commands.
| Command | Description |
|---|---|
/status |
Show current model, provider status, API key status |
/switch-model <nr|name> |
Switch to a specific model or provider |
/g4f-start |
Start G4F aggregator (auto-detect Docker or Python) |
/g4f-health |
G4F health check, restart, view logs |
/fallback-chain |
View or configure the failover chain |
/fallback-chain test |
Test all providers in the chain |
/provider-test |
Test all 27 providers |
/provider-register |
Step-by-step guide for free-tier provider registration |
/auto-failover on|off |
Toggle auto-failover |
Skills are automatically available in opencode. They provide specialized know-how for agent operations.
| Skill | Description |
|---|---|
g4f-management |
Start, stop, restart, troubleshoot G4F aggregator |
keyless-providers |
Rate limits, reliability data for all keyless providers |
provider-registration |
Step-by-step registration guides for all free-tier providers |
When the current model fails (rate limit, timeout, auth error), opencode-portable automatically falls through this chain:
Keyless (G4F → Pollinations)
↓
OpenRouter free
↓
Free-tier API keys (Groq → Cerebras → Mistral → NVIDIA → …)
↓
Specialized (Cohere → SiliconFlow → Z.AI → …)
The router tries each provider in order. On success it stops; on failure it moves to the next. Configure via /fallback-chain in TUI.
We tested over 20 claimed "keyless" endpoints from Reddit, GitHub, and Discord. Only G4F and Pollinations.ai returned valid responses without any form of authentication. The rest required API keys, returned empty responses, or were dead.
They remain in the config for reference. If their endpoints change, open them. Do not rely on them.
Of the 24 originally listed G4F models, only 6 passed live testing. The remaining 18 passed — the others (claude-, gemini-, llama-*, grok-3, qwen-2.5-coder-32b, etc.) all returned HTTP 500/401/404 or empty responses.
In opencode TUI, run /connect. Or manually add to ~/.config/opencode/opencode.jsonc:
"providers": {
"groq": {
"id": "@ai-sdk/openai-compatible",
"apiKey": "${env:GROQ_API_KEY}",
"options": {
"baseURL": "https://api.groq.com/openai/v1"
}
}
}Each provider's key signup page is listed in the All Providers table.
Linux and WSL only. You can run opencode-portable in Docker on any platform.
Contributions are welcome! Found a working keyless endpoint? Opened an issue or PR. Found a broken model? Same.
MIT © 2026 bulbaczPL
🇵🇱 Polski — przeczytaj ten dokument po polsku
Tłumaczenie w przygotowaniu. W międzyczasie możesz przetłumaczyć stronę przez przeglądarkę (Ctrl+klik → Przetłumacz na polski).
🇩🇪 Deutsch — dieses Dokument auf Deutsch lesen
Übersetzung in Vorbereitung. Du kannst die Seite im Browser übersetzen lassen.
🇫🇷 Français — lire ce document en français
Traduction en préparation. Vous pouvez traduire la page via le navigateur.
🇪🇸 Español — leer este documento en español
Traducción en preparación. Puedes traducir la página con el navegador.
🇮🇹 Italiano — leggere questo documento in italiano
Traduzione in preparazione. Puoi tradurre la pagina tramite il browser.
🇵🇹 Português — ler este documento em português
Tradução em preparação. Podes traduzir a página através do navegador.
🇷🇺 Русский — прочитать этот документ на русском
Перевод готовится. Вы можете перевести страницу в браузере.
🇨🇳 中文 — 阅读此文档的中文版本
翻译准备中。您可以通过浏览器翻译此页面。
🇯🇵 日本語 — 日本語でこのドキュメントを読む
翻訳準備中。ブラウザでページを翻訳してください。