Repository navigation
Description
Summary
Adding a provider to the gateway currently means hand-editing several docs pages that all restate the same facts already encoded in the canonical openapi.yaml (inference-gateway/schemas). This is a request to add a task generate step to this repo that regenerates the provider-derived sections from that schema, so onboarding a new provider becomes task generate + review instead of N manual edits kept in sync by hand.
Follow-up from PR #338 (NVIDIA) and #332 (MiniMax): each was a purely mechanical restatement of provider data that already lives in the schema.
Source of truth
inference-gateway/schemas/openapi.yaml already models every provider under components.schemas.Provider:
enum- the canonical provider id list (openai,anthropic, ...minimax,nvidia).x-provider-configs.<id>- per-provider config carrying everything the docs restate:url- default API base URLauth_type-bearer|xheader|nonesupports_vision- booleanendpoints- models/chat method + path
What is derivable today (and where it is hand-maintained)
| Schema field | Docs location (hand-maintained today) |
|---|---|
enum id + display name |
supported-providers.md Available Providers table; the uppercase PROVIDER list; per-provider example headings |
auth_type |
supported-providers.md "Auth" column (bearer -> Bearer Token, xheader -> X-Header, none -> Optional API key) |
url |
supported-providers.md "Default URL" column; configuration.md *_API_URL defaults in the <script setup> block |
supports_vision |
supported-providers.md "Vision Support" column + "Providers with Vision Support" list |
| id -> env vars | configuration.md *_API_URL / *_API_KEY rows |
| id -> action input | github-action.md <provider>-api-key Inputs rows |
Adding one provider today touches all three pages; drift between them is easy and invisible.
Proposed approach
- Add a
Taskfile.ymlto this repo with ageneratetask (there is none today). task generatefetches the canonicalopenapi.yamlpinned to a schema commit/tag, then renders the provider-derived sections. The ADKs already follow this pattern - seetypescript-adk.md: generated types are "regenerated viapnpm generate:typesand pinned to a specific schema commit."- Prefer injecting into marked regions (e.g.
<!-- BEGIN GENERATED: providers -->/<!-- END GENERATED -->) rather than owning whole pages, since these pages are mostly hand-authored prose.configuration.mdalready isolates its table data in a top-of-file<script setup>const, a natural generation target. - Wire a drift check into CI. The org already has an
sdk-driftlabel ("Drift detected against canonical OpenAPI schema"); the same idea here would fail the build when a schema change outdates the docs instead of letting them silently rot.
Not in the schema (stays hand-authored, or needs a schema extension)
- Per-provider vision model lists ("Nemotron, Llama, DeepSeek, ...") and the example
modelids in curl snippets. - Prose notes (e.g. the Google
/v1beta/openainote, the NVIDIA-vs-Groq note). - Display-name / casing map: enum ids are lowercase/snake (
nvidia,minimax,ollama_cloud) but the docs renderNVIDIA,MiniMax,Ollama Cloud- a small override map is needed. - The
github-action.md*-api-keyinputs are owned byinference-gateway/infer-action, not the schema; generating that row assumes the upstream input exists (the exact dependency that blocked [DOCS] Document nvidia-api-key input in github-action.md once infer-action supports it #329).
Acceptance criteria
task generateregenerates the provider table(s), the*_API_URL/*_API_KEYrows, and the*-api-keyaction-input rows from the pinned canonicalopenapi.yaml.- Running it after a provider is added to the schema produces the same edits a human would have made by hand.
- CI flags drift between the committed docs and the schema.
Affected pages: supported-providers.md, configuration.md, github-action.md. Related: PR #338, #332, #329, #337; schema source inference-gateway/schemas/openapi.yaml.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Jul 5, 2026
@claude Can you implement it?