Troubleshooting

Troubleshooting

Solve common issues when integrating with KushRouter.

Authentication errors (401)

  • Double-check that you are using the correct header:
    • OpenAI-compatible routes: Authorization: Bearer $API_KEY
    • Anthropic-compatible routes: x-api-key: $API_KEY
  • Verify the key is active in the dashboard and has remaining credits.

Validation errors (400)

  • Ensure stream is a boolean value, not a string.
  • Confirm all required provider-specific parameters are provided (e.g., max_tokens for Anthropic models).
  • Review the Schemas page for full validation rules.

Rate limits (429)

  • Requests are throttled per API key and IP. Space retry attempts with exponential backoff.
  • Check usage dashboards for burst patterns.

Payload too large (413)

  • Compress prompts or split conversations into smaller batches.
  • For long-running jobs, consider the Batches API.

Tool calls missing arguments

  • KushRouter streams incremental tool deltas, but some providers emit final arguments only at completion. We inject a final delta to ensure downstream clients receive full JSON.
  • Verify your client handles both incremental and final tool call frames.

Need more help?

  • Contact support.
  • Enable verbose logging in your SDK and capture request IDs when reporting issues.

Further reading