@@ -4,12 +4,24 @@ const { test } = require('node:test');
44const helper = require ( '../../lib/agent-cli-provider' ) ;
55const { 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
920const 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+
3555test ( '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
6284test ( '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