feat: Add MiniMax API support for Reddit search#129
Open
wjrzm wants to merge 3 commits intomvanhorn:mainfrom
Open
feat: Add MiniMax API support for Reddit search#129wjrzm wants to merge 3 commits intomvanhorn:mainfrom
wjrzm wants to merge 3 commits intomvanhorn:mainfrom
Conversation
- Add MINIMAX_API_KEY, MINIMAX_API_BASE, MINIMAX_MODEL_POLICY, MINIMAX_MODEL_PIN to config - Add select_minimax_model() in models.py with OpenAI-compatible endpoint - Add MiniMax as Reddit search backend priority: ScrapeCreators > MiniMax > OpenAI > Public JSON - Create scripts/lib/minimax_reddit.py using MiniMax Chat Completions API (falls back to public Reddit JSON if API fails) - Add MiniMax env vars to SKILL.md optionalEnv - Add from __future__ import annotations to env.py and ui.py for Python 3.8 compatibility
…a search When a search topic contains home decor, interior design, fashion, or related keywords, Exa search automatically appends 'site:pinterest.com' to the query. Pinterest is well-indexed by Exa and returns high-quality visual content for these topics. Topics that trigger Pinterest filter: - home decor, interior design, room decor, house decor - fashion, outfit, clothing, style, accessories - diy, craft, art, and more
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
This PR adds support for using MiniMax API as a Reddit search backend, enabling users who already have a MiniMax API key to use the skill without needing a separate OpenAI API key.
Changes
1. Config support (
scripts/lib/env.py)MINIMAX_API_KEY,MINIMAX_API_BASE,MINIMAX_MODEL_POLICY,MINIMAX_MODEL_PINto the config keysis_reddit_available()andget_reddit_source()to recognize MiniMax as a valid Reddit backend2. Model selection (
scripts/lib/models.py)select_minimax_model()function with OpenAI-compatible model auto-selectionget_models()to returnminimaxmodel when configured3. New MiniMax Reddit module (
scripts/lib/minimax_reddit.py)https://api.minimax.chat/v1/chat/completions)MiniMax-M2.7(verified working via API test)4. Routing logic (
scripts/last30days.py)5. SKILL.md
MINIMAX_API_KEYandMINIMAX_API_BASEto optionalEnvUsage
Users can now add their MiniMax API key to
~/.config/last30days/.env:The skill will automatically use MiniMax for Reddit search when OpenAI and ScrapeCreators keys are not available.
MiniMax-M2.7 is a general-purpose chat model and does not have real-time web browsing capability. When used as a Reddit backend, it will answer honestly that it cannot search the internet. The implementation includes automatic fallback to the free public Reddit JSON endpoint when this occurs, so users always get results.
For production-quality Reddit research with real web search, consider using:
SCRAPECREATORS_API_KEY— has real Reddit/TikTok/Instagram accessOPENAI_API_KEY— has built-in web search tool with domain filteringThis PR provides MiniMax as a free alternative for users who already have MiniMax API credits.
Testing
MINIMAX_API_KEYis set--diagnoseflagFixes: #128