Upgrade AI SDK providers, zod 4, TypeScript 7; fix empty Gemini typing - #19
Merged
Merged
Conversation
jkudish
added a commit
that referenced
this pull request
Sep 25, 2026
AI SDK 7 provider packages + Gemini Flash typing fix via #19, zod 4 + TS 7 internals, dependency updates, agent skill in package. Amp-Thread-ID: https://ampcode.com/threads/T-01a0d53e-c271-716f-94dd-6df00c40c7b8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the major dependencies current and fixes empty Gemini typing.
AI SDK providers 2.x → 4.x (
openai-compatible1.x → 3.x).ai@7was already installed, but the old providers implement model spec v2, so every typing call ran through ai@7's compatibility shim (with a warning on stderr). The v4 providers remove the shim and the HIGH undici advisory that came in throughprovider-utils@3;npm audit --omit=devis now clean. The exact@ai-sdk/googlepin becomes a caret range. A unit test asserts every typing provider builds a native spec-v4 model.zod 3 → 4. No source changes. Contract differences, reviewed and accepted:
additionalProperties: false(the MCP SDK converts zod 4 in input mode). Runtime still strips unknown keys.start_urlis trimmed and has tabs/newlines removed by.url()before validation (same normalizationnew URL()applies)..int()fields reject integers beyond 2^53−1.TypeScript 7.
"types": ["node"]in tsconfig; emit is byte-identical to 5.9 except sourcemaps.Fix: Gemini typing returned empty text. Gemini 2.5 Flash spent the 48-token cap on hidden thinking (reproduced on both provider versions). Google now gets a 256-token cap, and Flash models get
reasoning: "none"(thinking budget 0 on 2.5, minimum level on 3+). Pro and pre-2.5 models keep default thinking because they reject those settings. README updated.Verified: clean
npm ci, typecheck, build, unit tests (73/73), live e2e (39/39) against TypeSafe and OpenRouter typing, a full navigation with Gemini typing (searched "Ristretto" via google), and live typing on gemini-2.5-flash, 2.5-flash-lite, 3-flash-preview, and 3.1-pro-preview. The OpenAI provider is covered by mocked request tests only (no valid key in the test environment).