Skip to content

feat: generate ADK provider tables from the schema - #347

Merged
edenreich merged 1 commit into
mainfrom
docs/issue-346-20260706-0856
Jul 6, 2026
Merged

edenreich merged 1 commit into
mainfrom
docs/issue-346-20260706-0856

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Summary

Converts the hand-maintained "Switching providers and models" tables in the ADK docs into a generated region driven by the canonical schema + scripts/provider-overrides.json. Onboarding a provider is now schema + overrides + task generate with zero hand-editing of the ADK tables - closing the drift gap called out in the issue (the Nvidia vs NVIDIA casing split, and the TS table predating NVIDIA/MiniMax/Moonshot/Ollama Cloud).

The generator now manages four files / seven regions: the new adk-provider-table region appears once in each of rust-adk.md and typescript-adk.md, alongside the existing five gateway regions.

Changes

  • scripts/provider-overrides.json: new display-only adkExampleModel per provider (backfilled from the current tables; chose gpt-oss:120b, MiniMax-M3, kimi-latest for the previously-absent Ollama Cloud / MiniMax / Moonshot), plus adkKeyNote on ollama for the keyless API-key cell.
  • scripts/generate-provider-docs.mjs: renderAdkProviderTable() (mirrors renderProvidersTable's padded-table pattern), validation that every provider has adkExampleModel and that auth_type: none providers carry adkKeyNote, and two new updateFile() calls in main().
  • typescript-adk.md: existing table wrapped in GENERATED:adk-provider-table markers and regenerated (canonical order; now includes all 13 providers).
  • rust-adk.md: adds a Switching providers and models section with the generated table. This table was dropped from the page in the 0.8.0 docs refresh, so the issue's rust-adk.md:213 reference was stale; it is re-added as a generated region to meet the acceptance criteria.
  • scripts/generate-provider-docs.test.mjs: new adk-provider-table cases asserting a byte-for-byte match against both files.
  • Taskfile.yml: GENERATED_FILES now covers both ADK files, so prettier --write and the generate:check drift guard include them.
  • CLAUDE.md / AGENTS.md / README.md: updated to describe four files / seven regions.

Design decisions (per the issue)

  1. Row order: adopts the canonical override order for consistency with the other generated regions (a harmless reordering of the TS table).
  2. Ollama display name: renders Ollama from the shared displayName override (was Local Ollama) - no ADK-specific label override added.
  3. New providers (Ollama Cloud, MiniMax, Moonshot, and NVIDIA in the TS page) now render in both tables - the intended anti-drift outcome.
  4. Per-provider prose stays hand-authored: only the table sits inside the markers; the intro/closing sentences are untouched.

Verification

  • bun test - 8 pass (6 existing + 2 new ADK cases)
  • bun run lint:md - clean
  • bunx prettier --check . - clean (generator output is prettier-stable)
  • bun run build - VitePress build succeeds
  • Generator is idempotent (re-running yields no drift); supported-providers.md / configuration.md are unchanged by the override additions.

Closes #346

Convert the hand-maintained "Switching providers and models" tables in
the ADK docs into a generated region, so onboarding a provider is schema
+ scripts/provider-overrides.json + `task generate` with no hand edits.

- add adkExampleModel (+ adkKeyNote for the auth_type: none Ollama row)
  per provider to provider-overrides.json
- add renderAdkProviderTable and wire rust-adk.md + typescript-adk.md
  into main(), following the padded-table pattern of renderProvidersTable
- wrap both tables in GENERATED:adk-provider-table markers; add the
  section to rust-adk.md (dropped in the 0.8.0 refresh) and expand the
  typescript-adk.md table to the full canonical provider set
- extend the fixture test with an adk-provider-table case for both files
- add both files to GENERATED_FILES in Taskfile.yml
- update CLAUDE.md/AGENTS.md/README.md (four files / seven regions)

Closes #346
@inference-gateway-maintainer
inference-gateway-maintainer Bot requested a review from a team as a code owner July 6, 2026 09:08
@edenreich
edenreich merged commit aece944 into main Jul 6, 2026
1 check passed
@edenreich
edenreich deleted the docs/issue-346-20260706-0856 branch July 6, 2026 09:56
inference-gateway-maintainer Bot added a commit that referenced this pull request Jul 6, 2026
The main-into-branch merge left rust-adk.md with two
"Switching providers and models" sections: the branch's
(under AgentBuilder) and main's #347 canonical one (after the
minimal server). Because they sat at non-overlapping lines git
auto-merged both with no conflict marker, so the manual
resolution never saw it, and the regression test only checks
the first GENERATED region so it stayed green. Keep main's
canonical section (parallel with typescript-adk.md, table in
sync with the overrides) and drop the duplicate, preserving the
requested NVIDIA note (trimmed to avoid repeating the base-URL
guidance already above it).
edenreich added a commit that referenced this pull request Jul 6, 2026
* docs(rust-adk): add nvidia to provider switching table

* Apply suggestions from code review

Co-authored-by: Eden Reich <[email protected]>

* docs(adk): generate provider tables from openapi schema

Bring the "Switching providers and models" tables in rust-adk.md and
typescript-adk.md under the provider-docs generator, so onboarding a
provider is schema + provider-overrides.json + `task generate` with no
hand-editing.

- add renderAdkProviderTable + adk-provider-table markers in both pages
- add display-only adkExampleModel field per provider in the overrides
- add both files to GENERATED_FILES and extend the fixture test (8 pass)

This expands both tables to the full canonical provider set (adds Ollama
Cloud, MiniMax, Moonshot) and normalizes casing via the schema overrides
(Nvidia -> NVIDIA, Local Ollama -> Ollama).

* fix: drop duplicate renderAdkProviderTable from merge

The main-into-branch merge kept both parents' copies of
renderAdkProviderTable (a duplicate export - illegal ESM that
bun happens to tolerate, with the second definition silently
winning). Collapse to one function that keeps main's adkKeyNote
handling and reuses the shared formatTable helper. Output is
byte-identical, so the committed ADK tables are unchanged and
all 8 generator tests still pass.

* fix: remove duplicate provider table section in rust-adk

The main-into-branch merge left rust-adk.md with two
"Switching providers and models" sections: the branch's
(under AgentBuilder) and main's #347 canonical one (after the
minimal server). Because they sat at non-overlapping lines git
auto-merged both with no conflict marker, so the manual
resolution never saw it, and the regression test only checks
the first GENERATED region so it stayed green. Keep main's
canonical section (parallel with typescript-adk.md, table in
sync with the overrides) and drop the duplicate, preserving the
requested NVIDIA note (trimmed to avoid repeating the base-URL
guidance already above it).

* fix: fail generation on duplicate GENERATED markers

injectRegion used findIndex, so a file with two same-key
GENERATED regions (as this merge produced in rust-adk.md) would
have only its first region rewritten and the stale duplicate
left in place - an empty diff that task generate:check reports
as clean. Count the markers and throw when a key has more than
one region, turning that silent merge trap into a hard failure.
Export injectRegion and cover both paths in the regression
tests (now 10).

* ci: add drift detection for docs

---------

Co-authored-by: inference-gateway-maintainer[bot] <246577062+inference-gateway-maintainer[bot]@users.noreply.github.com>
Co-authored-by: Eden Reich <[email protected]>
inference-gateway-releaser Bot added a commit that referenced this pull request Jul 9, 2026
## [0.9.0](0.8.0...0.9.0) (2026-07-09)

### ✨ Features

* generate ADK provider tables from the schema ([#347](#347)) ([aece944](aece944)), closes [#346](#346)

### 👷 CI

* **claude:** centralize claude.yml via reusable workflow ([#372](#372)) ([9a41158](9a41158))
* **infer:** centralize infer.yml via reusable workflow ([#367](#367)) ([47d5fb2](47d5fb2))
* **infer:** centralize infer.yml via reusable workflow ([#368](#368)) ([305d621](305d621))

### 📚 Documentation

* add Wait tool documentation to CLI reference ([#371](#371)) ([8018c50](8018c50)), references [inference-gateway/cli#792](inference-gateway/cli#792)
* add Z-AI provider documentation ([#363](#363)) ([3c3db53](3c3db53))
* document agent.skills.max_chars, line-boundary truncation, and date-only system prompt ([#359](#359)) ([73d49b5](73d49b5))
* document infer chat --session-id flag ([#351](#351)) ([d6b3cf6](d6b3cf6))
* document infer-action system prompt override semantics ([#357](#357)) ([58c8bc4](58c8bc4))
* **github-action:** add zai-api-key input to the inputs table ([#366](#366)) ([a129831](a129831))
* remove Claude Code subscription mode documentation ([#374](#374)) ([442a9fa](442a9fa)), references [inference-gateway/cli#812](inference-gateway/cli#812)
* **rust-adk:** add NVIDIA provider to Rust ADK docs ([#345](#345)) ([a329e43](a329e43)), references [#347](#347)
* update memory documentation for per-project fact organization and entry caps ([#350](#350)) ([8dca0cd](8dca0cd)), closes [#348](#348)

### 🔧 Miscellaneous

* **deps:** bump claude-code 2.1.197 -> 2.1.201 ([#353](#353)) ([5f714de](5f714de))
* **deps:** bump claude-code-action v1.0.165 -> v1.0.169 ([#370](#370)) ([293e9b8](293e9b8))
* **deps:** bump infer CLI v0.130.1 -> v0.133.0, infer-action v0.24.0 -> v0.26.0 ([#354](#354)) ([824a288](824a288))
* **deps:** bump infer CLI v0.133.0 -> v0.133.1, infer-action v0.27.0 -> v0.27.1 ([#360](#360)) ([03ec147](03ec147))
* **deps:** bump infer CLI v0.133.1 -> v0.137.0, infer-action v0.27.1 -> v0.29.0 ([#361](#361)) ([e7bec3e](e7bec3e))
* **deps:** bump infer CLI v0.137.0 -> v0.138.0, infer-action v0.29.0 -> v0.30.1 ([#365](#365)) ([02be4c8](02be4c8))
* **deps:** bump infer CLI v0.138.0 -> v0.140.1 ([#375](#375)) ([2fd4097](2fd4097))
* **deps:** bump infer-action v0.26.0 -> v0.26.1 ([#356](#356)) ([17f74f8](17f74f8))
* **deps:** bump infer-action v0.26.1 -> v0.27.0 ([#358](#358)) ([89c944b](89c944b))
* enable debug mode in infer.yml workflow ([9e373c6](9e373c6))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Generate the ADK provider tables from the schema (task generate)

1 participant