Skip to main content
You can point AISuite through Butter using its Client class, which supports custom provider_configs. See it in the example below.
import aisuite as ai
import os

client = ai.Client(
    provider_configs={
        "openai": {
            "base_url": "https://proxy.butter.dev/v1",
            "default_headers": {"Butter-Auth": f"Bearer {os.getenv('BUTTER_API_KEY')}"}
        } 
    }
)

response = client.chat.completions.create(
    model="openai:gpt-4",
    messages=[{"role": "user", "content": "What is the English word for mantequilla?"}]
)

print(response)