Problem
CrewAI's BaseLLM layer doesn't expose which features a provider supports (structured output, tool calling, reasoning, streaming). When a user configures response_format or uses tools with a provider that doesn't support them, the failure happens at the provider API level with a cryptic error:
- DeepSeek: doesn't support
response_format — user gets raw API error
- Cerebras: thinking/reasoning behavior differs from OpenAI
- Local models via Ollama: capabilities vary by model and quantization
This is related to PR #6171 which hardcodes {"deepseek"} as a provider that doesn't support response_format. This per-provider hardcoding approach doesn't scale.
Proposed Solution
-
Add a ProviderCapabilities dataclass that each provider populates:
@dataclass
class ProviderCapabilities:
supports_response_format: bool = True
supports_tool_calling: bool = True
supports_reasoning: bool = False
supports_streaming: bool = True
supports_image_input: bool = False
-
In BaseLLM, check capabilities before making API calls and raise clear error messages like: "Provider deepseek does not support response_format. Use result_as_string=True or switch to a provider that supports structured output."
-
Surface capabilities in the provider documentation
Impact
Problem
CrewAI's
BaseLLMlayer doesn't expose which features a provider supports (structured output, tool calling, reasoning, streaming). When a user configuresresponse_formator uses tools with a provider that doesn't support them, the failure happens at the provider API level with a cryptic error:response_format— user gets raw API errorThis is related to PR #6171 which hardcodes
{"deepseek"}as a provider that doesn't supportresponse_format. This per-provider hardcoding approach doesn't scale.Proposed Solution
Add a
ProviderCapabilitiesdataclass that each provider populates:In
BaseLLM, check capabilities before making API calls and raise clear error messages like: "Provider deepseek does not support response_format. Use result_as_string=True or switch to a provider that supports structured output."Surface capabilities in the provider documentation
Impact