Aiberm Auth
magpie / OpenCode provider plugin for Aiberm: one API key, each model on its native API (Anthropic Messages, OpenAI Responses, Gemini, Chat Completions)
0
0
20.0
生态多维模型
22 小时前
2026-10-20
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["aiberm-auth@0.1.1"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["aiberm-auth@0.1.1"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D aiberm-authOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
A magpie / OpenCode provider plugin for Aiberm. You sign in with one Aiberm API key, and each model is sent on its native API, so magpie converts a request only when the agent speaks a different API.
| Models | API | Endpoint |
|---|---|---|
| Claude | Anthropic Messages | https://aiberm.com/v1/messages |
| Gemini | Gemini | https://aiberm.com/v1beta/models/<id>:streamGenerateContent |
| GPT | OpenAI Responses | https://aiberm.com/v1/responses |
| Others (DeepSeek, Grok, Qwen, Kimi…) | Chat Completions | https://aiberm.com/v1/chat/completions |
The API for each model is picked from the supported_endpoint_types field in Aiberm's /v1/models. Grok and DeepSeek stay on Chat Completions, because Aiberm doesn't serve Responses for them.
Install
In magpie's window: Plugins → search aiberm → Install, then sign in with your Aiberm API key.
Or from the command line:
magpie plugin add aiberm-auth # from npm
magpie plugin login aiberm # asks for your own Aiberm API key
magpie provider test aiberm claude-opus-5-5
Each person signs in with their own key. The plugin holds no key; magpie keeps it on your machine.
Models are named aiberm/<model>, for example aiberm/claude-opus-5-5.
What it does
- Sign-in: one API key, stored by magpie in
~/.config/magpie/plugin-auth.json(mode 600). - Models: read from the key's
/v1/models. Embedding, image, speech and OCR models are left out. Context and output limits come from the vendors' published numbers, and Aiberm may cap below them. - Reasoning levels: Claude
low…max, GPTnone…xhigh, Geminilow/medium/high, otherslow/medium/high. - Usage:
magpie quotashows what the key has spent (New API's/api/usage/token/).
Tests
bun test
同类生态推荐
Magpie Tokener
@tokener-ai/magpie-plugin-tokener
Tokener.ai provider plugin for OpenCode and magpie: API key sign-in, model discovery, Chat and Messages
Opendesign Auth
opencode-opendesign-auth
OpenCode provider plugin: Open Design Cloud (Design Plan, Vela/AMR)
Magpie
@d-ai/magpie
D.AI (dai.itbug.shop) models in magpie and OpenCode: one ddsk_ API key, chat models from the public catalog, per-key usage