diff --git a/src/components/providers/forms/ProviderForm.tsx b/src/components/providers/forms/ProviderForm.tsx index 0145b86f6..7fc02727d 100644 --- a/src/components/providers/forms/ProviderForm.tsx +++ b/src/components/providers/forms/ProviderForm.tsx @@ -944,7 +944,12 @@ export function ProviderForm({ const commonEnvObj = envStringToObj(geminiCommonConfigSnippet.trim()); if (isPlainObject(envObj) && isPlainObject(commonEnvObj)) { const { customConfig } = extractDifference(envObj, commonEnvObj); - envObj = customConfig as Record; + // Convert to string record with type guard to avoid type assertion issues + const stringEnvObj: Record = {}; + for (const [key, value] of Object.entries(customConfig)) { + stringEnvObj[key] = String(value); + } + envObj = stringEnvObj; } } const combined = {