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

Study the in-repo samples: glixo-community-modules/bundled/ollama, bundled/cliproxy, bundled/anthropic, bundled/openai.

Minimal provider manifest

Key points:

{
  "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

FieldPurpose
adapteropenai-compatible, openai, openai-oauth, or anthropic
credentialFieldsSettings form: url, secret, text, or oauth
modelDiscoveryUsually openai-compatible-models at /models
modelRouting.familiesWhich model families this provider claims
modelRouting.patternsGlob patterns for model ids (e.g. llama*)
capabilitieschat, streaming, tools, images, reasoning

Bundled vs marketplace-listed

Providers do not need Agxos contributes.agxos — they only affect the model picker.

Test locally

  1. Add the module under catalog/code/ and run catalog:sync.
  2. Install in Glixo Code; open Settings → Models.
  3. Enter credentials and verify model discovery against your gateway.