Skip to content

fix(angular): normalize relative apiUrl to absolute for LangGraph SDK#43

Merged
blove merged 1 commit into
mainfrom
claude/blissful-bartik
Apr 7, 2026
Merged

fix(angular): normalize relative apiUrl to absolute for LangGraph SDK#43
blove merged 1 commit into
mainfrom
claude/blissful-bartik

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 7, 2026

Summary

Production cockpit examples show Failed to construct 'URL': Invalid URL because the LangGraph SDK Client requires an absolute URL, but production environments use relative paths (/api) that are proxied by Vercel middleware.

Fix: FetchStreamTransport now prepends window.location.origin for relative paths before passing to the SDK Client.

Evidence

  • Reproduced in Chrome at examples.stream-resource.dev/langgraph/streaming
  • Error banner: "Failed to construct 'URL': Invalid URL"
  • All 14 examples affected (all use apiUrl: '/api' in production)

Test plan

  • Angular library tests pass
  • Chat library tests pass
  • Angular library builds
  • Verify in production after deploy

… Client

Production environments use relative paths like '/api' that are proxied
by Vercel middleware. The LangGraph SDK Client constructor requires an
absolute URL. Fix: prepend window.location.origin for relative paths.
@blove blove merged commit ab7611d into main Apr 7, 2026
13 checks passed
blove added a commit that referenced this pull request Apr 7, 2026
…piUrl fix

The examples deploy change detection only checked cockpit/**/angular/ and
scripts/assemble-examples.ts. Library changes (libs/angular/, libs/chat/,
libs/render/) were not detected, so the apiUrl fix from PR #43 was never
deployed. Now checks all three lib directories.
blove added a commit that referenced this pull request Apr 7, 2026
…piUrl fix

The examples deploy change detection only checked cockpit/**/angular/ and
scripts/assemble-examples.ts. Library changes (libs/angular/, libs/chat/,
libs/render/) were not detected, so the apiUrl fix from PR #43 was never
deployed. Now checks all three lib directories.
blove added a commit that referenced this pull request Apr 7, 2026
The examples deploy change detection only checked cockpit/**/angular/ and
scripts/assemble-examples.ts. Library changes (libs/angular/, libs/chat/,
libs/render/) were not detected, so the apiUrl fix from PR #43 was never
deployed. Now checks all three lib directories.
blove added a commit that referenced this pull request Apr 7, 2026
…#43)

Production environments use relative paths like '/api' that are proxied
by Vercel middleware. The LangGraph SDK Client constructor requires an
absolute URL. Fix: prepend window.location.origin for relative paths.
blove added a commit that referenced this pull request Apr 7, 2026
The examples deploy change detection only checked cockpit/**/angular/ and
scripts/assemble-examples.ts. Library changes (libs/angular/, libs/chat/,
libs/render/) were not detected, so the apiUrl fix from PR #43 was never
deployed. Now checks all three lib directories.
blove added a commit that referenced this pull request Apr 7, 2026
…#43)

Production environments use relative paths like '/api' that are proxied
by Vercel middleware. The LangGraph SDK Client constructor requires an
absolute URL. Fix: prepend window.location.origin for relative paths.
blove added a commit that referenced this pull request Apr 7, 2026
The examples deploy change detection only checked cockpit/**/angular/ and
scripts/assemble-examples.ts. Library changes (libs/angular/, libs/chat/,
libs/render/) were not detected, so the apiUrl fix from PR #43 was never
deployed. Now checks all three lib directories.
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.

1 participant