Quality & Reliability
Every pipeline now returns validated structured news: title, factual summary, optional AI analysis, publication date and source IDs. Native citation/retrieval metadata supplies the clickable source links. Unknown source IDs, unsafe links, malformed JSON and truncated responses cannot become successful news items.
Publication dates
The News time window applies to all providers. New installs default to d1 (last 24 hours); existing date ranges are preserved. Unknown dates are excluded by default. Enable “Include news without publication dates” to retain them with a warning. Dates taken from source metadata and dates reported by the model have separate labels. A date without a time is treated as a calendar-day interval and cannot prove exact 24-hour freshness. These checks verify source membership and dates, not the truth of every claim.
Calls, retries and limits
Native search normally uses two model calls per topic: research with native sources, followed by structured formatting without tools. Sonar can search again during formatting. RSS + Gemini needs one non-search model call per topic. Configure output-token limits, timeouts, up to two retries for explicit throttling/server errors, and search-call limits where supported. Google grounding and Grok may not enforce a hard search-count cap. Retries may be billable; Obsidian HTTP timeouts stop waiting but cannot cancel remote work.
Optional API usage in notes shows reported generation metadata, including cached generation metadata when reused. Unreported counts, retriever/query/judge calls and failed/retried calls can be missing. It is not a currency budget or bill estimate. No automatic model/provider fallback is used.
Failures and caches
Empty results and API errors are distinct. Failed, empty and partial-feed results are not cached. Successful caches include content settings and are checked against the moving time window before reuse. Run Retry news generation (save a new note) to preserve the original note while retrying. Custom prompts can guide editorial choices; the JSON/source/time contract and renderer still control output. Custom note templates are supported.
Validation
npm test runs offline fixtures for all six providers, malformed citations/dates, freshness, cache invalidation, retries and note preservation. CI runs tests and a TypeScript production build on pull requests, branch pushes and releases. Real API availability and account quotas require an account-level connection test.
Advanced
Google Search Optimization
When using Google providers, the plugin runs 5 parallel search strategies per topic:
| Strategy | Purpose |
|---|---|
| Optimized | AI-generated query with optimal keywords |
| Specific | Exact phrase matching for precision |
| Broad | Wide search for comprehensive coverage |
| Recent | Time-filtered for latest developments |
| Simple | Basic query as fallback |
Results are deduplicated, filtered by quality sources (BBC, Reuters, TechCrunch, Bloomberg, etc.), and ranked by AI.
Caching
Two levels of caching reduce API usage and speed up generation:
- Query Cache: Persists AI-generated search queries per topic. Cleared manually.
- Daily Content Cache: Caches processed content per topic per day. Auto-cleaned on next day. Can be disabled in Advanced settings if you always want fresh results.
Performance Tips
| Goal | Recommendation |
|---|---|
| Speed | Agentic providers, fewer results per topic, concise format |
| Cost | RSS + Gemini summaries, lower output limits, and fewer results |
| Quality | Enable AI queries + AI judge, increase results per topic, use custom prompts |
| Coverage | Results per topic 10–15, max search 40–50, broader date range |
API Rate Limits
| Provider | Free Tier | Paid |
|---|---|---|
| Google Custom Search | 100 queries/day | $5 per 1,000 |
| Gemini | Project-specific model and tool quotas | Pay-as-you-go |
| OpenAI / Anthropic / Grok | No free tier | Pay-per-use |
| Perplexity | No free tier | Subscription |
| OpenRouter | No free tier | Varies by model |
Architecture
Design Patterns
| Pattern | Implementation |
|---|---|
| Factory | NewsProviderFactory — creates providers from settings |
| Strategy | Agentic vs Modular pipeline selection |
| Template | TemplateEngine — placeholder rendering |
| Abstract Base | BaseNewsProvider, BaseRetriever, BaseSummarizer |
File Structure
src/
types.ts # Type definitions & settings
constants.ts # Translations & constants
utils.ts # FileUtils, LanguageUtils, ContentUtils, MetadataUtils
settings-tab.ts # Settings UI
providers/
base-news-provider.ts # Abstract base class
news-provider-factory.ts # Factory
agentic/ # Perplexity, GPT, Claude, Grok, OpenRouter, Gemini
coordinators/ # Search-Summarize coordinator
retrievers/ # Google Search, RSS, Perplexity Search
summarizers/ # Gemini, GPT, Claude, Grok, OpenRouter
template/
template-engine.ts # Rendering engine
template-presets.ts # Template preset definitions
Contributing
Development Setup
git clone https://github.com/ChenziqiAdam/Daily-News-Briefing.git
cd Daily-News-Briefing
npm install
npm run dev # Watch mode
npm run build # Production build
Testing
- Run
npm testandnpm run build - Copy
main.js,manifest.json,styles.cssto your vault's.obsidian/plugins/daily-news-briefing/ - Reload Obsidian (
Ctrl/Cmd+R)
Adding a New Provider
Agentic Provider
- Create
src/providers/agentic/your-provider.ts - Extend
BaseNewsProvider, implementfetchAndSummarizeNews(topic): Promise<BriefingResult> - Register in
NewsProviderFactory - Add settings UI and types
Summarizer
- Create
src/providers/summarizers/your-summarizer.ts - Extend
BaseSummarizer, implementsummarize(topic, articles, language) - Register in coordinator factory
Pull Requests
- Fork and create a feature branch
- Ensure
npm run buildpasses - Test in Obsidian
- Submit PR with description and testing notes
Need more help?