Which AI Providers Are Integrated with Calliope? Complete Guide to the 6 Built-In Platforms
Calliope ships with built-in support for six major AI inference providers—OpenAI, Azure, Hugging Face, Stability AI, Replicate, and Runway—defined in the InferenceModelProvider enum and configured in calliope/models/inference_model_config.py.
The open-source Calliope framework (chrisimmel/calliope) provides a unified abstraction layer for multi-modal AI inference. Understanding which AI providers are integrated with Calliope helps developers select the right backend for text generation, image synthesis, audio transcription, and computer vision tasks.
The Six AI Providers Built Into Calliope
The authoritative list of supported providers lives in calliope/models/inference_model_config.py (lines 7-14), which defines the InferenceModelProvider enumeration. Each provider maps to a specific engine implementation in the calliope/inference/engines/ directory.
OpenAI (GPT-4, DALL-E, Whisper)
Calliope integrates OpenAI for three distinct modalities. Text-to-text inference uses models like GPT-4 and GPT-3.5 through configurations such as openai_gpt_4 (lines 105-163 in inference_model_config.py). The implementation resides in calliope/inference/engines/openai_text.py.
For text-to-image generation, Calliope supports DALL-E 2 via the openai_dall_e_2 configuration and calliope/inference/engines/openai_image.py. Audio-to-text transcription uses OpenAI Whisper through openai_whisper and calliope/inference/engines/openai_audio.py.
Azure Computer Vision
Microsoft Azure provides vision analysis and OCR capabilities. The configurations azure_vision_analysis and azure_vision_ocr (lines 45-62) point to calliope/inference/engines/azure_vision.py, which handles image description and text extraction tasks.
Hugging Face
The Hugging Face integration supports open-source models for multiple modalities. Available configurations include huggingface_image_captioning, huggingface_stable_diffusion_1.5, huggingface_gpt_neo_2.7B, and huggingface_wav2vec2 (lines 63-84). A generic engine in calliope/inference/engines/hugging_face.py wraps the Hugging Face Inference API for these models.
Stability AI
For Stable Diffusion image generation, Calliope provides the stability_stable_diffusion_1.5 configuration (lines 85-98) and a dedicated engine at calliope/inference/engines/stability_image.py.
Replicate
Replicate's model hosting platform is supported through calliope/inference/engines/replicate.py, enabling access to thousands of community models through a generic configuration mechanism.
Runway
RunwayML inference capabilities are implemented in calliope/inference/engines/runway.py, supporting the platform's specialized image and video generation models.
How the Provider System Works
The InferenceModelProvider enum acts as the central registry, allowing Calliope to route requests to the correct client implementation at runtime. The get_model_config_by_name() function retrieves provider-specific settings including API endpoints and model identifiers, while individual engine files handle the actual HTTP requests and response parsing for each platform.
Code Examples: Configuring and Using AI Providers
Selecting a Provider via the Model Registry
from calliope.models.inference_model_config import get_model_config_by_name
# Grab the OpenAI GPT-4 configuration
gpt4_cfg = get_model_config_by_name("openai_gpt_4")
print(gpt4_cfg.provider) # → openai
print(gpt4_cfg.provider_model_name) # → gpt-4
Using the Provider-Specific Engine
from calliope.inference.engines.openai_text import openai_text_to_text_inference
from calliope.models.inference_model_config import get_model_config_by_name
model_cfg = get_model_config_by_name("openai_gpt_4")
response = await openai_text_to_text_inference(
prompt="Explain Calliope in a sentence.",
model_config=model_cfg,
)
print(response)
Switching to a Different Provider (e.g., Hugging Face)
from calliope.models.inference_model_config import get_model_config_by_name
from calliope.inference.engines.hugging_face import huggingface_image_captioning_inference
model_cfg = get_model_config_by_name("huggingface_image_captioning")
caption = await huggingface_image_captioning_inference(
image_path="my_picture.jpg",
model_config=model_cfg,
)
print(caption)
Loading a Full Set of Configs in One Call
from calliope.models.inference_model_config import load_model_configs
configs = load_model_configs(
text_to_text_model_config="openai_gpt_4",
text_to_image_model_config="stability_stable_diffusion_1.5",
)
# `configs` now holds ready-to-use objects for each selected provider
Summary
- Calliope integrates six AI providers: OpenAI, Azure, Hugging Face, Stability AI, Replicate, and Runway.
- Provider configurations are centralized in
calliope/models/inference_model_config.pywith theInferenceModelProviderenum. - Each provider has a dedicated engine implementation in
calliope/inference/engines/. - The system supports text-to-text, text-to-image, audio-to-text, and computer vision workflows.
- Developers switch providers by changing model configuration strings without modifying inference logic.
Frequently Asked Questions
How do I add a custom AI provider to Calliope?
To add a new provider, create a new engine file in calliope/inference/engines/ following the pattern of existing implementations like openai_text.py. You must also register the provider in the InferenceModelProvider enum in calliope/models/inference_model_config.py and add corresponding configuration entries with model names and API settings.
Can I use multiple AI providers in the same Calliope application?
Yes. The load_model_configs() function allows you to initialize multiple providers simultaneously. For example, you can configure OpenAI GPT-4 for text generation and Stability AI for image generation in the same session by specifying both in your configuration dictionary.
Which provider should I use for image generation in Calliope?
Calliope supports image generation through three providers: OpenAI (DALL-E 2 via openai_dall_e_2), Stability AI (Stable Diffusion via stability_stable_diffusion_1.5), and Hugging Face (Stable Diffusion 1.5 via huggingface_stable_diffusion_1.5). Stability AI and Hugging Face offer open-weight models, while OpenAI provides proprietary DALL-E access.
Where are the API client implementations for each provider stored?
Each AI provider integrated with Calliope has a dedicated engine file in calliope/inference/engines/: openai_text.py, openai_image.py, openai_audio.py, azure_vision.py, hugging_face.py, stability_image.py, replicate.py, and runway.py. These files handle authentication, request formatting, and response parsing for their respective APIs.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →