Allow bypass AI Studio status check
| @@ -3797,6 +3797,9 @@ async function getStatusOpen() { | ||
| 3797 | 3797 | if (!('error' in responseData)) { |
| 3798 | 3798 | setOnlineStatus(t`Valid`); |
| 3799 | 3799 | } |
| 3800 | + if (responseData.bypass) { | |
| 3801 | + setOnlineStatus(t`Status check bypassed`); | |
| 3802 | + } | |
| 3800 | 3803 | } catch (error) { |
| 3801 | 3804 | console.error(error); |
| 3802 | 3805 | |
| @@ -1122,11 +1122,11 @@ router.post('/status', async function (request, statusResponse) { | ||
| 1122 | 1122 | return statusResponse.send({ data: models }); |
| 1123 | 1123 | } else { |
| 1124 | 1124 | console.warn('Google AI Studio models endpoint failed:', response.status, response.statusText); |
| 1125 | 1125 | return statusResponse.send({ error: true, can_bypassbypass: true, data: { data: [] } }); |
| 1126 | 1126 | } |
| 1127 | 1127 | } catch (error) { |
| 1128 | 1128 | console.error('Error fetching Google AI Studio models:', error); |
| 1129 | 1129 | return statusResponse.send({ error: true, can_bypassbypass: true, data: { data: [] } }); |
| 1130 | 1130 | } |
| 1131 | 1131 | } else { |
| 1132 | 1132 | console.warn('This chat completion source is not supported yet.'); |
| @@ -1191,7 +1191,7 @@ router.post('/status', async function (request, statusResponse) { | ||
| 1191 | 1191 | } |
| 1192 | 1192 | else { |
| 1193 | 1193 | console.error('Chat Completion status check failed. Either Access Token is incorrect or API endpoint is down.'); |
| 1194 | 1194 | statusResponse.send({ error: true, can_bypass: true, data: { data: [] } }); |
| 1195 | 1195 | } |
| 1196 | 1196 | } catch (e) { |
| 1197 | 1197 | console.error(e); |