diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index aeb0ce9a5..b2d2cbd4d 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -588,7 +588,7 @@ max_tokens: $settings?.options?.num_predict ?? undefined, docs: docs.length > 0 ? docs : undefined }, - model.source.toLowerCase() === 'litellm' + model?.source?.toLowerCase() === 'litellm' ? `${LITELLM_API_BASE_URL}/v1` : `${OPENAI_API_BASE_URL}` ); diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 7245137d1..1a304f6d2 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -602,7 +602,7 @@ max_tokens: $settings?.options?.num_predict ?? undefined, docs: docs.length > 0 ? docs : undefined }, - model.source.toLowerCase() === 'litellm' + model?.source?.toLowerCase() === 'litellm' ? `${LITELLM_API_BASE_URL}/v1` : `${OPENAI_API_BASE_URL}` );