A Guide to AISuite for Multi-LLM Integration
    Deep Dives

    A Guide to AISuite for Multi-LLM Integration

    AISuite simplifies multi-LLM development with a unified API, allowing seamless integration and model switching across different LLMs.

    ADaSci Editorial
    ADaSci EditorialEditorial Team, Association of Data Scientists
    Feb 13, 2025

    The rise of multiple large language model (LLM) providers has made it essential for developers to work across different AI platforms without being locked into a single ecosystem. AISuite simplifies this process by providing a unified interface to interact with multiple LLM providers seamlessly. Whether you need to test responses from OpenAI, Anthropic, Google, or others, AISuite allows you to swap models and compare outputs effortlessly. This article explores AISuite’s architecture, installation, setup, supported providers, and practical usage, with hands-on code examples to demonstrate its capabilities.

    Table of Content

    1. Why AISuite?
    2. Understanding AISuite Architecture
    3. Installation & Setup
    4. Using AISuite for Chat Completions
    5. Supported LLM Providers


    Let’s start by understanding why AISuite is needed in the first place.

    Why AISuite?

    AISuite offers a standardized API that abstracts away provider-specific complexities. Instead of learning multiple SDKs, developers can interact with OpenAI’s GPT, Anthropic’s Claude and others using a single interface. The library supports flexible model swapping across providers without code changes, a unified API format similar to OpenAI’s that makes integration straightforward, automatic parameter handling to ensure each model receives properly formatted inputs.

    Understanding AISuite Architecture

    AISuite acts as a thin wrapper over multiple LLM provider SDKs, enabling seamless model interaction. The Client class serves as the core interface, routing requests to the appropriate provider module based on the model identifier.

    Installation & Setup

    It can be installed in different ways, depending on whether you need specific provider integrations.

    Basic Installation

    To install without any provider dependencies:

    !pip install aisuite

    Installing a Specific Provider

    If you need support for a particular provider

    !pip install 'aisuite[anthropic]'

    Installing All Supported Providers

    To install it with all provider-specific dependencies:

    !pip install 'aisuite[all]'


    Using AISuite for Chat Completions

    It simplifies chat completion requests by maintaining an interface similar to OpenAI’s SDK. Below is an example of generating responses from groq and cohere:

    import aisuite as ai

    client = ai.Client()

    models = ["groq:llama-3.2-3b-preview", "cohere:command-r-plus-08-2024"]

    messages = [
        {"role": "system", "content": "Respond in English."},
        {"role": "user", "content": "Tell me a joke."},
    ]

    for model in models:
        response = client.chat.completions.create(
            model=model,
            messages=messages,
            temperature=0.75
        )

        print(f"Model: {model}\nResponse: {response.choices[0].message.content}\n")

    Output:-

    Explanation
    1. Client Initialization: The Client() object serves as the interface for interacting with different providers.
    2. Model Identifier Format: The <provider>:<model-name> format allows it to determine which provider API to call.


    This enables easy comparison of responses from different models.

    Supported LLM Providers

    AISuite currently supports the following providers:

    1. OpenAI
    2. Anthropic
    3. Google
    4. AWS Bedrock
    5. Mistral
    6. Hugging Face
    7. Groq
    8. Azure
    9. SambaNova


    It determines the correct API parameters based on the provider specified in the model identifier.

    Final Words

    AISuite is a powerful tool for developers and researchers needing multi-LLM interoperability. By providing a unified API, it eliminates the complexity of working with multiple provider SDKs, allowing users to seamlessly test and deploy AI models across different platforms With its expanding support for new providers, easy extensibility, and standardized API, It is set to become a key component in the future of AI development.

    References

    1. Github Repository


    adasci-editorial

    ADaSci Editorial

    The ADaSci Editorial team publishes research explainers, industry analysis and practical guides for AI and data science professionals.