Skip to main content
For exact v4 signatures and all public model exports, use the models and messages API reference. This page explains selected types. Factory examples configure adapters; they do not call providers. Install each adapter’s optional dependency from its guide. Current text-model choices are maintained in example models.

ModelProvider Interface

Every model in Agentium implements this interface. Use a built-in factory such as openai(), anthropic(), or google(), or implement a custom provider. This page explains common contracts; the installed v4 declarations define the full option surface.

ModelConfig

Options passed to generate() and stream(). Only options exposed by RunOpts can be passed directly to agent.run(). A ModelConfig field is not automatically a supported run option.

Factory Functions and Provider Configs

Provider factories create a ModelProvider. The tables below describe commonly used options; individual provider guides cover integration-specific behavior. Model identifiers are examples, not an availability guarantee.

openai(modelId, config?)

anthropic(modelId, config?)

google(modelId, config?)

vertex(modelId, config?)

ollama(modelId, config?)

deepseek(modelId, config?)

mistral(modelId, config?)

xai(modelId, config?)

perplexity(modelId, config?)

jev(modelId?, config?)

Not a chat model. Pass questions on agent.run(input, { questions }), or fall back to constructor questions / structuredOutput / closed-set tools. See Jev.
Helpers (also exported from @agentium/core): choice(instructions, { label: desc \| null }), noul(instructions?, { true?, false? }), score(instructions, levels[]) — score is 0-indexed, lowest first.

cohere(modelId, config?)

meta(modelId, config?)

awsBedrock(modelId, config?)

awsClaude(modelId, config?)

azureOpenai(modelId, config?)

azureFoundry(modelId, config?)

vercel(modelId, config?)


OpenAI-Compatible Providers

Any API that follows the OpenAI API format can be used with the openai() factory by setting baseURL:

Environment Variables

Quick reference for all provider environment variables: