From 528a522180a21470f7a53f66d7cf5ca5dad7e906 Mon Sep 17 00:00:00 2001 From: Gabriel Monteiro Nepomuceno Date: Sun, 22 Mar 2026 05:37:57 +0000 Subject: [PATCH] fix: correct github-copilot model limits to match Copilot API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update token limits for 6 models in the github-copilot provider to match the authoritative values from the Copilot API endpoint (GET https://api.githubcopilot.com/models). Models fixed: - claude-haiku-4.5: ctx 144K→200K, input 128K→136K, output 32K→64K - claude-opus-4.5: ctx 160K→200K, input 128K→168K - claude-opus-4.6: ctx 144K→200K, input 128K→168K, output 64K→32K - claude-sonnet-4.5: ctx 144K→200K, input 128K→168K - claude-sonnet-4.6: input 128K→168K - gpt-5.2: ctx 264K→400K, input 128K→272K, output 64K→128K The under-reported limits cause tools like OpenCode to trigger context compaction 40K-136K tokens earlier than necessary. Fixes #858 --- providers/github-copilot/models/claude-haiku-4.5.toml | 6 +++--- providers/github-copilot/models/claude-opus-4.5.toml | 4 ++-- providers/github-copilot/models/claude-opus-4.6.toml | 6 +++--- providers/github-copilot/models/claude-sonnet-4.5.toml | 4 ++-- providers/github-copilot/models/claude-sonnet-4.6.toml | 2 +- providers/github-copilot/models/gpt-5.2.toml | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/providers/github-copilot/models/claude-haiku-4.5.toml b/providers/github-copilot/models/claude-haiku-4.5.toml index 668290ee6..b459118fb 100644 --- a/providers/github-copilot/models/claude-haiku-4.5.toml +++ b/providers/github-copilot/models/claude-haiku-4.5.toml @@ -14,9 +14,9 @@ input = 0 output = 0 [limit] -context = 144_000 -output = 32_000 -input = 128_000 +context = 200_000 +output = 64_000 +input = 136_000 [modalities] input = ["text", "image"] diff --git a/providers/github-copilot/models/claude-opus-4.5.toml b/providers/github-copilot/models/claude-opus-4.5.toml index bcd51ee55..2cb612ee8 100644 --- a/providers/github-copilot/models/claude-opus-4.5.toml +++ b/providers/github-copilot/models/claude-opus-4.5.toml @@ -14,9 +14,9 @@ input = 0 output = 0 [limit] -context = 160_000 +context = 200_000 output = 32_000 -input = 128_000 +input = 168_000 [modalities] input = ["text", "image"] diff --git a/providers/github-copilot/models/claude-opus-4.6.toml b/providers/github-copilot/models/claude-opus-4.6.toml index 1765f77ba..a12227431 100644 --- a/providers/github-copilot/models/claude-opus-4.6.toml +++ b/providers/github-copilot/models/claude-opus-4.6.toml @@ -14,9 +14,9 @@ input = 0 output = 0 [limit] -context = 144_000 -output = 64_000 -input = 128_000 +context = 200_000 +output = 32_000 +input = 168_000 [modalities] input = ["text", "image"] diff --git a/providers/github-copilot/models/claude-sonnet-4.5.toml b/providers/github-copilot/models/claude-sonnet-4.5.toml index 880effbf7..22fc9972f 100644 --- a/providers/github-copilot/models/claude-sonnet-4.5.toml +++ b/providers/github-copilot/models/claude-sonnet-4.5.toml @@ -14,9 +14,9 @@ input = 0 output = 0 [limit] -context = 144_000 +context = 200_000 output = 32_000 -input = 128_000 +input = 168_000 [modalities] input = ["text", "image"] diff --git a/providers/github-copilot/models/claude-sonnet-4.6.toml b/providers/github-copilot/models/claude-sonnet-4.6.toml index f9bee5848..de5608f3c 100644 --- a/providers/github-copilot/models/claude-sonnet-4.6.toml +++ b/providers/github-copilot/models/claude-sonnet-4.6.toml @@ -15,7 +15,7 @@ output = 0 [limit] context = 200_000 output = 32_000 -input = 128_000 +input = 168_000 [modalities] input = ["text", "image"] diff --git a/providers/github-copilot/models/gpt-5.2.toml b/providers/github-copilot/models/gpt-5.2.toml index bee46cfe9..f3ba73ded 100644 --- a/providers/github-copilot/models/gpt-5.2.toml +++ b/providers/github-copilot/models/gpt-5.2.toml @@ -14,9 +14,9 @@ input = 0 output = 0 [limit] -context = 264_000 -input = 128_000 -output = 64_000 +context = 400_000 +input = 272_000 +output = 128_000 [modalities] input = ["text", "image"]