{
  "uid": "cogitave.learn.docs.choose-a-provider",
  "kind": "doc",
  "href": "/docs/choose-a-provider/",
  "title": "Choose a provider",
  "summary": "The model providers Namzu ships as drivers, how to register one, what changes when you switch, and which to pick for local development, hosted inference, aggregation, or an OpenAI-compatible endpoint of your own.",
  "type": "how-to",
  "products": [
    "namzu"
  ],
  "roles": [
    "developer"
  ],
  "levels": [
    "beginner"
  ],
  "subjects": [],
  "headings": [
    "The drivers",
    "Register one",
    "Which one to start with",
    "What stays the same across drivers",
    "Next steps"
  ],
  "source": "\n# Choose a provider\n\nNamzu keeps model vendors out of the kernel. Each vendor is a **driver** in its\nown package; you install the one you use and register it once. Everything after\nthe registration line is vendor-neutral, so switching is a change to one import\nand one call.\n\n## The drivers\n\n| Package | Use it for |\n|---|---|\n| `@namzu/ollama` | Local inference. Zero-config default, no key, no network egress. |\n| `@namzu/lmstudio` | Local inference over LM Studio's WebSocket interface. |\n| `@namzu/openai` | OpenAI Chat Completions. |\n| `@namzu/anthropic` | Anthropic Messages API. |\n| `@namzu/bedrock` | AWS Bedrock Converse - useful when the account boundary matters. |\n| `@namzu/openrouter` | Aggregated access to many models behind one key. |\n| `@namzu/http` | Any OpenAI- or Anthropic-compatible endpoint. Zero dependencies. |\n| *(none)* | `MockLLMProvider`, pre-registered with the kernel. No network. |\n\n## Register one\n\nRegistration is two lines, and the shape is the same for every driver:\n\n```typescript\nimport { ProviderRegistry } from '@namzu/sdk'\nimport { registerOllama } from '@namzu/ollama'\n\nregisterOllama()\n\nconst { provider } = ProviderRegistry.create({\n  type: 'ollama',\n  host: 'http://localhost:11434',\n})\n```\n\nTo move to a hosted vendor, change the import and the `type`:\n\n```typescript\nimport { registerAnthropic } from '@namzu/anthropic'\n\nregisterAnthropic()\n\nconst { provider } = ProviderRegistry.create({ type: 'anthropic' })\n```\n\nYour agent code does not change.\n\n## Which one to start with\n\n- **Developing, or writing tests?** Install nothing extra. The kernel's\n  `MockLLMProvider` is already registered and needs no network, which makes test\n  runs deterministic and free.\n- **Working offline, or keeping data on your machine?** `@namzu/ollama`. It is the\n  local-first default for a reason: no key, no egress.\n- **Running in production against a frontier model?** `@namzu/openai`,\n  `@namzu/anthropic`, or `@namzu/bedrock`. Pick on the account and compliance\n  boundary you need, not on the API - the kernel hides the API difference.\n- **Comparing many models cheaply?** `@namzu/openrouter`.\n- **Serving your own weights, or a gateway in front of them?** `@namzu/http`,\n  pointed at your endpoint.\n\n> [!TIP]\n> Register the mock in tests and the real driver in production from the same\n> code path. Because the response shape is identical, a test that passes against\n> the mock is exercising the same contract the vendor will satisfy.\n\n## What stays the same across drivers\n\nEvery provider returns:\n\n```typescript\n{ id, model, message: { role, content, toolCalls? }, finishReason, usage }\n```\n\nThat is the contract. A driver that cannot satisfy it is a bug in the driver, not\nsomething your agent has to work around.\n\n## Next steps\n\n- [Quickstart](quickstart.md) - the shortest end-to-end path.\n- [Check your environment](check-your-environment.md) - confirm a driver is\n  reachable before you debug your agent.\n- [Packages](packages.md) - versions and the rest of the surface.\n",
  "lastReviewed": "2026-07-26",
  "order": 1
}