fix(ui): accept partial raw model records

- allow raw JSON model arrays with partial fields to format safely

- keep the requested=upstream review fixes compatible with raw editor input

Refs #941
This commit is contained in:
Tam Nhu Tran committed 2026-04-10 17:46:18 -04:00
1 parent 92a769d773
commit 42d5724f34
1 file changed
+1 -1
+1 -1
View File
@@ -165,7 +165,7 @@ export function getRequestedUpstreamModelRuleErrors(value: string): string[] {
* Format stored provider config back into the UI-facing requested=upstream form. * Format stored provider config back into the UI-facing requested=upstream form.
*/ */
export function formatRequestedUpstreamModelRules( export function formatRequestedUpstreamModelRules(
models: AiProviderModelAlias[] | null | undefined models: Array<Partial<AiProviderModelAlias>> | null | undefined
): string { ): string {
return (models || []) return (models || [])
.map((item) => { .map((item) => {