feat(ai-gateway): support TypeSafe System One via OpenRouter - #6634
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental commit Files Reviewed (2 files)
Previous Review Summaries (3 snapshots, latest commit cabfd2f)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit cabfd2f)Status: No Issues Found | Recommendation: Merge Executive SummaryThe review-fix commit Files Reviewed (2 files)
Previous review (commit eed8fd2)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe TypeSafe System One handler was extracted into Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (5 files)
Fix these issues in Kilo Cloud Previous review (commit 48b9dff)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (8 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
Summary
/api/gateway/typesafe/v1/systemone, forwarding to OpenRouter/api/v1/systemonewith the platform credential.typesafe/jev-1.13(also accepting the barejev-1.13SDK model ID); omitted HTTP models default to that pinned version. No user BYOK, additional providers, or model/metadata endpoint.@typesafe-ai/sdk, preserve gateway authentication, rate limits, balance checks and organization policy, and bill upstreamusage.costthrough the existing microdollar writer.SDK usage
Validation
This PR was created and assigned to @chrarnoldus before running tests, as requested.
pnpm --filter web exec tsgo --noEmit --checkers 1, after the tRPC declaration build), changed-file oxlint, formatting, andgit diff --check.@typesafe-ai/sdk@0.6.0-> local Next.js gateway -> OpenRouter -> Jev -> local PostgreSQL billing, without mocks. Returnedtypesafe/jev-1.13-20260917, answerbilling, 311 input tokens and 38 output tokens. Upstream cost$0.000013062persisted as 13 microdollars, with the same generation ID andapi_kind=systemone; the local user usage counter increased from 0 to 13.The local E2E required starting Docker Desktop and a process-only default for the unrelated missing
NEXT_PUBLIC_WASTELAND_URL. The repositorytest:dbscript currently fails on unsupportedpnpm -s; its equivalent infra setup and migrations were run successfully as separate commands. No unrelated tracked tooling or configuration was changed. Temporary Next.js servers were stopped. Full repository validation was not run.