Providers

Anthropic

Use Anthropic completion models with Anvia.

Use @anvia/anthropic when you want Anthropic completion models through Anvia's normalized runtime.

Completion Model

import { AgentBuilder } from "@anvia/core";
import { AnthropicClient } from "@anvia/anthropic";

const client = new AnthropicClient({ apiKey });
const model = client.completionModel("claude-opus-4-6");

const agent = new AgentBuilder("support", model)
  .instructions("Answer support questions clearly.")
  .build();

Anthropic models can be used anywhere Anvia expects a completion model.

Custom Client Options

const client = new AnthropicClient({
  apiKey: config.anthropic.apiKey,
  baseUrl: config.anthropic.baseUrl,
});

Use this form when secrets are injected by your app framework instead of read directly from process.env.

Capabilities

CapabilityExample
Completionclient.completionModel("claude-opus-4-6")
Tool useSupported through Anvia tools
StreamingSupported through normalized streaming events

Provider support can vary for attachments, tool behavior, streaming fields, and model-specific parameters. Anvia normalizes the SDK surface, but it does not make every model capability identical.