Skip to content

Commit fcec4c1

Browse files
Document internal-whitespace regex intent
Co-authored-by: Eric Allam <eric@trigger.dev>
1 parent b72e6b6 commit fcec4c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/ai/src/chatTransport.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ const BASE_URL_VALIDATION_ERRORS = {
457457
credentials: "baseURL must not include username or password credentials",
458458
} as const;
459459

460+
// Includes standard whitespace plus common invisible separator/control marks
461+
// that can make URLs look valid while behaving unexpectedly.
460462
const INTERNAL_WHITESPACE_REGEX = /[\s\u200B\u200C\u200D\u2060\uFEFF]/u;
461463

462464
function resolvePayloadMapper<

0 commit comments

Comments
 (0)