[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.