Update model selection to handle potential undefined data from API

Fix type assertion for OpenRouter models in settings page to prevent runtime errors.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/HPCBgsr
This commit is contained in:
michaelschal committed 2025-10-01 16:32:02 +00:00
1 parent 372e76f1a4
commit 7b97fb4839
2 files changed
+1 -5

No files matched your search

-4
View File
@@ -14,10 +14,6 @@ run = ["npm", "run", "start"]
localPort = 5000 localPort = 5000
externalPort = 80 externalPort = 80
[[ports]]
localPort = 33041
externalPort = 3000
[env] [env]
PORT = "5000" PORT = "5000"
+1 -1
View File
@@ -204,7 +204,7 @@ export default function Settings() {
<SelectValue placeholder="Sélectionner un modèle" /> <SelectValue placeholder="Sélectionner un modèle" />
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
{openrouterModels?.data?.map((model: any) => ( {(openrouterModels as any)?.data?.map((model: any) => (
<SelectItem key={model.id} value={model.id}> <SelectItem key={model.id} value={model.id}>
{model.name} {model.name}
</SelectItem> </SelectItem>