From 35c01777294f3098f6e2ec6cad41c848b980dfde Mon Sep 17 00:00:00 2001
From: Gianluigi Conti <13535297+glconti@users.noreply.github.com>
Date: Mon, 15 Sep 2025 22:44:28 +0200
Subject: [PATCH] fix(openai): update Azure API version and improve error
handling
---
apps/client/src/constants/llm.ts | 2 +-
.../dashboard/settings/_sections/openai.tsx | 12 +++++++-----
apps/client/src/services/openai/client.ts | 16 +++++-----------
3 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/apps/client/src/constants/llm.ts b/apps/client/src/constants/llm.ts
index e33b3948..cdf23ff4 100644
--- a/apps/client/src/constants/llm.ts
+++ b/apps/client/src/constants/llm.ts
@@ -1,3 +1,3 @@
export const DEFAULT_MODEL = "gpt-3.5-turbo";
export const DEFAULT_MAX_TOKENS = 1024;
-export const DEFAULT_AZURE_API_VERSION = "2025-01-01-preview";
+export const DEFAULT_AZURE_API_VERSION = "2024-10-21";
diff --git a/apps/client/src/pages/dashboard/settings/_sections/openai.tsx b/apps/client/src/pages/dashboard/settings/_sections/openai.tsx
index cb866871..230789ad 100644
--- a/apps/client/src/pages/dashboard/settings/_sections/openai.tsx
+++ b/apps/client/src/pages/dashboard/settings/_sections/openai.tsx
@@ -127,7 +127,7 @@ export const OpenAISettings = () => {
https://your-resource.openai.azure.com). Set the deployment name in the Model field
and specify the appropriate API version for your Azure deployment.
sk-1234567890abcdef and the Base URL to your Ollama URL, i.e.
+ http://localhost:11434/v1. You can also pick and choose models and set the max tokens
as per your preference.