Caveman
Framework integrationsCrewAI

CrewAI

CrewAI’s LLM class is LiteLLM-backed, so a base_url on it sends every crew call through the gateway. Pass the LLM to your Agents and Crew as usual.

CrewAI
import os
from crewai import LLM

llm = LLM(
model="openai/gpt-4.1",
base_url="http://127.0.0.1:8787/w/my-service/openai/v1",
api_key=os.environ["OPENAI_API_KEY"],
)

# Pass llm to your Agents/Crew as usual.

CrewAI's LLM class is LiteLLM-backed; base_url routes every crew call through the gateway.

Local vs. connected

The base URL above is the local proxy default (http://127.0.0.1:8787). Connected or managed use swaps in the cloud gateway URL and adds x-cave-api-key (gateway auth) plus x-cave-upstream-key (your per-request provider key) as request headers on the same client.