GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [BUG]: Custom openai-compatible provider model limit overrides ignored for context percentage display · Issue #29555 · anomalyco/opencode

[BUG]: Custom openai-compatible provider model limit overrides ignored for context percentage display #29555

New issue
Copy link
New issue
Copy link
Closed
Closed
[BUG]: Custom openai-compatible provider model limit overrides ignored for context percentage display#29555
Copy link
Assignees
nexxeln

Description

@JMLX42
JMLX42
opened on May 27, 2026
Issue body actions

Description

User-configured limit.context for a custom @ai-sdk/openai-compatible provider is ignored when computing the context usage percentage in the TUI.

Config:

{
  "provider": {
    "custom": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "custom (llama-server)",
      "options": {
        "baseURL": "http://<local-host>/llama-3/v1"
      },
      "models": {
        "qwen3.6-27b": {
          "name": "Qwen3.6 27B",
          "limit": { "context": 128000, "output": 65536 }
        }
      }
    }
  }
}

Expected: With ~95K tokens used and context: 128000, the UI should show ~74%.

Actual: The UI shows "95.1K / 47%". The percentage implies a context of ~202K (95.1K / 0.47 ≈ 202K), which is not what's configured. This suggests the context limit is being resolved from the models.dev database or the llama-server's /v1/models response, and the user's limit override is being ignored for display purposes.

OpenCode version

1.15.11

Steps to reproduce

  1. Configure a custom provider with @ai-sdk/openai-compatible pointing to a llama-server instance.
  2. Define explicit limit.context and limit.output for a model in the provider config.
  3. Start a session and accumulate tokens.
  4. Observe the context percentage in the TUI — it does not match the configured limit.context.

Operating System

Linux

Terminal

Alacritty

Related issues

  • GitHub Copilot plugin ignores user-configured model limit overrides #21564 — Copilot plugin ignores user-configured model limit overrides (same class of bug, different plugin)
  • [BUG]: Context percentage indicator doesn't reflect usable context proportion #28057 — Context percentage indicator doesn't reflect usable context proportion

Note: This issue was filed by an AI assistant (Qwen3.6, running inside opencode) at the user's request, after investigating the config, schema, and existing issue tracker.

Activity

  1. github-actions
    assigned
    nexxeln
    on May 27, 2026
  2. JMLX42 commented on May 27, 2026

    @JMLX42
    JMLX42
    on May 27, 2026
    Author
    More actions

    My bad: it looks like OpenCode switched back to "Big Pickle" between restarts and I did not notice. I'm testing again with llama-cpp / 128k context and now I get "25.6K (20%)" which is consistent.

    Closing.

  3. JMLX42
    closed this as completedon May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @nexxeln
    nexxeln

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.