Skip to content
Source
Sign inSign up
TanStack/ai

feat(schemas): @tanstack/ai-schemas with nightly OpenAPI sync (closes #619) #622

Closedtombeckenhamwants to merge 7 commits intomain from619-create-schemas-libraryopened View on GitHub

Showing 229 changed files with 178 additions and 0 deletions (loading 171).

x
0 of 229 viewed, 229 left
19 additions and 0 deletions.changeset/initial-ai-schemas.mdAdded
View file
@@ -0,0 +1,19 @@
+---
+'@tanstack/ai-schemas': minor
+---
+​
+Initial release of `@tanstack/ai-schemas` — JSON Schema and Zod schemas for AI provider generation endpoints, generated nightly from upstream OpenAPI specs.
+​
+Covers OpenAI, Anthropic, Gemini, ElevenLabs, xAI Grok, OpenRouter, and FAL. Endpoints are grouped per provider by activity — `chat`, `image`, `video`, `audio` (TTS, transcription, music, sound effects in one group), `embeddings`, `moderation` — behind `@tanstack/ai-schemas/{provider}/{activity}/{json-schema,zod}` subpaths. Platform/admin endpoints are excluded from generation. Architecture ported from fal-ai/fal-js PR #212; extended to every provider that publishes an OpenAPI spec.
+​
+Sources:
+​
+- OpenAI: `github.com/openai/openai-openapi`
+- Anthropic: Stainless OpenAPI resolved via `anthropic-sdk-typescript/.stats.yml`
+- Gemini: Google Generative Language Discovery doc, converted to OpenAPI in-pipeline
+- ElevenLabs: `api.elevenlabs.io/openapi.json`
+- xAI Grok: `docs.x.ai/openapi.json`
+- OpenRouter: `openrouter.ai/openapi.json` + `api/v1/videos/models` metadata (per-video-model constrained schemas)
+- FAL: per-model OpenAPI from the FAL models API (requires `FAL_KEY`)
+​
+The `.github/workflows/sync-schemas.yml` workflow runs daily and opens a PR when any provider's spec changes. Resolves #619.
108 additions and 0 deletions.github/workflows/sync-schemas.ymlAdded
View file
@@ -0,0 +1,108 @@
+name: Sync Provider Schemas
+​
+on:
+ schedule:
+ # 05:00 UTC daily — one hour before sync-models.yml so the two automated
+ # PRs don't contend on the changeset / branch push at the same minute.
+ - cron: '0 5 * * *'
+ workflow_dispatch: