Skip to content

feat (provider/gateway): update route path version and embed format#11358

Merged
shaper merged 1 commit intomainfrom
12-22-feat_provider_gateway_update_route_path_version_and_embed_format
Dec 22, 2025
Merged

feat (provider/gateway): update route path version and embed format#11358
shaper merged 1 commit intomainfrom
12-22-feat_provider_gateway_update_route_path_version_and_embed_format

Conversation

@shaper
Copy link
Copy Markdown
Collaborator

@shaper shaper commented Dec 22, 2025

Background

AI Gateway is moving to a separate route for AI SDK v6. The embed call options have also changed since v5.

Summary

Updated base url for new route path, and embed params to reflect new call options.

Manual Verification

Ran an embed query manually against local gateway server with new route handlers.

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

Copy link
Copy Markdown
Collaborator Author

shaper commented Dec 22, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@shaper shaper marked this pull request as ready for review December 22, 2025 08:49
@shaper shaper requested a review from dancer December 22, 2025 08:49
@shaper shaper mentioned this pull request Dec 22, 2025
4 tasks
Copy link
Copy Markdown
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

The JSDoc comment for the baseURL option in GatewayProviderSettings still references the old API version (v1/ai) but the actual default has been updated to v3/ai.

View Details
📝 Patch Details
diff --git a/packages/gateway/src/gateway-provider.ts b/packages/gateway/src/gateway-provider.ts
index ed2cdbb53..ae7e5c4a3 100644
--- a/packages/gateway/src/gateway-provider.ts
+++ b/packages/gateway/src/gateway-provider.ts
@@ -65,7 +65,7 @@ Creates a model for generating images.
 
 export interface GatewayProviderSettings {
   /**
-The base URL prefix for API calls. Defaults to `https://ai-gateway.vercel.sh/v1/ai`.
+The base URL prefix for API calls. Defaults to `https://ai-gateway.vercel.sh/v3/ai`.
    */
   baseURL?: string;
 

Analysis

Outdated JSDoc comment for baseURL option in GatewayProviderSettings

What fails: The JSDoc comment for the baseURL option in the GatewayProviderSettings interface documents an outdated default API version (v1/ai) that does not match the actual implementation.

How to reproduce: Open packages/gateway/src/gateway-provider.ts and compare:

  • Line 68: JSDoc comment states "Defaults to https://ai-gateway.vercel.sh/v1/ai"
  • Line 117: Actual implementation uses 'https://ai-gateway.vercel.sh/v3/ai'

Result: Developers reading the interface JSDoc will see incorrect documentation, believing the default API version is v1 when the actual default is v3.

Expected: JSDoc comment should match the actual implementation, stating "Defaults to https://ai-gateway.vercel.sh/v3/ai"

Evidence: The v3 API is confirmed as the current default in:

  • Actual implementation at line 117
  • All test expectations (lines 412, 435, 935)
  • MDX documentation line 83 explicitly states "The default prefix is https://ai-gateway.vercel.sh/v3/ai"
Fix on Vercel

@shaper shaper merged commit 7294355 into main Dec 22, 2025
27 checks passed
@shaper shaper deleted the 12-22-feat_provider_gateway_update_route_path_version_and_embed_format branch December 22, 2025 11:34
@gr2m gr2m added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/gateway Issues related to the @ai-sdk/gateway provider and removed ai/gateway labels Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/gateway Issues related to the @ai-sdk/gateway provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants