Skip to content

Migration lego-hunter to Tinyfish SDK #208

Merged
simantak-dabhade merged 2 commits into
tinyfish-io:mainfrom
KrishnaAgarwal7531:lego
May 19, 2026
Merged

Migration lego-hunter to Tinyfish SDK #208
simantak-dabhade merged 2 commits into
tinyfish-io:mainfrom
KrishnaAgarwal7531:lego

Conversation

@KrishnaAgarwal7531
Copy link
Copy Markdown
Contributor

Migrates Lego Restock Hunter from OpenAI-based URL generation to the TinyFish SDK, removing the @ai-sdk/openai and ai dependencies entirely.
The original generate-urls route used GPT-4o-mini to hallucinate search URLs for 15 hardcoded retailers — results were often wrong or outdated. The new /api/discover-retailers runs two parallel TinyFish Search queries targeted at the specific LEGO set name, finding real current product pages across retailers without any LLM involvement.
/api/search-lego replaces the raw Mino SSE fetch with client.agent.stream — typed EventType.STREAMING_URL, EventType.PROGRESS, EventType.COMPLETE + RunStatus.COMPLETED, with result content validation. Deal analysis is now built-in price sorting logic rather than a second GPT-4o-mini call — no LLM needed to determine which price is lower.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 69674135-1d36-4eff-93ee-5ad42a1310af

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@simantak-dabhade simantak-dabhade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean migration. Fixed next-env.d.ts. Build passes.

@simantak-dabhade simantak-dabhade merged commit 259d20b into tinyfish-io:main May 19, 2026
3 checks 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.

3 participants