For AI agents: the complete documentation index is available at https://aioproxy.dev/llms.txt, the full documentation bundle is available at https://aioproxy.dev/llms-full.txt, and this page is available as Markdown at https://aioproxy.dev/guide/providers/ai-sdk-providers.md.
  • English
  • AI SDK Providers (kind: "ai-sdk")

    Beyond built-in HTTP protocols, AIO Proxy supports using any npm package that exports standard Vercel AI SDK provider factories as a native model driver.

    config.jsonc
    {
      "providers": {
        "cohere": {
          "kind": "ai-sdk",
          "packageName": "@ai-sdk/cohere",
          "options": {
            "apiKey": "{{env.COHERE_API_KEY}}",
          },
          "models": ["command-r-plus"],
        },
      },
    }

    How It Works

    1. Flexible Ecosystem: Any package exporting a standard create* factory function conforming to AI SDK standards can be loaded.
    2. Unified Dispatch: Inbound requests (OpenAI Responses, Chat Completions, Anthropic Messages) are mapped into universal model messages and executed via the AI SDK driver.

    Sync Models with Upstream

    Set syncModels: true instead of maintaining a manual models list. Discovery uses the package instance's listModels method when available, otherwise an OpenAI-compatible /models endpoint at options.baseURL. Without either, the Provider reports CATALOG_UNSUPPORTED.

    config.jsonc
    {
      "providers": {
        "relay": {
          "kind": "ai-sdk",
          "packageName": "@ai-sdk/openai-compatible",
          "options": {
            "name": "relay",
            "baseURL": "https://relay.example.com/v1",
            "apiKey": "{{env.RELAY_API_KEY}}",
          },
          "syncModels": true,
          "excludedModels": ["gpt-3.5-turbo"],
        },
      },
    }

    Sync is off by default and is mutually exclusive with a non-empty models list. excludedModels is only valid with syncModels: true; it hides exact model IDs without glob matching. Aliases may target hidden models, and manual models lists work as before.

    Discovery runs immediately on startup and after config changes, then every hour. Failed refreshes retry after 5 minutes once the list is stale; an outage or empty response keeps the last good list. Before the first successful discovery, only aliases route. Changing packageName or options.baseURL discards the old list. Discovery never rewrites the config file.

    The Dashboard models section offers a Manual / Sync with upstream switch, per-model hide controls, the last refreshed time, and a refresh button. API Providers also support model sync.