Skip to content

[bug] Remote inference with guardrails-ai==0.6.6 throws 401 error in deployed environment #1280

Open
@SurakshaPrabhu

Description

@SurakshaPrabhu

Description:
I’ve implemented and tested the code using guardrails-ai==0.6.6 locally, configured with my email-linked API token. Everything works as expected in the local environment.

However, when deployed in the remote environment, the remote inference requests fail with a 401 Unauthorized error. Below are the logs from the deployed environment:

DEBUG:urllib3.connectionpool:https://hub.api.guardrailsai.com:443 "POST /validator/restricttotopic/inference HTTP/1.1" 401 26
DEBUG:urllib3.connectionpool:https://hub.api.guardrailsai.com:443 "POST /validator/detect_jailbreak/inference HTTP/1.1" 401 26

What I've confirmed:

The same token and configuration work fine locally.

No changes were made to the token or validator setup between environments.

Token is correctly passed in the deployed code.

Expected Behavior:
Remote inference validators should work the same in the deployed environment as they do locally, using the same valid API token.

Request:
Please help identify if this is a token scope/authorization issue, an environment-specific configuration mismatch, or a backend issue with the Guardrails API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions