@nightowlsdev/provider-anthropic
Adapter/ModelAnthropic Claude model provider for Night Owls swarms, backed by the native AI SDK.
What it does
Exposes `anthropicModels(opts?)`, a model factory you pass to `defineSwarm({ modelFactory })` in `@nightowlsdev/core`. It wraps `@ai-sdk/anthropic`'s `createAnthropic`, mapping a model id (e.g. `claude-sonnet-4-6`) to an AI SDK `LanguageModelV3`. By default it reads `ANTHROPIC_API_KEY` from the environment; pass `{ apiKey }` to override. Also ships a declarative `nightOwlsPlugin` manifest the CLI uses to scaffold env/config. Model providers compose: install one `provider-*` package per provider you use, then route per agent with `createModelFactory` from `@nightowlsdev/core`.
Install
pnpm add @nightowlsdev/provider-anthropicKey exports
- anthropicModels
- nightOwlsPlugin
Usage
import { defineSwarm } from "@nightowlsdev/core";
import { anthropicModels } from "@nightowlsdev/provider-anthropic";
// Reads ANTHROPIC_API_KEY from the env by default.
const swarm = defineSwarm({ agents, modelFactory: anthropicModels() });