Skip to main content

Model Providers for LLMs

A Large Language Model (LLM) is a neural network trained on large text corpora. You send it a prompt (a text instruction) and it generates a response. LLMs power natural language tasks such as answering questions, summarizing content, extracting structured data, and planning and executing tool calls.

A Model Provider is WSO2 Integrator's unified abstraction over LLMs. It wraps the provider-specific API behind a consistent interface, so Direct LLM Calls, Natural Functions, the RAG generate node, and AI agents all work the same way regardless of which LLM you choose. Pick a provider, fill in the form, and click Save.

Every model provider exposes the same two actions, so switching LLMs is a connection-level swap that leaves the rest of your flow unchanged.

Available actions

Every model provider exposes the following actions.

ActionWhat it doesRequired parametersOptional parameters
GenerateSends a prompt to the model and binds the response to a typed Ballerina value. The everyday action behind a generate node, a Natural Function, or RAG ai:generate.Prompt (the instruction template), Expected Type (the type the response is parsed into)None per call. Anything you want to tune (temperature, max tokens) lives on the connection.
ChatSends a list of chat messages and (optionally) tool definitions; returns the model's reply, including any tool calls. Used by Agents.Messages (the conversation), Tools (tool definitions for tool calling)Stop (a stop sequence).
note

Per-call overrides are not exposed in the form. Anything that varies per request belongs in the prompt; anything that varies across the project is set once on the connection (see Standard HTTP advanced configurations below).

Where to find model providers for LLM

  • Add Node panel > AI > Direct LLM > Model Provider

Right-side Model Providers panel showing the search bar and a + Add Model Provider button at the top of an empty list.

  • Click + Add Model Provider and the Select Model Provider picker opens with a card for each provider type:

Select Model Provider picker listing Default Model Provider (WSO2), Anthropic, Azure OpenAI, DeepSeek, Google Vertex, Mistral, Ollama, OpenAI, with one-line descriptions for each.

Scroll to see the remaining options:

Select Model Provider picker scrolled to show DeepSeek (highlighted), Google Vertex, Mistral, Ollama, OpenAI, and OpenRouter Model Provider entries.

Implementations overview

ProviderModuleAPI key required?Has embedding provider?
Default WSO2ballerina/aiNo (signed-in via WSO2)Yes. See Default WSO2 Embedding Provider
Anthropicballerinax/ai.anthropicYesNo
Azure OpenAIballerinax/ai.azureYesYes
DeepSeekballerinax/ai.deepseekYesNo
Google Vertexballerinax/ai.googleapis.vertexOAuth2 / service accountYes
Mistralballerinax/ai.mistralYesNo
Ollamaballerinax/ai.ollamaNo (local)No
OpenAIballerinax/ai.openaiYesYes
OpenRouterballerinax/ai.openrouterYesYes

Standard HTTP advanced configurations

Every provider with a hosted endpoint (all providers except the Default WSO2 provider, which is preconfigured) shares the same HTTP-level advanced configurations. They tune the underlying HTTP client and apply to every request the provider makes.

FieldDefaultAvailable valuesWhat it controls
Service URLprovider-specificURL stringOverride the provider's API base URL - useful for OpenAI-compatible gateways or self-hosted endpoints.
Maximum Tokens512Any positive integerHard cap on the response length.
Temperature0.70.0-2.0 (provider-dependent)Sampling temperature. Lower = more deterministic, higher = more creative. Use 0.0 for the most reproducible results.
HTTP VersionHTTP_2_0HTTP_1_1, HTTP_2_0The HTTP version used for requests.
HTTP1 Settings{}Record (keep-alive, version, chunking)HTTP/1.x protocol settings.
HTTP2 Settings{}RecordHTTP/2 protocol settings.
Timeout60 (seconds)Any positive numberPer-request timeout.
Forwarded"disable""disable", "enable", "transient"Whether to set Forwarded / X-Forwarded-For headers when behind a proxy.
Pool Configuration{}Record (max active, idle time)Request pool settings.
Cache Configuration{}RecordHTTP response caching.
CompressionAUTOAUTO, ALWAYS, NEVERaccept-encoding handling.
Circuit Breaker Configuration{}Record (rollingWindow, failureThreshold, resetTime, statusCodes)Open the breaker on repeated failures so calls fail fast and recover.
Retry Configuration{}Record (count, interval, backOffFactor, maxWaitInterval, statusCodes)Retry on failure.
Response Limits{}Record (max body, max headers)Maximum inbound response size.
Secure Socket()Record (trust store, key store, client auth)TLS / SSL options.
Proxy()Record (host, port, userName, password)HTTP proxy settings.
Validationtruetrue, falseInbound payload validation.
note

The same set of fields appears in the Advanced Configurations section of every provider's Create form. Below, each provider's section only calls out provider-specific knobs that go on top.

Default WSO2 model provider

Provided by the core ballerina/ai package. Routes through the WSO2 intelligence service. No API key in your source. A one-time WSO2 sign-in writes the credentials into your project's Config.toml. The fastest way to get an LLM running while you're prototyping.

Create form

Create Model Provider form for the Default WSO2 provider. Header reads 'Creates a default model provider based on the provided wso2ProviderConfig'. Banner: 'This is a simple operation that requires no parameters. Specify where to store the result to finish.' Two fields: Model Provider Name (default aiWso2modelprovider) and Result Type (locked to ai). Save button.

No provider-specific fields. Sign in with your WSO2 account and WSO2 Integrator handles the rest. There are no advanced configurations on this provider.

tip

When you click Save, the Command Palette opens with Ballerina: Configure default WSO2 model provider. Sign in once and the credentials are written to Config.toml automatically. You can re-run the command at any time to refresh.

Anthropic

Anthropic's Claude family includes three model tiers: Opus, Sonnet, and Haiku.

Official website: anthropic.com.

Create form

Create Model Provider form for Anthropic showing two required fields: API Key and Model Type. Below: Advanced Configurations Expand link, Model Provider Name anthropicModelprovider, Result Type anthropic.

FieldRequiredDefaultAvailable values
API KeyYes-Anthropic API key.
Model TypeYes-claude-sonnet-4-5, claude-sonnet-4-5-20250929, claude-haiku-4-5, claude-haiku-4-5-20251001, claude-opus-4-5, claude-opus-4-5-20251101, claude-opus-4-6, claude-sonnet-4-6, claude-opus-4-1-20250805, claude-opus-4-20250514, claude-sonnet-4-20250514, claude-3-7-sonnet-20250219, claude-3-5-haiku-20241022, claude-3-5-sonnet-20241022, claude-3-5-sonnet-20240620, claude-3-opus-20240229, claude-3-sonnet-20240229, claude-3-haiku-20240307.

Advanced configurations

Anthropic Create Model Provider form with Advanced Configurations expanded showing Service URL (default https://api.anthropic.com/v1), Maximum Tokens (default 512), Temperature (default 0.7), HTTP Version.

FieldDefaultAvailable valuesWhat it controls
Service URLhttps://api.anthropic.com/v1URL stringAnthropic API base URL.
Maximum Tokens512Any positive integerHard cap on response length. Anthropic always sends this on every call, so the connection always carries a default.
Temperature0.70.0-1.0Sampling temperature.

Plus the Standard HTTP advanced configurations.

Azure OpenAI

Same family of models as OpenAI, hosted on Azure with per-resource deployments.

Official website: Azure OpenAI Service.

Create form

Create Model Provider form for Azure OpenAI showing four required fields: Service URL, API Key, Deployment ID, API Version. Below: Advanced Configurations Expand link, Model Provider Name azureOpenaimodelprovider, Result Type azure.

FieldRequiredDefaultAvailable values
Service URLYes-Base URL of your Azure OpenAI resource, e.g. https://your-resource.openai.azure.com.
API KeyYes-Azure OpenAI API key.
Deployment IDYes-The deployment identifier you created in the Azure portal (the model name is implicit in the deployment).
API VersionYes-Azure OpenAI API version, e.g. 2023-07-01-preview.

Advanced configurations

Azure OpenAI Create Model Provider form with Advanced Configurations expanded. Visible fields: Maximum Tokens (default 512), Temperature (default 0.7), HTTP Version.

FieldDefaultAvailable valuesWhat it controls
Maximum Tokens512Any positive integerHard cap on response length.
Temperature0.70.0-2.0Sampling temperature.

Plus the Standard HTTP advanced configurations.

info

The Azure package also ships an Embedding Provider and the Azure AI Search Knowledge Base. See Azure OpenAI and Azure AI Search.

DeepSeek

DeepSeek's chat and reasoning models.

Official website: deepseek.com.

Create form

Create Model Provider form for DeepSeek showing one required field: API Key. Below: Advanced Configurations Expand link, Model Provider Name deepseekModelprovider, Result Type deepseek.

FieldRequiredDefaultAvailable values
API KeyYes-DeepSeek API key.

Advanced configurations

DeepSeek Create Model Provider form with Advanced Configurations expanded showing Model Type (default DEEPSEEK_CHAT), Service URL (default https://api.deepseek.com), Maximum Tokens (default 512), Temperature (default 0.7), HTTP Version, HTTP1 Settings.

FieldDefaultAvailable valuesWhat it controls
Model Typedeepseek-chat (WSO2 Integrator shows the constant DEEPSEEK_CHAT)deepseek-chat, deepseek-reasonerWhich DeepSeek model to use.
Service URLhttps://api.deepseek.comURL stringDeepSeek API base URL.
Maximum Tokens512Any positive integerHard cap on response length.
Temperature0.70.0-1.0Sampling temperature.

Plus the Standard HTTP advanced configurations.

Google Vertex AI

Vertex AI exposes Google's Gemini models alongside hosted Anthropic, Mistral, Meta, DeepSeek, and other open-weight models.

Official website: Vertex AI.

Create form

Create Model Provider form for Google Vertex showing three required fields: Auth (record/expression toggle, with hint 'OAuth2RefreshConfig for OAuth2 refresh token flow, or ServiceAccountConfig for automatic token refresh via service account'), Project ID, Model (with hint 'The model in publisher/model-name format, e.g., google/gemini-2.0-flash'). Below: Advanced Configurations Expand link, Model Provider Name vertexModelprovider, Result Type vertex.

FieldRequiredDefaultAvailable values
AuthYes-OAuth2 refresh-token record, a service-account record, or a path to a service-account JSON file. See auth options below.
Project IDYes-Your Google Cloud project ID.
ModelYes-Publisher-prefixed model name. Examples: google/gemini-2.0-flash, anthropic/claude-sonnet-4-6, mistralai/mistral-medium-3, meta/llama-4-maverick-17b-128e-instruct-maas, deepseek-ai/deepseek-v3-0324, qwen/qwen3-235b-a22b, kimi/kimi-k2, minimax/minimax-m2.

Advanced configurations

Google Vertex Create Model Provider form with Advanced Configurations expanded showing Location (default 'global'), Service URL (default 'https://{location}-aiplatform.googleapis.com').

FieldDefaultAvailable valuesWhat it controls
Locationglobalglobal, us-central1, europe-west1, etc.Google Cloud region.
Service URL"" (auto-derived from Location)URL stringOverride the regional endpoint. Defaults to https://\{location\}-aiplatform.googleapis.com.
Maximum Tokens512Any positive integerHard cap on response length.
Temperature() (omitted from request)0.0-2.0 or emptySampling temperature. Leave empty for models that reject the field (e.g. some Anthropic-on-Vertex calls).

Plus the Standard HTTP advanced configurations.

Vertex auth options

Auth typeFieldsWhen to use
OAuth2 refresh configclientId, clientSecret, refreshToken, optional refreshUrlAlready have OAuth2 refresh-token credentials.
Service account configclientEmail, privateKey, optional scopesWant explicit credentials in source.
Service account JSON pathA file path stringEasiest - point at the downloaded service-account JSON file from the Google Cloud console. The connector reads client_email and private_key automatically and refreshes the token.
info

Vertex also ships an Embedding Provider. See Google Vertex.

Mistral

EU-hosted Mistral and Mixtral models, including Codestral and Pixtral.

Official website: mistral.ai.

Create form

Create Model Provider form for Mistral showing two required fields: API Key and Model Type. Below: Advanced Configurations Expand link, Model Provider Name mistralModelprovider, Result Type mistral.

FieldRequiredDefaultAvailable values
API KeyYes-Mistral AI API key.
Model TypeYes-mistral-large-latest, mistral-medium-latest, mistral-small-latest, codestral-latest, ministral-8b-latest, ministral-3b-latest, pixtral-large-latest, open-mixtral-8x22b, open-mixtral-8x7b, open-mistral-nemo, devstral-small-latest, mistral-saba-latest. Date-pinned variants (e.g. mistral-large-2411, codestral-2501) are also available.

Advanced configurations

Mistral Create Model Provider form with Advanced Configurations expanded showing Service URL (default https://api.mistral.ai/v1), Maximum Tokens (default 512), Temperature (default 0.7).

FieldDefaultAvailable valuesWhat it controls
Service URLhttps://api.mistral.ai/v1URL stringMistral API base URL.
Maximum Tokens512Any positive integerHard cap on response length.
Temperature0.70.0-1.0Sampling temperature.

Plus the Standard HTTP advanced configurations.

Ollama

Local model runner. Nothing leaves the machine. It is useful for offline development, privacy-sensitive flows, and any model Ollama supports.

Official website: ollama.com.

Create form

Create Model Provider form for Ollama showing one required field: Model Type. Below: Advanced Configurations Expand link, Model Provider Name ollamaModelprovider, Result Type ollama.

FieldRequiredDefaultAvailable values
Model TypeYes-Anything ollama pull can fetch (e.g. llama3.2, mistral, qwen2.5).

Advanced configurations

Ollama exposes Mirostat sampling and other decoding controls that the hosted providers don't.

Ollama Create Model Provider form with Advanced Configurations expanded showing Service URL (default http://localhost:11434), Mirostat Sampling (default 0, options 0=disabled, 1=Mirostat, 2=Mirostat 2.0), Mirostat Eta (default 0.1), Mirostat Tau (default 5.0), Context Window Size (default 2048).

FieldDefaultAvailable valuesWhat it controls
Service URLhttp://localhost:11434URL stringURL of the local Ollama daemon.
Mirostat Sampling00 (disabled), 1 (Mirostat), 2 (Mirostat 2.0)Whether to use Mirostat sampling for controlling perplexity.
Mirostat Eta0.1Any positive numberMirostat learning rate. Higher = more responsive to feedback.
Mirostat Tau5.0Any positive numberMirostat target perplexity. Lower = more focused, more coherent.
Context Window Size2048Any positive integerContext window in tokens.
Repeat Last N640 (disabled), -1 (=context window), or a positive integerLook-back window for repetition penalty.
Repeat Penalty1.1Any positive numberRepetition penalty strength. Higher = stronger penalty.
Temperature0.8Any positive numberSampling temperature.
Seed0Any integerRandom seed for deterministic generation.
Number Of Tokens To Predict-1-1 (unlimited) or any positive integerMaximum tokens to generate.
Top K40Any positive integerTop-K sampling.
Top P0.90.0-1.0Top-P (nucleus) sampling.
Min P0.00.0-1.0Minimum probability filter relative to the top token.

Plus the Standard HTTP advanced configurations.

note

Ollama is the only provider with no API key. Authentication is implicit because the daemon trusts callers on localhost.

OpenAI

Connects to OpenAI's hosted models (GPT-4o, GPT-4.1, o1 reasoning models, GPT-3.5-turbo).

Official website: platform.openai.com.

Create form

Create Model Provider form for OpenAI showing two required fields: API Key (text/expression toggle) and Model Type (select/expression toggle, value 'No Selection'), then Advanced Configurations Expand link, Model Provider Name set to openaiModelprovider, Result Type set to openai.

FieldRequiredDefaultAvailable values
API KeyYes-Your OpenAI API key (starts with sk-…). Reference a configurable in production.
Model TypeYes-gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4-turbo, gpt-3.5-turbo, o1, o1-pro, chatgpt-4o-latest, gpt-4o-audio-preview. Date-pinned variants (e.g. gpt-4o-2024-11-20) are also available for reproducibility.

Advanced configurations

OpenAI Create Model Provider form with Advanced Configurations expanded. Visible fields: Service URL (default https://api.openai.com/v1), Maximum Tokens (default 512), Temperature (default 0.7), HTTP Version (default http), HTTP1 Settings, HTTP2 Settings, Timeout.

FieldDefaultAvailable valuesWhat it controls
Service URLhttps://api.openai.com/v1URL stringOpenAI API base URL. Override only for OpenAI-compatible gateways.
Maximum Tokens512Any positive integerHard cap on response length.
Temperature0.70.0-2.0Sampling temperature.

Plus the Standard HTTP advanced configurations (Timeout, Retry, Circuit Breaker, Proxy, etc.).

info

The OpenAI package also ships an Embedding Provider. See OpenAI.

OpenRouter

OpenRouter routes a single API across many model providers (OpenAI, Anthropic, Mistral, Meta, Cohere, and others). Use it when you want one key and the freedom to swap models by string.

Official website: openrouter.ai.

Create form

Create Model Provider form for OpenRouter showing two required fields: API Key (with link to https://openrouter.ai/keys) and Model Type (with example values 'openai/gpt-4o', 'anthropic/claude-3.5-sonnet'). Below: Advanced Configurations Expand link, Model Provider Name openrouterModelprovider, Result Type openrouter.

FieldRequiredDefaultAvailable values
API KeyYes-OpenRouter API key. Get one from openrouter.ai/keys.
Model TypeYes-Qualified model name. Examples: openai/gpt-4o, anthropic/claude-3.5-sonnet, mistralai/mistral-large, meta-llama/llama-3.1-70b-instruct. See OpenRouter's model list.

Advanced configurations

OpenRouter Create Model Provider form with Advanced Configurations expanded showing Service URL (default https://openrouter.ai/api/v1), Site URL (sent as HTTP-Referer header), Site Name (sent as X-OpenRouter-Title header), Maximum Tokens (default 512), Temperature (default 0.7), HTTP Version.

FieldDefaultAvailable valuesWhat it controls
Service URLhttps://openrouter.ai/api/v1URL stringOpenRouter API base URL.
Site URL()URL string or emptyOptional site URL sent as the HTTP-Referer header. Used by OpenRouter for site attribution and leaderboards.
Site Name()String or emptyOptional site name sent as the X-OpenRouter-Title header.
Maximum Tokens512Any positive integerHard cap on response length.
Temperature() (omitted)0.0-2.0 or emptySampling temperature. Leave empty to omit.

Plus the Standard HTTP advanced configurations.

info

The OpenRouter package also ships an Embedding Provider. See OpenRouter.

Model provider connections

Once you save a model provider, it becomes a reusable project connection that can be accessed throughout your integration and AI flows.

The saved model provider appears in multiple places:

  • In the Connections tree on the left side of the project explorer, where all project-level connections are listed (for example, wso2ModelProvider or openaiModelProvider).

  • The integration project's Design view wires each artifact to the provider it depends on:

The integration project Design overview with the left sidebar Connections tree populated with four model-provider connections, and the main canvas wiring three artifacts (chat agent service, HTTP service, MCP service) to their respective model-provider nodes on the right with provider logos.

  • The Model Providers panel lists every model provider connection available in the project. Use the + button to add a new provider connection, or expand a provider to view its available actions.

The Model Providers right-side panel listing four model-provider connections - anthropicModelprovider, azureOpenaimodelprovider, openaiModelprovider, wso2ModelProvider - each with a chevron and provider logo.

Editing or replacing a model provider

To change a provider's API key, model name, or any other field after it's been created, click the provider name in the left Connections tree. The Edit Connection modal opens:

Edit Connection modal centered on screen with Variable Name field, Variable Type field with edit pencil icon, Update Connection button at the bottom.

FieldWhat it does
Variable NameRename the connection. Updates every reference automatically.
Variable TypeThe Ballerina type. Click the pencil icon to change it (e.g. swap one provider implementation for another - OpenAI to Azure OpenAI - without renaming the connection in the rest of your code).
Advanced ConfigurationsExpand to edit HTTP and model parameters.
Update ConnectionSave the change. Existing nodes that referenced the connection continue to work.
tip

Editing a connection follows the same pattern for every component type. Embedding providers, vector stores, knowledge bases, and chunkers all use the same Edit Connection modal.

What's next

  • Embedding providers — Vector embeddings for RAG. The OpenAI, Azure, Vertex, OpenRouter, and Default WSO2 packages also ship embedding providers.
  • Vector stores — Persist and query embeddings using Pinecone, Weaviate, Qdrant, pgvector, and other backends.
  • Knowledge bases — Managed retrieval sources, including Azure AI Search, that plug directly into RAG flows.
  • Chunkers — Split documents into chunks before embedding for ingestion into a vector store.