Error11 reports
Fix BadRequestError
in DSPy
✅ Solution
BadRequestError in dspy often arises from incorrect API usage, such as malformed requests, exceeding token limits, or unsupported model parameters. To fix it, carefully review your dspy program, ensuring your prompts respect the model's input format, the context length is within limits, and all specified parameters are valid for the chosen model. Inspect the detailed error message for specifics to guide adjustments.
Related Issues
Real GitHub issues where developers encountered this error:
[Bug] GEPA reflection_minibatch_size parameter ignored, causing context length explosionsNov 13, 2025
[Bug] Azure gpt-5-chat incorrectly classified as reasoning modelNov 7, 2025
[Bug] LiteLLM exception when using OpenAI Speech-To-Text modelsOct 29, 2025
[Bug] OpenAI Responses `model_type` fails with `Image` inputsOct 28, 2025
[Bug] Responses API always falls back to JSON mode which breaks with web searchOct 21, 2025
Timeline
First reported:Jul 7, 2025
Last reported:Nov 13, 2025