Summary
Brand name and class names are used inconsistently:
| Where | Spelling |
|---|
README.md:1, 3 | Recost |
README.md Flask section + license | ReCost |
recost/__init__.py:1-5 docstring | ReCost |
recost/frameworks/flask.py:22 (class) | ReCost |
recost/frameworks/fastapi.py (class) | RecostMiddleware |
CLAUDE.md:19, 27 | EcoAPIHandle, EcoAPIConfig, EcoAPIMiddleware — none exist in code |
The FastAPI middleware is RecostMiddleware, the Flask extension is ReCost — different conventions for analogous classes.
Stale doc claims piled on top:
- "21+ built-in rules" in both docs; actual count is 34 rules / 14 providers (
_provider_registry.py:33 comment already says so). README.md:106 documents flush_interval: float (30.0) as a top-level option; in code, flush_interval is the deprecated seconds option that emits a DeprecationWarning. The real option is flush_interval_ms: int = 30_000. Users who follow the README pull warnings into their logs.flush_interval_ms, max_buckets, shutdown_flush_timeout_ms are missing from the README config table.
Fix
- Pick one brand spelling (recommend
Recost). - Rename
ReCost (Flask) → RecostExtension (or Recost), with a deprecation alias for one release. - Strip every
EcoAPI* reference from CLAUDE.md. - Walk the README: update provider count, swap to
flush_interval_ms as the documented option (mark flush_interval deprecated), add the missing config fields. - Add a test that asserts
len(BUILTIN_PROVIDERS) == 34 so future drift is caught.
Files
recost/frameworks/flask.pyrecost/__init__.pyREADME.mdCLAUDE.mdtests/test_provider_registry.py
Priority
P1 — the public face of the SDK is incoherent.
Summary
Brand name and class names are used inconsistently:
README.md:1, 3RecostREADME.mdFlask section + licenseReCostrecost/__init__.py:1-5docstringReCostrecost/frameworks/flask.py:22(class)ReCostrecost/frameworks/fastapi.py(class)RecostMiddlewareCLAUDE.md:19, 27EcoAPIHandle,EcoAPIConfig,EcoAPIMiddleware— none exist in codeThe FastAPI middleware is
RecostMiddleware, the Flask extension isReCost— different conventions for analogous classes.Stale doc claims piled on top:
_provider_registry.py:33comment already says so).README.md:106documentsflush_interval: float (30.0)as a top-level option; in code,flush_intervalis the deprecated seconds option that emits aDeprecationWarning. The real option isflush_interval_ms: int = 30_000. Users who follow the README pull warnings into their logs.flush_interval_ms,max_buckets,shutdown_flush_timeout_msare missing from the README config table.Fix
Recost).ReCost(Flask) →RecostExtension(orRecost), with a deprecation alias for one release.EcoAPI*reference fromCLAUDE.md.flush_interval_msas the documented option (markflush_intervaldeprecated), add the missing config fields.len(BUILTIN_PROVIDERS) == 34so future drift is caught.Files
recost/frameworks/flask.pyrecost/__init__.pyREADME.mdCLAUDE.mdtests/test_provider_registry.pyPriority
P1 — the public face of the SDK is incoherent.