Hi! I’ve been experimenting with MuckScraper on a small local Ollama host (8GB VRAM) and ended up building a split‑routing system that lets the project run inference across both local Ollama and cloud LLMs (via OpenRouter). I wanted to share the changes in case this direction is useful for the main project — the architecture is modular enough that it could support any OpenAI‑compatible cloud provider with minimal adjustments.
Why:
Running everything through a local model wasn’t feasible on my hardware, but I still wanted fast, cheap inference for lightweight tasks. The solution was to route “simple” operations (classification, headlines, bias scoring) to Ollama, while sending heavier summarization and deep‑analysis tasks to a cloud LLM.
This keeps the pipeline responsive even on modest hardware while still enabling high‑quality summarization.
What changed:
I added a provider‑aware LLM client and updated the pipeline so each part of MuckScraper can choose the appropriate inference backend.
Key changes:
- New split‑routing LLM client
The file newsfetcher/llmclient.py was rewritten to support two providers:
- generate_text_ollama()
- generate_text_openrouter()
- get_embedding_ollama()
- get_embedding_openrouter()
Plus a unified generate_text(provider=...) interface and provider‑specific status/config checks.
Timeouts are configurable via .env (OLLAMATIMEOUT, OPENROUTERTIMEOUT).
- Routing updates across the pipeline
Lightweight tasks → Ollama
Heavy summarization → OpenRouter
Specifically:
- Topic classification → Ollama
- Headline generation → Ollama
- Outlet bias scoring → Ollama
- Story summarization → OpenRouter
- Deep article analysis → OpenRouter
- Deep story reports → OpenRouter
This is all documented in IMPLEMENTATIONSUMMARY.md and LLMROUTING_CHANGES.md.
- Environment configuration
.env now supports:
OLLAMA_HOST=http://localhost:11434 OLLAMA_MODEL=gemma3:4b OLLAMA_TIMEOUT=120 OPENROUTER_TIMEOUT=120 OPENROUTER_HOST=https://openrouter.ai/api/v1 OPENROUTER_MODEL=openrouter/free OPENROUTER_API_KEY= LLM_PROVIDER=openrouter # Provider toggle: "ollama" (default, home machine), "gemini", "groq", or "openrouter" EMBEDDING_PROVIDER=openrouter EMBEDDING_MODEL=nomic_embed_text OPENROUTER_EMBEDDING_MODEL=text-embedding-ada-002
The OpenRouter section can be swapped for any OpenAI‑compatible cloud LLM (Anthropic, OpenAI, Groq, DeepSeek, etc.) by adjusting the base URL and model name.
- Backward compatibility
All existing function signatures remain intact.
Code that doesn’t specify a provider still uses the default LLM_PROVIDER.
How it works:
The pipeline routes each LLM call based on the task type. This keeps local inference fast while offloading heavy work to the cloud.
If this direction aligns with your roadmap
I’d be happy to help adapt the routing layer. The architecture is intentionally simple so it can be extended to additional providers or models without major refactoring.
Thanks for building such a great project — this split‑routing approach has made it much more usable on constrained hardware.
Hi! I’ve been experimenting with MuckScraper on a small local Ollama host (8GB VRAM) and ended up building a split‑routing system that lets the project run inference across both local Ollama and cloud LLMs (via OpenRouter). I wanted to share the changes in case this direction is useful for the main project — the architecture is modular enough that it could support any OpenAI‑compatible cloud provider with minimal adjustments.
Why:
Running everything through a local model wasn’t feasible on my hardware, but I still wanted fast, cheap inference for lightweight tasks. The solution was to route “simple” operations (classification, headlines, bias scoring) to Ollama, while sending heavier summarization and deep‑analysis tasks to a cloud LLM.
This keeps the pipeline responsive even on modest hardware while still enabling high‑quality summarization.
What changed:
I added a provider‑aware LLM client and updated the pipeline so each part of MuckScraper can choose the appropriate inference backend.
Key changes:
The file newsfetcher/llmclient.py was rewritten to support two providers:
Plus a unified generate_text(provider=...) interface and provider‑specific status/config checks.
Timeouts are configurable via .env (OLLAMATIMEOUT, OPENROUTERTIMEOUT).
Lightweight tasks → Ollama
Heavy summarization → OpenRouter
Specifically:
This is all documented in IMPLEMENTATIONSUMMARY.md and LLMROUTING_CHANGES.md.
.env now supports:
OLLAMA_HOST=http://localhost:11434 OLLAMA_MODEL=gemma3:4b OLLAMA_TIMEOUT=120 OPENROUTER_TIMEOUT=120 OPENROUTER_HOST=https://openrouter.ai/api/v1 OPENROUTER_MODEL=openrouter/free OPENROUTER_API_KEY= LLM_PROVIDER=openrouter # Provider toggle: "ollama" (default, home machine), "gemini", "groq", or "openrouter" EMBEDDING_PROVIDER=openrouter EMBEDDING_MODEL=nomic_embed_text OPENROUTER_EMBEDDING_MODEL=text-embedding-ada-002The OpenRouter section can be swapped for any OpenAI‑compatible cloud LLM (Anthropic, OpenAI, Groq, DeepSeek, etc.) by adjusting the base URL and model name.
All existing function signatures remain intact.
Code that doesn’t specify a provider still uses the default LLM_PROVIDER.
How it works:
The pipeline routes each LLM call based on the task type. This keeps local inference fast while offloading heavy work to the cloud.
If this direction aligns with your roadmap
I’d be happy to help adapt the routing layer. The architecture is intentionally simple so it can be extended to additional providers or models without major refactoring.
Thanks for building such a great project — this split‑routing approach has made it much more usable on constrained hardware.