Commit 5ae6ff4
feat: add support for OpenAI US data residency endpoint (us.api.openai.com) (#5537)
* feat: add support for OpenAI US data residency endpoint (us.api.openai.com)
- Update OpenAI URL pattern to accept us.api.openai.com for US data residency
- Add custom base URL support in OpenAIProvider.buildUrl() via userConfig.baseUri
- Add UI configuration for OpenAI Base URL in provider key settings
- Enables BYOK customers to comply with OpenAI's January 12, 2026 deadline
Customers can now configure their OpenAI provider key with a custom base URL
(e.g., https://us.api.openai.com) to route requests to the US regional endpoint.
* feat: use dropdown select for OpenAI endpoint and add validation
- Replace free-form text input with dropdown select for OpenAI endpoint
- Add predefined options: Default (api.openai.com) and US Data Residency (us.api.openai.com)
- Add server-side validation to only allow whitelisted OpenAI base URLs
- Invalid or unknown URLs fall back to the default api.openai.com endpoint
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1ab78af commit 5ae6ff4
File tree
4 files changed
+87
-7
lines changed- packages/cost
- models
- providers
- providers
- web/components/providers
4 files changed
+87
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
11 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
12 | 40 | | |
13 | 41 | | |
14 | | - | |
| 42 | + | |
15 | 43 | | |
16 | | - | |
| 44 | + | |
17 | 45 | | |
18 | 46 | | |
19 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
43 | 56 | | |
44 | 57 | | |
45 | 58 | | |
| |||
98 | 111 | | |
99 | 112 | | |
100 | 113 | | |
| 114 | + | |
101 | 115 | | |
102 | 116 | | |
103 | 117 | | |
| |||
119 | 133 | | |
120 | 134 | | |
121 | 135 | | |
122 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
123 | 141 | | |
124 | 142 | | |
125 | 143 | | |
| |||
279 | 297 | | |
280 | 298 | | |
281 | 299 | | |
| 300 | + | |
| 301 | + | |
282 | 302 | | |
283 | 303 | | |
284 | | - | |
| 304 | + | |
285 | 305 | | |
286 | 306 | | |
287 | 307 | | |
| |||
393 | 413 | | |
394 | 414 | | |
395 | 415 | | |
396 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
397 | 426 | | |
398 | 427 | | |
399 | 428 | | |
| |||
470 | 499 | | |
471 | 500 | | |
472 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
473 | 524 | | |
474 | 525 | | |
475 | 526 | | |
| |||
0 commit comments