Handle unknown chat completion sources gracefully by logging an error and returning an empty string
| @@ -1661,7 +1661,8 @@ export function getChatCompletionModel(source = null) { | |||
| 1661 | case chat_completion_sources.XAI: | 1661 | case chat_completion_sources.XAI: |
| 1662 | return oai_settings.xai_model; | 1662 | return oai_settings.xai_model; |
| 1663 | default: | 1663 | default: |
| 1664 | throw new Error(`Unknown chat completion source: ${activeSource}`); | 1664 | console.error(`Unknown chat completion source: ${activeSource}`); |
| 1665 | return ''; | ||
| 1665 | } | 1666 | } |
| 1666 | } | 1667 | } |
| 1667 | 1668 | ||