Skip to content

Enhancement: Expose rate limit information #169

@olliiiver

Description

@olliiiver

Hello.

Could the SDK expose the rate limit information which is part of the response headers?

> POST /v1/chat/completions HTTP/2
> Host: api.mistral.ai
> User-Agent: curl/8.7.1
> Accept: */*
> Content-Type: application/json
> Authorization: Bearer qN7h6rEWlmjs5iL67Y4rtladP3P76C2t
> Content-Length: 135

...

< x-ratelimit-limit-tokens-minute: 5000000
< x-ratelimit-remaining-tokens-minute: 4999911
< x-ratelimit-tokens-query-cost: 52
< x-ratelimit-limit-req-minute: 720
< x-ratelimit-remaining-req-minute: 717

Like:

  • x-ratelimit-limit-tokens-minute
  • x-ratelimit-remaining-tokens-minute
  • x-ratelimit-limit-req-minute
  • x-ratelimit-remaining-req-minute

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