Skip to content

Commit 9b6d4a9

Browse files
Merge pull request #401 from cloudflare/changeset-release/main
Version Packages
2 parents 8b16848 + 3f3fd16 commit 9b6d4a9

10 files changed

Lines changed: 25 additions & 27 deletions

File tree

.changeset/config-validation-and-model-types.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/orange-ducks-peel.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/tanstack-config-validation-and-model-types.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/tanstack-ai/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @cloudflare/tanstack-ai
22

3+
## 0.1.2
4+
5+
### Patch Changes
6+
7+
- [#406](https://github.com/cloudflare/ai/pull/406) [`9af703b`](https://github.com/cloudflare/ai/commit/9af703b93df4a6c7f4a1d10f895d488344b71425) Thanks [@vaibhavshn](https://github.com/vaibhavshn)! - Pass API Key properly for Gemini Tanstack AI Adapter
8+
9+
- [#400](https://github.com/cloudflare/ai/pull/400) [`8822603`](https://github.com/cloudflare/ai/commit/882260300ccbf78a8c40e5ce54a49d02c7ad3c8c) Thanks [@threepointone](https://github.com/threepointone)! - Add config validation to all Workers AI adapter constructors that throws a clear error when neither a binding, credentials (accountId + apiKey), nor a gateway configuration is provided. Widen all model type parameters (WorkersAiTextModel, WorkersAiImageModel, WorkersAiEmbeddingModel, WorkersAiTranscriptionModel, WorkersAiTTSModel, WorkersAiSummarizeModel) to accept arbitrary strings while preserving autocomplete for known models.
10+
311
## 0.1.1
412

513
### Patch Changes

packages/tanstack-ai/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cloudflare/tanstack-ai",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "Use TanStack AI with Cloudflare Workers AI and AI Gateway",
55
"keywords": [
66
"ai",

packages/tanstack-ai/src/adapters/gemini.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ import type { AiGatewayCredentialsConfig, AiGatewayConfig } from "../utils/creat
2222
* Includes cache control options from AiGatewayConfig.
2323
* See {@link https://github.com/googleapis/js-genai/issues/999 | googleapis/js-genai#999}.
2424
*/
25-
export type GeminiGatewayConfig = AiGatewayCredentialsConfig &
26-
AiGatewayConfig;
25+
export type GeminiGatewayConfig = AiGatewayCredentialsConfig & AiGatewayConfig;
2726

2827
/**
2928
* Build Gemini client config that routes through AI Gateway.

packages/tanstack-ai/test/gateway-adapters.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,16 @@ const credentialsConfig: AiGatewayCredentialsConfig = {
174174
};
175175

176176
const geminiConfig: GeminiGatewayConfig = {
177-
accountId: 'test-account',
178-
gatewayId: 'test-gateway',
179-
apiKey: 'test-api-key',
177+
accountId: "test-account",
178+
gatewayId: "test-gateway",
179+
apiKey: "test-api-key",
180180
};
181181

182182
const geminiConfigWithCfKey: GeminiGatewayConfig = {
183-
accountId: 'test-account',
184-
gatewayId: 'test-gateway',
185-
apiKey: 'test-api-key',
186-
cfApiKey: 'cf-test-key',
183+
accountId: "test-account",
184+
gatewayId: "test-gateway",
185+
apiKey: "test-api-key",
186+
cfApiKey: "cf-test-key",
187187
};
188188

189189
const mockBindingRun = vi.fn(async (..._args: unknown[]) => new Response("ok"));

packages/tanstack-ai/test/gateway-fetch.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ describe("createGatewayFetch", () => {
154154
const credentialsConfig: AiGatewayCredentialsConfig = {
155155
accountId: "test-account",
156156
gatewayId: "test-gateway",
157-
apiKey: "test-cf-api-key"
157+
apiKey: "test-cf-api-key",
158158
};
159159

160160
it("should call fetch with the correct gateway URL", async () => {

packages/workers-ai-provider/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# workers-ai-provider
22

3+
## 3.1.2
4+
5+
### Patch Changes
6+
7+
- [#400](https://github.com/cloudflare/ai/pull/400) [`8822603`](https://github.com/cloudflare/ai/commit/882260300ccbf78a8c40e5ce54a49d02c7ad3c8c) Thanks [@threepointone](https://github.com/threepointone)! - Add early config validation to `createWorkersAI` that throws a clear error when neither a binding nor credentials (accountId + apiKey) are provided. Widen all model type parameters (TextGenerationModels, ImageGenerationModels, EmbeddingModels, TranscriptionModels, SpeechModels, RerankingModels) to accept arbitrary strings while preserving autocomplete for known models.
8+
39
## 3.1.1
410

511
### Patch Changes

packages/workers-ai-provider/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "workers-ai-provider",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"description": "Workers AI Provider for the vercel AI SDK",
55
"keywords": [
66
"ai",

0 commit comments

Comments
 (0)