chore(ai-openrouter): upgrade @openrouter/sdk from 0.13.20 to 1.x

Aperta
#1,610 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@AlemTuzlak ci sta già lavorando.

Dal 3/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start with the SDK 1.0 changelog and the dependency entries in packages/ai-openrouter/package.json and testing/e2e/package.json. Inspect the listed text, responses, image, video, HTTPClient, model-type, and provider-sync entry points, then run the e2e suite. Done means the SDK is upgraded, affected adapters and hooks still work, and the @tanstack/ai-openrouter changeset is included.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

waiting-on: maintainer

What

@openrouter/sdk is pinned at 0.13.20. The latest release is 1.4.21 (published 2026-10-02), one major version ahead.

Pinned in:

  • packages/ai-openrouter/package.json
  • testing/e2e/package.json

Why

  • We are a full major version behind the SDK that @tanstack/ai-openrouter wraps.
  • New OpenRouter API fields and endpoints only reach the adapter through the SDK's generated types.
  • The longer the gap, the larger the eventual migration.

Scope

The SDK is the core dependency of every OpenRouter adapter, so the upgrade touches all of them:

  • Text (chat completions): createOpenRouterText
  • Responses (beta): createOpenRouterResponsesText
  • Image
  • Video: videoGeneration.generate / getGeneration / getVideoContent
  • HTTPClient hooks used by the e2e suite to inject X-Test-Id (testing/e2e/src/lib/providers.ts)
  • Type imports from @openrouter/sdk/models (for example VideoGenerationRequest, ContentPartImage)
  • scripts/sync-provider-models.ts, if it reads SDK types
  • Changeset for @tanstack/ai-openrouter

Notes

  • Review the SDK's 1.0 changelog for breaking changes before starting.
  • Video job creation: both 0.13.20 and 1.4.21 accept only HTTP 202 from POST /api/v1/videos. @copilotkit/aimock 1.43 answers 200, so its built-in OpenRouter video mock fails with the real SDK on either version. The upgrade does not fix that. It needs a fix in aimock or a custom mount in the e2e suite.
  • Found while working on #539 / #1541.
Lingua principale
TypeScript
Stelle
3.3k
Fork
378
Merge medio
1g 2h
PR unite (30g)
219

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/ai

Tutte le issue di TanStack/ai

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.