- Remove _fetch_pixabay_api_image() function entirely
- Tier 6 (Pixabay) removed from _enrich_one_item — falls through to Pexels
- Re-enrich all items across Tokyo, Kyoto, Osaka, London with Pixabay-free pipeline
- Update all docstrings and tier references
- Zero Pixabay URLs remaining in cache for these cities
Source breakdown after repair:
Tokyo: 123 Wikimedia + 4 Pexels/Unsplash
Kyoto: 120 Wikimedia + 13 Pexels/Unsplash
Osaka: 96 Wikimedia + 37 Pexels/Unsplash
London: 110 Wikimedia + 23 Pexels/Unsplash
fix: content-hash dedup with _MAX_STOCK_SHARING=4 — eliminate duplicate photos in Oslo, Osaka, Marrakech, Hanoi, Prague, Madrid caches
- After Pixabay returns an image, re-check English Wikipedia and
Wikidata tiers in case they were rate-limited on first pass
- Added multi-language Wikipedia tier (fr/de/es/it/ja) as Tier 2
- Fixed cache check to skip empty-string entries (re-try failed items)
- Cache: non-empty URLs only — empty cache entries no longer block retries
feat: fast offline translations via deep-translator with parallel HTTP
Adds _translate_items_deep() which translates attraction text fields
using Google Translate via the deep-translator library. Uses
ThreadPoolExecutor (15 workers) to parallelize HTTP calls — translates
19 items × 4 fields (76 texts) in ~3-6s instead of ~45s.
Falls back to existing LLM translation for unsupported languages.
Existing JP/TC cache is preserved.
- Consolidate 4 JSON cache files into .cache/ folder
- Update all path references in recommender.py and 3 scripts
- Update README.md with new cache paths
- .gitignore: consolidate 8 log patterns into single *.log, add .repair_progress.json
- recommender.py: expand docstrings on _geocode_city and _parse_json_response
- streamlit_app.py: warn user when all results fail location verification
Replace fragile md5(content-hash) key with deterministic
(city, cat_hash, language) key. Survives image enrichment,
field re-ordering, and any content-level changes. Fixes
translation spinner on any language switch (e.g. Japanese
-> Traditional Chinese).
- Root cause: max_tokens=2048 truncated LLM output, dropping _local fields
- Fixed: bumped to 8192 in translate_items()
- Enhanced prompt + auto-retry with warning when _local fields missing
- All 28 Tokyo/Kyoto combos translated (14× Japanese + 14× Traditional Chinese)
- Full 4 _local fields present on every item
Added _is_media_entertainment_page() check in _fetch_wiki_image to
skip film, TV, video game, and album pages that may share names
with real attractions (e.g. 'Dishoom' Bollywood film vs Dishoom
London restaurant). Falls through to next candidate when detected.
Also cleared the cached Dishoom poster entry so it re-fetches.
Persist translation cache to disk + prewarm script
Items that can't find a specific image now get image_url='' instead
of sharing a generic city photo. Frontend already shows 🏛️ emoji
fallback for empty image_url.
Also added 10 new cities to warmup queue.
Fix Wikipedia Commons thumbnail URLs: 400px -> 500px (valid size)
- Bumped pithumbsize from 400 to 500 in REST API call
- Changed fallback Commons URL construction to use 500px-
- Rewrote 78 cached image URLs in both caches to 500px
Root cause: Wikipedia Commons restricted /Npx- thumbnail sizes;
only 500px and 1280px are accepted now (400px returns HTTP 400).
Improve image enrichment: city context in Tier 1 + smarter warmup health check
- _fetch_wiki_image() now accepts city param — tries '{name}, {city}'
and '{name} ({city})' search queries when bare name yields few candidates
- _enrich_one_item() passes city to Tier 1 (was only used by Tiers 2-6)
- check_items() in warmup: 3-pass fix (missing → fallback replace → retry),
detects city-level fallback images shared by >=3 items and replaces them
- New --fix mode: re-check existing cached images without LLM calls
(python scripts/warmup.py --fix --city Tokyo)
- Image cache cleaned: 540 → 519 entries (transients removed)
Unified warmup script + provider observability + Tokyo caches
- New scripts/warmup.py: unified warmup with per-combo checkpointing
(saves all 3 caches after every combo), per-provider logging,
health check + duplicate detection built in, resumable progress
- Added provider_log parameter to get_recommendations() and
get_recommendations_cached() — captures provider name, model,
status, timing, item count per attempt
- Added duplicate image detection to check_cache.py (fallback fix)
- Tokyo caches populated: all 7 categories (19 or 16 items each)
- LLM 44, Images 543, Geocode 142 entries
v0.0.5 — Deterministic cache, Surprise Me, image fixes, health check
Add conditional extra_body parameter to disable internal reasoning
trace at the API level for Ollama Cloud model. Applied to all 3 API
call sites: _call_model, _verify_with_model, and translate_items.
Other providers (OpenRouter, Gemini) are unaffected.
feat: switch primary provider to Ollama Cloud DeepSeek V4 Flash