omp-config-crypt 0.9.14 → 0.9.15

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
@@ -164,7 +164,7 @@ Protocol defaults to `openai-completions`; flags never become the Key. Edit and
164
164
 
165
165
  Discovery alone does **not** verify generation. Interactive add and edit model acquisition are unified:
166
166
  both require candidate verification via real short generations with clear billing/cost notice before multi-select.
167
- Existing model custom parameters (e.g., `contextWindow`, `maxTokens`, `compat`, `reasoning`) are preserved when
167
+ Existing model custom parameters (e.g., `api`, `contextWindow`, `maxTokens`, `compat`, `reasoning`) are preserved when
168
168
  re-selected. Cancelling acquisition performs zero writes to the draft. If protocol, Base URL, or Key is modified
169
169
  in the draft, cached model checks are invalidated immediately, preventing unverified saves.
170
170
  `filterChatModels` excludes non-chat image/video generation models (e.g. Sora, Kling, CogVideo, Runway, Luma,
@@ -182,7 +182,7 @@ and legacy files are not overwritten or removed. Invalid private JSON and public
182
182
  unsupported by the fixed-field formatter reject writes rather than silently discard configuration.
183
183
  Model-level `api` overrides are supported and preserved when saving any provider, including
184
184
  mixed-protocol catalogs with `openai-completions` at provider level and `openai-responses` on individual models.
185
- Run the isolated storage regression checks with `node --test test/provider-store.test.mjs`.
185
+ Run the storage and provider regression checks with `node --test test/sync-portable.test.mjs`.
186
186
 
187
187
  Standalone Responses example:
188
188
  `omp-sync provider add gateway --url https://example.com/v1 --key YOUR_KEY --api openai-responses --model MODEL_ID --private --non-interactive`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-config-crypt",
3
- "version": "0.9.14",
3
+ "version": "0.9.15",
4
4
  "description": "Universal cross-platform encrypted portability for omp config, extensions, and instructions",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -358,6 +358,7 @@ export function formatYamlModels(providers) {
358
358
  out += ` models:\n`;
359
359
  for (const m of cfg.models) {
360
360
  out += ` - id: ${m.id}\n`;
361
+ if (m.api) out += ` api: ${m.api}\n`;
361
362
  if (m.name) out += ` name: ${m.name}\n`;
362
363
  if (m.reasoning !== undefined) out += ` reasoning: ${m.reasoning}\n`;
363
364
  if (m.input) {
@@ -530,7 +531,7 @@ export function getProvider(name, { agentDir = getAgentDir() } = {}) {
530
531
  }
531
532
 
532
533
  const PROVIDER_FIELDS = new Set(["private", "baseUrl", "api", "apiKey", "authHeader", "models"]);
533
- const MODEL_FIELDS = new Set(["id", "name", "reasoning", "input", "contextWindow", "maxTokens", "compat"]);
534
+ const MODEL_FIELDS = new Set(["id", "api", "name", "reasoning", "input", "contextWindow", "maxTokens", "compat"]);
534
535
  function unsupported(field) {
535
536
  throw new Error(`公开 YAML 格式不支持字段或结构 ${field};未写入`);
536
537
  }