Why
The provider A/B experiment (round-robin between DeepSeek and Anthropic for article simplification, to compare error rates) has run long enough. Deactivate it and pin providers deliberately.
Current behavior
zeeguu/core/llm_services/simplification_and_classification.py:
_get_next_simplification_provider() (~L27) alternates 'deepseek' / 'anthropic' on a module-level counter.
- It's used by
simplify_article_adaptive_levels() (~L79) only when the caller passes no simplification_provider (~L122-127).
- The batch crawler already pins DeepSeek —
zeeguu/operations/crawler/crawl.py:148 crawl_round_robin(..., simplification_provider='deepseek') — so batch never round-robins.
- The remaining round-robin caller is the on-demand path:
simplify_article_adaptive_levels(title, content, language_code) at ~L454 (creating a simplified level when a reader needs it), which passes no provider.
Change
Stop the on-demand path from alternating; pin it to Anthropic (Haiku), matching models.py SIMPLIFICATION = ANTHROPIC_HAIKU ("real-time Haiku key path"). Net result:
- On-demand / live simplification → Anthropic Haiku (low latency; DeepSeek stays as fallback on failure).
- Batch crawl simplification → DeepSeek (already pinned; cheaper; latency-insensitive).
Minimal options (pick one):
- Set the default in
simplify_article_adaptive_levels so simplification_provider defaults to 'anthropic' instead of round-robin, and remove/retire _get_next_simplification_provider.
- Or make
_get_next_simplification_provider() return a fixed 'anthropic' (leaves less dead code behind — prefer removing it).
Acceptance criteria
- On-demand simplification deterministically uses Anthropic Haiku (verify via logs /
result['provider']).
- Batch crawl still uses DeepSeek.
- Round-robin counter and helper removed (no dead code).
- DeepSeek fallback-on-failure behavior preserved.
Notes
- The related grammar-correction experiment is already parked (
correct_grammar=False by default, ran 2025-12-09 → 2026-04-05) — out of scope here, but confirm it stays disabled.
- Context: this cleanup also sharpens a production example in the "LLM integration patterns" paper (live=Anthropic / batch=DeepSeek as a clean latency-tiered split).
Why
The provider A/B experiment (round-robin between DeepSeek and Anthropic for article simplification, to compare error rates) has run long enough. Deactivate it and pin providers deliberately.
Current behavior
zeeguu/core/llm_services/simplification_and_classification.py:_get_next_simplification_provider()(~L27) alternates'deepseek'/'anthropic'on a module-level counter.simplify_article_adaptive_levels()(~L79) only when the caller passes nosimplification_provider(~L122-127).zeeguu/operations/crawler/crawl.py:148crawl_round_robin(..., simplification_provider='deepseek')— so batch never round-robins.simplify_article_adaptive_levels(title, content, language_code)at ~L454 (creating a simplified level when a reader needs it), which passes no provider.Change
Stop the on-demand path from alternating; pin it to Anthropic (Haiku), matching
models.pySIMPLIFICATION = ANTHROPIC_HAIKU("real-time Haiku key path"). Net result:Minimal options (pick one):
simplify_article_adaptive_levelssosimplification_providerdefaults to'anthropic'instead of round-robin, and remove/retire_get_next_simplification_provider._get_next_simplification_provider()return a fixed'anthropic'(leaves less dead code behind — prefer removing it).Acceptance criteria
result['provider']).Notes
correct_grammar=Falseby default, ran 2025-12-09 → 2026-04-05) — out of scope here, but confirm it stays disabled.