github linshenkx/prompt-optimizer v2.11.9

3 hours ago

English

Summary

  • Standard Prompt Optimizer JSON exports now import without losing messages, tools, model parameters, or metadata.
  • Advanced templates with message-array content import correctly, while invalid or failed replacement batches leave existing templates untouched.
  • Built-in text and image providers now expose refreshed model catalogs, capabilities, regional endpoints, and current image-generation parameters.

Highlights

  • Backups and prompt exports now round-trip more reliably across Desktop and Web, including tool calls and advanced template content.
  • Built-in model configurations move forward automatically when they still use a known legacy default, while preserving user overrides.
  • GPT Image 2 supports its current high-resolution size options, alongside updated Gemini, Qwen, Seedream, Claude, OpenAI, Grok, GLM, and MiniMax entries.

Product Updates

Desktop

  • Await asynchronous import/export service calls in Electron IPC handlers so rejected operations return through the normal structured error path.
  • Apply the safer shared template-import behavior to Desktop backups and data restoration.

Web

  • Recognize Prompt Optimizer's standard JSON format before OpenAI-compatible detection so imports preserve the original payload instead of converting it destructively.
  • Preserve message names, tool calls, tool call IDs, tool definitions, sampling parameters, stop sequences, streaming flags, and supported metadata during standard-format import.
  • Show import failures through the localized structured error formatter.

Extension

  • Synchronized the extension version and shared provider/model updates; no extension-specific workflow change is required.

Core/Infra

  • Validate and normalize a complete template replacement batch before performing a single storage write.
  • Support advanced templates whose content is a message array and reject malformed metadata containers instead of silently replacing them with defaults.
  • Refresh built-in text models and reasoning parameters across OpenAI, Anthropic, Gemini, xAI, DashScope, Zhipu, and MiniMax.
  • Refresh built-in image models for OpenAI, Gemini, DashScope, and Seedream, including automatic migration from known legacy defaults.
  • Add explicit global and Mainland China endpoint metadata to the MiniMax provider.

Fixes

  • Prevented standard JSON imports from being misclassified as OpenAI or unsupported data and losing tools or metadata.
  • Prevented malformed template batches or failed storage writes from deleting or partially replacing existing user templates.
  • Removed nested internal error-code markers from user-facing aggregate import errors.
  • Added GPT Image 2 high-resolution size options and aligned its exposed background values with the supported request contract.
  • Preserved user parameter overrides while migrating eligible built-in model configurations to their current defaults.

Breaking Changes / Upgrade Notes

  • None. Existing custom model configurations and user overrides remain unchanged unless they still match a known legacy built-in default.

Developer Notes

  • The release range is v2.11.8..HEAD.
  • Standard exports use the prompt-optimizer-standard marker to avoid destructive OpenAI-compatible conversion.
  • Template replacement now performs full preflight validation and one storage write; validation and persistence failures retain the previous data.
  • Verification covers the repository release-note gate, unit/repository gates, lint/type checks, and release metadata consistency.

Installation guide: English | 中文
Source release notes (EN)


中文

概括

  • Prompt Optimizer 标准 JSON 导出现在可以完整导入,不再丢失消息、工具、模型参数或元数据。
  • 支持导入消息数组形式的高级模板;模板批次无效或替换失败时,已有模板保持不变。
  • 更新内置文本与图像模型目录、能力声明、区域端点和图像生成参数。

亮点

  • Desktop 与 Web 的备份和提示词导入现在可以更可靠地往返还原,包括工具调用和高级模板内容。
  • 仍使用已知旧版默认值的内置模型会自动迁移到当前版本,同时保留用户参数覆盖。
  • GPT Image 2 新增当前支持的高分辨率尺寸,并同步更新 Gemini、Qwen、Seedream、Claude、OpenAI、Grok、GLM 和 MiniMax 模型项。

产品更新

Desktop

  • Electron IPC 处理器现在会等待异步导入导出服务调用,使 Promise 拒绝能够进入正常的结构化错误返回流程。
  • Desktop 备份和数据恢复共用更安全的模板导入行为。

Web

  • 在 OpenAI 兼容格式识别之前优先识别 Prompt Optimizer 标准 JSON,避免导入时发生破坏性转换。
  • 标准格式导入会保留消息名称、工具调用、工具调用 ID、工具定义、采样参数、停止序列、流式标记和受支持的元数据。
  • 导入失败统一通过本地化结构化错误格式化器展示。

Extension

  • 同步扩展版本与共享 provider / 模型更新;本次没有扩展端专属工作流变化。

Core/Infra

  • 在写入存储前对完整模板替换批次进行统一校验和规范化,并以单次写入完成替换。
  • 支持内容为消息数组的高级模板;对于异常 metadata 容器不再静默套用默认值,而是明确拒绝。
  • 更新 OpenAI、Anthropic、Gemini、xAI、DashScope、Zhipu 和 MiniMax 的内置文本模型及推理参数。
  • 更新 OpenAI、Gemini、DashScope 和 Seedream 的内置图像模型,并支持从已知旧版默认值自动迁移。
  • 为 MiniMax provider 增加明确的全球与中国大陆区域端点元数据。

修复

  • 修复标准 JSON 被错误识别为 OpenAI 或不支持格式,进而丢失工具或元数据的问题。
  • 修复异常模板批次或存储写入失败导致已有用户模板被删除或部分替换的问题。
  • 去除聚合导入错误中嵌套的内部错误码标记。
  • 为 GPT Image 2 补充高分辨率尺寸,并使其背景参数选项与受支持的请求契约保持一致。
  • 迁移符合条件的内置模型配置时保留用户参数覆盖。

破坏性变更 / 升级说明

  • 无。现有自定义模型配置和用户覆盖保持不变;只有仍匹配已知旧版内置默认值的配置会自动迁移。

开发者说明

  • 本次发布范围是 v2.11.8..HEAD
  • 标准导出使用 prompt-optimizer-standard 标记,避免被破坏性地转换为 OpenAI 兼容格式。
  • 模板替换现采用完整预检和单次存储写入;校验或持久化失败时保留原有数据。
  • 验证覆盖仓库 Release Notes 门禁、单元/仓库门禁、lint / 类型检查和发布元数据一致性。

安装文档:English | 中文
仓库版本说明(中文)


macOS note: if macOS reports the app as damaged or cannot verify the developer, this is usually caused by the quarantine attribute on downloaded apps. See the installation guide, or remove it after installing with xattr -rd com.apple.quarantine /Applications/PromptOptimizer.app; for a downloaded DMG, you can run the same command on ~/Downloads/PromptOptimizer-*.dmg before installing.
macOS 备注:如果 macOS 提示“已损坏”或“无法验证开发者”,通常是下载文件的隔离属性导致。请参考安装文档;也可以在安装后执行 xattr -rd com.apple.quarantine /Applications/PromptOptimizer.app,或在安装前对 ~/Downloads/PromptOptimizer-*.dmg 执行同类命令。

Don't miss a new prompt-optimizer release

NewReleases is sending notifications on new releases.