This commit is contained in:
IGNY8 VPS (Salman)
2025-12-20 19:49:57 +00:00
parent 3283a83b42
commit 9e8ff4fbb1
18 changed files with 797 additions and 828 deletions

View File

@@ -46,33 +46,20 @@ export default function ValidationCard({
setTestResult(null);
try {
// Get saved settings to get API key and model
// Get saved settings to get model
// fetchAPI extracts data from unified format {success: true, data: {...}}
// So settingsData IS the data object (config object)
const settingsData = await fetchAPI(`/v1/system/settings/integrations/${integrationId}/`);
let apiKey = '';
let model = 'gpt-4.1';
let model = 'gpt-4o-mini';
if (settingsData && typeof settingsData === 'object') {
apiKey = settingsData.apiKey || '';
model = settingsData.model || 'gpt-4.1';
model = settingsData.model || 'gpt-4o-mini';
}
if (!apiKey) {
setTestResult({
success: false,
message: 'API key not configured. Please configure your API key in settings first.',
});
setIsLoading(false);
return;
}
// Call test endpoint
// Call test endpoint (uses platform API key - no apiKey parameter needed)
// For Runware, we don't need with_response or model config
const requestBody: any = {
apiKey: apiKey,
};
const requestBody: any = {};
if (integrationId === 'openai') {
requestBody.config = {