Skip to content

Commit 702e635

Browse files
committed
fix: add Bedrock provider model ids
1 parent e94b6c2 commit 702e635

3 files changed

Lines changed: 45 additions & 19 deletions

File tree

src/agent-cli-provider/adapters/claude.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const MODEL_CATALOG: Readonly<Record<string, ModelCatalogEntry>> = {
4040
'claude-opus-4-6': { rank: 3 },
4141
'claude-opus-4-7': { rank: 3 },
4242
'claude-opus-4-8': { rank: 3 },
43+
'claude-opus-5': { rank: 3 },
4344
fable: { rank: 3 },
4445
'claude-fable-5': { rank: 3 },
4546
'claude-mythos-5': { rank: 3 },

src/agent-cli-provider/adapters/codex.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ const MODEL_CATALOG: Readonly<Record<string, ModelCatalogEntry>> = {
2929
'gpt-5.5': { rank: 3 },
3030
'gpt-5.6': { rank: 3 },
3131
'gpt-5.6-sol': { rank: 3 },
32+
'openai.gpt-5.6-sol': { rank: 3 },
3233
'gpt-5.6-terra': { rank: 2 },
34+
'openai.gpt-5.6-terra': { rank: 2 },
3335
'gpt-5.6-luna': { rank: 1 },
36+
'openai.gpt-5.6-luna': { rank: 1 },
3437
};
3538

3639
const LEVEL_MAPPING: Readonly<Record<ModelLevel, LevelModelSpec>> = {

tests/agent-cli-provider/current-model-support.test.js

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,24 @@ const { test } = require('node:test');
44
const helper = require('../../lib/agent-cli-provider');
55
const { runExecutable } = require('./executable-contract-helpers.cjs');
66

7-
const OPENAI_GPT_56_MODELS = ['gpt-5.6', 'gpt-5.6-sol', 'gpt-5.6-terra', 'gpt-5.6-luna'];
7+
const BEDROCK_NAMESPACED_CODEX_MODELS = [
8+
['openai.gpt-5.6-sol', 'gpt-5.6-sol'],
9+
['openai.gpt-5.6-terra', 'gpt-5.6-terra'],
10+
['openai.gpt-5.6-luna', 'gpt-5.6-luna'],
11+
];
12+
const OPENAI_GPT_56_MODELS = [
13+
'gpt-5.6',
14+
'gpt-5.6-sol',
15+
'gpt-5.6-terra',
16+
'gpt-5.6-luna',
17+
...BEDROCK_NAMESPACED_CODEX_MODELS.map(([model]) => model),
18+
];
819

920
const CURRENT_CLAUDE_MODELS = [
1021
'fable',
1122
'claude-fable-5',
1223
'claude-opus-4-8',
24+
'claude-opus-5',
1325
'claude-opus-4-7',
1426
'claude-opus-4-6',
1527
'claude-opus-4-5',
@@ -32,6 +44,14 @@ test('Codex catalog accepts the GPT-5.6 family and alias', () => {
3244
}
3345
});
3446

47+
test('Bedrock-namespaced Codex model ranks match their unprefixed twins', () => {
48+
const catalog = helper.getProviderAdapter('codex').modelCatalog;
49+
50+
for (const [namespacedModel, unprefixedModel] of BEDROCK_NAMESPACED_CODEX_MODELS) {
51+
assert.equal(catalog[namespacedModel].rank, catalog[unprefixedModel].rank);
52+
}
53+
});
54+
3555
test('Claude catalog accepts current canonical ids, aliases, and limited-access models', () => {
3656
const adapter = helper.getProviderAdapter('claude');
3757

@@ -40,28 +60,30 @@ test('Claude catalog accepts current canonical ids, aliases, and limited-access
4060
}
4161
});
4262

43-
test('Codex sends max reasoning effort through its config override', () => {
44-
const spec = helper.buildProviderCommand('codex', 'test context', {
45-
modelSpec: { model: 'gpt-5.6-sol', reasoningEffort: 'max' },
46-
cliFeatures: {
47-
supportsConfigOverride: true,
48-
supportsSkipGitRepoCheck: true,
49-
},
50-
});
63+
test('Codex sends Bedrock-namespaced GPT-5.6 models through its command path', () => {
64+
for (const [model] of BEDROCK_NAMESPACED_CODEX_MODELS) {
65+
const spec = helper.buildProviderCommand('codex', 'test context', {
66+
modelSpec: { model, reasoningEffort: 'max' },
67+
cliFeatures: {
68+
supportsConfigOverride: true,
69+
supportsSkipGitRepoCheck: true,
70+
},
71+
});
5172

52-
assert.deepEqual(spec.args.slice(spec.args.indexOf('-m'), spec.args.indexOf('-m') + 2), [
53-
'-m',
54-
'gpt-5.6-sol',
55-
]);
56-
assert.deepEqual(
57-
spec.args.slice(spec.args.indexOf('--config'), spec.args.indexOf('--config') + 2),
58-
['--config', 'model_reasoning_effort="max"']
59-
);
73+
assert.deepEqual(spec.args.slice(spec.args.indexOf('-m'), spec.args.indexOf('-m') + 2), [
74+
'-m',
75+
model,
76+
]);
77+
assert.deepEqual(
78+
spec.args.slice(spec.args.indexOf('--config'), spec.args.indexOf('--config') + 2),
79+
['--config', 'model_reasoning_effort="max"']
80+
);
81+
}
6082
});
6183

6284
test('Claude sends max reasoning effort through the installed CLI effort flag', () => {
6385
const spec = helper.buildProviderCommand('claude', 'test context', {
64-
modelSpec: { model: 'claude-fable-5', reasoningEffort: 'max' },
86+
modelSpec: { model: 'claude-opus-5', reasoningEffort: 'max' },
6587
cliFeatures: {
6688
supportsModel: true,
6789
supportsEffort: true,
@@ -70,7 +92,7 @@ test('Claude sends max reasoning effort through the installed CLI effort flag',
7092

7193
assert.deepEqual(
7294
spec.args.slice(spec.args.indexOf('--model'), spec.args.indexOf('--model') + 2),
73-
['--model', 'claude-fable-5']
95+
['--model', 'claude-opus-5']
7496
);
7597
assert.deepEqual(
7698
spec.args.slice(spec.args.indexOf('--effort'), spec.args.indexOf('--effort') + 2),

0 commit comments

Comments
 (0)