Skip to content

OpenAI-compatible endpoint blocks requests from official OpenAI Node SDK unless SDK metadata headers are suppressed #597

@tranhoangnguyen03

Description

@tranhoangnguyen03

I found what looks like an OpenAI-compatibility issue with 9router.

Date tested: April 15, 2026

Endpoint:
https://rwbwbll.9router.com/v1

Summary

Requests to 9router work with plain curl, but fail with:

403 Your request was blocked.

when sent through the official OpenAI Node SDK, including clients built on top of it like pi.

The same SDK request succeeds if I suppress the SDK metadata headers.

What worked

A plain OpenAI-compatible request via curl worked:

  • normal Authorization: Bearer ...
  • Content-Type: application/json
  • POST /v1/chat/completions

What failed

The same request through the OpenAI Node SDK failed with:

403 Your request was blocked.

This also reproduced in pi-coding-agent, which uses the OpenAI SDK for openai-completions providers.

What made it work

When I overrode these headers to empty values, the same SDK request succeeded:

  • User-Agent
  • X-Stainless-Retry-Count
  • X-Stainless-Timeout
  • X-Stainless-Lang
  • X-Stainless-Package-Version
  • X-Stainless-OS
  • X-Stainless-Arch
  • X-Stainless-Runtime
  • X-Stainless-Runtime-Version

Why this matters

If 9router advertises OpenAI-compatible endpoints, it should ideally accept requests from the official OpenAI SDK, not just raw curl calls.

Right now it seems like some SDK-specific metadata headers are being blocked upstream.

Request

Could you check whether 9router or its upstream filtering is rejecting requests based on the OpenAI SDK header profile?

Happy to provide a minimal repro if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions