From 668b235b0729318c8f9968aaac222b3cdef3c742 Mon Sep 17 00:00:00 2001 From: Chris Staley Date: Thu, 2 Apr 2026 11:32:40 -0600 Subject: [PATCH] =?UTF-8?q?docs:=20fix=20plan=20=E2=80=94=20add=20missing?= =?UTF-8?q?=20import=20for=20buildModelSyncInternalHeaders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plans/2026-04-02-gemini-available-models-sync.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/superpowers/plans/2026-04-02-gemini-available-models-sync.md b/docs/superpowers/plans/2026-04-02-gemini-available-models-sync.md index 750be3e533..51d7949213 100644 --- a/docs/superpowers/plans/2026-04-02-gemini-available-models-sync.md +++ b/docs/superpowers/plans/2026-04-02-gemini-available-models-sync.md @@ -212,11 +212,11 @@ In the POST handler, after `const newConnection = await createProviderConnection } ``` -Also add the import for `buildModelSyncInternalHeaders` at the top of the file. This function is defined in `src/app/api/providers/[id]/sync-models/route.ts` — but it's not exported. Instead, trigger the sync via the internal endpoint directly using fetch (which is what we do above). Remove the import attempt and just use the fetch approach. +Add this import at the top of the file: -Actually, let's simplify. We don't need `buildModelSyncInternalHeaders`. We just need the cookie from the current request. The code above already does this — it forwards the user's auth cookie. Just make sure to add this import at the top of the file (it's likely already imported): - -Check if `fetch` is available globally (it is in Next.js edge/node runtime). No additional imports needed. +```typescript +import { buildModelSyncInternalHeaders } from "@/shared/services/modelSyncScheduler"; +``` - [ ] **Step 2: Build to verify no type errors**