feat: rewrite check-research for Gemini Deep Research (Task 5)#628
Merged
codercatdev merged 1 commit intodevfrom Mar 5, 2026
Merged
feat: rewrite check-research for Gemini Deep Research (Task 5)#628codercatdev merged 1 commit intodevfrom
codercatdev merged 1 commit intodevfrom
Conversation
Replace all NotebookLM calls with Gemini Deep Research API (pollResearch, parseResearchReport) and Gemini Infographics (generateInfographicsForTopic with Imagen 4 Fast). Changes: - stepResearching: polls Gemini interaction instead of NotebookLM - stepResearchComplete: generates infographics via Imagen (sync, no polling) - stepInfographicsGenerating: legacy migration handler only - Remove all NotebookLM imports and client initialization - Add enableDeepResearch toggle (skip when disabled) - Keep: fail-closed auth, stuck detection, enrichment, Claude critic Co-authored-by: research <research@miriad.systems>
|
Deployment failed with the following error: Learn More: https://vercel.com/alex-pattersons-projects?upgradeToPro=build-rate-limit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites
app/api/cron/check-research/route.tsto replace all NotebookLM calls with Gemini Deep Research API + Gemini Infographics (Imagen 4 Fast).What Changed
Removed
NotebookLMClient,initAuth,ArtifactTypeCode,ArtifactStatus)initAuth()call andNotebookLMClientinstantiationnbClientparameter from all step functionsDEFAULT_INFOGRAPHIC_INSTRUCTIONSconstant (now lives ingemini-infographics.ts)nbClient.*method calls (pollResearch,importResearchSources,getSummary,getSourceIds,generateInfographic,listArtifacts,getInfographicUrl,getCookieHeader)Added
pollResearch(interactionId)from@/lib/services/gemini-research— replaces NotebookLM pollingparseResearchReport(topic, report)from@/lib/services/gemini-research— replaces manual briefing/summary extractiongenerateInfographicsForTopic(topic, briefing)from@/lib/services/gemini-infographics— replaces NotebookLM infographic generation + downloadresearchInteractionIdfield inPipelineDoc(new Gemini field, withresearchNotebookIdkept for backward compat)enableDeepResearchtoggle — when disabled, researching docs skip directly to enrichingStep Changes
stepResearchingparseResearchReportstepResearchCompleteinfographics_generatingenrichingstepInfographicsGeneratingenrichingstepEnrichingbuildResearchPayloadto handle both new (fullResearchPayload) and legacy (briefing + sources) formatsKept Unchanged
fetchCache = 'force-no-store'andmaxDuration = 60CRON_SECRETauthflagStuckDocs()andbuildStuckThresholds()MAX_DOCS_PER_STATUS = 2extractTalkingPoints,extractCodeExamples,classifyScene,classifySourceTypebuildEnrichmentPrompt,claudeCritic,SYSTEM_INSTRUCTION_FALLBACKVerification
npx tsc --noEmit— zero errorsDependencies
@/lib/services/gemini-research(Task 3 — merged)@/lib/services/gemini-infographics(Task 4 — merged)