Skip to content

Commit cd74585

Browse files
committed
Add azure to list of model in ModelSelector
1 parent 14385bd commit cd74585

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/chat-interface/model-selector.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
FIREWORKS_MODELS,
1818
GEMINI_MODELS,
1919
LS_HAS_SEEN_MODEL_DROPDOWN_ALERT,
20+
AZURE_MODELS,
2021
} from "@/constants";
2122
import { Dispatch, SetStateAction, useEffect, useState } from "react";
2223
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
@@ -29,6 +30,7 @@ const allModels = [
2930
...OPENAI_MODELS,
3031
...FIREWORKS_MODELS,
3132
...GEMINI_MODELS,
33+
...AZURE_MODELS,
3234
];
3335

3436
const modelNameToLabel = (modelName: ALL_MODEL_NAMES) => {
@@ -176,6 +178,12 @@ export default function ModelSelector(props: ModelSelectorProps) {
176178
) {
177179
return false;
178180
}
181+
if (
182+
model.name.includes("azure") &&
183+
process.env.NEXT_PUBLIC_AZURE_ENABLED === "false"
184+
) {
185+
return false;
186+
}
179187
if (
180188
model.name.includes("gemini-") &&
181189
process.env.NEXT_PUBLIC_GEMINI_ENABLED === "false"

0 commit comments

Comments
 (0)