gpteam 0.1.24 → 0.1.27
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/lib/config.js +1 -1
- package/lib/help.js +2 -2
- package/lib/models.js +8 -2
- package/lib/nodes.js +0 -8
- package/package.json +1 -1
package/lib/config.js
CHANGED
|
@@ -54,7 +54,7 @@ export function writeCodexConfig(settings) {
|
|
|
54
54
|
`base_url = ${tomlString(settings.node.baseUrl)}`,
|
|
55
55
|
'wire_api = "responses"',
|
|
56
56
|
'requires_openai_auth = true',
|
|
57
|
-
'supports_websockets =
|
|
57
|
+
'supports_websockets = true'
|
|
58
58
|
];
|
|
59
59
|
const mcpCommand = codexImageMCPCommand();
|
|
60
60
|
const managedImageMCP = [
|
package/lib/help.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const PACKAGE_NAME = 'gpteam';
|
|
2
|
-
export const PACKAGE_VERSION = '0.1.
|
|
2
|
+
export const PACKAGE_VERSION = '0.1.27';
|
|
3
3
|
|
|
4
4
|
export function getHelpText() {
|
|
5
5
|
return [
|
|
@@ -15,7 +15,7 @@ export function getHelpText() {
|
|
|
15
15
|
' --model <id> 预选模型,例如 gpt-5.5',
|
|
16
16
|
' --context <tokens> 预设可配置上下文长度',
|
|
17
17
|
' --effort <level> 按模型支持项预选,常见为 none / low / medium / high / xhigh',
|
|
18
|
-
' --node <id> jp-direct / jp-split / hk-split
|
|
18
|
+
' --node <id> jp-direct / jp-split / hk-split',
|
|
19
19
|
' --rounds <n> 每个入口测速轮数,默认 3',
|
|
20
20
|
' --max-output-tokens <n> 测速输出上限,默认 648',
|
|
21
21
|
' --install-client 客户端命令缺失时直接安装,不再二次确认',
|
package/lib/models.js
CHANGED
|
@@ -45,8 +45,7 @@ export function normalizeModels(payload) {
|
|
|
45
45
|
|
|
46
46
|
for (const item of items) {
|
|
47
47
|
const id = String(item.id || item.name || '').trim();
|
|
48
|
-
if (!id
|
|
49
|
-
if (id.includes('image')) continue;
|
|
48
|
+
if (!isConfigurableCodexModel(id, item)) continue;
|
|
50
49
|
const fallback = FALLBACK_MODELS[id] || {};
|
|
51
50
|
const thinking = item.thinking && typeof item.thinking === 'object' ? item.thinking : {};
|
|
52
51
|
const levels = Array.isArray(thinking.levels) ? thinking.levels : fallback.efforts;
|
|
@@ -74,6 +73,13 @@ export function normalizeModels(payload) {
|
|
|
74
73
|
return Array.from(result.values()).sort((a, b) => a.id.localeCompare(b.id));
|
|
75
74
|
}
|
|
76
75
|
|
|
76
|
+
function isConfigurableCodexModel(id, item) {
|
|
77
|
+
if (!id || !id.startsWith('gpt-') || id.includes('image')) return false;
|
|
78
|
+
const owner = String(item?.owned_by || item?.provider || item?.type || '').trim().toLowerCase();
|
|
79
|
+
if (!owner) return Object.prototype.hasOwnProperty.call(FALLBACK_MODELS, id);
|
|
80
|
+
return owner === 'openai' || owner === 'codex' || owner === 'openai-compatible';
|
|
81
|
+
}
|
|
82
|
+
|
|
77
83
|
export async function fetchModels(baseUrl, apiKey, options = {}) {
|
|
78
84
|
let response;
|
|
79
85
|
try {
|
package/lib/nodes.js
CHANGED
|
@@ -22,14 +22,6 @@ export const INGRESS_NODES = [
|
|
|
22
22
|
split: true,
|
|
23
23
|
baseUrl: 'https://api-hk.gpteamservices.com/v1',
|
|
24
24
|
healthUrl: 'https://api-hk.gpteamservices.com/api/health'
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: 'us-split',
|
|
28
|
-
label: '美国入口',
|
|
29
|
-
region: 'US',
|
|
30
|
-
split: true,
|
|
31
|
-
baseUrl: 'https://api-us.gpteamservices.com/v1',
|
|
32
|
-
healthUrl: 'https://api-us.gpteamservices.com/api/health'
|
|
33
25
|
}
|
|
34
26
|
];
|
|
35
27
|
|