@@ -7,9 +7,10 @@ import { test } from 'playwright/test'
77import assert from 'node:assert/strict'
88import { generateText , streamText } from 'ai'
99import { createOpenAI } from '@ai-sdk/openai'
10- import { axiosAuth , clean , directoryUrl , defaultQuotas } from '../../support/axios.ts'
10+ import { axiosAuth , superAdmin , clean , directoryUrl , defaultQuotas } from '../../support/axios.ts'
1111
1212const user = await axiosAuth ( 'test-standalone1' )
13+ const admin = await superAdmin
1314const externalUser = await axiosAuth ( 'test1-user1' )
1415
1516const settingsData = {
@@ -50,7 +51,7 @@ async function createGatewayProvider (ax: any, ownerType = 'user', ownerId = 'te
5051test . describe ( 'Gateway API - OpenAI-compatible proxy' , ( ) => {
5152 test . beforeEach ( async ( ) => {
5253 await clean ( )
53- await user . put ( '/api/settings/user/test-standalone1' , settingsData )
54+ await admin . put ( '/api/settings/user/test-standalone1' , settingsData )
5455 } )
5556
5657 test ( 'generateText through gateway' , async ( ) => {
@@ -101,7 +102,7 @@ test.describe('Gateway API - OpenAI-compatible proxy', () => {
101102 } )
102103
103104 test ( 'external user can use gateway when external quota is positive' , async ( ) => {
104- await user . put ( '/api/settings/user/test-standalone1' , {
105+ await admin . put ( '/api/settings/user/test-standalone1' , {
105106 ...settingsData ,
106107 quotas : {
107108 ...defaultQuotas ,
0 commit comments