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>