PluginShippedclawql-inference/plugin
Plugins hub · Registry reference
Inference providers
Inference backends are optional provider plugins on clawql-inference. The core package stays lean: gateway, routing, and a registry. Built-in defaults from the inference plan register automatically; integrators and third parties add more via the same plugin contract.
Built-in defaults (automatic)
composeDefaultProviderPlugins() registers these unless disabled:
| Plugin id | Adapter | Credentials / config |
|---|---|---|
| openai | Chat completions | OPENAI_API_KEY, CLAWQL_OPENAI_BASE_URL |
| anthropic | Messages API | ANTHROPIC_API_KEY, CLAWQL_ANTHROPIC_BASE_URL |
| ollama | Local /api/chat | OLLAMA_BASE_URL (default http://127.0.0.1:11434) |
Model ids use provider/model (e.g. anthropic/claude-sonnet-4, ollama/phi4).
Enable / disable plugins
| Env | Effect |
|---|---|
CLAWQL_INFERENCE_PROVIDERS=openai,anthropic | Allowlist — only listed provider plugins register |
CLAWQL_INFERENCE_DISABLE_PROVIDERS=ollama | Denylist — skip listed builtins |
Plugin contract
import type { InferenceProviderPlugin } from 'clawql-inference'
export function createGroqProviderPlugin(): InferenceProviderPlugin {
return {
id: 'groq',
version: '1.0.0',
onRegister({ env, registry }) {
registry.set('groq', createGroqAdapter({ apiKey: env.GROQ_API_KEY }))
},
}
}
Compose builtins + extensions:
import {
composeProviderPlugins,
createInferenceGateway,
createProviderRegistry,
} from 'clawql-inference'
const gateway = createInferenceGateway({
providers: createProviderRegistry({
env: process.env,
plugins: composeProviderPlugins({
extensions: [createGroqProviderPlugin()],
}),
}),
})
Publish third-party packages as clawql-*-inference-provider (or in-repo under packages/) and pass them to composeProviderPlugins(\{ extensions: [...] \}) — same pattern as horizontal MCP plugins, without runtime npm discovery.
Subpath export
clawql-inference/plugin— builtins, compose helpers, adapter factories for authors
