LLM provider extensions
Provider extensions register a new model source in Settings → Models. They are declarative — no custom server code. The host reads contributes.llmProviders[] and wires credentials, model discovery, and routing.
When to use
- Ship an OpenAI-compatible gateway (Ollama, CLIProxy, LiteLLM, vLLM).
- Wrap a vendor with a standard adapter (
anthropic,openai,openai-oauth). - Document a first-party provider in the marketplace (browse-only, preinstalled).
Study the in-repo samples: glixo-community-modules/bundled/ollama, bundled/cliproxy, bundled/anthropic, bundled/openai.
Minimal provider manifest
Key points:
entryuses the declarative marker:{ "command": "echo", "args": ["declarative-llm-provider"] }capabilitiesincludesglixo.llm.provider.<id>requiresincludescapability.glixo.llmProviders.registercontributes.llmProviders[]defines the UI and adapter
{
"id": "com.example.providers.my-gateway",
"name": "My Gateway Provider",
"kind": "extension",
"version": "0.1.0",
"protocolVersion": "0",
"description": "Connect to my OpenAI-compatible LLM gateway.",
"runtime": { "kind": "node", "version": "20" },
"entry": { "command": "echo", "args": ["declarative-llm-provider"] },
"capabilities": ["glixo.llm.provider.mygateway"],
"requires": ["capability.glixo.llmProviders.register"],
"contributes": {
"llmProviders": [{
"id": "mygateway",
"label": "My Gateway",
"description": "Self-hosted OpenAI-compatible endpoint.",
"icon": "git-network-outline",
"adapter": "openai-compatible",
"credentialFields": [
{
"id": "baseUrl",
"label": "Base URL",
"type": "url",
"required": true,
"defaultValue": "http://127.0.0.1:8080/v1"
},
{
"id": "apiKey",
"label": "API key",
"type": "secret",
"required": false,
"secret": true
}
],
"modelDiscovery": {
"kind": "openai-compatible-models",
"path": "/models"
},
"modelRouting": {
"families": ["openai"],
"patterns": ["*"],
"servesAllFamilies": false
},
"capabilities": ["chat", "streaming", "tools"]
}]
},
"artifacts": [{
"rid": "any",
"url": "artifacts/my-gateway-provider-0.1.0.zip",
"sha256": "<64-char-hex>"
}],
"updateChannels": ["stable"]
}
Adapter and routing fields
| Field | Purpose |
|---|---|
adapter | openai-compatible, openai, openai-oauth, or anthropic |
credentialFields | Settings form: url, secret, text, or oauth |
modelDiscovery | Usually openai-compatible-models at /models |
modelRouting.families | Which model families this provider claims |
modelRouting.patterns | Glob patterns for model ids (e.g. llama*) |
capabilities | chat, streaming, tools, images, reasoning |
Bundled vs marketplace-listed
- Bundled (
bundled: true) — preinstalled with Glixo Code; marketplace entry is browse-only documentation. - Third-party — place under
catalog/code/<your-provider>/, pack a real artifact zip, publish like any extension.
Providers do not need Agxos contributes.agxos — they only affect the model picker.
Test locally
- Add the module under
catalog/code/and runcatalog:sync. - Install in Glixo Code; open Settings → Models.
- Enter credentials and verify model discovery against your gateway.