Skip to content

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Task.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions