What's Fixed
A full-codebase review by two independent models (Claude /code-review + OpenAI Codex) confirmed 25 defects; this release fixes 23 of them. No new features — correctness, billing accuracy, and robustness only.
Billing / cost accounting
- Corrected model pricing table (Haiku 4.5: $1/$5, Opus 4.6: $5/$25 per MTok)
- Prompt-cache write/read tokens now counted in cost tracking (1.25x / 0.1x input rate)
- Budget is enforced before Batch API submission and before LLM critique
--max-cardsnow applies to Batch API results--quality basic(the default) no longer silently runs the paid LLM critique
Correctness / data loss
- Explicit model choices from config.yaml,
PDF2ANKI_MODEL, and the Web UI are honored over automatic routing - Extraction cache key includes OCR settings (no more stale non-OCR cache hits)
- Cards containing code fences no longer break JSON parsing
- One malformed LLM response no longer discards the whole file's cards (and its cost is still recorded)
- Fixed an invalid PyMuPDF call that silently dropped every oversized image in
--visionmode - Partial Batch API failures are now surfaced instead of silently losing sections
- Reversible cards push with the real Anki note type
Basic (and reversed card) - TSV output carries a notetype column so mixed Basic/Cloze files import correctly
Robustness / UX
- TUI review no longer skips cards when accepting under a status filter
- CLI survives batch timeouts, non-retryable API errors, and
--pushfailures per file - Malformed AnkiConnect responses raise a proper error instead of crashing
- Atomic cache writes; Web UI temp cleanup no longer deletes live instances' files
- Single retry policy (SDK + app-level retries no longer stack to ~9 attempts)
- Markdown splitting ignores
#comments inside code fences
Tests: 714 passed (20 new regression tests), mypy clean, coverage 92.6%
Full diff: v0.3.0...v0.3.1