You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: ProviderCapabilities.get_capabilities() static fallbacks are skipped when LiteLLM introspection fails #6412
In crewai/llm.py, the ProviderCapabilities dataclass (#6233) adds static fallback detection for response_format and reasoning_effort support. However, when the LiteLLM supports_response_schema field is unavailable, the code returns early before get_capabilities() can run, skipping the static fallback logic entirely.
Where
crewai/llm.py — The early return guard above get_capabilities() bypasses both the static response_format fallback AND reasoning_effort validation when supports_response_schema is unavailable from LiteLLM introspection.
Impact
Providers that don't expose supports_response_schema via LiteLLM lose all capability detection, even for features that have static fallbacks (e.g., well-known provider lists)
response_format requests are incorrectly sent to providers that don't support it
reasoning_effort settings are not validated against known provider lists
Reproduction
Use a provider where LiteLLM doesn't return supports_response_schema:
Configure response_format={"type": "json_object"}
The capability check returns early
The request may be sent to a provider that doesn't support it
Move the static capability checks (get_capabilities()) before the LiteLLM introspection early return, so static fallbacks are always evaluated regardless of introspection availability.
This looks like it's already resolved on the current revision of #6233.
Checked lib/crewai/src/crewai/llm.py on PR #6233's latest commit (ff65516, 2026-07-09): _validate_call_params now only early-returns on not _ensure_litellm(), and unconditionally calls caps = self.get_capabilities() afterward regardless of whether supports_response_schema was importable from litellm. get_capabilities() itself has its own litellm-introspection-with-static-fallback logic for each capability (_PROVIDERS_WITHOUT_RESPONSE_FORMAT, _PROVIDERS_WITH_REASONING), so the "static fallback skipped when introspection unavailable" bug described here doesn't reproduce against that commit.
Timeline-wise: the fix landed in PR #6233's commit fix(providers): address CodeRabbit review on capability detection on 2026-06-29, two days before this issue was filed (2026-07-01) — so this may have been filed against an earlier revision of the PR branch, or against the CodeRabbit comment thread itself rather than the current diff.
Once #6233 merges this should be fully covered; happy to be corrected if there's a remaining gap I'm missing.
Activity
STiFLeR7 commentedon Jul 10, 2026
This looks like it's already resolved on the current revision of #6233.
Checked
lib/crewai/src/crewai/llm.pyon PR #6233's latest commit (ff65516, 2026-07-09):_validate_call_paramsnow only early-returns onnot _ensure_litellm(), and unconditionally callscaps = self.get_capabilities()afterward regardless of whethersupports_response_schemawas importable from litellm.get_capabilities()itself has its own litellm-introspection-with-static-fallback logic for each capability (_PROVIDERS_WITHOUT_RESPONSE_FORMAT,_PROVIDERS_WITH_REASONING), so the "static fallback skipped when introspection unavailable" bug described here doesn't reproduce against that commit.Timeline-wise: the fix landed in PR #6233's commit
fix(providers): address CodeRabbit review on capability detectionon 2026-06-29, two days before this issue was filed (2026-07-01) — so this may have been filed against an earlier revision of the PR branch, or against the CodeRabbit comment thread itself rather than the current diff.Once #6233 merges this should be fully covered; happy to be corrected if there's a remaining gap I'm missing.
fix(llm): handle LiteLLM supports_response_schema introspection failu…
IgorGanapolsky commentedon Jul 23, 2026
Reliability note
Production automation failures usually reduce to a contract issue before a model/prompt issue:
If you have one failing execution + expected vs actual, reply with stack/version and I will send a free root-cause checklist.
fix(llm): handle LiteLLM supports_response_schema introspection failu…
fix(llm): handle LiteLLM supports_response_schema introspection failu…
fix(llm): handle LiteLLM supports_response_schema introspection failu…
github-actions commentedon Aug 22, 2026
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
fix(llm): handle LiteLLM supports_response_schema introspection failu…
github-actions commentedon Aug 27, 2026
This issue was closed because it has been stalled for 5 days with no activity.
fix(llm): handle LiteLLM supports_response_schema introspection failu…