Skip to main content
You can integrate third-party LLM models from a variety of supported providers through the AI Gateway system. The gateway also supports the configuration of routing policies, enabling use cases such as load balancing and fallback across multiple models.

Supported providers

Note: When importing a model from OpenRouter, always set the max_token parameter explicitly. If you skip this step, the system defaults to 65536 tokens. This high token count can cause the request to fail if you don’t have enough credits.

CLI Reference

You can add a model to the watsonx Orchestrate AI gateway using the orchestrate models import command.
1

Define the model specification file

granite-3-3-8b-model.yaml
2

Create an API key connection

3

Add the model

Arguments:
  • --file (-f): File path of the spec file containing the model configuration.
  • --app-id (-a): The app ID of a key_value connection containing provider configuration details. These will be merged with the values provided in the provider_config section of the spec.

Examples using the supported providers

The following sections contain examples and the supported schemas for each model provider.
provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Define the model specification file

Then, you can define a specification file to provide the details about the model and the provider configuration specifications:
gpt-5-2025-08-07.yaml
2

Create an API key connection

To safely use the OpenAI API key, you must first create a connection:
BASH
3

Add the model

You can now add the model using the specification file and the connection that you created:
provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Define the model specification file

watsonx-model.yaml
2

Create an API key connection

Note:When you add a watsonx.ai virtual model, include the provider-config details. Without them, chat access to the model may fail. Provide custom host details using the —provider-config flag in the orchestrate models add command. For more information, see Using the CLI only.
3

Add the model

Notes:
  • Provide one of: watsonx_space_id, watsonx_project_id, or watsonx_deployment_id.
  • Include watsonx_cpd_url, watsonx_cpd_username, watsonx_cpd_password only for on-prem (CPD) setups.
  • When deploying Deploy on Demand (DoD) models, you need to explicitly provide the model configuration during registration. Set these configuration values according to the model’s requirements, since they don’t automatically transfer during inference from the watsonx Orchestrate side.
provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Define the model specification file

Then, you can define a specification file to provide the details about the model and the provider configuration specifications:
gpt-oss-120b.yaml
2

Create an API key connection

To safely use the API key, you must first create a connection:
BASH
3

Add the model

You can now add the model using the specification file and the connection that you created:
provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Define the model specification file

anthropic-claude.yaml
2

Create an API key connection

3

Add the model

provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Define the model specification file

google-genai.yaml
2

Create an API key connection

3

Add the model

provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Define the model specification file

azure-gpt.yaml
2

Create an API key connection

3

Add the model

provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Define the model specification file

azure-openai-gpt.yaml
2

Create an API key connection

3

Add the model

provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Define the model specification file

aws-bedrock-model.yaml
2

Create an API key connection

3

Add the model

Note:
  • You must provide either the api_key, aws_secret_access_key, or aws_access_key_id.
  • You must provide the model name in the name field.
  • When deploying Deploy on Demand (DoD) models, you need to explicitly provide the model configuration during registration. Set these configuration values according to the model’s requirements, since they don’t automatically transfer during inference from the watsonx Orchestrate side.
provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Define the model specification file

mistral-large.yaml
2

Create an API key connection

3

Add the model

provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Create an API key connection

2

Define the model specification file

openrouter-model.yaml
3

Add the model

provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Create an API key connection

2

Define the model specification file

xai-model.yaml
3

Add the model

provider_config
object
The fields which can either be set by connection or by the provider_config field of the model. Values from a connection will be merged with the provider_config.
Example usage:
1

Start ollama

In some systems, ollama might run under the systemctl, so you need to stop it before you run the Ollama server:
Then you can start the Ollama server and download the model, if it has not started yet:
2

Get your IP address

You can get your network IP address by running:
3

Testing your connection

Before you import the model, it is a good idea to test your connection to guarantee the watsonx Orchestrate Developer Edition server can connect to the Ollama server.
  1. Use the following curl command to test your connection, replacing 198.51.100.42 with the IP address that you obtained in the previous step:
  1. Enter the watsonx Orchestrate Developer Edition gateway container:
  1. Run the curl command again from within the container shell.
Tips: If you experience connection issues with Ollama:
  • Wait a few minutes after starting the server before running the command.
  • Restart the Ollama server.
  • Close any VPN clients.
  • Try reconnecting to both Wi-Fi and wired Ethernet simultaneously.
  • Avoid switching networks during the process.
  • Reset the watsonx Orchestrate Developer Edition server:
4

Define the model specification file

For Ollama, you don’t need to create a connection or use an actual API key. You can use a string such as ollama as an API key.You must use your current local network IP address as your URL. Ollama will not work if you use localhost or 0.0.0.0 in the model specification file.
ollama-llama2.yaml
Remember: Replace http://198.51.100.42:11434 with the IP address that you have obtained in the previous step.
5

Add the model

List all LLMs

Run the orchestrate models list command to see all available LLMs in your active environment.
BASH
Note:By default, you see a table of available models. If you prefer raw output, add the --raw (-r) flag.

Removing custom LLMs

Run the orchestrate models remove command and use the --name (-n) flag to specify the LLM you want to remove.
BASH

Updating custom LLM

To update a custom LLM, first remove it, then add it again:
BASH

Additional configuration options

Setting a default LLM in the UI

If you use an on-premises installation with models provisioned only through the AI gateway, you can choose which model appears as the default in the user interface. To do this, add the default tag under the tags section of a model with the type set to chat.
granite-default-model.yaml
Note:For on-premises installations using only externally hosted virtual-models, at least one model must be specified as the default model or it will not be possible to open the “Create Agent” page in the UI.

Setting a default LLM for knowledge bases

If you use an on-premises installation with models provisioned only through the AI gateway, you can also set a default model for knowledge bases. To do this, add the default tag under the tags section of a model with the type set to embedding.
virtual-model.yaml

Registering a watsonx model by using your watsonx credentials

You can also register a watsonx model that uses your watsonx credentials supplied in your .env file when you start the watsonx Orchestrate Developer Edition. For that, your .env file must contain either:
  • Your watsonx.ai credentials with the WATSONX_APIKEY and WATSONX_SPACE_ID environment variables.
  • Or, your watsonx Orchestrate credentials with the WO_INSTANCE and WO_API_KEY environment variables.
To learn how to configure you .env file with these credentials, see Installing the watsonx Orchestrate Developer Edition. To register the watsonx model using this method, set the api_key credential value to “gateway”. You do not need to specify a space_id when you add the model. See the following example:
Note:This requirement does not apply to on-premises deployments.
BASH