Skip to content

About

OpenWebUI for multiple AI models, including OpenAI, Gemini, Claude, and others

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Proxy Multiple Model

Proxy Multiple Model is a proxy engine that unifies multiple AI providers into a single OpenAI-compatible API. Instead of integrating each provider separately into your application, you only need to configure the providers once, and the proxy will automatically route requests to the appropriate AI service.

The proxy supports multiple providers, including:

  • Vertex AI
  • OpenAI
  • Google AI Studio
  • Ollama

By centralizing all AI providers behind a single endpoint, you can easily connect applications such as Open WebUI, your own custom applications, or any other software that supports the OpenAI API.


Configuration

Server Configuration

PORT=9090

Note The proxy listens on port 9090 by default. If you change this value, make sure the same port is also updated in your .env file and Docker configuration if applicable.


Vertex AI Configuration

Vertex AI Project ID

VERTEXAI_PROJECT={vertex-project-id}

Example:

my-project-4860

Note You can find your Vertex AI Project ID in your Google Cloud Platform (GCP) project.


Vertex AI Location

VERTEXAI_LOCATION={location}

Examples:

global
us-central1

Vertex AI Anthropic Version

Some Anthropic models on Vertex AI require an Anthropic API version.

VERTEXAI_ANTHROPIC_VERSION={vertexai-anthropic-version}

Example:

vertex-2023-10-16

Available Vertex AI Models

VERTEXAI_AVAILABLE_MODELS={model-list-vertex}

Example:

[
  "google/gemini-2.5-pro",
  "google/gemini-2.5-flash",
  "google/gemini-2.5-flash-image",
  "gemini-3.1-pro-preview",
  "gemini-3-flash-preview",
  "claude-sonnet-4-6"
]

Note Vertex AI does not provide an API for retrieving the list of models available in your project. You must define the available models manually.


Google Cloud Credentials

Place your Google Cloud service account credentials in the project root directory using the following filename:

credential-gcp.json

Project structure:

project/
├── credential-gcp.json
├── docker-compose.yml
├── .env
└── ...

OpenAI Configuration

OPENAI_API_KEY={openai-api-key}

Set this value to enable OpenAI models.


Ollama Configuration

OLLAMA_BASE_URL={ollama-base-url}

If you are running Ollama on a Linux host without Docker, you must expose the Ollama server so it can be accessed by Docker containers.

Step 1. Edit the Ollama service

sudo systemctl edit ollama.service

Add the following configuration:

[Service]
Environment="OLLAMA_HOST=0.0.0.0"

Step 2. Reload and restart Ollama

sudo systemctl daemon-reload
sudo systemctl restart ollama

Step 3. Configure the proxy

Update your .env file:

OLLAMA_BASE_URL=http://host.docker.internal:11434

Note On some Linux distributions, host.docker.internal may not be available. If necessary, replace it with your host machine's IP address.


Running the Project

Build the Docker image

docker compose build

Start the service

docker compose up

Once the service is running, the OpenAI-compatible API will be available at:

http://localhost:9090/v1

Architecture

The following diagram illustrates how the proxy engine centralizes multiple AI providers behind a single OpenAI-compatible endpoint.

Proxy OpenWebUI Architecture


API Endpoints

List Available Models

Returns all configured models across every enabled provider.

GET http://localhost:9090/v1/models

Chat Completions

OpenAI-compatible endpoint:

POST http://localhost:9090/v1/chat/completions

Legacy endpoint (also supported):

POST http://localhost:9090/chat/completions

Open WebUI Setup

1. Admin Panel → Connections

Add a new OpenAI connection and configure it to use the proxy.

Open WebUI Connections


2. Admin Panel → Models

Refresh the model list after the connection has been added.

Open WebUI Models


Documentation

For a complete guide and implementation details, read the full documentation:

https://medium.com/@mdhiftaa/openwebui-proxy-multiple-models-b072e734385d?sharedUserId=mdhiftaa

About

OpenWebUI for multiple AI models, including OpenAI, Gemini, Claude, and others

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages