File size: 2,135 Bytes
f9a28cd
 
 
 
 
 
 
96bdf6c
 
 
 
 
 
 
f9a28cd
97869a1
f9a28cd
 
 
 
 
 
 
 
 
96bdf6c
 
 
 
f9a28cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
export const CHANNEL_REQUEST_MODES = Object.freeze([
    'images-non-stream',
    'images-sse',
    'responses-non-stream',
    'responses-sse'
]);

export const DEFAULT_CHANNEL_REQUEST_MODE_PRIORITY = Object.freeze([
    'images-non-stream',
    'images-sse',
    'responses-non-stream',
    'responses-sse'
]);

export const CHANNEL_REQUEST_MODE_SMOKE_CASES = Object.freeze({
    'images-non-stream': Object.freeze(['orchestration_generate_1k', 'edit_1k']),
    'images-sse': Object.freeze(['page_sse_edit_2k']),
    'responses-non-stream': Object.freeze(['responses_agent_generate_1k']),
    'responses-sse': Object.freeze(['responses_page_sse_generate_1k'])
});

export const CHANNEL_REQUEST_MODE_ADMIN_CONTROL = Object.freeze({
    source: 'admin_env_whitelist',
    globalEnv: 'OPENAI_UPSTREAM_REQUEST_MODES',
    channelEnvPattern: 'OPENAI_CHANNEL_N_REQUEST_MODES',
    globalPriorityEnv: 'OPENAI_UPSTREAM_REQUEST_MODE_PRIORITY',
    channelPriorityEnvPattern: 'OPENAI_CHANNEL_N_REQUEST_MODE_PRIORITY',
    defaultPriority: DEFAULT_CHANNEL_REQUEST_MODE_PRIORITY,
    defaultPriorityPolicy: 'lowest_cost_first',
    mutableAtRuntime: false,
    finalGateCommand:
        'npm run smoke:image-upstream-real -- --env-file-if-exists .env.real-smoke.local --require-independent-targets --allow-billable',
    smokeGateCommands: Object.freeze({
        'images-non-stream': Object.freeze([
            'npm run smoke:image-upstream-real -- --env-file-if-exists .env.real-smoke.local --case original-images-json --allow-billable'
        ]),
        'images-sse': Object.freeze([
            'npm run smoke:image-upstream-real -- --env-file-if-exists .env.real-smoke.local --case sub2api-images-sse --allow-billable'
        ]),
        'responses-non-stream': Object.freeze([
            'npm run smoke:image-upstream-real -- --env-file-if-exists .env.real-smoke.local --case sub2api-responses-json --allow-billable'
        ]),
        'responses-sse': Object.freeze([
            'npm run smoke:image-upstream-real -- --env-file-if-exists .env.real-smoke.local --case gpt2image-responses-sse --allow-billable'
        ])
    })
});