Skip to content

fix(github-copilot): claude-opus-4.8 is native 1M context + thinking (not 128K)#91870

Closed
wyhgoodjob wants to merge 3 commits into
openclaw:mainfrom
wyhgoodjob:fix/copilot-opus-4.8-1m-context
Closed

fix(github-copilot): claude-opus-4.8 is native 1M context + thinking (not 128K)#91870
wyhgoodjob wants to merge 3 commits into
openclaw:mainfrom
wyhgoodjob:fix/copilot-opus-4.8-1m-context

Conversation

@wyhgoodjob

Copy link
Copy Markdown

What

Fix github-copilot/claude-opus-4.8 metadata so it reflects its real capabilities: native 1M context window + adaptive thinking (reasoning efforts low/medium/high/xhigh/max).

  • model-metadata.ts: add a STATIC_MODEL_OVERRIDES entry for claude-opus-4.8 (1M ctx, maxTokens 64k, reasoning: true, thinkingLevelMap, supportedReasoningEfforts), mirroring the existing claude-opus-4.7-1m-internal shape.
  • openclaw.plugin.json: bump the bundled manifest row for claude-opus-4.8 from contextWindow: 128000 / maxTokens: 8192 to 1000000 / 64000 and add reasoning: true. This manifest value is what seeds the session context budget, so it must be correct independently of the defaults helper.
  • models.test.ts: add an assertion that buildCopilotModelDefinition("claude-opus-4.8") resolves to the 1M + thinking definition.

Fixes #91869.

Why

PR #88547 added claude-opus-4.8 by mirroring the 4.7 row, which carried over contextWindow: 128000 and no reasoning support. But 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). The hard-coded 128K silently caps entitled users and disables thinking.

Real behavior proof

Behavior addressed: On an account entitled to claude-opus-4.8 via GitHub Copilot, openclaw models list showed 128k and the session context budget (/statusContext: x/128k) capped at 128k with no thinking.

Real environment tested: OpenClaw 2026.6.1 (2e08f0f), Debian, provider github-copilot authenticated against a real Copilot subscription (live api.githubcopilot.com).

Upstream /models response for the affected account (abridged), proving the capability is real:

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

(For contrast the same response returns claude-opus-4.7 = 1,000,000, while claude-opus-4.7-high / -xhigh = 200,000, confirming the 4.8 row was simply wrong rather than an intentional cap.)

After applying the equivalent change locally (manifest ctx → 1,000,000 + override), a real session shows Context: 148k/1.0m and a thinking=high turn on github-copilot/claude-opus-4.8 runs successfully (verified end-to-end).

Tests

  • node scripts/run-vitest.mjs extensions/github-copilot/models.test.ts

(Adds one assertion; existing 4.7-1m-internal / gpt-5.5 override assertions remain.)

Notes

@openclaw-barnacle openclaw-barnacle Bot added extensions: github-copilot size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 10, 2026
@clawsweeper

clawsweeper Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed June 15, 2026, 1:23 PM ET / 17:23 UTC.

Summary
The branch adds a static GitHub Copilot claude-opus-4.8 metadata override, updates the bundled manifest row to 1M/64k/reasoning, and adds model-default regression coverage.

PR surface: Source +13, Tests +16. Total +29 across 3 files.

Reproducibility: yes. at source level: current main and v2026.6.6 still carry the 128k/8192/no-reasoning fallback row, and the PR body provides live Copilot /models output plus after-fix OpenClaw output. I did not rerun the live Copilot call because this review has no entitled token.

Review metrics: 1 noteworthy metric.

  • Provider fallback capability metadata: 1 static override added, 1 manifest row changed. These provider-owned fallback rows feed model listing, dynamic resolution, and session context budgeting when live Copilot discovery is disabled, unavailable, or shadowed.

Stored data model
Persistent data-model change detected: vector/embedding metadata: extensions/github-copilot/model-metadata.ts, vector/embedding metadata: extensions/github-copilot/models.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Add adaptive thinking support and focused provider-policy/index tests for Copilot Opus 4.8.
  • [P2] Rerun the focused GitHub Copilot metadata and provider-policy tests after the repair.

Risk before merge

  • [P1] As submitted, adaptive thinking remains unavailable through the Copilot provider profile even though the PR body and metadata claim adaptive-thinking support.
  • [P2] The diff changes shipped fallback metadata for an existing Copilot model; when live discovery is disabled or unavailable, existing users will see different context-budget, output-token, and reasoning behavior after upgrade.
  • [P2] The targeted static fallback bump overlaps with test(github-copilot): cover live xhigh reasoning for non-Claude mini models (#59416) #91728; maintainers should choose landing order and coexistence, but that open PR does not fully supersede this static fallback correction.

Maintainer options:

  1. Fix Adaptive Profile Before Merge (recommended)
    Update the Copilot thinking-profile helper and focused tests so claude-opus-4.8 exposes adaptive, xhigh, and max when static or live metadata proves that capability.
  2. Accept Metadata-Only Interim
    Maintainers could intentionally land only the context/output-token correction now, but the PR body and tests should stop claiming complete adaptive-thinking support until the profile surface is fixed.
  3. Defer To Live-Catalog Policy
    Pause this targeted fallback bump if maintainers want the live-catalog PR to land first and then decide whether static fallback metadata still needs a one-model correction.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Preserve the static `claude-opus-4.8` 1M/64k metadata correction. Update GitHub Copilot thinking-profile handling so `github-copilot/claude-opus-4.8` exposes `adaptive`, `xhigh`, and `max` consistently through `provider-policy-api.ts` and the registered provider resolver; add focused coverage in `extensions/github-copilot/provider-policy-api.test.ts` and `extensions/github-copilot/index.test.ts`; keep the broader live/static catalog precedence work in https://github.com/openclaw/openclaw/pull/91728 out of scope; run `node scripts/run-vitest.mjs extensions/github-copilot/models.test.ts extensions/github-copilot/provider-policy-api.test.ts extensions/github-copilot/index.test.ts` and `git diff --check`.

Next step before merge

  • [P2] A narrow automated repair can add the missing adaptive thinking profile/tests without choosing the broader live-catalog policy.

Security
Cleared: The diff is limited to GitHub Copilot model metadata and a focused test, with no new dependency, workflow, package, credential, download, or code-execution surface.

Review findings

  • [P2] Expose adaptive thinking in the Copilot profile — extensions/github-copilot/model-metadata.ts:52-53
Review details

Best possible solution:

Land the static fallback correction together with the small Copilot thinking-profile update for adaptive/xhigh/max, while keeping the broader live-vs-static catalog precedence in #91728.

Do we have a high-confidence way to reproduce the issue?

Yes at source level: current main and v2026.6.6 still carry the 128k/8192/no-reasoning fallback row, and the PR body provides live Copilot /models output plus after-fix OpenClaw output. I did not rerun the live Copilot call because this review has no entitled token.

Is this the best way to solve the issue?

No, not as submitted. The static metadata surface is the right immediate boundary, but the provider thinking profile must expose adaptive so the claimed capability is selectable.

Full review comments:

  • [P2] Expose adaptive thinking in the Copilot profile — extensions/github-copilot/model-metadata.ts:52-53
    The new Opus 4.8 override advertises adaptive thinking, but the Copilot provider profile still comes from resolveCopilotExtendedThinkingLevels, which only appends xhigh/max and is chosen before the generic anthropic-messages Claude fallback. After this PR, /think adaptive remains unsupported for github-copilot/claude-opus-4.8; add adaptive to the Copilot profile and cover the provider-policy/index paths.
    Confidence: 0.84

Overall correctness: patch is incorrect
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8ded75628437.

Label changes

Label justifications:

  • P2: The PR addresses a bounded GitHub Copilot provider capability bug affecting context budget and thinking controls for entitled users.
  • merge-risk: 🚨 compatibility: The diff changes shipped fallback metadata for an existing model, which can change upgrade behavior when live discovery is unavailable or disabled.
  • merge-risk: 🚨 auth-provider: The diff affects GitHub Copilot provider model capability metadata used for model choice, context budgeting, and reasoning controls.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body includes redacted live Copilot /models output, a real environment, after-fix context-budget output, and a successful thinking=high run; it does not cover the remaining adaptive-option gap.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes redacted live Copilot /models output, a real environment, after-fix context-budget output, and a successful thinking=high run; it does not cover the remaining adaptive-option gap.
Evidence reviewed

PR surface:

Source +13, Tests +16. Total +29 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 15 2 +13
Tests 1 16 0 +16
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 31 2 +29

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs extensions/github-copilot/models.test.ts extensions/github-copilot/provider-policy-api.test.ts extensions/github-copilot/index.test.ts.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • saju01: Authored the merged PR that added claude-opus-4.8 to the Copilot static catalog, and later connected this exact live-metadata issue to the live-catalog work. (role: introduced catalog row and adjacent contributor; confidence: high; commits: fbb776d92c29, 60580c48679a; files: extensions/github-copilot/openclaw.plugin.json, extensions/github-copilot/models-defaults.ts, extensions/github-copilot/models.test.ts)
  • steipete: Merged the catalog-row PR and authored broader Claude Opus 4.8 support that established adjacent model/thinking metadata behavior. (role: merger and recent area contributor; confidence: high; commits: fbb776d92c29, 1188aa3b81ef; files: extensions/github-copilot/openclaw.plugin.json, src/plugin-sdk/provider-model-shared.ts, src/llm/providers/anthropic.ts)
  • efpiva: Authored the merged Copilot /models discovery implementation that maps live context, max output, and reasoning metadata. (role: live catalog discovery contributor; confidence: medium; commits: 880c0944072d, 75405f64d0a7; files: extensions/github-copilot/index.ts, extensions/github-copilot/models.ts, extensions/github-copilot/models.test.ts)
  • wangwllu: Authored the recent merged change that made generic anthropic-messages rows use the Claude thinking profile, adjacent to the remaining Copilot provider-profile gap. (role: recent thinking-profile contributor; confidence: medium; commits: 43b4e2769928; files: src/auto-reply/thinking.ts, src/plugins/provider-claude-thinking.ts, src/plugin-sdk/provider-model-shared.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. labels Jun 10, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label Jun 10, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 10, 2026
@openclaw-clownfish

Copy link
Copy Markdown
Contributor

Thanks @wyhgoodjob for the targeted Copilot metadata fix. I am closing this as superseded by #91728 because both PRs address the same claude-opus-4.8 live metadata shadowing problem, and #91728 is the surviving canonical path that fixes the root cause by making live Copilot /models metadata win over stale static rows.

Canonical path: #91728
Source PR: #91870

I am keeping the canonical thread open there so validation and maintainer review stay in one place. Clownfish will preserve this source PR as attribution for the concrete 4.8 symptom report and targeted patch. If this still has a distinct reproduction path or remains broken after #91728 lands, please reply and we can reopen or split it back out.

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

Labels

clownfish Tracked by Clownfish automation extensions: github-copilot merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant