Why does a model name plus base URL need a provider-dispatch check in current CrewAI?

A custom base URL is not, by itself, a routing test. CrewAI’s versioned LLM documentation distinguishes native provider integrations from LiteLLM-backed integrations and shows a Custom OpenAI-Compatible Endpoint example using custom_openai=True with a gateway URL and an anthropic/claude-sonnet-4-6 model string. Treat that flag and the model prefix as part of the provider-dispatch decision, not as incidental syntax.

That matters when adapting CometAPI’s CrewAI tutorial. The official CometAPI guide’s helper passes a model_id, COMETAPI_BASE_URL, and COMETAPI_KEY to CrewAI’s LLM, and its installation guidance says to pin versions tested for production. The practical adaptation is to pin the CrewAI version used by your integration, use a separately verified CometAPI model ID and base URL, and evaluate the current custom OpenAI-compatible configuration rather than assuming that the URL alone selects CometAPI.

Before a multi-agent run, make the smallest possible check:

  1. Build one LLM with the pinned CrewAI version, the intended CometAPI base URL, a server-side key, the verified model ID, and the documented custom-endpoint setting where applicable.
  2. Make one minimal request.
  3. Inspect the selected provider implementation and a sanitized destination or request trace to confirm that the call took the intended CometAPI route.
  4. Separately test any required tool calling, structured output, streaming, or cross-model behavior; one successful completion does not prove those features.

This is a dispatch verification procedure, not a claim that every model prefix or CrewAI release behaves the same way. The CrewAI documentation is the version-matched primary reference; the CometAPI tutorial supplies the gateway parameters and version-pinning context. Recheck both when upgrading.

Sources: CrewAI LLM documentation · CometAPI CrewAI guide

The dispatch check should also be an admission gate for a cost comparison. If a CrewAI run has not been shown to take the intended CometAPI route, exclude it from that route’s benchmark rather than attributing its cost or latency to the configured model name.

After that gate, I would compare cost per accepted task, not just price per token:

  • Freeze a small task set, an acceptance rubric, the CrewAI version, and the retry limits before comparing configurations.
  • For each task, record all model attempts, including retries and any fallback calls, with sanitized route labels and available usage records. Keep missing usage explicitly unknown rather than treating it as free.
  • Divide the total attributable model charges across the evaluation set—including failed tasks—by the number of tasks that meet the rubric. If none pass, report zero accepted tasks rather than a misleading unit cost.
  • Report acceptance rate and end-to-end task latency alongside that number. A lower cost per accepted task is not enough if the configuration misses the application’s latency requirement.

For a CometAPI-backed run, use billing records where available; otherwise label the calculation an estimate and record the applicable price date and assumptions. This is a proposed measurement method, not a measured savings claim. The minimal completion in the post establishes a routing checkpoint; the task-level evaluation answers whether that verified route is economically useful.