opencode-provider-poolsideOpenCode plugin for the Poolside AI model provider with live model discovery
2
504
近 7 天 15
39.8
生态多维模型
19 天前
2026-08-01
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-provider-poolside@0.2.2"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-provider-poolside@0.2.2"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-provider-poolsideopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode Provider for Poolside
Use hosted Poolside AI models (Laguna) directly from OpenCode with live model discovery and API key management.
Features
- Live model discovery — fetches the current model catalog from the Poolside API at startup, with sensible Laguna fallbacks when the API is unreachable.
- OpenAI-compatible — uses
@ai-sdk/openai-compatibleunder the hood, so streaming, tool calls, and JSON mode work out of the box. - API key management — built-in auth hook for storing and loading your Poolside API key via OpenCode's
/connectcommand. - Reasoning support — Laguna M.1 and XS 2.1 expose
none,minimal,low,medium,high, andxhigh; Laguna S 2.1 exposes its supportednoneandxhighmodes through OpenCode's variant picker. - Zero config — add the plugin to your
opencode.jsonand you're ready to go.
Quick start
1. Install the plugin
Add the package to your OpenCode config. OpenCode installs it automatically:
// ~/.config/opencode/opencode.json or .opencode/opencode.json
{
"plugin": ["opencode-provider-poolside"]
}
The legacy opencode-provider-poolside/server entry point remains supported.
2. Get a Poolside API key
Create a developer API key at platform.poolside.ai → API Keys → New key.
3. Connect your API key
In OpenCode, run:
/connect poolside
Follow the prompts to enter your API key. OpenCode stores it securely and the plugin loads it automatically.
Alternatively, set the environment variable:
export POOLSIDE_API_KEY="your-api-key"
4. Start using Poolside models
opencode -m poolside/laguna-m.1
Or set a default model in your config:
{
"model": "poolside/laguna-m.1",
"small_model": "poolside/laguna-xs-2.1"
}
Available models
| Model | Context | Max output | Reasoning |
|---|---|---|---|
poolside/laguna-m.1 |
262,144 | 32,768 | none–xhigh |
poolside/laguna-xs-2.1 |
262,144 | 32,768 | none–xhigh |
poolside/laguna-s-2.1 |
1,048,576 | 131,072 | none, xhigh |
The static catalog uses these verified Poolside limits. Authenticated model discovery enriches the catalog with live capabilities, while preserving these limits when the Poolside /models response is incomplete or stale.
Configuration
Provider options
The plugin sets these defaults automatically, but you can override them in your config:
{
"provider": {
"poolside": {
"npm": "@ai-sdk/openai-compatible",
"name": "Poolside",
"env": ["POOLSIDE_API_KEY"],
"options": {
"baseURL": "https://inference.poolside.ai/v1"
}
}
}
}
Custom base URL
If you use a Poolside deployment, set a custom base URL:
{
"provider": {
"poolside": {
"options": {
"baseURL": "https://your-deployment.example.com/openai/v1"
}
}
}
}
Environment variable
export POOLSIDE_API_KEY="your-api-key"
How it works
- Config hook — On startup, the plugin registers the
poolsideprovider with@ai-sdk/openai-compatible, sets the base URL and environment variable, and populates the model catalog. - Model discovery — If
POOLSIDE_API_KEYis available, the plugin fetches the live model list fromhttps://inference.poolside.ai/v1/models. If the API is unreachable, it falls back to a static catalog of known Laguna models; verified limits remain in place if the endpoint reports stale values. - Model aliases — OpenCode exposes models as
poolside/laguna-*while sending Poolside's requiredpoolside/laguna-*upstream IDs without duplicating the provider prefix. - Auth hook — The plugin provides an API key auth method so you can manage your key with OpenCode's
/connect poolsidecommand.
Related projects
- Poolside for GitHub Copilot Chat — Use Poolside models directly in VS Code's Copilot Chat.
- Pi Provider for Poolside — Poolside provider for the Pi coding agent.
Unofficial project; not affiliated with Poolside, OpenCode, or Poolside AI. Poolside account limits and charges still apply. Licensed under MIT.