Skip to main content

Plugins extend agent-qa from your config. Each entry is an npm package or a file, resolved from the config file's folder:

plugins:
  auth:
    - package: "@vostride/agent-qa-subscription-auth"
  providers:
    - package: "@acme/agent-qa-provider"
    - path: ./agent-qa-provider.mjs

Auth plugins

An auth plugin adds a way to sign in to a model provider. The one most projects use is @vostride/agent-qa-subscription-auth, which adds the anthropic-subscription and openai-subscription providers for Claude and Codex subscriptions. Install it in the project and declare it, then sign in with agent-qa auth login --config <name>. See Models and credentials.

When a declared auth plugin is not installed, commands that need it stop and say how to install it. When it is installed but fails to load, the message says the fault is in the plugin, not a missing install.

Provider plugins

A provider plugin adds a model provider without changing agent-qa. It exports a descriptor, as its default export or in a providers array:

import { openaiCompatible } from '@vostride/agent-qa-model'

export default {
  id: 'acme-gateway',
  label: 'Acme Gateway',
  authModes: ['api-key'],
  needsBaseURL: true,
  adapter(transport, modelId) {
    return openaiCompatible(
      { ...transport, baseURL: rewriteBaseURL(transport), headers: signHeaders(transport) },
      modelId,
    )
  },
}
FieldRequiredMeaning
idYesThe provider ID used in registry.llms[].provider.
labelYesThe name shown to people.
authModesYesThe kinds of credentials it takes, such as api-key.
adapter(transport, modelId)YesReturns the model client. Compose a built-in adapter from @vostride/agent-qa-model rather than writing streaming and parsing again.
needsBaseURLNoWhether entries must set baseURL.
defaultModelNoA model to suggest.

Then use it like any other provider:

registry:
  llms:
    - name: gateway
      provider: acme-gateway
      model: house-model-1
      baseURL: https://llm.acme.internal/v1

agent-qa auth set saves API keys only for the built-in providers. A provider plugin that needs a credential also needs an auth plugin with the same provider ID.