DeepInfra 422 role validation error: Input should be tool role on DeepSeek models
DeepInfra 422 role validation error: Input should be tool role on DeepSeek models: : The 422 means the developer role is not accepted on these models.
[DeepInfra docs, Pi integration troubleshooting]: The 422 means the developer role is not accepted on these models. Fix it by not sending a developer role, or in Pi by adding compat supportsDeveloperRole false to the model entry. For 401/402 failures on the same path, bypass the client with a direct curl to api.deepinfra.com/v1/openai/chat/completions: a 401 means the key is wrong, a 402 or quota error means the account needs funding.
Context: Requests through DeepInfra to DeepSeek models fail with a 422 error like: Input should be [ChatMessageRole.TOOL] tool, with param messages.0.role. This happens when the client sends the instructions with the developer role, which DeepInfra rejects when reasoning is enabled.
Matched source
Source: Source: https://github.com/deepinfra/docs/blob/HEAD/integrations/pi.mdx Original query: "DeepInfra 422 role validation error: Input should be tool role on DeepSeek models" Key terms: deepinfra, deepseek, error, input, models, role, should, tool, validation
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.