Commit 1620bb6
brettheap
fix(provider): validate baseURL format before passing to SDK
Prevents ERR_INVALID_URL by validating baseURL values before passing
to AI SDK. The SDK's nullish coalescing (??) only catches null/undefined,
not empty strings or invalid values like 'anthropic'.
When an invalid baseURL is provided, it's filtered out and the SDK
uses its default endpoint instead.1 parent 41f9a58 commit 1620bb6
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
873 | 881 | | |
874 | 882 | | |
875 | 883 | | |
| |||
0 commit comments