Skip to content

Commit d44d6b3

Browse files
committed
feat(caps): GPT-6 Astra reads images and has a 1.05M window
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.
1 parent 119fef2 commit d44d6b3

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

extensions/levelcode-ai/providers/catalog.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ const CAPS = {
3232
// OpenAI
3333
'gpt-4o': { context: 128000, tools: true, vision: true },
3434
'gpt-4o-mini': { context: 128000, tools: true, vision: true, fast: true },
35+
// Not covered by the gpt-4/gpt-5 heuristic below, which would also give it a 128k window; the
36+
// real one is 1.05M (OpenRouter models API, 2026-09-06) and it reads images. Without this row the
37+
// gateway picker offers it while the composer refuses attachments and the meter sizes it wrong.
38+
'gpt-6-astra': { context: 1050000, tools: true, vision: true },
3539
'o3-mini': { context: 200000, tools: true, reasoning: true },
3640
'o1': { context: 200000, tools: true, reasoning: true },
3741
'o1-mini': { context: 128000, tools: false, reasoning: true }, // o1-mini has no function calling

extensions/levelcode-ai/test/catalog.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ test('modelCaps: exact table hit', () => {
1919
test('modelCaps: OpenRouter vendor/model matches on basename', () => {
2020
assert.deepStrictEqual(C.modelCaps('openai/gpt-4o'), C.modelCaps('gpt-4o'));
2121
});
22+
// GPT-6 Astra is a gateway model; the picker offers whatever /account/models returns, so the caps
23+
// table must already know it or the composer refuses images and the meter assumes a 200k window.
24+
test('modelCaps: gpt-6-astra is an explicit row, not the gpt-4/5 heuristic', () => {
25+
assert.deepStrictEqual(C.modelCaps('gpt-6-astra'), { context: 1050000, tools: true, vision: true });
26+
assert.deepStrictEqual(C.modelCaps('openai/gpt-6-astra'), C.modelCaps('gpt-6-astra'));
27+
assert.strictEqual(C.supportsVisionForModel('openai', 'gpt-6-astra'), true);
28+
assert.strictEqual(C.contextWindowFor('openai', 'gpt-6-astra'), 1050000);
29+
});
2230
test('modelCaps: family heuristics for unknown ids', () => {
2331
assert.strictEqual(C.modelCaps('o4-mini').reasoning, true); // o-series
2432
assert.strictEqual(C.modelCaps('claude-3-5-haiku-latest').vision, true);

0 commit comments

Comments
 (0)