@@ -36,10 +36,10 @@ func TestAIBridgeListInterceptions(t *testing.T) {
3636Features : license.Features {},
3737},
3838})
39- experimentalClient := codersdk .NewExperimentalClient (client )
4039
4140ctx := testutil .Context (t ,testutil .WaitLong )
42- _ ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
41+ //nolint:gocritic // Owner role is irrelevant here.
42+ _ ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
4343var sdkErr * codersdk.Error
4444require .ErrorAs (t ,err ,& sdkErr )
4545require .Equal (t ,http .StatusForbidden ,sdkErr .StatusCode ())
@@ -59,9 +59,9 @@ func TestAIBridgeListInterceptions(t *testing.T) {
5959},
6060},
6161})
62- experimentalClient := codersdk .NewExperimentalClient (client )
6362ctx := testutil .Context (t ,testutil .WaitLong )
64- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
63+ //nolint:gocritic // Owner role is irrelevant here.
64+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
6565require .NoError (t ,err )
6666require .Empty (t ,res .Results )
6767})
@@ -79,7 +79,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
7979},
8080},
8181})
82- experimentalClient := codersdk .NewExperimentalClient (client )
8382ctx := testutil .Context (t ,testutil .WaitLong )
8483
8584user1 ,err := client .User (ctx ,codersdk .Me )
@@ -140,7 +139,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
140139i1SDK := db2sdk .AIBridgeInterception (i1 ,user1Visible , []database.AIBridgeTokenUsage {i1tok2 ,i1tok1 }, []database.AIBridgeUserPrompt {i1up2 ,i1up1 }, []database.AIBridgeToolUsage {i1tool2 ,i1tool1 })
141140i2SDK := db2sdk .AIBridgeInterception (i2 ,user2Visible ,nil ,nil ,nil )
142141
143- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
142+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
144143require .NoError (t ,err )
145144require .Len (t ,res .Results ,2 )
146145require .Equal (t ,i2SDK .ID ,res .Results [0 ].ID )
@@ -190,7 +189,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
190189},
191190},
192191})
193- experimentalClient := codersdk .NewExperimentalClient (client )
194192ctx := testutil .Context (t ,testutil .WaitLong )
195193
196194allInterceptionIDs := make ([]uuid.UUID ,0 ,20 )
@@ -221,7 +219,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
221219}
222220
223221// Try to fetch with an invalid limit.
224- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
222+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
225223Pagination : codersdk.Pagination {
226224Limit :1001 ,
227225},
@@ -232,7 +230,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
232230require .Empty (t ,res .Results )
233231
234232// Try to fetch with both after_id and offset pagination.
235- res ,err = experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
233+ res ,err = client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
236234Pagination : codersdk.Pagination {
237235AfterID :allInterceptionIDs [0 ],
238236Offset :1 ,
@@ -265,7 +263,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
265263}else {
266264pagination .Offset = len (interceptionIDs )
267265}
268- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
266+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
269267Pagination :pagination ,
270268})
271269require .NoError (t ,err )
@@ -305,11 +303,9 @@ func TestAIBridgeListInterceptions(t *testing.T) {
305303},
306304},
307305})
308- adminExperimentalClient := codersdk .NewExperimentalClient (adminClient )
309306ctx := testutil .Context (t ,testutil .WaitLong )
310307
311308secondUserClient ,secondUser := coderdtest .CreateAnotherUser (t ,adminClient ,firstUser .OrganizationID )
312- secondUserExperimentalClient := codersdk .NewExperimentalClient (secondUserClient )
313309
314310now := dbtime .Now ()
315311i1 := dbgen .AIBridgeInterception (t ,db , database.InsertAIBridgeInterceptionParams {
@@ -322,15 +318,15 @@ func TestAIBridgeListInterceptions(t *testing.T) {
322318},& now )
323319
324320// Admin can see all interceptions.
325- res ,err := adminExperimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
321+ res ,err := adminClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
326322require .NoError (t ,err )
327323require .EqualValues (t ,2 ,res .Count )
328324require .Len (t ,res .Results ,2 )
329325require .Equal (t ,i1 .ID ,res .Results [0 ].ID )
330326require .Equal (t ,i2 .ID ,res .Results [1 ].ID )
331327
332328// Second user can only see their own interceptions.
333- res ,err = secondUserExperimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
329+ res ,err = secondUserClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
334330require .NoError (t ,err )
335331require .EqualValues (t ,1 ,res .Count )
336332require .Len (t ,res .Results ,1 )
@@ -350,7 +346,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
350346},
351347},
352348})
353- experimentalClient := codersdk .NewExperimentalClient (client )
354349ctx := testutil .Context (t ,testutil .WaitLong )
355350
356351user1 ,err := client .User (ctx ,codersdk .Me )
@@ -500,7 +495,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
500495t .Run (tc .name ,func (t * testing.T ) {
501496t .Parallel ()
502497ctx := testutil .Context (t ,testutil .WaitLong )
503- res ,err := experimentalClient .AIBridgeListInterceptions (ctx ,tc .filter )
498+ res ,err := client .AIBridgeListInterceptions (ctx ,tc .filter )
504499require .NoError (t ,err )
505500require .EqualValues (t ,len (tc .want ),res .Count )
506501// We just compare UUID strings for the sake of this test.
@@ -530,7 +525,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
530525},
531526},
532527})
533- experimentalClient := codersdk .NewExperimentalClient (client )
534528
535529// No need to insert any test data, we're just testing the filter
536530// errors.
@@ -587,7 +581,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
587581t .Run (tc .name ,func (t * testing.T ) {
588582t .Parallel ()
589583ctx := testutil .Context (t ,testutil .WaitLong )
590- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
584+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
591585FilterQuery :tc .q ,
592586})
593587var sdkErr * codersdk.Error