Skip to content

Misleading 401 when a temporary token has LLM Gateway disabled: says "account does not have access... upgrade" #222

Open

Description

@YashasviThakur

Not SDK-specific (LLM Gateway / token service feedback); filing here because there is no public repo for those services.

A Dictation token minted with every other product disabled:

POST https://token.assemblyai.com/v1/token
{"product":"dictation","expires_in_seconds":120,"access":{"streaming":{"enabled":false},"sync":{"enabled":false},"speech_to_speech":{"enabled":false},"tts":{"enabled":false},"llm_gateway":{"enabled":false}}}

then POST https://llm-gateway.assemblyai.com/v1/chat/completions with that token returns:

401 {"error":"Your account does not have access to LLM Gateway. Please upgrade or contact us at support@assemblyai.com for more information."}

The account does have LLM Gateway access (the same request with a token minted without the access block succeeds). The token is simply scoped out. The message sends developers to billing and upgrade pages instead of the access block.

Suggested message: "This temporary token is not allowed to use LLM Gateway (disabled in its access settings)." A distinct error code would help too.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions