Skip to content

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

Closed

Description

@inference-gateway-maintainer

Context

Follow-up to #345 (which added NVIDIA to rust-adk.md by hand) and the generator work in #339.

Onboarding a provider today is a single task generate for the gateway pages (supported-providers.md, configuration.md), but the two ADK pages carry a hand-maintained "Switching providers and models" table that the generator never touches:

  • rust-adk.md:213
  • typescript-adk.md:1092

Because they are hand-authored, they drift:

  • typescript-adk.md predates NVIDIA, MiniMax, and Moonshot - none appear in its table.
  • The NVIDIA row added by hand in docs(rust-adk): add NVIDIA provider to Rust ADK docs #345 renders Nvidia, while the generated gateway docs render NVIDIA (from the displayName override). Same provider, two spellings.

Goal: onboarding a provider should be schema + scripts/provider-overrides.json + task generate, with zero hand-editing of the ADK tables.

The table to generate

Both ADK pages share the same 4-column shape:

Column Source
Provider displayName override (this also fixes the Nvidia -> NVIDIA casing divergence)
A2A_AGENT_CLIENT_PROVIDER provider id from the schema Provider enum
Example A2A_AGENT_CLIENT_MODEL display-only, NOT modeled in the schema -> new field in provider-overrides.json
API key env var {ENVUPPER}_API_KEY, with the auth_type: none (Ollama) row rendered as its "none (...)" note

Tasks

  • Add a display-only field (e.g. adkExampleModel) per provider to scripts/provider-overrides.json. Backfill from the current tables (gpt-5-mini, claude-opus-4-8, nvidia/meta/llama-3.1-8b-instruct, ...). Providers absent from today's ADK tables (ollama_cloud, minimax, moonshot) need an example chosen.
  • Add a renderAdkProviderTable(providers) renderer in scripts/generate-provider-docs.mjs, following the padded-markdown-table pattern already used by renderProvidersTable.
  • Add <!-- GENERATED:adk-provider-table START/END (do not edit - run: task generate) --> markers around the table in both rust-adk.md and typescript-adk.md, and wire two new updateFile(...) calls in main().
  • Handle the auth_type: none (local Ollama) row: its API-key cell is none (set A2A_AGENT_CLIENT_BASE_URL to your Ollama), not a *_API_KEY. Decide whether to derive that from the auth type or carry it as an override field (e.g. adkKeyNote).
  • Extend the fixture test (scripts/generate-provider-docs.test.mjs) with an adk-provider-table case asserting a byte-for-byte match against both committed files (mirrors the existing five region tests).
  • Update the GENERATED_FILES var in Taskfile.yml (line 6) to add rust-adk.md typescript-adk.md, so both the prettier --write step and the generate:check drift guard cover the new files.
  • Update CLAUDE.md: the generator now manages four files / seven regions (add adk-provider-table in each ADK page), not "two files / five regions".

Design decisions to settle

  1. Row order. The canonical order in provider-overrides.json (openai, deepseek, anthropic, cohere, groq, cloudflare, ollama, ollama_cloud, google, mistral, minimax, moonshot, nvidia) differs from the current curated ADK order (OpenAI, Anthropic, Groq, DeepSeek, ...). Generating adopts the canonical order - a visible but harmless reordering. Recommend accepting it for consistency with the other generated regions.
  2. Display name for Ollama. The tables say "Local Ollama"; the displayName override is "Ollama". Either accept "Ollama" or add an ADK-specific label override.
  3. New providers now appear in both tables. ollama_cloud, minimax, moonshot (and nvidia in the TS page) will render for the first time. That is the intended anti-drift outcome, but it is where the TS table visibly grows.
  4. Per-provider prose stays hand-authored. The NVIDIA paragraph under the rust-adk.md table is editorial, not tabular - leave it (and any future per-provider note) outside the markers. Only the table is generated.

Acceptance criteria

  • task generate rewrites both ADK tables; on a clean tree task generate:check passes (no drift).
  • bun test covers the new region for both ADK files.
  • Adding a hypothetical provider to the schema + overrides, then running task generate, updates supported-providers.md, configuration.md, rust-adk.md, and typescript-adk.md in one shot - no hand edits.

Out of scope

  • The illustrative (e.g. openai, nvidia, ollama, groq) hint in the env-var reference table (rust-adk.md:971) - it is a non-exhaustive example, not a full enumeration, so it does not need generating.

Activity

  1. edenreich commented on Jul 6, 2026

    @edenreich
    Contributor

    @claude Can you work on this?

  2. added theissue type on Jul 6, 2026
  3. changed the issue type fromtoon Jul 6, 2026
  4. moved this to Todo in 2026on Jul 6, 2026
  5. inference-gateway-maintainer commented on Jul 6, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Claude finished @edenreich's task in 13m 12s —— View job • docs/issue-346-20260706-0856 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-346-20260706-0856?quick_pull=1&title=Issue%20%23346%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%23346%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Done - ADK provider tables are now schema-generated

    Opened PR #347. The "Switching providers and models" table is now a generated region in both ADK pages, so onboarding a provider is schema + scripts/provider-overrides.json + task generate with no hand-editing.

    Completed

    • Add issue to Roadmap board (In progress -> QA)
    • Add adkExampleModel + adkKeyNote per provider to scripts/provider-overrides.json
    • Add renderAdkProviderTable(providers) + validation + two updateFile calls in scripts/generate-provider-docs.mjs
    • Wrap the typescript-adk.md table in GENERATED:adk-provider-table markers
    • Add a generated "Switching providers and models" table + markers to rust-adk.md
    • Extend scripts/generate-provider-docs.test.mjs with an adk-provider-table case for both files
    • Update GENERATED_FILES in Taskfile.yml
    • Update CLAUDE.md (four files / seven regions) - also AGENTS.md + README.md for accuracy
    • Verify: bun test, lint:md, prettier --check, build, and generator idempotency

    Design decisions settled (per the issue)

    1. Row order: canonical override order adopted (harmless reorder of the TS table).
    2. Ollama display name: renders Ollama from the shared displayName override (was Local Ollama) - no ADK-specific label added.
    3. New rows now appear: Ollama Cloud, MiniMax, Moonshot (+ NVIDIA in the TS page). NVIDIA now renders NVIDIA in both places, fixing the Nvidia/NVIDIA split.
    4. auth_type: none: carried as an adkKeyNote override on ollama (validated as required for keyless providers), rendering none (set A2A_AGENT_CLIENT_BASE_URL to your Ollama).
    5. Prose stays hand-authored: only the table sits inside the markers.

    Heads-up on repo state

    The current rust-adk.md had no provider table - it was dropped in the 0.8.0 docs refresh, so the issue's rust-adk.md:213 reference and its editorial NVIDIA paragraph were stale. I re-added the section as a generated region (with a short Rust-flavored intro/closing) to meet the acceptance criteria that task generate update all four files. Worth a glance in review to confirm the placement (under Quick start, after the AI-powered server example) reads well.

    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 idempotent; supported-providers.md / configuration.md unchanged by the override additions
    • branch docs/issue-346-20260706-0856 - PR #347
  6. moved this from Todo to In progress in 2026on Jul 6, 2026
  7. added a commit that references this issue on Jul 6, 2026
    a49e020
  8. moved this from In progress to QA in 2026on Jul 6, 2026
  9. moved this from QA to Done in 2026on Jul 6, 2026
  10. inference-gateway-releaser commented on Jul 9, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    released

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions