Skip to content

Commit 4e49295

Browse files
authored
Merge pull request #91 from levelcodeai/feat/gpt-6-astra-caps
feat(caps): explicit rows for the gateway's frontier models — GPT-6 Astra, Fable 5 / 5.1
2 parents 7bc84cd + 6a983fa commit 4e49295

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

‎extensions/levelcode-ai/providers/catalog.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,19 @@ const CAPS = {
2929
'claude-opus-4-8': { context: 200000, tools: true, vision: true, caching: true },
3030
'claude-sonnet-4-6': { context: 200000, tools: true, vision: true, caching: true },
3131
'claude-haiku-4-5-20251001': { context: 200000, tools: true, vision: true, fast: true },
32+
// Fable reaches the composer two ways: through the gateway as the OpenRouter basename (dotted
33+
// 5.1), and BYOK-native as the dashed id. Neither had a row, so both fell to the claude-*
34+
// heuristic's 200k — a fifth of the real window. Fable 5 / 5.1 are Pro-tier from 2026-09-08.
35+
'claude-fable-5': { context: 1000000, tools: true, vision: true, caching: true },
36+
'claude-fable-5.1': { context: 1000000, tools: true, vision: true, caching: true },
37+
'claude-fable-5-1': { context: 1000000, tools: true, vision: true, caching: true },
3238
// OpenAI
3339
'gpt-4o': { context: 128000, tools: true, vision: true },
3440
'gpt-4o-mini': { context: 128000, tools: true, vision: true, fast: true },
41+
// Not covered by the gpt-4/gpt-5 heuristic below, which would also give it a 128k window; the
42+
// real one is 1.05M (OpenRouter models API, 2026-09-06) and it reads images. Without this row the
43+
// gateway picker offers it while the composer refuses attachments and the meter sizes it wrong.
44+
'gpt-6-astra': { context: 1050000, tools: true, vision: true },
3545
'o3-mini': { context: 200000, tools: true, reasoning: true },
3646
'o1': { context: 200000, tools: true, reasoning: true },
3747
'o1-mini': { context: 128000, tools: false, reasoning: true }, // o1-mini has no function calling

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ 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+
});
30+
test('modelCaps: Fable 5 / 5.1 carry the 1M window under every id they arrive as', () => {
31+
for (const id of ['anthropic/claude-fable-5', 'anthropic/claude-fable-5.1', 'claude-fable-5-1']) {
32+
assert.deepStrictEqual(C.modelCaps(id), { context: 1000000, tools: true, vision: true, caching: true }, id);
33+
assert.strictEqual(C.contextWindowFor('openai', id), 1000000, id);
34+
}
35+
});
2236
test('modelCaps: family heuristics for unknown ids', () => {
2337
assert.strictEqual(C.modelCaps('o4-mini').reasoning, true); // o-series
2438
assert.strictEqual(C.modelCaps('claude-3-5-haiku-latest').vision, true);

0 commit comments

Comments
 (0)