diff --git a/.env.example b/.env.example index bf161162..d8e99e24 100644 --- a/.env.example +++ b/.env.example @@ -28,9 +28,10 @@ NEXT_PUBLIC_SUPABASE_URL= NEXT_PUBLIC_SUPABASE_ANON_KEY= # Azure OpenAI Configuration -AZURE_OPENAI_API_KEY=your-azure-openai-api-key -AZURE_OPENAI_API_INSTANCE_NAME=your-instance-name -AZURE_OPENAI_API_DEPLOYMENT_NAME=your-deployment-name -AZURE_OPENAI_API_VERSION=2024-08-01-preview +# ENSURE THEY ARE PREFIXED WITH AN UNDERSCORE. +_AZURE_OPENAI_API_KEY=your-azure-openai-api-key +_AZURE_OPENAI_API_INSTANCE_NAME=your-instance-name +_AZURE_OPENAI_API_DEPLOYMENT_NAME=your-deployment-name +_AZURE_OPENAI_API_VERSION=2024-08-01-preview # Optional: Azure OpenAI Base Path (if using a different domain) -# AZURE_OPENAI_API_BASE_PATH=https://your-custom-domain.com/openai/deployments +# _AZURE_OPENAI_API_BASE_PATH=https://your-custom-domain.com/openai/deployments diff --git a/src/agent/utils.ts b/src/agent/utils.ts index 41c2a54a..5bbe9364 100644 --- a/src/agent/utils.ts +++ b/src/agent/utils.ts @@ -155,14 +155,14 @@ export const getModelConfig = ( modelName: actualModelName, modelProvider: "azure_openai", azureConfig: { - azureOpenAIApiKey: process.env.AZURE_OPENAI_API_KEY || "", + azureOpenAIApiKey: process.env._AZURE_OPENAI_API_KEY || "", azureOpenAIApiInstanceName: - process.env.AZURE_OPENAI_API_INSTANCE_NAME || "", + process.env._AZURE_OPENAI_API_INSTANCE_NAME || "", azureOpenAIApiDeploymentName: - process.env.AZURE_OPENAI_API_DEPLOYMENT_NAME || "", + process.env._AZURE_OPENAI_API_DEPLOYMENT_NAME || "", azureOpenAIApiVersion: - process.env.AZURE_OPENAI_API_VERSION || "2024-08-01-preview", - azureOpenAIBasePath: process.env.AZURE_OPENAI_API_BASE_PATH, + process.env._AZURE_OPENAI_API_VERSION || "2024-08-01-preview", + azureOpenAIBasePath: process.env._AZURE_OPENAI_API_BASE_PATH, }, }; } diff --git a/src/components/chat-interface/model-selector/index.tsx b/src/components/chat-interface/model-selector/index.tsx index a7a69159..de6697e6 100644 --- a/src/components/chat-interface/model-selector/index.tsx +++ b/src/components/chat-interface/model-selector/index.tsx @@ -16,6 +16,7 @@ import { FIREWORKS_MODELS, GEMINI_MODELS, LS_HAS_SEEN_MODEL_DROPDOWN_ALERT, + AZURE_MODELS, } from "@/constants"; import { Dispatch, SetStateAction, useState } from "react"; import { AlertNewModelSelectorFeature } from "./alert-new-model-selector"; @@ -26,6 +27,7 @@ const allModels = [ ...OPENAI_MODELS, ...FIREWORKS_MODELS, ...GEMINI_MODELS, + ...AZURE_MODELS, ]; const modelNameToLabel = (modelName: ALL_MODEL_NAMES) => { diff --git a/src/constants.ts b/src/constants.ts index fe8989a7..6c98d4bb 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -30,6 +30,7 @@ export const AZURE_MODELS = [ name: "azure/gpt-4o-mini", modelName: "gpt-4o-mini", label: "GPT-4o mini (Azure)", + isNew: false, }, ];