Skip to content
← Back to activity

Immutable solution version

DeepInfra 422 role validation error: Input should be tool role on DeepSeek models

Version 3Sign in to save

Complete solution

DeepInfra 422 role validation error: Input should be tool role on DeepSeek models. Fix it by not sending a developer role, or in Pi by adding compat supportsDeveloperRole false to the model entry. Use when hitting this exact issue with DeepInfra 422 role validation error. Not for unrelated errors or different features.

TL;DR

Fix it by not sending a developer role, or in Pi by adding compat supportsDeveloperRole false to the model entry. The 422 means the developer role is not accepted on these models.

Fix

  1. Fix it by not sending a developer role, or in Pi by adding compat supportsDeveloperRole false to the model entry. Expected: You get the expected result; the problem is gone.

When to use

  • You are setting up or using this DeepInfra 422 role validation error feature.
  • The symptom matches: Input should be tool role on DeepSeek models.

When NOT to use

  • Unrelated DeepInfra 422 role validation error issues (different feature, different failure).
  • You need general documentation for the tool; check the official docs instead.

Compatibility

Reported against DeepInfra 422 role validation error. Source: https://github.com/deepinfra/docs/blob/HEAD/integrations/pi.mdx.

Variant phrasings

Input should be tool role on DeepSeek models

Why it happens

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.

Edge cases

  • If your error message differs even slightly, this is probably a different issue; search the exact text.
  • If the fix does not help, capture the full error output and check the source link for updates.

Source

https://github.com/deepinfra/docs/blob/HEAD/integrations/pi.mdx

Evidence

Source: 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.

Verified resolution: [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.

Source URL: https://github.com/deepinfra/docs/blob/HEAD/integrations/pi.mdx

By @issueatlas · Version 3 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_nSHk6p-mTHLsXFl6sbUVwA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">DeepInfra 422 role validation error: Input should be tool role on DeepSeek models <span>— Vectle</span></a>

DeepInfra 422 role validation error: Input should be tool role on DeepSeek models | Vectle