Skip to content

docs: provider-count single source of truth, RFC status sweep, adding-a-provider checklist - #193

Merged
eric8810 merged 1 commit into
masterfrom
docs/consistency-172-173-177-182
Sep 26, 2026
Merged

eric8810 merged 1 commit into
masterfrom
docs/consistency-172-173-177-182

Conversation

@eric8810

Copy link
Copy Markdown
Contributor

Bundles the four documentation-consistency issues from the #166 docs track into one PR (per maintainer decision; each is still individually closable).

#182 — RFC status lines

Verified every status against the code before writing it:

  • 0016 / 0020 / 0021 / 0022: DRAFT → IMPLEMENTED with landing PR refs. Beyond the issue's list, 0020 (external provider config) had also landed (feat(providers): external provider config overlay (RFC-0020) #97: register_provider runtime overlay + FFI/Node/Python passthrough) — the sweep missed it. 0016's §7.2 had four stale open items (M6 proxy / M7 aggregation / M11 stream aggregation / M12 generateObject, all landed via feat(core): M11 streamText aggregation + M12 generateObject + M6 proxy + rawFinishReason #99) — struck through with evidence pointers.
  • 0005-rename: "pending execution" → EXECUTED (repo/crates/FFI all renamed; the RFC's own body was bulk-replaced, which is why some of its prose reads tautologically — noted in the status line).
  • Missing status lines added: 0002 (IMPLEMENTED), 0003 (IMPLEMENTED, in force), 0004 (SUPERSEDED — snapshot, source of truth is the registry), 0005-protocol (ACCEPTED — the "no cross-protocol conversion" decision record), 0027-coverage (IMPLEMENTED, baseline snapshot).
  • Bonus: the RFC-0031 links in 0009/0016 were broken (the RFC lives at docs/ai-sdk-request-pipeline.md, not rfc/) — fixed.

#177 — one source of truth for the provider count

The count was wrong in both directions: README said 329 in two places and 325 in two others; PROJECT-OVERVIEW/API/reference/CONTRIBUTING carried more stale copies.

  • Fixed the counting source first: gen_providers_doc.py previously subtracted a hand-kept list of 2 machinery modules, so replay and catalogue were counted as providers. A module now counts iff it re-exports a typed surface (*Provider / *Config / *Model) — all four machinery modules drop out without a deny-list.
  • True numbers: 251 registry + 76 typed = 327. The generator emits a Totals table into providers.md (registry rows, per-category typed providers, grand total; section titles truncated to first sentence for the table).
  • Every living doc now references the page instead of repeating a number; README states the total once with a date and a link (tagline number now links to the page; the badge is the only other repetition, explicitly acknowledged). The two hand-maintained "coverage" tables (README / PROJECT-OVERVIEW) used groupings that can't be kept in sync with the generator's categories and were replaced with pointers + example lists. Historical snapshots under docs/internal/ and docs/quality-audit/ keep their numbers untouched.

#172 — gen_providers_doc.py --check in CI

  • --check mode matching the gen_provider_names.py pattern (compare generated text, STALE + exit 1 on mismatch).
  • CI step added in the contract-tests job right next to the existing ProviderName drift check.
  • docs/api/providers.md regenerated once so the first run is green (verified locally: --check passes, gen_provider_names.py --check still green, ci.yml parses).

#173 — adding-a-provider checklist

New docs/contributing/adding-a-provider.md, written against the current repo mechanics (all commands and paths verified):

  • Case 1 registry row: JSON row shape (incl. the real profile flags), both generators, cassette derivation via generate_thin_wrapper_cassettes.py (real OpenAI recordings, not fake data), roadmap note that Tracking: code reduction roadmap (providers, FFI, bindings, docs) #166 B2 replaces this with registry-iterating conformance.
  • Case 2 new protocol: module layout, the section-comment → doc-category coupling in lib.rs, cassettes + conformance module, and the explicit warning that protocol providers are not name-addressable until Tracking: code reduction roadmap (providers, FFI, bindings, docs) #166 B1.
  • Case 3 single modality: the Config/Provider-shell/one-modality-model pattern with serper.rs / lmnt.rs as references.
  • The generator rule (do-not-edit header + CI --check), the provider-count rule, and the retirement conditions of every remaining scripts/ tool per Tracking: code reduction roadmap (providers, FFI, bindings, docs) #166.
  • Linked from README (docs table) and CONTRIBUTING.md's existing "Adding a provider" section; CONTRIBUTING's stale "325" fixed too.

Verification

  • python3 scripts/gen_providers_doc.py --check ✅ (and --check for gen_provider_names.py unchanged ✅)
  • ci.yml valid YAML; new step mirrors the existing one
  • All added relative links resolve (incl. the provider_registry.json path and the #totals anchors)
  • No provider-count literals remain in any living doc (grep-verified; badge + one dated README statement excepted)

…-a-provider checklist

- gen_providers_doc.py: count provider modules by exported typed surface
  (*Provider/*Config/*Model), which excludes the provider/provider_name/
  replay/catalogue machinery without a hand-kept list; emit a Totals table
  (registry rows, per-category typed providers, grand total) into
  providers.md; add --check for CI (next to gen_provider_names.py --check)
- True counts: 251 registry + 76 typed = 327 (README said both 329 and 325;
  PROJECT-OVERVIEW/API/reference/CONTRIBUTING carried stale numbers too) —
  every living doc now references providers.md instead of repeating a
  number; README states the total once with a date and a link
- RFC status sweep: 0016/0020/0021/0022 DRAFT -> IMPLEMENTED (with landing
  PR refs; 0016 §7.2 M6/M7/M11/M12 struck through, landed via #99);
  0005-rename 'pending execution' -> EXECUTED; missing status lines added to
  0002/0003/0004/0005-protocol/0027-coverage; broken RFC-0031 links in
  0009/0016 fixed (the RFC lives in docs/ai-sdk-request-pipeline.md)
- New docs/contributing/adding-a-provider.md: the three-case checklist
  (registry row / new protocol / single modality), the generator rule and
  script retirement conditions; linked from README and CONTRIBUTING

Closes #172, closes #173, closes #177, closes #182
@eric8810
eric8810 merged commit a6ac87e into master Sep 26, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant