Repository navigation
[feat] providers: reuse a BigModel account across model categories - #289
PCcoding666 wants to merge 2 commits into
Conversation
|
Heads-up on an overlap with #276 (GLM-TTS, same parent RFC #234). Both PRs touch I merged your branch ( The preset one is two lines - #276 widens the same entry to serve GLM-TTS: Resolution is I verified the resolved merge: Whichever lands second gets this conflict, so no action needed now - just flagging it early since it is a two-line fix if you know about it, and a confusing one if you don't. #276 is currently approved with checks green, so it will likely be first; happy to do the rebase on my side instead if you'd rather land #289 first. One unrelated observation while reading the diff: |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed71facfc4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| previous = [item for item in models if (item.get('providerId') == provider_id and item['kind'] == kind) | ||
| or (item['id'] == config_id and not cross_category)] |
There was a problem hiding this comment.
Include legacy vision peers in the replacement set
When an existing multi-model vision service is managed from the Image or Video category, legacy_segmentation still allows the save, but this filter includes only the anchor because its peers still have kind == 'vision'. Saving a two-model service with both models therefore produces three records: the second old vision record survives and a duplicate is created with a new ID. Deselecting that model also fails to remove it. Include the legacy source-kind peers in previous during this supported conversion so the saved selection and model identities are preserved.
Useful? React with 👍 / 👎.
| if cross_category: | ||
| # Promote an explicitly selected standalone record, preserving its model ID. | ||
| existing['providerId'] = provider_id | ||
| previous = [item for item in models if (item.get('providerId') == provider_id and item['kind'] == kind) |
There was a problem hiding this comment.
Please include legacy vision peers in previous to avoid duplicate models on save, and cover retaining and deselecting peers in a regression test.
Summary
Adding a BigModel model in another category currently requires entering the account key again. This change lets users select a saved mainland BigModel account across chat, image, video and audio. Account identifiers distinguish credentials on the same endpoint. Key rotation applies to the selected account, and editing or deleting models applies to the selected category.
Refs #234. The integrated branch includes the current GLM chat, GLM-Image, CogVideoX-3 and GLM-TTS presets. Each category retains its own protocol and proxy settings, including
bigmodel_videofor CogVideoX-3. Frontend and backend connection checks use the same explicit category allowlist.Verification
At
ed71facf, integrated with upstream691135f, on Apple Silicon:Settings evidence
Chromium exercised the current integrated app through an isolated local API. With two fixture image accounts, I selected account A in English and account B in Chinese, saving all four categories in each language without reentering a key (eight saves). The original image records stayed intact, saved video models kept the
bigmodel_videoprotocol, and closing/reopening settings showed both distinct video accounts. The page reported no JavaScript errors.Regression tests above use fixtures; the separate real-account acceptance below uses the production adapters.
Live BigModel acceptance (2026-11-16)
Ran the integrated
ed71facfapp on Apple Silicon against the official BigModel API, in a fresh isolated project. Saved one real account key once, then reused the saved account across all four categories. These calls used the production assistant HTTP route, bundled OpenCode runtime, project commands, background jobs and provider adapters.glm-5.3-flashbigmodel-check.mdexactly once, received anappliedreceipt and confirmed it. Three upstream streaming requests returned HTTP 200; the 42-byte file matched the expected text.glm-imagecogvideox-3glm-tts, presettongtongAll three media jobs succeeded, passed the app's file checks, and were explicitly adopted through
result.select. Stopped and restarted the backend, opened a new session, and verified the exact bytes of all four assets, all three selected result IDs, the saved conversation and the shared account identity. Reused each media asset as a new material node after reopening; asset, job and result counts stayed unchanged. The reopened browser decoded the image and played both the video and audio to their ends with no decode errors.The live run made six provider POST requests: three streaming chat requests and one each for image, video and speech. Reopen, reuse and browser playback made no additional model submissions. Native runtime counters reported 10,513 chat tokens; those counters are not an account billing statement.
Sanitized request, file, reopen, reuse and browser evidence. Credentials, raw model traces and signed provider media URLs are excluded.
Live scope: one account, text-to-video and a preset voice. Multiple-account isolation and category-scoped edits/deletions are covered by the fixture regressions above. Image-conditioned/first-and-last-frame video, voice cloning and fault recovery were not exercised against the real service in this run. This is functional/file/playback acceptance, not a creative-quality benchmark.
Prepared and tested with Codex assistance.