Files
crewAI/lib
Devin AI 2aebd8fa5f fix: strip json_schema response_format for DeepSeek and other unsupported providers (#5990)
When providers like DeepSeek do not support the json_schema response_format
type, structured output requests now fall back to prompt-based JSON extraction
instead of failing with a 400 error.

Changes:
- Add supports_json_schema flag to ProviderConfig (default True, False for DeepSeek)
- Override _prepare_completion_params to strip json_schema and inject schema instructions
- Override _handle_completion, _ahandle_completion, _handle_streaming_completion
  to use prompt-based fallback instead of beta.chat.completions.parse
- Add comprehensive tests for the fallback behavior

Co-Authored-By: João <joao@crewai.com>
2026-06-01 06:12:02 +00:00
..
2026-05-28 09:47:19 -07:00
2026-05-28 09:47:19 -07:00
2026-05-28 09:47:19 -07:00