@sogni-ai/sogni-creative-agent-skill 3.63.0 → 3.64.0

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.
@@ -14,6 +14,11 @@ preserves normal CLI behavior while attributing the request to Claude Code.
14
14
 
15
15
  ## Setup
16
16
 
17
+ This plugin runs the local CLI. For local versus hosted MCP setup and hosted
18
+ availability, read [the MCP guide](https://docs.sogni.ai/agents/mcp/).
19
+ A hosted connection does not install this plugin or access its local files,
20
+ personas or memories.
21
+
17
22
  1. Install the CLI (one-time): `npm install -g @sogni-ai/sogni-creative-agent-skill@latest`.
18
23
  2. Provide your Sogni API key (get one at https://dashboard.sogni.ai/api-key): either set `SOGNI_API_KEY` in the environment, or save it to `~/.config/sogni/credentials` as `SOGNI_API_KEY=<your-key>`.
19
24
  3. Verify with `sogni-agent doctor --json` and confirm `"success": true` before reporting the install as working. Run `doctor` only after an install or upgrade, or when a command fails, never as a preflight before generating: generation commands check the key, ffmpeg and balance themselves.
@@ -34,6 +39,21 @@ stages unless the user requested a review pause. Preserve exact prompts, source
34
39
  choices, counts, and model choices; repeat shared requirements in every variation.
35
40
  Do not repeat a successful stage or automatically add `--no-filter` after failure.
36
41
  Honor requests to wait for user input; model-specific policies still apply.
42
+
43
+ **Seedance draft mode is opt-in.** Before adding a paid 480p draft, explain
44
+ that it can test motion, composition, or lighting before committing to 1080p;
45
+ quote the actual draft, direct-final, and combined cost, then ask which the user
46
+ prefers and wait. Draft cost is extra, not credit toward the final; video-input
47
+ drafts can be costly. If a 720p/1080p attempt fails or produces an unusable take,
48
+ suggest testing the revision in 480p draft mode before another expensive attempt:
49
+ roughly 5.5 times cheaper than 1080p, with actual estimates for the comparison.
50
+ Get consent before switching. An explicit draft request or agreed draft plan supplies
51
+ consent within its scope. A later higher-quality/final request supersedes that
52
+ plan: finalize an approved unchanged draft, or render revised content directly
53
+ at the requested final resolution. Another draft needs renewed consent. Read
54
+ [the Seedance 2.5 draft guide](../../references/models.md#seedance-25) before
55
+ using `--seedance-draft` or `--seedance-finalize`.
56
+
37
57
  `-o` replaces an existing file, so give each new render its own filename. Unless
38
58
  the user asks, never write over their source files or an earlier render, or
39
59
  remove their media, personas or memories.
@@ -14,6 +14,27 @@ the operation (`generate` or `edit`). If either is missing, ask for it. If the
14
14
  exact pair is not registered, report that limitation;
15
15
  never substitute another destination model's prompt contract.
16
16
 
17
+ ## GPT Image 2.6 GIFs and annotations
18
+
19
+ Select `gpt-image-2.6-sunburst` or `gpt-image-2.6-flare` explicitly. For a GIF,
20
+ describe the action and return to the starting pose, then use `--output-format gif`,
21
+ `--image-frame-count 9`, and `--image-frame-duration-ms 200`. Nine frames at 200 ms
22
+ give a 1.8-second animation. GIFs accept text only: no context image, mask, markup,
23
+ transparent background, or compression setting. Frames must be 2–16; each edge
24
+ is a multiple of 16, and width × height × frames must not exceed 8,294,400.
25
+
26
+ ```bash
27
+ sogni-agent -m gpt-image-2.6-flare --output-format gif --width 320 --height 320 --image-quality medium --image-complexity high --image-frame-count 9 --image-frame-duration-ms 200 "A monkey lifts a lantern, blinks, and lowers it to its exact starting pose. Locked camera, seamless loop."
28
+ ```
29
+
30
+ `--image-complexity low|medium|high` controls planning separately from rendering
31
+ quality. For annotation-guided still edits, use `--image-markup-url` with a
32
+ separate transparent PNG matching the first `--context` image after orientation.
33
+ Describe the requested edit in the prompt. Do not combine an annotation with a mask.
34
+ Use a concrete size and quality when comparing prices. GIF quotes reserve an output
35
+ budget and settle downward to confirmed provider usage when lower. Limits checked
36
+ November 4, 2026 PT; the live API enforces 16 frames despite the guide's higher limit.
37
+
17
38
  ## Output contracts by family
18
39
 
19
40
  | Target family | Native prompt shape | Output envelope |
@@ -42,7 +63,7 @@ Prompt-only families return the directly runnable prompt with no label,
42
63
  Markdown fence, preamble, explanation, or render offer.
43
64
 
44
65
  <!-- BEGIN GENERATED PROMPT GUIDE: image-models -->
45
- <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.23.0; edit the rules there, not here. -->
66
+ <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.25.1; edit the rules there, not here. -->
46
67
 
47
68
  ## Per-model rules from Sogni's image prompt writer
48
69
 
@@ -5,6 +5,26 @@ going when the CLI stops waiting, when its connection drops, and when no agent
5
5
  is connected at all. These commands follow a project by id instead of holding a
6
6
  connection open for its whole life.
7
7
 
8
+ ## Rendering on Relaxed
9
+
10
+ `--network relaxed` (or `defaultNetwork: "relaxed"` in the plugin config) sends a
11
+ render to the Relaxed Supernet. It is included in Sogni Unlimited, including while
12
+ Fast is paused at the plan's fair-use capacity. Relaxed has far fewer workers, so a
13
+ video can wait for hours. Anything unfinished 24 hours after you submit it is
14
+ cancelled, and a project no online worker can run is cancelled much sooner. Always
15
+ submit Relaxed video with `--detach` and collect it with `--result <id> --wait`.
16
+
17
+ `sogni-agent --list-models --model-network relaxed` shows what runs there for
18
+ Unlimited members; a job paid with Spark or SOGNI, or from a trial, can still be
19
+ refused for a listed model. To stay on Fast once its capacity is used up, pay with
20
+ Premium Spark using `--billing-mode tokens`.
21
+
22
+ A plain render on Relaxed waits at least 30 minutes before the CLI stops waiting,
23
+ and stopping leaves the project running. `--source-reel` waits the same time for
24
+ each clip and fails if one takes longer. To run a reel there, pick a model that runs
25
+ on Relaxed and pass a long `-t`, for example
26
+ `--reel-model minimax-h3-fastvideo-int8_i2v_turbo -t 14400`.
27
+
8
28
  ## Commands
9
29
 
10
30
  ```bash
@@ -752,8 +752,28 @@ no negative prompt and no ControlNet.
752
752
  fail asynchronously after inferring the task.
753
753
  - **Audio-only reference**: unlike 2.0, Seedance 2.5 accepts standalone audio as
754
754
  its only loose reference.
755
- - **Draft mode** (Seedance 2.5 and 2.5 Uncensored): iterate at 480p, then render
756
- the take you keep at 1080p. `--seedance-draft` renders a 480p draft at the
755
+ - **Draft mode is opt-in** (Seedance 2.5 and 2.5 Uncensored). Before adding a
756
+ paid draft, explain the choice and ask the user's preference; wait for their
757
+ answer. A 480p preview can help judge uncertain motion, composition, lighting,
758
+ or prompt adherence before paying for 1080p, especially when rejected takes
759
+ would otherwise be full-resolution renders. It does not guarantee a better
760
+ result or lower total cost. If a 720p/1080p attempt fails or produces an unusable
761
+ take, suggest testing the revision in 480p draft mode before spending on another
762
+ high-resolution attempt. A 480p draft is roughly 5.5 times cheaper than 1080p;
763
+ compare actual estimates for the same inputs rather than guaranteeing that ratio.
764
+ Explain the recovery plan and get consent before switching; failure does not
765
+ authorize paid drafts or repeated high-resolution retries. Estimate the draft, direct final, and
766
+ combined draft-plus-final cost with `--estimate-video-cost`, keeping the model,
767
+ duration, aspect ratio, audio, and references matched to the planned job.
768
+ Video-input estimates can be conservative when source metadata is unavailable.
769
+ Label them as estimates, not actual charges or flat pricing.
770
+ Each draft is an extra charge, not credit toward the final; video-input drafts
771
+ use video-input pricing and must not be described as inherently cheap.
772
+ An explicit draft request or agreed draft plan supplies consent within its
773
+ scope; approval of one draft does not authorize an unbounded series of drafts.
774
+ If the user already requested final quality, render it directly without adding
775
+ a draft. If final resolution is unclear, ask whether they prefer 720p or 1080p.
776
+ `--seedance-draft` renders a 480p draft at the
757
777
  480p price; any normal Seedance 2.5 input works, and the size must be 480p
758
778
  (the CLI picks it when you give none). An ordinary 480p render cannot be
759
779
  finalized later. Only a job submitted as a draft can. `--seedance-finalize
@@ -764,6 +784,12 @@ no negative prompt and no ControlNet.
764
784
  again at 1080p for the draft's length, at the video-input rate when the draft
765
785
  had a video input. Judge the draft before finalizing: the final is the same
766
786
  video, not a new take.
787
+ A higher-quality/final request after a draft supersedes draft-first iteration:
788
+ finalize the approved draft only if its content is to stay unchanged. A change
789
+ to lighting, prompt, media, duration, or audio cannot be applied by finalizing;
790
+ render the revision directly at the requested final resolution. Another paid
791
+ draft requires renewed consent after explaining its additional cost. A request
792
+ for a 480p deliverable alone does not authorize a draft-plus-final workflow.
767
793
 
768
794
  The bundled CLI and pinned SDKs recognize `seedance-2-5` and transport typed
769
795
  tasks; see `package.json` for the current dependency versions. The direct CLI
@@ -70,6 +70,13 @@ CLI defaults are 512×512 images, count 1, spark tokens, prompt-hash seeds):
70
70
  Notes:
71
71
 
72
72
  - Seed strategies: `prompt-hash` (deterministic) or `random`.
73
+ - `defaultNetwork` sets the Supernet every local render uses; `--network` overrides
74
+ it for one run. With `relaxed`, a model with no Relaxed workers is refused rather
75
+ than moved to Fast (`sogni-agent --list-models --model-network relaxed` lists what
76
+ runs there), except vendor models, which stay on Fast. Hosted chat and hosted
77
+ workflows always run on Fast. Without a timeout setting, renders on Relaxed wait at
78
+ least 30 minutes; a `default*TimeoutSec` value in this config replaces that, so
79
+ raise any short one you have set.
73
80
  - `defaultEditModel` pins one model for every `-c` edit that names no `-m`.
74
81
  Leave it unset to keep the CLI's choice: `krea2_identity_edit_v1_2` for one
75
82
  or two context images, `flux3_image_klein_sd_int8_convrot` for three to ten.
@@ -124,7 +124,7 @@ LTX-2.5 text-to-video, one shot, so one sentence: "A medium shot frames a woman
124
124
  ```
125
125
 
126
126
  <!-- BEGIN GENERATED PROMPT GUIDE: ltx-2.5 -->
127
- <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.23.0; edit the rules there, not here. -->
127
+ <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.25.1; edit the rules there, not here. -->
128
128
 
129
129
  ### Sogni's prompt rules: ltx-2.5
130
130
 
@@ -179,7 +179,7 @@ Preserve requested visual style and production value without adding new objects,
179
179
  <!-- END GENERATED PROMPT GUIDE: ltx-2.5 -->
180
180
 
181
181
  <!-- BEGIN GENERATED PROMPT GUIDE: ltx-2.3 -->
182
- <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.23.0; edit the rules there, not here. -->
182
+ <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.25.1; edit the rules there, not here. -->
183
183
 
184
184
  ### Sogni's prompt rules: ltx-2.3
185
185
 
@@ -823,6 +823,15 @@ guarantees pixel-exact preservation or exact choreography. `video continuation`
823
823
  still needs an actual continuation workflow. Use I2VA, L2VA, or FL2VA when an
824
824
  endpoint must be locked.
825
825
 
826
+ **Inspect identity throughout motion transfer.** In a 2026-11-03 fifteen-second
827
+ Balanced photo-plus-video canary, the output switched to the source video's
828
+ performer midway through the shot even without reference-token compression.
829
+ Completing the requested duration and retaining the replacement in the first
830
+ and last frames did not establish quality. Inspect at least 24 native frames
831
+ across the whole take and both sides of every identity switch or cut. When
832
+ testing compression, include a matched uncompressed control before assigning
833
+ the defect to compression; one seed does not establish equivalence.
834
+
826
835
  For voice references, bind the voice to the speaking subject by reusing that
827
836
  subject's `(Sx)` in `subject_definitions`; do not put the speaker ID in
828
837
  `retention_analysis`. A timbre/rhythm/emotion/delivery reference must not import
@@ -964,7 +973,7 @@ the exact waveform-conditioned lip-sync input. Remote audio URLs and additional
964
973
  audio references keep their existing handling.
965
974
 
966
975
  <!-- BEGIN GENERATED PROMPT GUIDE: minimax-h3 -->
967
- <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.23.0; edit the rules there, not here. -->
976
+ <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.25.1; edit the rules there, not here. -->
968
977
 
969
978
  ### Sogni's prompt rules: minimax-h3
970
979
 
@@ -1182,7 +1191,7 @@ A low tracking shot races alongside a teal 1960s convertible down a sunlit coast
1182
1191
  ```
1183
1192
 
1184
1193
  <!-- BEGIN GENERATED PROMPT GUIDE: seedance-2.5 -->
1185
- <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.23.0; edit the rules there, not here. -->
1194
+ <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.25.1; edit the rules there, not here. -->
1186
1195
 
1187
1196
  ### Sogni's prompt rules: seedance-2.5
1188
1197
 
@@ -1256,7 +1265,7 @@ TARGET CAPABILITIES: Seedance 2.5 uses the same director-style prompt grammar an
1256
1265
  <!-- END GENERATED PROMPT GUIDE: seedance-2.5 -->
1257
1266
 
1258
1267
  <!-- BEGIN GENERATED PROMPT GUIDE: seedance-2.0 -->
1259
- <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.23.0; edit the rules there, not here. -->
1268
+ <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.25.1; edit the rules there, not here. -->
1260
1269
 
1261
1270
  ### Sogni's prompt rules: seedance-2.0
1262
1271
 
@@ -1365,7 +1374,7 @@ writer uses close this section.
1365
1374
  motion timing, camera path, framing, and background.
1366
1375
 
1367
1376
  <!-- BEGIN GENERATED PROMPT GUIDE: wan-2.2 -->
1368
- <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.23.0; edit the rules there, not here. -->
1377
+ <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.25.1; edit the rules there, not here. -->
1369
1378
 
1370
1379
  ### Sogni's prompt rules: wan-2.2
1371
1380
 
@@ -1455,7 +1464,7 @@ The rules Sogni's own prompt writer uses close this section.
1455
1464
  - Prompts may run to 20,000 characters.
1456
1465
 
1457
1466
  <!-- BEGIN GENERATED PROMPT GUIDE: wan-3 -->
1458
- <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.23.0; edit the rules there, not here. -->
1467
+ <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.25.1; edit the rules there, not here. -->
1459
1468
 
1460
1469
  ### Sogni's prompt rules: wan-3
1461
1470
 
@@ -1510,7 +1519,7 @@ audio that is always on. What it renders well and the reference limits are in
1510
1519
  [models.md § HappyHorse 1.1](./models.md#happyhorse-11-prompting-tips).
1511
1520
 
1512
1521
  <!-- BEGIN GENERATED PROMPT GUIDE: happyhorse-1.1 -->
1513
- <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.23.0; edit the rules there, not here. -->
1522
+ <!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.25.1; edit the rules there, not here. -->
1514
1523
 
1515
1524
  ### Sogni's prompt rules: happyhorse-1.1
1516
1525
 
@@ -3,12 +3,12 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@sogni-ai/sogni-intelligence-client": "4.23.0",
6
+ "@sogni-ai/sogni-intelligence-client": "4.25.1",
7
7
  "execa": "^10.0.1",
8
8
  "json5": "^2.2.3",
9
9
  "sharp": "0.35.5"
10
10
  },
11
11
  "overrides": {
12
- "@sogni-ai/sogni-client": "5.74.0"
12
+ "@sogni-ai/sogni-client": "5.75.1"
13
13
  }
14
14
  }
package/sogni-agent.mjs CHANGED
@@ -101,6 +101,7 @@ import {
101
101
  normalizeGptImageModelAlias,
102
102
  normalizeGptImageQuality,
103
103
  getGptImageRequestOptions,
104
+ gptImageGifDimensions,
104
105
  isGptImageModel,
105
106
  isKreaIdentityEditModel,
106
107
  // Seedream 5.0 Pro Uncensored: external-API image model (text-to-image and
@@ -170,8 +171,14 @@ const KNOWN_MODEL_CATALOG_TAGS = new Set([
170
171
  // message). Mirrors the `insufficient_credits` enrichment below: it adds an
171
172
  // actionable hint/category so an agent responds correctly instead of looping a
172
173
  // covered job that cannot bill. Codes are the source of truth in
173
- // sogni-socket/constants/errorCodes.js (4078-4081).
174
- const SUBSCRIPTION_BILLING_ERROR_CODES = new Set(['4078', '4079', '4080', '4081']);
174
+ // sogni-socket/constants/errorCodes.js (4078-4081, 4087, 4089).
175
+ const SUBSCRIPTION_BILLING_ERROR_CODES = new Set(['4078', '4079', '4080', '4081', '4087', '4089']);
176
+ // The socket's refusal for a model with no place on Relaxed. Its wording is the
177
+ // only marker: the jobError carries just 4004, which also covers disabled models
178
+ // and a catalog that is still updating, where retrying is right.
179
+ const RELAXED_UNAVAILABLE_MESSAGE = /not currently available on the Relaxed Supernet|only available on the Fast Supernet/i;
180
+ const RELAXED_UNAVAILABLE_HINT =
181
+ 'This model does not run on Relaxed right now. Run --list-models --model-network relaxed to see what does, or rerun with --network fast.';
175
182
  const APP_ID_LIMIT_ERROR_CODE = '4061';
176
183
  const APP_ID_LIMIT_HINT =
177
184
  'This CLI persists and reuses one installation app ID. Keep ~/.config/sogni/app-id between sessions; for ephemeral/container homes, set one stable SOGNI_APP_ID or persist SOGNI_APP_ID_PATH. If the address is already blocked, preserve the stable ID and wait before retrying.';
@@ -210,6 +217,13 @@ function subscriptionBillingFallback(code) {
210
217
  purchaseLabel: 'Upgrade to Unlimited Pro',
211
218
  purchaseUrl: UNLIMITED_PLAN_URL,
212
219
  };
220
+ case '4087':
221
+ case '4089':
222
+ // The plan's Fast capacity is used up until it resets (daily or monthly).
223
+ return {
224
+ retryable: false,
225
+ hint: 'Fast rendering on this plan is paused until it resets, so retrying on Fast will keep failing. Relaxed stays included: rerun with --network relaxed, or set defaultNetwork to relaxed in the plugin config until the reset. Not every model runs there (see --list-models --model-network relaxed) and the queue can take hours, so add --detach and collect the result with --result <id> --wait. To stay on Fast now, pay with Premium Spark using --billing-mode tokens.',
226
+ };
213
227
  default:
214
228
  return null;
215
229
  }
@@ -703,6 +717,7 @@ function buildCliErrorPayload({ message, code, details, hint, prompt }) {
703
717
  };
704
718
  if (classified.metadata) payload.metadata = classified.metadata;
705
719
  if (classified.metadata?.consentInstructions && !hint) payload.hint = classified.metadata.consentInstructions;
720
+ if (classified.hint && !hint) payload.hint = classified.hint;
706
721
  if (classified.technicalError && classified.technicalError !== payload.error) {
707
722
  payload.technicalError = classified.technicalError;
708
723
  }
@@ -710,7 +725,7 @@ function buildCliErrorPayload({ message, code, details, hint, prompt }) {
710
725
  if (details) payload.errorDetails = details;
711
726
  if (hint) payload.hint = hint;
712
727
  if (applySubscriptionBillingEnrichment(payload, code)) {
713
- // Subscription-billing code (4078-4081) — handled with subscription-specific
728
+ // Subscription-billing code (4078-4081, 4087, 4089) — handled with subscription-specific
714
729
  // guidance; skip the generic "Buy Spark Packs" credits branch.
715
730
  } else if (classified.category === 'insufficient_credits') {
716
731
  payload.purchaseAction = true;
@@ -804,6 +819,16 @@ function classifyCliError(error, context = {}) {
804
819
  error = unwrapGenericProjectError(error);
805
820
  const rawMessage = cliErrorMessage(error);
806
821
 
822
+ if (RELAXED_UNAVAILABLE_MESSAGE.test(rawMessage)) {
823
+ return {
824
+ error_type: 'MODEL_UNAVAILABLE',
825
+ category: 'model_unavailable',
826
+ message: rawMessage,
827
+ retryable: false,
828
+ hint: RELAXED_UNAVAILABLE_HINT
829
+ };
830
+ }
831
+
807
832
  // HTTP 429: Sogni limits requests per network, and the browser of whoever runs
808
833
  // this shares that budget. Say how long to wait, never "try again".
809
834
  const rateLimit = rateLimitFromError(error);
@@ -966,12 +991,13 @@ function addCanonicalErrorFields(payload, error, context = {}) {
966
991
  payload.retryable = classified.retryable;
967
992
  if (classified.metadata) payload.metadata = classified.metadata;
968
993
  if (classified.metadata?.consentInstructions && !payload.hint) payload.hint = classified.metadata.consentInstructions;
994
+ if (classified.hint && !payload.hint) payload.hint = classified.hint;
969
995
  if (classified.technicalError && classified.technicalError !== classified.message) {
970
996
  payload.technicalError = classified.technicalError;
971
997
  }
972
998
  const subscriptionCode = subscriptionBillingCodeFromError(error);
973
999
  if (applySubscriptionBillingEnrichment(payload, subscriptionCode)) {
974
- // Subscription-billing code (4078-4081) — handled with subscription-specific
1000
+ // Subscription-billing code (4078-4081, 4087, 4089) — handled with subscription-specific
975
1001
  // guidance; skip the generic "Buy Spark Packs" credits branch.
976
1002
  } else if (classified.category === 'insufficient_credits') {
977
1003
  payload.purchaseAction = true;
@@ -986,6 +1012,13 @@ function addCanonicalErrorFields(payload, error, context = {}) {
986
1012
  // Human-facing twin of addCanonicalErrorFields: print the classified, friendly
987
1013
  // message (with the raw message as a detail line when it differs) so human
988
1014
  // users get the same quality of error JSON consumers already receive.
1015
+ // Only these two: the other subscription hints stay in the JSON payload, because
1016
+ // their generic wording can contradict the socket's more specific message.
1017
+ function fastCapacityHint(error) {
1018
+ const code = String(subscriptionBillingCodeFromError(unwrapGenericProjectError(error)) ?? '');
1019
+ return code === '4087' || code === '4089' ? subscriptionBillingFallback(code).hint : null;
1020
+ }
1021
+
989
1022
  function printHumanError(error, context = {}) {
990
1023
  let classified = null;
991
1024
  try { classified = classifyCliError(error, context); } catch { /* fall back to raw */ }
@@ -996,6 +1029,8 @@ function printHumanError(error, context = {}) {
996
1029
  }
997
1030
  const hint = error?.hint
998
1031
  || classified?.metadata?.consentInstructions
1032
+ || classified?.hint
1033
+ || fastCapacityHint(error)
999
1034
  || (classified?.category === 'insufficient_credits' ? SPARK_PACKS_PURCHASE_HINT : null);
1000
1035
  if (hint) console.error(`Hint: ${hint}`);
1001
1036
  }
@@ -1097,7 +1132,7 @@ function createSkillSogniClient(creds, appId) {
1097
1132
  appSource: SOGNI_APP_SOURCE,
1098
1133
  appId,
1099
1134
  attribution: clientAttribution(AGENT_ATTRIBUTION),
1100
- network: openclawConfig?.defaultNetwork || 'fast',
1135
+ network: renderNetwork,
1101
1136
  autoConnect: false,
1102
1137
  apiKey: creds.SOGNI_API_KEY,
1103
1138
  authType: 'apiKey'
@@ -2037,6 +2072,10 @@ function imageOptionsFromCli() {
2037
2072
  if (!isGptImage2ModelSelection(options.model)) return {};
2038
2073
  return {
2039
2074
  ...getGptImageRequestOptions({
2075
+ gptImageComplexity: options.imageComplexity,
2076
+ gptImageFrameCount: options.imageFrameCount,
2077
+ gptImageFrameDurationMs: options.imageFrameDurationMs,
2078
+ gptImageMarkupUrl: options.imageMarkupUrl,
2040
2079
  gptImageBackground: options.imageBackground ?? undefined,
2041
2080
  gptImageOutputCompression: options.imageOutputCompression ?? undefined,
2042
2081
  outputFormat: options.outputFormat ?? 'png'
@@ -2323,9 +2362,19 @@ function requiresSparkOnlyToken(modelId) {
2323
2362
  || isWan3ModelSelectionLocal(modelId);
2324
2363
  }
2325
2364
 
2365
+ // Vendor models run on neither worker pool and the socket refuses them on
2366
+ // Relaxed, so a configured default leaves them on Fast. An explicit --network is
2367
+ // sent as asked, and the refusal says why.
2368
+ function projectNetwork(modelId) {
2369
+ if (renderNetwork === 'relaxed' && !options.network && requiresSparkOnlyToken(modelId)) return 'fast';
2370
+ return renderNetwork;
2371
+ }
2372
+
2326
2373
  // Attach the user's explicit --billing-mode to a project config. Omitted by
2327
2374
  // default so the server keeps deciding coverage (Unlimited members get 'auto'
2328
- // coverage server-side; token payers are unaffected).
2375
+ // coverage server-side; token payers are unaffected). The render network always
2376
+ // goes on the project: the socket routes on this field over the connection's
2377
+ // network, and the client wrapper fills in 'fast' when it is missing.
2329
2378
  function nextSemanticWorkloadAttribution(options = {}) {
2330
2379
  return semanticWorkloadAttribution(AGENT_ATTRIBUTION, INVOCATION_LINEAGE.next(options));
2331
2380
  }
@@ -2336,6 +2385,7 @@ function withBillingMode(config, attributionOptions = {}) {
2336
2385
  ...(!options.video && !options.upscaleVideo && !options.music && !options.speech && !options.imageTo3d && options.embedPromptMetadata !== undefined
2337
2386
  ? { embedPromptMetadata: options.embedPromptMetadata } : {}),
2338
2387
  ...(options.billingMode ? { billingMode: options.billingMode } : {}),
2388
+ network: projectNetwork(config.modelId),
2339
2389
  attribution: nextSemanticWorkloadAttribution(attributionOptions),
2340
2390
  };
2341
2391
  }
@@ -3780,6 +3830,7 @@ const options = {
3780
3830
  quality: null, // Quality tier: fast|hq|pro — auto-selects model, steps, dimensions
3781
3831
  tokenType: null,
3782
3832
  billingMode: null, // auto|subscription|tokens — omitted by default so the server decides coverage
3833
+ network: null, // fast|relaxed; defaults to the configured network, then fast
3783
3834
  steps: null,
3784
3835
  guidance: null,
3785
3836
  outputFormat: null,
@@ -4154,6 +4205,16 @@ for (let i = 0; i < args.length; i++) {
4154
4205
  i++;
4155
4206
  options.billingMode = raw;
4156
4207
  cliSet.billingMode = true;
4208
+ } else if (arg === '--network') {
4209
+ const raw = requireFlagValue(args, i, arg);
4210
+ i++;
4211
+ if (!['fast', 'relaxed'].includes(raw)) {
4212
+ fatalCliError('--network must be fast or relaxed.', {
4213
+ code: 'INVALID_ARGUMENT',
4214
+ details: { flag: '--network', value: raw }
4215
+ });
4216
+ }
4217
+ options.network = raw;
4157
4218
  } else if (arg === '--steps') {
4158
4219
  const raw = requireFlagValue(args, i, arg);
4159
4220
  i++;
@@ -4177,6 +4238,14 @@ for (let i = 0; i < args.length; i++) {
4177
4238
  i++;
4178
4239
  options.outputFormat = raw;
4179
4240
  cliSet.outputFormat = true;
4241
+ } else if (arg === '--image-complexity') {
4242
+ options.imageComplexity = requireFlagValue(args, i++, arg);
4243
+ } else if (arg === '--image-frame-count') {
4244
+ options.imageFrameCount = parseNumberValue(requireFlagValue(args, i++, arg), arg);
4245
+ } else if (arg === '--image-frame-duration-ms') {
4246
+ options.imageFrameDurationMs = parseNumberValue(requireFlagValue(args, i++, arg), arg);
4247
+ } else if (arg === '--image-markup-url') {
4248
+ options.imageMarkupUrl = requireFlagValue(args, i++, arg);
4180
4249
  } else if (arg === '--image-quality') {
4181
4250
  options.imageQuality = requireFlagValue(args, i++, arg);
4182
4251
  } else if (arg === '--image-background') {
@@ -5210,11 +5279,15 @@ Image Options:
5210
5279
  --distance <key> close-up|medium|wide
5211
5280
  --angle-strength <n> LoRA strength for multiple_angles (default: 0.9)
5212
5281
  --angle-description <text> Optional subject description
5213
- --output-format <f> Images: png|jpg|webp; video: mp4|mov (MOV: Seedance 2.5)
5282
+ --output-format <f> Images: png|jpg|webp|gif (GIF: GPT Image 2.6); video: mp4|mov (MOV: Seedance 2.5)
5214
5283
  --no-prompt-metadata Omit prompt/settings metadata from worker image outputs
5215
5284
  --return-last-frame Export the final video frame as an image (Seedance 2.5)
5216
- --image-quality <q> GPT Image: low|medium|high; 2.5 also xhigh|max
5217
- --image-background <b> auto|opaque; 2.5 also transparent (PNG/WebP)
5285
+ --image-complexity <q> GPT Image 2.6: low|medium|high planning effort
5286
+ --image-frame-count <n> GIF: 2-16 frames (default 9), use --output-format gif
5287
+ --image-frame-duration-ms <n> GIF: 20-2000 ms per frame (default 200)
5288
+ --image-markup-url <url> Transparent annotation PNG for the first edit reference
5289
+ --image-quality <q> GPT Image: low|medium|high; 2.5 and 2.6 also xhigh|max
5290
+ --image-background <b> auto|opaque; 2.5/2.6 also transparent (PNG/WebP)
5218
5291
  --image-output-compression <n> JPEG/WebP compression, integer 0–100
5219
5292
  --image-mask <path|url> PNG alpha mask of first --context image, same size
5220
5293
  --sampler <name> Sampler (images/music; H3 LightX2V Turbo: euler|er_sde|sa_solver; FastH3: euler)
@@ -5412,7 +5485,8 @@ Hosted API Modes:
5412
5485
  --api-base-url <url> Sogni API base URL (default: ${DEFAULT_API_BASE_URL})
5413
5486
 
5414
5487
  General:
5415
- -t, --timeout <sec> Stop waiting after this many seconds (default: 30, video: 1800, music: 600).
5488
+ -t, --timeout <sec> Stop waiting after this many seconds (default: 30, video: 1800, music: 600;
5489
+ at least 1800 on Relaxed).
5416
5490
  Counted from submission; time the account's own plan concurrency limit
5417
5491
  holds the project is not counted. The project is NOT cancelled; fetch it
5418
5492
  later with --result
@@ -5434,6 +5508,8 @@ General:
5434
5508
  --token-type <type> Token type: spark|sogni|auto (default: spark, auto retries with alternate)
5435
5509
  --billing-mode <mode> Billing: auto|subscription|tokens (default: server decides; "subscription"
5436
5510
  requires Sogni Unlimited coverage, "tokens" opts out of it)
5511
+ --network <n> Render on this Supernet: fast|relaxed (default: configured defaultNetwork, else fast).
5512
+ Relaxed queues can take hours; pair long renders with --detach
5437
5513
  --balance, --balances Show account, plan, and SPARK/SOGNI balances and exit
5438
5514
  --list-models [query] List live Supernet media models; optionally filter by query
5439
5515
  --search-models <q> Search live models by ID or name (separator-insensitive)
@@ -5842,6 +5918,17 @@ if (options.billingMode) {
5842
5918
  options.billingMode = mode;
5843
5919
  }
5844
5920
 
5921
+ // --network wins, then the configured default, then Fast.
5922
+ function resolveRenderNetwork() {
5923
+ if (options.network) return options.network;
5924
+ const configured = openclawConfig?.defaultNetwork;
5925
+ if (!configured) return 'fast';
5926
+ if (configured === 'fast' || configured === 'relaxed') return configured;
5927
+ console.error(`Warning: defaultNetwork must be "fast" or "relaxed" (got ${JSON.stringify(configured)}); using fast.`);
5928
+ return 'fast';
5929
+ }
5930
+ const renderNetwork = resolveRenderNetwork();
5931
+
5845
5932
  if (options.apiTaskProfile) {
5846
5933
  const profile = String(options.apiTaskProfile).trim().toLowerCase();
5847
5934
  if (!VALID_API_TASK_PROFILES.has(profile)) {
@@ -6062,7 +6149,7 @@ if (options.outputFormat) {
6062
6149
  details: { outputFormat: options.outputFormat }
6063
6150
  });
6064
6151
  }
6065
- } else if (!['png', 'jpg', 'webp'].includes(options.outputFormat)) {
6152
+ } else if (!['png', 'jpg', 'webp', 'gif'].includes(options.outputFormat)) {
6066
6153
  fatalCliError('Image output format must be "png", "jpg", or "webp".', {
6067
6154
  code: 'INVALID_ARGUMENT',
6068
6155
  details: { outputFormat: options.outputFormat }
@@ -6074,7 +6161,7 @@ if (options.returnLastFrame && (!options.video || !isSeedance25ModelSelectionLoc
6074
6161
  fatalCliError('--return-last-frame requires Seedance 2.5 video.', { code: 'INVALID_ARGUMENT' });
6075
6162
  }
6076
6163
 
6077
- if (options.imageQuality !== null || options.imageBackground !== null || options.imageOutputCompression !== null || options.imageMask !== null) {
6164
+ if (options.imageQuality !== null || options.imageBackground !== null || options.imageOutputCompression !== null || options.imageMask !== null || [options.imageComplexity, options.imageFrameCount, options.imageFrameDurationMs, options.imageMarkupUrl].some(value => value !== undefined) || options.outputFormat === 'gif') {
6078
6165
  try {
6079
6166
  if (options.video || options.music || !isGptImage2ModelSelection(options.model)) {
6080
6167
  throw new Error('Image quality, background, compression and mask options require a GPT Image model.');
@@ -6768,12 +6855,23 @@ if (options.music) {
6768
6855
 
6769
6856
  if (!options.video && !options.music && isGptImage2ModelSelection(options.model)) {
6770
6857
  options.model = normalizeGptImageModelAlias(options.model);
6858
+ if (options.outputFormat === 'gif') {
6859
+ if (options.contextImages.length || options.imageMask || options.imageMarkupUrl) fatalCliError('GIF output requires text-to-image generation without references, mask or markup.', { code: 'INVALID_ARGUMENT' });
6860
+ try {
6861
+ Object.assign(options, gptImageGifDimensions(
6862
+ cliSet.width || widthFromConfig || widthFromPrompt ? options.width : undefined,
6863
+ cliSet.height || heightFromConfig || heightFromPrompt ? options.height : undefined,
6864
+ options.imageFrameCount
6865
+ ));
6866
+ } catch (error) { fatalCliError(error.message, { code: 'INVALID_ARGUMENT' }); }
6867
+ } else {
6771
6868
  if (!cliSet.width && !widthFromConfig && !widthFromPrompt) options.width = 1024;
6772
6869
  if (!cliSet.height && !heightFromConfig && !heightFromPrompt) options.height = 1024;
6773
6870
  const { width, height } = options;
6774
6871
  if (width % 16 || height % 16 || Math.max(width, height) > 3840 || Math.max(width, height) / Math.min(width, height) > 3 || width * height < 655360 || width * height > 8294400) {
6775
6872
  fatalCliError('GPT Image dimensions must be multiples of 16, at most 3840 per edge, within 3:1 and 655360–8294400 pixels.', { code: 'INVALID_ARGUMENT' });
6776
6873
  }
6874
+ }
6777
6875
  if (!cliSet.timeout && !timeoutFromConfig) options.timeout = 600000;
6778
6876
  }
6779
6877
 
@@ -6904,6 +7002,25 @@ if (apiWorkflowStartAction && apiWorkflowTemplate === 'generated_keyframe_video'
6904
7002
  if (apiWorkflowStartAction && apiWorkflowTemplate === 'storyboard_video' && !options.prompt && !apiWorkflowStartHasExternalInput) {
6905
7003
  fatalCliError('--api-workflow storyboard-video preset requires a prompt or --workflow-input JSON.', { code: 'INVALID_ARGUMENT' });
6906
7004
  }
7005
+ if (options.network) {
7006
+ const unrouted = [
7007
+ ['--api-chat, which runs on hosted Fast', options.apiChat],
7008
+ ['hosted workflows, which run on hosted Fast', options.apiWorkflowAction],
7009
+ ['--list-models or --search-models (use --model-network)', liveModelUtilityAction]
7010
+ ].find(([, applies]) => applies);
7011
+ if (unrouted) {
7012
+ fatalCliError(`--network cannot be combined with ${unrouted[0]}.`, {
7013
+ code: 'INVALID_ARGUMENT',
7014
+ details: { flag: '--network', conflictsWith: unrouted[0] }
7015
+ });
7016
+ }
7017
+ }
7018
+ // Relaxed queues run far longer than Fast, so its renders get at least the wait a
7019
+ // queued video gets, unless the caller or the config chose one. Timing out leaves
7020
+ // the project running; --result <id> --wait collects it.
7021
+ if (!cliSet.timeout && !timeoutFromConfig && projectNetwork(options.model) === 'relaxed') {
7022
+ options.timeout = Math.max(options.timeout, 1800000);
7023
+ }
6907
7024
  if (!liveModelUtilityAction && (options.liveModelMedia !== 'all' || options.liveModelNetwork || options.liveModelTags.length > 0)) {
6908
7025
  fatalCliError('--model-media, --model-network, and --model-tag require --list-models or --search-models.', {
6909
7026
  code: 'INVALID_ARGUMENT'
@@ -10072,7 +10189,7 @@ async function fetchLiveModelCatalog(network, media) {
10072
10189
  }
10073
10190
 
10074
10191
  async function runLiveModels() {
10075
- const network = options.liveModelNetwork || openclawConfig?.defaultNetwork || 'fast';
10192
+ const network = options.liveModelNetwork || renderNetwork;
10076
10193
  const media = options.liveModelMedia || 'all';
10077
10194
  const query = options.liveModelQuery?.trim() || null;
10078
10195
  const normalizedQuery = normalizeLiveModelSearch(query);
@@ -12916,6 +13033,7 @@ function sourceReelChildArgs(baseArgs, outputPath, prompt, plan, duration) {
12916
13033
  ...baseArgs
12917
13034
  ];
12918
13035
  if (options.tokenType) args.push('--token-type', options.tokenType);
13036
+ if (options.network) args.push('--network', options.network);
12919
13037
  if (options.steps !== null && options.steps !== undefined) args.push('--steps', String(options.steps));
12920
13038
  if (options.guidance !== null && options.guidance !== undefined) args.push('--guidance', String(options.guidance));
12921
13039
  if (options.noFilter) args.push('--no-filter');
@@ -14202,6 +14320,7 @@ async function buildVideoEstimateParams({ tokenType, steps }) {
14202
14320
  fps: options.fps,
14203
14321
  numberOfMedia: options.count,
14204
14322
  tokenType,
14323
+ network: projectNetwork(options.model),
14205
14324
  ...(Number.isFinite(steps) && steps > 0 ? { steps } : {}),
14206
14325
  ...(options.frames ? { frames: options.frames } : { duration: options.duration }),
14207
14326
  ...(referenceImageCount !== undefined ? { referenceImageCount } : {}),
@@ -14412,7 +14531,7 @@ async function runDoctor() {
14412
14531
  appSource: SOGNI_APP_SOURCE,
14413
14532
  appId: getOrCreateSogniAppId(),
14414
14533
  attribution: clientAttribution(AGENT_ATTRIBUTION),
14415
- network: openclawConfig?.defaultNetwork || 'fast',
14534
+ network: renderNetwork,
14416
14535
  autoConnect: false,
14417
14536
  apiKey: creds.SOGNI_API_KEY,
14418
14537
  authType: 'apiKey'
@@ -15097,6 +15216,7 @@ async function main() {
15097
15216
  success: true,
15098
15217
  type: 'video-cost',
15099
15218
  model: options.model,
15219
+ network: estimateParams.network,
15100
15220
  width: options.width,
15101
15221
  height: options.height,
15102
15222
  fps: options.fps,
@@ -16501,7 +16621,7 @@ async function main() {
16501
16621
  appSource: SOGNI_APP_SOURCE,
16502
16622
  appId: getOrCreateSogniAppId(),
16503
16623
  attribution: clientAttribution(AGENT_ATTRIBUTION),
16504
- network: openclawConfig?.defaultNetwork || 'fast',
16624
+ network: renderNetwork,
16505
16625
  autoConnect: false,
16506
16626
  apiKey: creds.SOGNI_API_KEY,
16507
16627
  authType: 'apiKey'
package/version.mjs CHANGED
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '3.63.0';
1
+ export const PACKAGE_VERSION = '3.64.0';