( env: Record<string, string> | undefined, source?: SettingSource, )
| 91 | ]) |
| 92 | |
| 93 | function withoutProjectSettingsOpenAIByokVars( |
| 94 | env: Record<string, string> | undefined, |
| 95 | source?: SettingSource, |
| 96 | ): Record<string, string> { |
| 97 | if (!env || source !== 'projectSettings') return env || {} |
| 98 | const out: Record<string, string> = {} |
| 99 | for (const [key, value] of Object.entries(env)) { |
| 100 | if (!PROJECT_SETTINGS_OPENAI_BYOK_ENV_VARS.has(key.toUpperCase())) { |
| 101 | out[key] = value |
| 102 | } |
| 103 | } |
| 104 | return out |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Compose the strip filters applied to every settings-sourced env object. |
no test coverage detected