feat(caps): explicit rows for the gateway's frontier models — GPT-6 Astra, Fable 5 / 5.1 - #91
Open
ndemianc wants to merge 2 commits into
Open
feat(caps): explicit rows for the gateway's frontier models — GPT-6 Astra, Fable 5 / 5.1#91ndemianc wants to merge 2 commits into
ndemianc wants to merge 2 commits into
Conversation
The gateway picker offers whatever /account/models returns, so a model can reach the composer before the caps table has heard of it. gpt-6-astra fell through to the default row: vision false, context 200k. In gateway mode that meant the composer refused every attachment for it and the context meter sized it against a window a fifth of the real one. The gpt-4/gpt-5 heuristic would not have caught it either, and if extended to gpt-6 it would assert a 128k window — wrong by 8x. An explicit row is the honest fix: 1,050,000 ctx and image input, both from the OpenRouter models API on 2026-09-06. Verified: catalog 14 tests (was 13); full suite 40 suites, 600 cases, 0 failing. Row reverted -> the new test fails.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is a low-risk, targeted caps-table addition with matching regression test coverage validating the intended behavior.
Pull request overview
Adds explicit capabilities metadata for the newly entitled gpt-6-astra model so LevelCode’s AI UX (image attachments + context meter) reflects its real window size and vision support when the model appears dynamically in the gateway picker.
Changes:
- Add a
CAPStable entry forgpt-6-astrawith{ context: 1050000, tools: true, vision: true }. - Add a unit test asserting
gpt-6-astraresolves via the explicit row (not thegpt-4/gpt-5heuristic) and is treated as vision-capable with the correct context window.
File summaries
| File | Description |
|---|---|
| extensions/levelcode-ai/providers/catalog.js | Adds an explicit CAPS row for gpt-6-astra to ensure correct context + vision behavior. |
| extensions/levelcode-ai/test/catalog.test.js | Adds regression coverage ensuring the explicit row is used and that vision/context helpers report correctly. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…rrive as Fable reaches the composer two ways — through the gateway as the OpenRouter basename (dotted `claude-fable-5.1`) and BYOK-native as the dashed `claude-fable-5-1` — and neither had a row, so both fell to the claude-* heuristic's 200k: a fifth of the real window, and the meter sized every Fable conversation against it. Vision was already right by luck of the heuristic; the window was not. Three explicit rows, one per spelling. Matters more now that Fable 5 / 5.1 are Pro-tier on the gateway (thin.ly, 2026-09-08) rather than Max-only. Verified: catalog 15 tests (was 14); imageCost 9, imageAttach 30. Rows reverted -> the new test fails.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An explicit
CAPSrow forgpt-6-astra:{ context: 1050000, tools: true, vision: true }, from the OpenRouter models API on 2026-09-06.Why
The gateway picker offers whatever
/account/modelsreturns, so a model reaches the composer the moment the backend entitles it — before this table has heard of it.gpt-6-astrafell through to the default row: visionfalse, context 200k. In gateway mode that meant the composer refused every image attachment for it, and the context meter sized it against a window a fifth of the real one.The
gpt-4/gpt-5prefix heuristic doesn't matchgpt-6, and extending it would assert a 128k window — wrong by 8×. An explicit row is the honest fix.Verification
catalog.test.js: 14 tests (was 13). Full suite: 40 suites, 600 cases, 0 failing.Companion to the backend change that entitles the model at Pro+ and adds a price ceiling on paid OpenRouter routes (systemu-net/thin.ly#428 — systemu-net/thin.ly#428).
Noticed, not changed:
gpt-5.5has no explicit row either and gets the heuristic's 128k, against a real 1.05M.Second commit — Fable 5 / 5.1
Same gap, now for the models moving to Pro-tier on the gateway (systemu-net/thin.ly#431 — systemu-net/thin.ly#431). Fable arrives two ways — the OpenRouter basename
claude-fable-5.1(dotted) via the gateway, and the nativeclaude-fable-5-1(dashed) under BYOK — and neither had a row, so both got theclaude-*heuristic's 200k against a real 1M. Three explicit rows, one per spelling. Vision was already right by luck of the heuristic; the window was not.Verified: catalog 15 tests; rows reverted → the new test fails.