Skip to main content

CrewAI

CrewAI's built-in LLM class can talk directly to your NuRoute gateway — no separate package or plugin needed. CrewAI isn't a platform with a plugin marketplace like n8n or Dify; it's a Python library, and its LLM class already accepts any OpenAI-compatible endpoint.

How it works​

CrewAI ships native, OpenAI-SDK-based provider implementations rather than routing everything through LiteLLM. Setting custom_openai=True forces the OpenAI-compatible code path and requires a base_url — it doesn't validate the model string against a known list, so NuRoute's "auto" value passes straight through untouched, exactly like specifying a real model ID would.

Quick start​

from crewai import LLM

llm = LLM(
model="auto", # NuRoute's routing engine picks the best model
custom_openai=True,
base_url="https://your-nuroute-gateway/v1",
api_key="aicp-...",
)

With model="auto", Artemis Task picks the model for each request.

Use it on an agent the same way as any other CrewAI LLM:

from crewai import Agent

researcher = Agent(
role="Researcher",
goal="Find accurate, up-to-date information",
backstory="An experienced research analyst.",
llm=llm,
)

Forcing a specific model​

Pass a real model ID instead of "auto" — CrewAI doesn't require a provider prefix here since custom_openai=True already scopes the request to your gateway:

llm = LLM(
model="claude-sonnet-4-6",
custom_openai=True,
base_url="https://your-nuroute-gateway/v1",
api_key="aicp-...",
temperature=0.2,
max_tokens=1024,
)

Tool calling​

CrewAI's native OpenAI-compatible path supports standard OpenAI-style function calling, and the NuRoute gateway accepts tools/tool_choice in the same shape — agent tool use works without any extra configuration.

Which models can I use?​

The same catalog as everywhere else. See Providers & Models for the full list, and the dashboard's Model Catalog tab for the live view (providers your admin has connected platform-wide, plus any you've connected yourself via BYOK).

Advanced: a fully custom LLM class​

If you need something the OpenAI-compatible wire format can't express — calling NuRoute through the nuroute Python SDK directly instead of raw HTTP, for example — CrewAI exposes a BaseLLM abstract class (from crewai import BaseLLM) you can subclass, implementing a single call(...) method. Most users won't need this: custom_openai already covers routing, model selection, and tool calling.