Skip to content

fix(wiki-compose): align BYOK backend with pinned Google compose model#991

Closed
cursor[bot] wants to merge 2 commits into
developfrom
cursor/critical-bug-investigation-b3fe
Closed

fix(wiki-compose): align BYOK backend with pinned Google compose model#991
cursor[bot] wants to merge 2 commits into
developfrom
cursor/critical-bug-investigation-b3fe

Conversation

@cursor

@cursor cursor Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Context

Review of PR #990 (fix(api): pin Wiki Compose LLM to google:gemini-3.5-flash) found a regression when combined with the existing Wiki Compose backend auto-selection (#984 / #986).

Bug and impact

Bug: Users with Anthropic or OpenAI BYOK configured in Settings → AI had Wiki Compose sessions created with user_anthropic / user_openai, but every LLM node now resolves google:gemini-3.5-flash. The first graph step calls createZediChatModel, which throws BackendProviderMismatchError.

Impact: Wiki Compose was effectively broken for all non-Google BYOK users (session created, run failed on first LLM call).

Root cause

PR #990 removed provider-aware resolveComposeModelId for Wiki Compose graphs without updating frontend backend selection or server preflight validation.

Fix

  • Frontend: resolveWikiComposeBackendFromAiSettings — only user_google BYOK or zedi_managed.
  • Server: assertComposeBackendReady — reject non-user_google BYOK for wiki-compose / wiki-compose-research at session create (clear 400).

Validation

  • bun test src/__tests__/agents/core/composeBackendValidation.test.ts
  • bun test src/lib/wikiCompose/resolveComposeBackend.test.ts

Note for PR #990

Separate operational risk: google:gemini-3.5-flash must exist as an active ai_models row or LLM nodes fail at validateModelAccess (web_search has fallback; compose LLM nodes do not).

Open in Web View Automation 

cursoragent and others added 2 commits May 26, 2026 23:49
Wiki Compose orchestrator, research, draft, and web_search now resolve
a single fixed ai_models.id (google:gemini-3.5-flash) instead of
provider-specific fallbacks. Ingest planner keeps resolveComposeModelId.

Co-authored-by: Akimasa Sugai <otomatty@users.noreply.github.com>
PR #990 pins Wiki Compose LLM calls to google:gemini-3.5-flash, but the UI
still selected user_anthropic/user_openai from AI settings. Session create
succeeded while the first graph node threw BackendProviderMismatchError.

Reject non-Google BYOK at session preflight for wiki-compose graphs and
resolve the compose backend to user_google or zedi_managed only.
@otomatty

Copy link
Copy Markdown
Owner

develop には coerceWikiComposeBackend / isWikiComposeAllowedBackend#992 経由で取り込み済みです。本 PR は superseded のためクローズします。

@otomatty otomatty closed this Jun 13, 2026
@otomatty otomatty deleted the cursor/critical-bug-investigation-b3fe branch June 13, 2026 14:26
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.

2 participants