@@ -36,10 +36,9 @@ 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+ _ ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
4342var sdkErr * codersdk.Error
4443require .ErrorAs (t ,err ,& sdkErr )
4544require .Equal (t ,http .StatusForbidden ,sdkErr .StatusCode ())
@@ -59,9 +58,8 @@ func TestAIBridgeListInterceptions(t *testing.T) {
5958},
6059},
6160})
62- experimentalClient := codersdk .NewExperimentalClient (client )
6361ctx := testutil .Context (t ,testutil .WaitLong )
64- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
62+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
6563require .NoError (t ,err )
6664require .Empty (t ,res .Results )
6765})
@@ -79,7 +77,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
7977},
8078},
8179})
82- experimentalClient := codersdk .NewExperimentalClient (client )
8380ctx := testutil .Context (t ,testutil .WaitLong )
8481
8582user1 ,err := client .User (ctx ,codersdk .Me )
@@ -140,7 +137,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
140137i1SDK := db2sdk .AIBridgeInterception (i1 ,user1Visible , []database.AIBridgeTokenUsage {i1tok2 ,i1tok1 }, []database.AIBridgeUserPrompt {i1up2 ,i1up1 }, []database.AIBridgeToolUsage {i1tool2 ,i1tool1 })
141138i2SDK := db2sdk .AIBridgeInterception (i2 ,user2Visible ,nil ,nil ,nil )
142139
143- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
140+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
144141require .NoError (t ,err )
145142require .Len (t ,res .Results ,2 )
146143require .Equal (t ,i2SDK .ID ,res .Results [0 ].ID )
@@ -190,7 +187,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
190187},
191188},
192189})
193- experimentalClient := codersdk .NewExperimentalClient (client )
194190ctx := testutil .Context (t ,testutil .WaitLong )
195191
196192allInterceptionIDs := make ([]uuid.UUID ,0 ,20 )
@@ -221,7 +217,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
221217}
222218
223219// Try to fetch with an invalid limit.
224- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
220+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
225221Pagination : codersdk.Pagination {
226222Limit :1001 ,
227223},
@@ -232,7 +228,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
232228require .Empty (t ,res .Results )
233229
234230// Try to fetch with both after_id and offset pagination.
235- res ,err = experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
231+ res ,err = client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
236232Pagination : codersdk.Pagination {
237233AfterID :allInterceptionIDs [0 ],
238234Offset :1 ,
@@ -265,7 +261,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
265261}else {
266262pagination .Offset = len (interceptionIDs )
267263}
268- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
264+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
269265Pagination :pagination ,
270266})
271267require .NoError (t ,err )
@@ -305,11 +301,9 @@ func TestAIBridgeListInterceptions(t *testing.T) {
305301},
306302},
307303})
308- adminExperimentalClient := codersdk .NewExperimentalClient (adminClient )
309304ctx := testutil .Context (t ,testutil .WaitLong )
310305
311306secondUserClient ,secondUser := coderdtest .CreateAnotherUser (t ,adminClient ,firstUser .OrganizationID )
312- secondUserExperimentalClient := codersdk .NewExperimentalClient (secondUserClient )
313307
314308now := dbtime .Now ()
315309i1 := dbgen .AIBridgeInterception (t ,db , database.InsertAIBridgeInterceptionParams {
@@ -322,15 +316,15 @@ func TestAIBridgeListInterceptions(t *testing.T) {
322316},& now )
323317
324318// Admin can see all interceptions.
325- res ,err := adminExperimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
319+ res ,err := adminClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
326320require .NoError (t ,err )
327321require .EqualValues (t ,2 ,res .Count )
328322require .Len (t ,res .Results ,2 )
329323require .Equal (t ,i1 .ID ,res .Results [0 ].ID )
330324require .Equal (t ,i2 .ID ,res .Results [1 ].ID )
331325
332326// Second user can only see their own interceptions.
333- res ,err = secondUserExperimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
327+ res ,err = secondUserClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
334328require .NoError (t ,err )
335329require .EqualValues (t ,1 ,res .Count )
336330require .Len (t ,res .Results ,1 )
@@ -350,7 +344,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
350344},
351345},
352346})
353- experimentalClient := codersdk .NewExperimentalClient (client )
354347ctx := testutil .Context (t ,testutil .WaitLong )
355348
356349user1 ,err := client .User (ctx ,codersdk .Me )
@@ -500,7 +493,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
500493t .Run (tc .name ,func (t * testing.T ) {
501494t .Parallel ()
502495ctx := testutil .Context (t ,testutil .WaitLong )
503- res ,err := experimentalClient .AIBridgeListInterceptions (ctx ,tc .filter )
496+ res ,err := client .AIBridgeListInterceptions (ctx ,tc .filter )
504497require .NoError (t ,err )
505498require .EqualValues (t ,len (tc .want ),res .Count )
506499// We just compare UUID strings for the sake of this test.
@@ -530,7 +523,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
530523},
531524},
532525})
533- experimentalClient := codersdk .NewExperimentalClient (client )
534526
535527// No need to insert any test data, we're just testing the filter
536528// errors.
@@ -587,7 +579,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
587579t .Run (tc .name ,func (t * testing.T ) {
588580t .Parallel ()
589581ctx := testutil .Context (t ,testutil .WaitLong )
590- res ,err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
582+ res ,err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
591583FilterQuery :tc .q ,
592584})
593585var sdkErr * codersdk.Error