gpteam 0.1.24 → 0.1.26

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 CHANGED
@@ -21,7 +21,7 @@ The Image MCP exposes an async-first local job flow plus a legacy compatibility
21
21
  - `create_image_job`: recommended for normal use. It starts a local background image job and returns `job_id` quickly, which avoids losing the whole generation when a VPN, proxy, or client has a 60-second idle timeout.
22
22
  - `get_image_job_status`: checks whether the local job is queued, running, succeeded, failed, canceled, or expired.
23
23
  - `cancel_image_job`: cancels a queued/running local job.
24
- - `download_image_result`: returns the completed file metadata and image content. Use `metadata_only`, `include_image`, and `include_revised_prompt` to control large result payloads.
24
+ - `download_image_result`: returns the completed file metadata and local file path by default. Pass `include_image: true` only when the client must receive MCP image content, because large images can trigger context compaction.
25
25
  - `get_capabilities`: returns supported sizes, formats, quality values, async support, cancellation semantics, queue limits, and image-to-image support.
26
26
  - `generate_image`: legacy compatibility alias. It now creates the same async job and returns `job_id` immediately instead of blocking until the image is complete.
27
27
 
package/lib/help.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const PACKAGE_NAME = 'gpteam';
2
- export const PACKAGE_VERSION = '0.1.24';
2
+ export const PACKAGE_VERSION = '0.1.26';
3
3
 
4
4
  export function getHelpText() {
5
5
  return [
@@ -651,7 +651,7 @@ function normalizeIdempotencyKey(value) {
651
651
  }
652
652
 
653
653
  function shapeDownloadResult(result, input = {}) {
654
- const includeImage = !input.metadata_only && input.include_image !== false;
654
+ const includeImage = input.include_image === true && !input.metadata_only;
655
655
  const includeRevisedPrompt = input.include_revised_prompt !== false;
656
656
  const output = {
657
657
  ...result,
@@ -238,13 +238,13 @@ function downloadSchema() {
238
238
  const schema = jobIDSchema();
239
239
  schema.properties.metadata_only = {
240
240
  type: 'boolean',
241
- description: 'Return only metadata without MCP image content.',
242
- default: false
241
+ description: '只返回文件路径和元数据,不返回 MCP 图片内容。默认 true,避免大图进入上下文触发频繁 compact。',
242
+ default: true
243
243
  };
244
244
  schema.properties.include_image = {
245
245
  type: 'boolean',
246
- description: 'Include image content when the job succeeded.',
247
- default: true
246
+ description: '显式返回 MCP 图片内容。大图会显著增加上下文,通常保持 false,只使用本地文件路径。',
247
+ default: false
248
248
  };
249
249
  schema.properties.include_revised_prompt = {
250
250
  type: 'boolean',
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 || !id.startsWith('gpt-')) continue;
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpteam",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "GPTeam API interactive client configurator and ingress benchmark CLI.",
5
5
  "type": "module",
6
6
  "bin": {