Skip to content

[Feature Request] Expose context-window and output-token limits in GET /models #687

Description

@yanmxa

Current behavior

GET /models currently returns only id, object, and owned_by for each model.

Requested change

Please add optional per-model token-limit metadata to the response, for example:

{
  "id": "deepseek-chat",
  "object": "model",
  "owned_by": "deepseek",
  "context_window": 128000,
  "max_output_tokens": 8000
}

Field names may follow DeepSeek's preferred convention; the important part is that clients can discover both limits programmatically.

Semantics to document

Please clarify whether context_window is the total request context capacity, or whether callers must reserve max_output_tokens from that value.

Why this helps

Session-aware clients use this metadata to:

  • display context usage accurately;
  • validate requests before they exceed a model limit;
  • compact conversation history safely and automatically;
  • adapt when supported models or their limits change.

This lets integrations avoid hard-coded, potentially stale token-limit tables.

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