Skip to content

GitHub Copilot: claude-opus-4.8 hard-coded to 128K context (native 1M) + missing thinking support #91869

Description

@wyhgoodjob

Summary

The GitHub Copilot provider hard-codes claude-opus-4.8 with contextWindow: 128000 (and no reasoning flag). Copilot's live /models endpoint returns 1,000,000 for this model with full reasoning-effort support. The static catalog value shadows the real capability, so users on entitled accounts silently get a 128K context budget and no thinking, even though the model and the provider both support 1M + adaptive thinking.

Root cause: PR #88547 added claude-opus-4.8 by mirroring the 4.7 metadata shape, which carried over contextWindow: 128000. Unlike claude-opus-4.7-high / -xhigh (which really are 200K split variants), Opus 4.8 is natively 1M on the Anthropic API / Bedrock / Vertex — no -1m suffix, no beta header, no long-context premium (per Anthropic's 4.8 release notes).

Reproduction

  1. Account entitled to claude-opus-4.8 via GitHub Copilot.
  2. GET https://api.githubcopilot.com/models returns (abridged) for claude-opus-4.8:
max_context_window_tokens: 1000000
max_prompt_tokens:         936000
max_output_tokens:         64000
reasoning_effort:          [low, medium, high, xhigh, max]
adaptive_thinking:         true
vision:                    true
  1. openclaw models list shows github-copilot/claude-opus-4.8 with 128k context.
  2. A real session's context budget caps at 128k/128k (visible in /statusContext: x/128k), triggering premature compaction on long contexts.

For comparison, the same /models response gives claude-opus-4.7 (no suffix) = 1,000,000 too, while claude-opus-4.7-high / claude-opus-4.7-xhigh = 200,000. So the 4.8 row is simply wrong, not a deliberate cap.

Two distinct places need the fix

The catalog value feeds two different consumers, and they resolve from different sources:

  1. extensions/github-copilot/openclaw.plugin.jsonmodelCatalog.providers.github-copilot.models[id=claude-opus-4.8] — this is what seeds the session context budget (/status Context line). Currently contextWindow: 128000.
  2. extensions/github-copilot/models-defaults.ts / static metadata — feeds the picker and models list.

A user-config override of models.providers.github-copilot.models[] fixes models list and routing, but the session budget still reads the bundled manifest, so editing config alone is not enough — the manifest itself has to be correct (or the budget resolver should prefer the live/override value).

Proposed fix

  1. Set claude-opus-4.8 contextWindow: 1000000, maxTokens: 64000, reasoning: true, input: ["text","image"] in the bundled manifest + defaults.
  2. Add supportedReasoningEfforts: ["low","medium","high","xhigh","max"] (matching upstream /models).
  3. Ideally, make the session-budget resolver prefer live /models metadata (or a user override) over the static manifest, so newly-entitled / re-spec'd models don't require a release bump. (This overlaps with GitHub Copilot: static default model list shadows live entitlement discovery #88548.)

Environment

  • OpenClaw 2026.6.1 (2e08f0f)
  • Provider: github-copilot, real Copilot subscription, live api.githubcopilot.com
  • Verified live /models returns claude-opus-4.8 ctx=1,000,000 + reasoning_effort [low,medium,high,xhigh,max] for the affected account.

Interim workaround (confirmed working)

  • User override models.providers.github-copilot.models[] with contextWindow:1000000 + reasoning:true + compat.supportedReasoningEfforts fixes models list + routing + thinking.
  • For the session budget, patch the bundled openclaw.plugin.json manifest's 4.8 contextWindow to 1000000 and restart. After that, /status shows Context: …/1.0m. (This is overwritten on upgrade.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions