A CrewAI script can leave a model implicit without leaving it unselected. The CrewAI connection documentation says the default comes from OPENAI_MODEL_NAME, falling back to gpt-4o-mini when that variable is unset. That is not evidence that a workflow intended for CometAPI will use the intended connection.
For a CometAPI integration, make the model, base URL, and credential one explicit configuration unit, then pass the resulting LLM object to each Agent that should use it. This is a configuration recommendation, not a claim of a tested integration.
Start with the three inputs
Before constructing the crew, resolve these together:
| Input | What to decide explicitly |
|---|---|
| Model | The identifier accepted for the intended CometAPI route, plus any provider-dispatch syntax required by the pinned CrewAI version. Do not inherit it accidentally from OPENAI_MODEL_NAME. |
| Base URL | The current CometAPI API base URL for that integration. Verify it rather than retaining another provider’s endpoint from a copied example. |
| API key | The CometAPI credential supplied server-side to that connection. Keep its value out of code, version control, and diagnostic output. |
CrewAI documents an OpenAI-compatible LLM constructor with explicit model, api_key, and base_url arguments, followed by an Agent receiving that LLM. The official CometAPI CrewAI guide applies that pattern in a helper using a model argument, COMETAPI_BASE_URL, and COMETAPI_KEY. Those variable names are explicit helper inputs—not proof that CrewAI automatically discovers them.
Use that helper pattern as the boundary: resolve all three inputs in one place, construct the LLM there, and attach it explicitly to each intended Agent. For multiple model choices, keep the endpoint and credential policy explicit while changing the selected model deliberately.
Check the connection before running the crew
My suggested sequence is:
- Pin the CrewAI version and check its dependency requirements. Confirm how that version selects the provider for your model identifier. A generic compatible constructor example does not settle every provider-dispatch branch.
- Check configuration without printing secrets. Confirm that the model and endpoint are the intended CometAPI pair and that the server-side credential is present. Treat a missing input as a configuration error rather than silently filling it from an unrelated provider’s settings.
- Make a minimal request through the constructed LLM. Check authentication and model acceptance before involving a multi-agent workflow. Constructor acceptance alone does not demonstrate successful routing. Use available non-secret request diagnostics to check the intended destination; a plausible answer alone is not routing evidence.
- Pass that object to the intended Agents, then test the features the crew needs. A successful basic text request would not, by itself, establish tool support or complete workflow compatibility.
These are proposed checks; no request or crew execution is reported here. The captured CometAPI example also sets a timeout and disables SDK retries, but neither setting validates the connection triple. Decide those behaviors separately after establishing the intended route.
Where the documentation stops
The CrewAI page supports the explicit constructor and Agent wiring. The CometAPI guide supports applying that pattern to its connection inputs. Neither establishes current model availability, successful authentication in your environment, or cost savings. The captured CometAPI sample also has collapsed formatting, so treat it as a configuration reference rather than copy-ready code.
The practical decision is to remove ambiguity before orchestration: if this crew is meant to use CometAPI, bind its model choice to the CometAPI endpoint and server credential explicitly, verify the small connection first, and only then expand to the crew.