Models
Choose and configure completion and embedding models for Anvia agents.
Anvia treats models as capabilities. A completion model can answer prompts and call tools. An embedding model can turn text into vectors for retrieval.
Provider clients create those capabilities, then agents, extractors, pipelines, and retrieval code consume them through provider-neutral interfaces.
import { AgentBuilder } from "@anvia/core";
import { OpenAIClient } from "@anvia/openai";
const openai = new OpenAIClient({ apiKey });
const model = openai.completionModel("gpt-5");
const agent = new AgentBuilder("support", model)
.instructions("Answer clearly and ask for missing details.")
.build();Model Categories
| Category | Use it for |
|---|---|
| Completion | Agents, extractors, prompt steps, streaming, and tool calls |
| Embeddings | Retrieval, document search, semantic routing, and vector stores |
| Compatible providers | OpenAI-compatible APIs through OpenAIClient({ baseUrl, apiKey }) |
| Vertex AI | Gemini through GeminiClient({ vertexai: true, project, location }) |
Providers
| Provider | Page |
|---|---|
| OpenAI | OpenAI Models |
| Anthropic | Anthropic Models |
| Google Gemini | Google Gemini Models |
| OpenAI-compatible | Compatible Provider Models |
