Skip to content

fix(nexus): make image generation route stable and executable - #58

Merged
smackgg merged 6 commits into
mainfrom
codex/fix-generation-storyboard-regressions
Jul 31, 2026
Merged

fix(nexus): make image generation route stable and executable#58
smackgg merged 6 commits into
mainfrom
codex/fix-generation-storyboard-regressions

Conversation

@smackgg

@smackgg smackgg commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expose only executable Nexus image-and-text models, excluding auto and image-only routes that cannot run through the metered Chat Completions path
  • prepare one bounded image route during tools/list and reuse its exact Data Token, Provider, and model catalog in the following image.generate call
  • prevent tools/call from repeating authorization, Provider, or model discovery after the Host has entered its external-call safety boundary
  • serialize credential-store commits and reject delayed access/Data Token refreshes after sign-out or reauthorization
  • preserve at-most-once operation replay and invalidate stale route/catalog work
  • retain the Storyboard launcher layout fix at the packaged viewport
  • release Nexus Service 0.3.15, Nexus companion 0.3.12, and Storyboard Studio 0.1.1

Root cause

Nexus image generation discovered the route three times: model listing loaded token/Provider/models, image.generate loaded models again, and the completion call loaded token/Provider again. A transient discovery failure after tools/call began was still pre-billable inside Nexus, but the Host correctly had to classify the non-LRO external result as unknown and lock the card.

Verification

  • bun run check on the final branch after merging latest main
  • Nexus tests: 34 passed, including delayed refresh × sign-out/reauthorization races
  • compiled darwin-arm64 companion stdio E2E: initialize → tools/listimage.generate
  • exact request counts: token / Provider / models / completion = 1 / 1 / 1 / 1
  • generated 77-byte PNG matched byte-for-byte
  • stdout/stderr contained no refresh/access/Data Token, prompt, output directory, or native temp path
  • current 767714f darwin-arm64 companion completed one real production Nexus call with the existing user authorization: google/gemini-2.5-flash-image, one visually verified 1024×1024 PNG (155,087 bytes), and zero stderr lines

@smackgg
smackgg force-pushed the codex/fix-generation-storyboard-regressions branch from 4f01d85 to 07c6eb2 Compare July 30, 2026 14:43
…storyboard-regressions

# Conflicts:
#	packages/plugins/nexus-service/convax-package.json
#	packages/plugins/nexus-service/package/manifest.json
@smackgg
smackgg requested a review from youking-lib July 30, 2026 14:53
@smackgg

smackgg commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@youking-lib @superche @fearclear @JPJeePee 麻烦任一位 review/approve 最新 head 767714f。CI 已完整通过;并且刚用该 head 编译出的 darwin-arm64 companion、现有生产 Nexus 授权和实时模型目录完成了一次真实调用:google/gemini-2.5-flash-image 返回 1 张经肉眼确认的 1024×1024 PNG(155,087 bytes),stderr 0。不是 fake gateway。修复保留 #57 的 USD budget 展示,并消除了 Host 接受任务后重复 token/Provider/model discovery 导致的 unknown 锁卡。

smackgg added 3 commits July 31, 2026 00:09
…storyboard-regressions

# Conflicts:
#	packages/plugins/nexus-service/convax-package.json
#	packages/plugins/storyboard-studio/convax-package.json
#	packages/plugins/storyboard-studio/package/README.md
@smackgg smackgg changed the title Fix Nexus image generation and Storyboard layout fix(nexus): make image generation route stable and executable Jul 30, 2026
@smackgg
smackgg merged commit 498514e into main Jul 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant