Practical overview
When it fits
Use it when a Python application needs a normalized chat or completion interface across documented providers, or when a custom function should fit that same client pattern.
Who it is for
- Python developers integrating LLM calls into applications
- Teams that want to configure different supported providers behind a common client interface
- Developers connecting an OpenAI-compatible endpoint or wrapping a custom backend
Documented uses
- Make chat and text-completion calls through a shared client interface.
- Change a configured provider without rewriting application calls to the client.
- Connect to an OpenAI-compatible endpoint by supplying a base URL.
- Adapt a custom backend function through the callable provider.
- Use a mock provider for offline examples or tests.
Requirements & limits
The repository is public and identifies the project as open source under the Apache License 2.0. Python 3.9 or later is required. The core has no required runtime dependencies; provider SDKs are optional extras.
- Provider calls use optional SDK extras; the core mock and callable providers require no third-party runtime dependencies.
- The OpenAI adapter supports OpenAI-compatible endpoints such as vLLM, Ollama, Azure OpenAI or an internal gateway through a base URL.
- Credentials are read from provider-specific environment variables or the standard AWS credential chain.
- LLMResponse exposes normalized content and token usage alongside latency, finish reason, model and the raw response.
- The README assigns retries, streaming and types to the underlying provider SDKs; LLM Bridge normalizes calls.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up an offline mock client
Install the core package and create an LLM Bridge client using its mock provider.
Before you start
- Python 3.9 or later
- The llm-bridge core package; the mock provider requires no vendor SDK or credentials
Steps
Install the core package with pip install llm-bridge.
Import create_llm from llm_bridge.
Create a client with the configuration {"provider": "mock"}.
Call complete with a prompt and read the returned response content.
Expected outcome
A mock-provider client can be used for an offline example or test without provider credentials.
Guide limitations
- The mock provider is not a call to an external model.
- The README's example demonstrates this setup and call, but does not specify the mock response behavior.
Configure a provider-backed client
Install one provider extra and configure an LLM Bridge client with that provider's credentials.
Before you start
- Python 3.9 or later
- The llm-bridge core package and the selected provider extra
- Credentials for the selected provider; AWS uses the standard AWS credential chain
Steps
Install llm-bridge with the extra for the chosen provider: [openai], [deepseek], [qwen], [aws] or [google].
Set the provider's documented credential environment variable, or configure the standard AWS credential chain for Bedrock.
Import create_llm and create a client with the provider name and a model value.
Use chat with messages or complete with a prompt, then read the returned LLMResponse.
Expected outcome
Application code can make chat or completion calls through the shared client interface for the selected provider.
Guide limitations
- The provider SDK and valid credentials are required for a real provider call.
- Model identifiers and credentials are provider-specific; this guide does not establish that any particular model or account is available.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- SantanderAI/llm_bridge · Official homepage title · retained in its source language

