gpteam 0.1.30 → 0.1.31

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/bench.js CHANGED
@@ -118,15 +118,7 @@ function measureStream(baseUrl, options) {
118
118
  const url = new URL(`${baseUrl.replace(/\/$/, '')}/responses`);
119
119
  const started = performance.now();
120
120
  const timings = { dnsMs: NaN, tcpMs: NaN, tlsMs: NaN, firstEventMs: NaN };
121
- const payload = JSON.stringify({
122
- model: options.model,
123
- stream: true,
124
- instructions: 'You are a helpful coding assistant.',
125
- input: options.prompt || '请只回复一句话:节点测速完成。',
126
- max_output_tokens: options.maxOutputTokens || 648,
127
- reasoning: options.effort ? { effort: options.effort } : undefined,
128
- metadata: { gpteam_config_probe: '1' }
129
- });
121
+ const payload = JSON.stringify(buildResponsesProbePayload(options));
130
122
 
131
123
  const request = https.request({
132
124
  protocol: url.protocol,
@@ -198,6 +190,21 @@ function measureStream(baseUrl, options) {
198
190
  });
199
191
  }
200
192
 
193
+ export function buildResponsesProbePayload(options = {}) {
194
+ const prompt = options.prompt || '请只回复一句话:节点测速完成。';
195
+ return {
196
+ model: options.model,
197
+ stream: true,
198
+ instructions: 'You are a helpful coding assistant.',
199
+ input: [{
200
+ role: 'user',
201
+ content: [{ type: 'input_text', text: prompt }]
202
+ }],
203
+ reasoning: options.effort ? { effort: options.effort } : undefined,
204
+ metadata: { gpteam_config_probe: '1' }
205
+ };
206
+ }
207
+
201
208
  export function formatStreamProbeError(status, headers, body, semanticError) {
202
209
  const statusCode = Number(status || 0);
203
210
  const contentType = String(headers?.['content-type'] || headers?.['Content-Type'] || '').trim();
package/lib/help.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const PACKAGE_NAME = 'gpteam';
2
- export const PACKAGE_VERSION = '0.1.30';
2
+ export const PACKAGE_VERSION = '0.1.31';
3
3
 
4
4
  export function getHelpText() {
5
5
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpteam",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "GPTEAM API interactive client configurator and ingress benchmark CLI.",
5
5
  "type": "module",
6
6
  "bin": {