Skip to content

I can not configure the limit for litellm #2787

Closed

Description

@m-da-costa

Sorry if my question is a basic one but I cannot configure the context window (limits) for my litellm instance. Se examples:
config.json

    "litellm": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://my.domain.com/v1"
      },
      "models": {
        "cerebras/qwen-3-coder-480b": {
          "tools": true,
          "reasoning": true,
          "context_window": 120000,
          "limit": {
            "context": 120000,
            "output": 64000
          }
        },
      }
    }
Image

Activity

  1. github-actions commented on Sep 26, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Sep 26, 2025

    @rekram1-node
    Collaborator

    @m-da-costa put:

    includeUsage: true

    in the provider options

    ex:

     "litellm": {
          "npm": "@ai-sdk/openai-compatible",
          "options": {
            "baseURL": "https://my.domain.com/v1",
            "includeUsage": true
          },
          "models": {
            "cerebras/qwen-3-coder-480b": {
              "tools": true,
              "reasoning": true,
              "context_window": 120000,
              "limit": {
                "context": 120000,
                "output": 64000
              }
            },
          }
        }
    
  3. self-assigned this
    on Sep 26, 2025
  4. rekram1-node commented on Sep 26, 2025

    @rekram1-node
    Collaborator

    going forward we will set this automatically but until next release you should be able to follow waht I mentioned above^^

  5. m-da-costa commented on Sep 26, 2025

    @m-da-costa
    Author

    Ty so much @rekram1-node

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

Metadata

Metadata

Assignees

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