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

Đang mở
#1,610 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@AlemTuzlak đang làm issue này rồi.

Từ ngày 3/10/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
3.3k
Fork
378
Merge trung bình
1 ngày 1 phút
Pull request đã merge (30 ngày)
208

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/ai

Tất cả issue của TanStack/ai

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.