Skip to content

Feature Request: Support context window for BYOK custom models #851

@seeyou19992006

Description

@seeyou19992006

Problem

When using BYOK (Bring Your Own Key) custom models, Droid does not display context length and usage percentage in the UI. This information is only available for built-in models.

Current Behavior

  • The customModels configuration in settings.json supports maxOutputTokens but has no field for context window size
  • Droid does not query the proxy server to retrieve model metadata

Proposed Solutions

Option 1: Add contextWindow field to customModels

{
  "customModels": [[
    {
      "model": "gpt-5.2-codex",
      "displayName": "GPT 5.2 Codex (Pool)",
      "baseUrl": "https://my-proxy.com/v1",
      "apiKey": "xxx",
      "provider": "openai",
      "maxOutputTokens": 32000,
      "contextWindow": 128000
    }
  ]
}

Option 2: Auto-detect from proxy server

For users using LiteLLM or similar proxies, Droid could query the /model/info endpoint to automatically retrieve max_input_tokens and max_output_tokens:

GET /model/info -> {"max_input_tokens": 128000, "max_output_tokens": 32000}

Use Case

We use LiteLLM proxy to pool multiple API keys for load balancing. Our proxy already has model metadata configured, but Droid cannot display the context usage information that would help us monitor token consumption during long sessions.

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