Skip to content

fix(ai-gateway): drop the Base44-App-Base-Url header path#222

Merged
yardend-wix merged 1 commit into
mainfrom
chore/ai-gateway-drop-app-base-url-header
Jul 7, 2026
Merged

fix(ai-gateway): drop the Base44-App-Base-Url header path#222
yardend-wix merged 1 commit into
mainfrom
chore/ai-gateway-drop-app-base-url-header

Conversation

@yardend-wix

Copy link
Copy Markdown
Collaborator

What

Removes the Base44-App-Base-Url mechanism introduced in #214, before any release ships it (aiGateway is still unpublished — latest npm is 0.8.35):

  • createClientFromRequest no longer reads the Base44-App-Base-Url header
  • the AI gateway module no longer takes appBaseUrl; connection() builds its baseURL from serverUrl only (i.e. Base44-Api-Url inside backend functions)
  • removed the appBaseUrl-preference tests; kept coverage for building from Base44-Api-Url

The pre-existing appBaseUrl client-config option (auth login/logout redirect URLs) is untouched.

Why

The apper PR that would have injected Base44-App-Base-Url into function invocations (base44-dev/apper#14868) was closed — the header will never exist on real invocations, so the SDK reading it is dead code.

Verified live instead that Base44-Api-Url already resolves to an app-recognized domain on the invocation paths that matter — published app traffic (same-origin), sandbox editor preview (preview-sandbox--{app_id}.* hosts are domain-resolved), and background workflows/automations (app-domain fallback) — so serverUrl is the right gateway origin. The one remaining gap (the builder's in-process test-function tool passes the builder host) is being fixed on the platform side, not in the SDK.

Tests

npm test: 177 passed. tsc --noEmit clean.

🤖 Generated with Claude Code

connection() now always builds the gateway baseURL from serverUrl
(Base44-Api-Url inside backend functions). The backend PR that injected
Base44-App-Base-Url was closed, so the header never ships; the platform
instead guarantees Base44-Api-Url resolves to the app on every invocation
path. Removes the header read in createClientFromRequest, the appBaseUrl
plumbing into the AI gateway module, and the related tests.

The pre-existing appBaseUrl client config (auth login/logout URLs) is
unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 6, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.35-pr.222.127e5f6

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.35-pr.222.127e5f6"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.35-pr.222.127e5f6"
  }
}

Preview published to npm registry — try new features instantly!

@yardend-wix yardend-wix changed the title chore(ai-gateway): drop the Base44-App-Base-Url header path fix(ai-gateway): drop the Base44-App-Base-Url header path Jul 6, 2026
@yardend-wix yardend-wix merged commit 9e8c28b into main Jul 7, 2026
5 of 7 checks passed
@yardend-wix yardend-wix deleted the chore/ai-gateway-drop-app-base-url-header branch July 7, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants