@rpascene/shared 0.30.8 → 0.30.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/es/common.mjs +2 -2
- package/dist/es/constants/index.mjs +1 -1
- package/dist/es/env/constants.mjs +77 -77
- package/dist/es/env/global-config-manager.mjs +1 -1
- package/dist/es/env/init-debug.mjs +5 -5
- package/dist/es/env/parse.mjs +11 -11
- package/dist/es/env/types.mjs +191 -191
- package/dist/es/env/utils.mjs +2 -2
- package/dist/lib/common.js +1 -1
- package/dist/lib/constants/index.js +1 -1
- package/dist/lib/env/constants.js +76 -76
- package/dist/lib/env/global-config-manager.js +1 -1
- package/dist/lib/env/init-debug.js +4 -4
- package/dist/lib/env/parse.js +10 -10
- package/dist/lib/env/types.js +478 -478
- package/dist/lib/env/utils.js +1 -1
- package/dist/types/env/types.d.ts +179 -179
- package/package.json +19 -14
- package/src/common.ts +3 -3
- package/src/constants/index.ts +1 -1
- package/src/env/constants.ts +144 -144
- package/src/env/decide-model-config.ts +1 -1
- package/src/env/global-config-manager.ts +1 -1
- package/src/env/init-debug.ts +5 -5
- package/src/env/parse.ts +15 -15
- package/src/env/types.ts +314 -314
- package/src/env/utils.ts +2 -2
|
@@ -32,97 +32,97 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
32
32
|
});
|
|
33
33
|
const external_types_js_namespaceObject = require("./types.js");
|
|
34
34
|
const VQA_MODEL_CONFIG_KEYS = {
|
|
35
|
-
modelName: external_types_js_namespaceObject.
|
|
36
|
-
socksProxy: external_types_js_namespaceObject.
|
|
37
|
-
httpProxy: external_types_js_namespaceObject.
|
|
38
|
-
openaiBaseURL: external_types_js_namespaceObject.
|
|
39
|
-
openaiApiKey: external_types_js_namespaceObject.
|
|
40
|
-
openaiExtraConfig: external_types_js_namespaceObject.
|
|
41
|
-
openaiUseAzureDeprecated: external_types_js_namespaceObject.
|
|
42
|
-
useAzureOpenai: external_types_js_namespaceObject.
|
|
43
|
-
azureOpenaiScope: external_types_js_namespaceObject.
|
|
44
|
-
azureOpenaiKey: external_types_js_namespaceObject.
|
|
45
|
-
azureOpenaiEndpoint: external_types_js_namespaceObject.
|
|
46
|
-
azureOpenaiApiVersion: external_types_js_namespaceObject.
|
|
47
|
-
azureOpenaiDeployment: external_types_js_namespaceObject.
|
|
48
|
-
azureExtraConfig: external_types_js_namespaceObject.
|
|
49
|
-
useAnthropicSdk: external_types_js_namespaceObject.
|
|
50
|
-
anthropicApiKey: external_types_js_namespaceObject.
|
|
51
|
-
vlMode: external_types_js_namespaceObject.
|
|
35
|
+
modelName: external_types_js_namespaceObject.MIDSCENE_VQA_MODEL_NAME,
|
|
36
|
+
socksProxy: external_types_js_namespaceObject.MIDSCENE_VQA_OPENAI_SOCKS_PROXY,
|
|
37
|
+
httpProxy: external_types_js_namespaceObject.MIDSCENE_VQA_OPENAI_HTTP_PROXY,
|
|
38
|
+
openaiBaseURL: external_types_js_namespaceObject.MIDSCENE_VQA_OPENAI_BASE_URL,
|
|
39
|
+
openaiApiKey: external_types_js_namespaceObject.MIDSCENE_VQA_OPENAI_API_KEY,
|
|
40
|
+
openaiExtraConfig: external_types_js_namespaceObject.MIDSCENE_VQA_OPENAI_INIT_CONFIG_JSON,
|
|
41
|
+
openaiUseAzureDeprecated: external_types_js_namespaceObject.MIDSCENE_VQA_OPENAI_USE_AZURE,
|
|
42
|
+
useAzureOpenai: external_types_js_namespaceObject.MIDSCENE_VQA_USE_AZURE_OPENAI,
|
|
43
|
+
azureOpenaiScope: external_types_js_namespaceObject.MIDSCENE_VQA_AZURE_OPENAI_SCOPE,
|
|
44
|
+
azureOpenaiKey: external_types_js_namespaceObject.MIDSCENE_VQA_AZURE_OPENAI_KEY,
|
|
45
|
+
azureOpenaiEndpoint: external_types_js_namespaceObject.MIDSCENE_VQA_AZURE_OPENAI_ENDPOINT,
|
|
46
|
+
azureOpenaiApiVersion: external_types_js_namespaceObject.MIDSCENE_VQA_AZURE_OPENAI_API_VERSION,
|
|
47
|
+
azureOpenaiDeployment: external_types_js_namespaceObject.MIDSCENE_VQA_AZURE_OPENAI_DEPLOYMENT,
|
|
48
|
+
azureExtraConfig: external_types_js_namespaceObject.MIDSCENE_VQA_AZURE_OPENAI_INIT_CONFIG_JSON,
|
|
49
|
+
useAnthropicSdk: external_types_js_namespaceObject.MIDSCENE_VQA_USE_ANTHROPIC_SDK,
|
|
50
|
+
anthropicApiKey: external_types_js_namespaceObject.MIDSCENE_VQA_ANTHROPIC_API_KEY,
|
|
51
|
+
vlMode: external_types_js_namespaceObject.MIDSCENE_VQA_VL_MODE
|
|
52
52
|
};
|
|
53
53
|
const GROUNDING_MODEL_CONFIG_KEYS = {
|
|
54
|
-
modelName: external_types_js_namespaceObject.
|
|
55
|
-
socksProxy: external_types_js_namespaceObject.
|
|
56
|
-
httpProxy: external_types_js_namespaceObject.
|
|
57
|
-
openaiBaseURL: external_types_js_namespaceObject.
|
|
58
|
-
openaiApiKey: external_types_js_namespaceObject.
|
|
59
|
-
openaiExtraConfig: external_types_js_namespaceObject.
|
|
60
|
-
openaiUseAzureDeprecated: external_types_js_namespaceObject.
|
|
61
|
-
useAzureOpenai: external_types_js_namespaceObject.
|
|
62
|
-
azureOpenaiScope: external_types_js_namespaceObject.
|
|
63
|
-
azureOpenaiKey: external_types_js_namespaceObject.
|
|
64
|
-
azureOpenaiEndpoint: external_types_js_namespaceObject.
|
|
65
|
-
azureOpenaiApiVersion: external_types_js_namespaceObject.
|
|
66
|
-
azureOpenaiDeployment: external_types_js_namespaceObject.
|
|
67
|
-
azureExtraConfig: external_types_js_namespaceObject.
|
|
68
|
-
useAnthropicSdk: external_types_js_namespaceObject.
|
|
69
|
-
anthropicApiKey: external_types_js_namespaceObject.
|
|
70
|
-
vlMode: external_types_js_namespaceObject.
|
|
54
|
+
modelName: external_types_js_namespaceObject.MIDSCENE_GROUNDING_MODEL_NAME,
|
|
55
|
+
socksProxy: external_types_js_namespaceObject.MIDSCENE_GROUNDING_OPENAI_SOCKS_PROXY,
|
|
56
|
+
httpProxy: external_types_js_namespaceObject.MIDSCENE_GROUNDING_OPENAI_HTTP_PROXY,
|
|
57
|
+
openaiBaseURL: external_types_js_namespaceObject.MIDSCENE_GROUNDING_OPENAI_BASE_URL,
|
|
58
|
+
openaiApiKey: external_types_js_namespaceObject.MIDSCENE_GROUNDING_OPENAI_API_KEY,
|
|
59
|
+
openaiExtraConfig: external_types_js_namespaceObject.MIDSCENE_GROUNDING_OPENAI_INIT_CONFIG_JSON,
|
|
60
|
+
openaiUseAzureDeprecated: external_types_js_namespaceObject.MIDSCENE_GROUNDING_OPENAI_USE_AZURE,
|
|
61
|
+
useAzureOpenai: external_types_js_namespaceObject.MIDSCENE_GROUNDING_USE_AZURE_OPENAI,
|
|
62
|
+
azureOpenaiScope: external_types_js_namespaceObject.MIDSCENE_GROUNDING_AZURE_OPENAI_SCOPE,
|
|
63
|
+
azureOpenaiKey: external_types_js_namespaceObject.MIDSCENE_GROUNDING_AZURE_OPENAI_KEY,
|
|
64
|
+
azureOpenaiEndpoint: external_types_js_namespaceObject.MIDSCENE_GROUNDING_AZURE_OPENAI_ENDPOINT,
|
|
65
|
+
azureOpenaiApiVersion: external_types_js_namespaceObject.MIDSCENE_GROUNDING_AZURE_OPENAI_API_VERSION,
|
|
66
|
+
azureOpenaiDeployment: external_types_js_namespaceObject.MIDSCENE_GROUNDING_AZURE_OPENAI_DEPLOYMENT,
|
|
67
|
+
azureExtraConfig: external_types_js_namespaceObject.MIDSCENE_GROUNDING_AZURE_OPENAI_INIT_CONFIG_JSON,
|
|
68
|
+
useAnthropicSdk: external_types_js_namespaceObject.MIDSCENE_GROUNDING_USE_ANTHROPIC_SDK,
|
|
69
|
+
anthropicApiKey: external_types_js_namespaceObject.MIDSCENE_GROUNDING_ANTHROPIC_API_KEY,
|
|
70
|
+
vlMode: external_types_js_namespaceObject.MIDSCENE_GROUNDING_VL_MODE
|
|
71
71
|
};
|
|
72
72
|
const PLANNING_MODEL_CONFIG_KEYS = {
|
|
73
|
-
modelName: external_types_js_namespaceObject.
|
|
74
|
-
socksProxy: external_types_js_namespaceObject.
|
|
75
|
-
httpProxy: external_types_js_namespaceObject.
|
|
76
|
-
openaiBaseURL: external_types_js_namespaceObject.
|
|
77
|
-
openaiApiKey: external_types_js_namespaceObject.
|
|
78
|
-
openaiExtraConfig: external_types_js_namespaceObject.
|
|
79
|
-
openaiUseAzureDeprecated: external_types_js_namespaceObject.
|
|
80
|
-
useAzureOpenai: external_types_js_namespaceObject.
|
|
81
|
-
azureOpenaiScope: external_types_js_namespaceObject.
|
|
82
|
-
azureOpenaiKey: external_types_js_namespaceObject.
|
|
83
|
-
azureOpenaiEndpoint: external_types_js_namespaceObject.
|
|
84
|
-
azureOpenaiApiVersion: external_types_js_namespaceObject.
|
|
85
|
-
azureOpenaiDeployment: external_types_js_namespaceObject.
|
|
86
|
-
azureExtraConfig: external_types_js_namespaceObject.
|
|
87
|
-
useAnthropicSdk: external_types_js_namespaceObject.
|
|
88
|
-
anthropicApiKey: external_types_js_namespaceObject.
|
|
89
|
-
vlMode: external_types_js_namespaceObject.
|
|
73
|
+
modelName: external_types_js_namespaceObject.MIDSCENE_PLANNING_MODEL_NAME,
|
|
74
|
+
socksProxy: external_types_js_namespaceObject.MIDSCENE_PLANNING_OPENAI_SOCKS_PROXY,
|
|
75
|
+
httpProxy: external_types_js_namespaceObject.MIDSCENE_PLANNING_OPENAI_HTTP_PROXY,
|
|
76
|
+
openaiBaseURL: external_types_js_namespaceObject.MIDSCENE_PLANNING_OPENAI_BASE_URL,
|
|
77
|
+
openaiApiKey: external_types_js_namespaceObject.MIDSCENE_PLANNING_OPENAI_API_KEY,
|
|
78
|
+
openaiExtraConfig: external_types_js_namespaceObject.MIDSCENE_PLANNING_OPENAI_INIT_CONFIG_JSON,
|
|
79
|
+
openaiUseAzureDeprecated: external_types_js_namespaceObject.MIDSCENE_PLANNING_OPENAI_USE_AZURE,
|
|
80
|
+
useAzureOpenai: external_types_js_namespaceObject.MIDSCENE_PLANNING_USE_AZURE_OPENAI,
|
|
81
|
+
azureOpenaiScope: external_types_js_namespaceObject.MIDSCENE_PLANNING_AZURE_OPENAI_SCOPE,
|
|
82
|
+
azureOpenaiKey: external_types_js_namespaceObject.MIDSCENE_PLANNING_AZURE_OPENAI_KEY,
|
|
83
|
+
azureOpenaiEndpoint: external_types_js_namespaceObject.MIDSCENE_PLANNING_AZURE_OPENAI_ENDPOINT,
|
|
84
|
+
azureOpenaiApiVersion: external_types_js_namespaceObject.MIDSCENE_PLANNING_AZURE_OPENAI_API_VERSION,
|
|
85
|
+
azureOpenaiDeployment: external_types_js_namespaceObject.MIDSCENE_PLANNING_AZURE_OPENAI_DEPLOYMENT,
|
|
86
|
+
azureExtraConfig: external_types_js_namespaceObject.MIDSCENE_PLANNING_AZURE_OPENAI_INIT_CONFIG_JSON,
|
|
87
|
+
useAnthropicSdk: external_types_js_namespaceObject.MIDSCENE_PLANNING_USE_ANTHROPIC_SDK,
|
|
88
|
+
anthropicApiKey: external_types_js_namespaceObject.MIDSCENE_PLANNING_ANTHROPIC_API_KEY,
|
|
89
|
+
vlMode: external_types_js_namespaceObject.MIDSCENE_PLANNING_VL_MODE
|
|
90
90
|
};
|
|
91
91
|
const DEFAULT_MODEL_CONFIG_KEYS = {
|
|
92
|
-
modelName: external_types_js_namespaceObject.
|
|
93
|
-
socksProxy: external_types_js_namespaceObject.
|
|
94
|
-
httpProxy: external_types_js_namespaceObject.
|
|
95
|
-
openaiBaseURL: external_types_js_namespaceObject.
|
|
96
|
-
openaiApiKey: external_types_js_namespaceObject.
|
|
97
|
-
openaiExtraConfig: external_types_js_namespaceObject.
|
|
98
|
-
openaiUseAzureDeprecated: external_types_js_namespaceObject.
|
|
99
|
-
useAzureOpenai: external_types_js_namespaceObject.
|
|
100
|
-
azureOpenaiScope: external_types_js_namespaceObject.
|
|
101
|
-
azureOpenaiKey: external_types_js_namespaceObject.
|
|
102
|
-
azureOpenaiEndpoint: external_types_js_namespaceObject.
|
|
103
|
-
azureOpenaiApiVersion: external_types_js_namespaceObject.
|
|
104
|
-
azureOpenaiDeployment: external_types_js_namespaceObject.
|
|
105
|
-
azureExtraConfig: external_types_js_namespaceObject.
|
|
106
|
-
useAnthropicSdk: external_types_js_namespaceObject.
|
|
107
|
-
anthropicApiKey: external_types_js_namespaceObject.
|
|
108
|
-
vlMode: external_types_js_namespaceObject.
|
|
92
|
+
modelName: external_types_js_namespaceObject.MIDSCENE_MODEL_NAME,
|
|
93
|
+
socksProxy: external_types_js_namespaceObject.MIDSCENE_OPENAI_SOCKS_PROXY,
|
|
94
|
+
httpProxy: external_types_js_namespaceObject.MIDSCENE_OPENAI_HTTP_PROXY,
|
|
95
|
+
openaiBaseURL: external_types_js_namespaceObject.MIDSCENE_OPENAI_BASE_URL,
|
|
96
|
+
openaiApiKey: external_types_js_namespaceObject.MIDSCENE_OPENAI_API_KEY,
|
|
97
|
+
openaiExtraConfig: external_types_js_namespaceObject.MIDSCENE_OPENAI_INIT_CONFIG_JSON,
|
|
98
|
+
openaiUseAzureDeprecated: external_types_js_namespaceObject.MIDSCENE_OPENAI_USE_AZURE,
|
|
99
|
+
useAzureOpenai: external_types_js_namespaceObject.MIDSCENE_USE_AZURE_OPENAI,
|
|
100
|
+
azureOpenaiScope: external_types_js_namespaceObject.MIDSCENE_AZURE_OPENAI_SCOPE,
|
|
101
|
+
azureOpenaiKey: external_types_js_namespaceObject.MIDSCENE_AZURE_OPENAI_KEY,
|
|
102
|
+
azureOpenaiEndpoint: external_types_js_namespaceObject.MIDSCENE_AZURE_OPENAI_ENDPOINT,
|
|
103
|
+
azureOpenaiApiVersion: external_types_js_namespaceObject.MIDSCENE_AZURE_OPENAI_API_VERSION,
|
|
104
|
+
azureOpenaiDeployment: external_types_js_namespaceObject.MIDSCENE_AZURE_OPENAI_DEPLOYMENT,
|
|
105
|
+
azureExtraConfig: external_types_js_namespaceObject.MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON,
|
|
106
|
+
useAnthropicSdk: external_types_js_namespaceObject.MIDSCENE_USE_ANTHROPIC_SDK,
|
|
107
|
+
anthropicApiKey: external_types_js_namespaceObject.MIDSCENE_ANTHROPIC_API_KEY,
|
|
108
|
+
vlMode: external_types_js_namespaceObject.MIDSCENE_VL_MODE
|
|
109
109
|
};
|
|
110
110
|
const DEFAULT_MODEL_CONFIG_KEYS_LEGACY = {
|
|
111
|
-
modelName: external_types_js_namespaceObject.
|
|
112
|
-
socksProxy: external_types_js_namespaceObject.
|
|
113
|
-
httpProxy: external_types_js_namespaceObject.
|
|
111
|
+
modelName: external_types_js_namespaceObject.MIDSCENE_MODEL_NAME,
|
|
112
|
+
socksProxy: external_types_js_namespaceObject.MIDSCENE_OPENAI_SOCKS_PROXY,
|
|
113
|
+
httpProxy: external_types_js_namespaceObject.MIDSCENE_OPENAI_HTTP_PROXY,
|
|
114
114
|
openaiBaseURL: external_types_js_namespaceObject.OPENAI_BASE_URL,
|
|
115
115
|
openaiApiKey: external_types_js_namespaceObject.OPENAI_API_KEY,
|
|
116
|
-
openaiExtraConfig: external_types_js_namespaceObject.
|
|
116
|
+
openaiExtraConfig: external_types_js_namespaceObject.MIDSCENE_OPENAI_INIT_CONFIG_JSON,
|
|
117
117
|
openaiUseAzureDeprecated: external_types_js_namespaceObject.OPENAI_USE_AZURE,
|
|
118
|
-
useAzureOpenai: external_types_js_namespaceObject.
|
|
119
|
-
azureOpenaiScope: external_types_js_namespaceObject.
|
|
118
|
+
useAzureOpenai: external_types_js_namespaceObject.MIDSCENE_USE_AZURE_OPENAI,
|
|
119
|
+
azureOpenaiScope: external_types_js_namespaceObject.MIDSCENE_AZURE_OPENAI_SCOPE,
|
|
120
120
|
azureOpenaiKey: external_types_js_namespaceObject.AZURE_OPENAI_KEY,
|
|
121
121
|
azureOpenaiEndpoint: external_types_js_namespaceObject.AZURE_OPENAI_ENDPOINT,
|
|
122
122
|
azureOpenaiApiVersion: external_types_js_namespaceObject.AZURE_OPENAI_API_VERSION,
|
|
123
123
|
azureOpenaiDeployment: external_types_js_namespaceObject.AZURE_OPENAI_DEPLOYMENT,
|
|
124
|
-
azureExtraConfig: external_types_js_namespaceObject.
|
|
125
|
-
useAnthropicSdk: external_types_js_namespaceObject.
|
|
124
|
+
azureExtraConfig: external_types_js_namespaceObject.MIDSCENE_AZURE_OPENAI_INIT_CONFIG_JSON,
|
|
125
|
+
useAnthropicSdk: external_types_js_namespaceObject.MIDSCENE_USE_ANTHROPIC_SDK,
|
|
126
126
|
anthropicApiKey: external_types_js_namespaceObject.ANTHROPIC_API_KEY,
|
|
127
127
|
vlMode: 'DEFAULT_MODEL_CONFIG_KEYS has no vlMode key'
|
|
128
128
|
};
|
|
@@ -59,7 +59,7 @@ class GlobalConfigManager {
|
|
|
59
59
|
getEnvConfigValue(key) {
|
|
60
60
|
const allConfig = this.getAllEnvConfig();
|
|
61
61
|
if (!external_types_js_namespaceObject.STRING_ENV_KEYS.includes(key)) throw new Error(`getEnvConfigValue with key ${key} is not supported.`);
|
|
62
|
-
if (key === external_types_js_namespaceObject.MATCH_BY_POSITION) throw new Error('MATCH_BY_POSITION is deprecated, use
|
|
62
|
+
if (key === external_types_js_namespaceObject.MATCH_BY_POSITION) throw new Error('MATCH_BY_POSITION is deprecated, use MIDSCENE_USE_VL_MODEL instead');
|
|
63
63
|
const value = allConfig[key];
|
|
64
64
|
this.keysHaveBeenRead[key] = true;
|
|
65
65
|
if ('string' == typeof value) return value.trim();
|
|
@@ -30,15 +30,15 @@ const external_logger_js_namespaceObject = require("../logger.js");
|
|
|
30
30
|
const external_basic_js_namespaceObject = require("./basic.js");
|
|
31
31
|
const external_types_js_namespaceObject = require("./types.js");
|
|
32
32
|
const initDebugConfig = ()=>{
|
|
33
|
-
const shouldPrintTiming = (0, external_basic_js_namespaceObject.getBasicEnvValue)(external_types_js_namespaceObject.
|
|
33
|
+
const shouldPrintTiming = (0, external_basic_js_namespaceObject.getBasicEnvValue)(external_types_js_namespaceObject.MIDSCENE_DEBUG_AI_PROFILE);
|
|
34
34
|
let debugConfig = '';
|
|
35
35
|
if (shouldPrintTiming) {
|
|
36
|
-
console.warn('
|
|
36
|
+
console.warn('MIDSCENE_DEBUG_AI_PROFILE is deprecated, use DEBUG=rpascene:ai:profile instead');
|
|
37
37
|
debugConfig = 'ai:profile';
|
|
38
38
|
}
|
|
39
|
-
const shouldPrintAIResponse = (0, external_basic_js_namespaceObject.getBasicEnvValue)(external_types_js_namespaceObject.
|
|
39
|
+
const shouldPrintAIResponse = (0, external_basic_js_namespaceObject.getBasicEnvValue)(external_types_js_namespaceObject.MIDSCENE_DEBUG_AI_RESPONSE);
|
|
40
40
|
if (shouldPrintAIResponse) {
|
|
41
|
-
console.warn('
|
|
41
|
+
console.warn('MIDSCENE_DEBUG_AI_RESPONSE is deprecated, use DEBUG=rpascene:ai:response instead');
|
|
42
42
|
debugConfig = debugConfig ? 'ai:*' : 'ai:call';
|
|
43
43
|
}
|
|
44
44
|
if (debugConfig) (0, external_logger_js_namespaceObject.enableDebug)(debugConfig);
|
package/dist/lib/env/parse.js
CHANGED
|
@@ -49,17 +49,17 @@ const parseVlModeAndUiTarsModelVersionFromRawValue = (vlModeRaw)=>{
|
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
const parseVlModeAndUiTarsFromGlobalConfig = (provider)=>{
|
|
52
|
-
const isDoubao = provider[external_types_js_namespaceObject.
|
|
53
|
-
const isQwen = provider[external_types_js_namespaceObject.
|
|
54
|
-
const isQwen3 = provider[external_types_js_namespaceObject.
|
|
55
|
-
const isUiTars = provider[external_types_js_namespaceObject.
|
|
56
|
-
const isGemini = provider[external_types_js_namespaceObject.
|
|
52
|
+
const isDoubao = provider[external_types_js_namespaceObject.MIDSCENE_USE_DOUBAO_VISION];
|
|
53
|
+
const isQwen = provider[external_types_js_namespaceObject.MIDSCENE_USE_QWEN_VL];
|
|
54
|
+
const isQwen3 = provider[external_types_js_namespaceObject.MIDSCENE_USE_QWEN3_VL];
|
|
55
|
+
const isUiTars = provider[external_types_js_namespaceObject.MIDSCENE_USE_VLM_UI_TARS];
|
|
56
|
+
const isGemini = provider[external_types_js_namespaceObject.MIDSCENE_USE_GEMINI];
|
|
57
57
|
const enabledModes = [
|
|
58
|
-
isDoubao && external_types_js_namespaceObject.
|
|
59
|
-
isQwen && external_types_js_namespaceObject.
|
|
60
|
-
isQwen3 && external_types_js_namespaceObject.
|
|
61
|
-
isUiTars && external_types_js_namespaceObject.
|
|
62
|
-
isGemini && external_types_js_namespaceObject.
|
|
58
|
+
isDoubao && external_types_js_namespaceObject.MIDSCENE_USE_DOUBAO_VISION,
|
|
59
|
+
isQwen && external_types_js_namespaceObject.MIDSCENE_USE_QWEN_VL,
|
|
60
|
+
isQwen3 && external_types_js_namespaceObject.MIDSCENE_USE_QWEN3_VL,
|
|
61
|
+
isUiTars && external_types_js_namespaceObject.MIDSCENE_USE_VLM_UI_TARS,
|
|
62
|
+
isGemini && external_types_js_namespaceObject.MIDSCENE_USE_GEMINI
|
|
63
63
|
].filter(Boolean);
|
|
64
64
|
if (enabledModes.length > 1) throw new Error(`Only one vision mode can be enabled at a time. Currently enabled modes: ${enabledModes.join(', ')}. Please disable all but one mode.`);
|
|
65
65
|
if (isQwen3) return {
|