1
- import React , { useEffect , useState , useCallback } from 'react' ;
2
1
import { motion } from 'framer-motion' ;
3
- import { classNames } from '~/utils/classNames' ;
4
- import { TbActivityHeartbeat } from 'react-icons/tb' ;
5
- import { BsCheckCircleFill , BsXCircleFill , BsExclamationCircleFill } from 'react-icons/bs' ;
6
- import { SiAmazon , SiGoogle , SiHuggingface , SiPerplexity , SiOpenai } from 'react-icons/si' ;
7
- import { BsRobot , BsCloud } from 'react-icons/bs' ;
8
- import { TbBrain } from 'react-icons/tb' ;
9
- import { BiChip , BiCodeBlock } from 'react-icons/bi' ;
10
- import { FaCloud , FaBrain } from 'react-icons/fa' ;
2
+ import React , { useCallback , useEffect , useState } from 'react' ;
11
3
import type { IconType } from 'react-icons' ;
12
- import { useSettings } from '~/lib/hooks/useSettings' ;
4
+ import { BiChip , BiCodeBlock } from 'react-icons/bi' ;
5
+ import { BsCheckCircleFill , BsCloud , BsExclamationCircleFill , BsRobot , BsXCircleFill } from 'react-icons/bs' ;
6
+ import { FaBrain , FaCloud } from 'react-icons/fa' ;
7
+ import { SiAmazon , SiGoogle , SiHuggingface , SiOpenai , SiPerplexity } from 'react-icons/si' ;
8
+ import { TbActivityHeartbeat , TbBrain , TbBrandAzure } from 'react-icons/tb' ;
13
9
import { useToast } from '~/components/ui/use-toast' ;
10
+ import { useSettings } from '~/lib/hooks/useSettings' ;
11
+ import { classNames } from '~/utils/classNames' ;
14
12
15
13
// Types
16
14
type ProviderName =
@@ -23,6 +21,7 @@ type ProviderName =
23
21
| 'HuggingFace'
24
22
| 'Mistral'
25
23
| 'OpenAI'
24
+ | 'AzureOpenAI'
26
25
| 'OpenRouter'
27
26
| 'Perplexity'
28
27
| 'Together'
@@ -73,6 +72,15 @@ const PROVIDER_STATUS_URLS: Record<ProviderName, ProviderConfig> = {
73
72
} ,
74
73
testModel : 'gpt-3.5-turbo' ,
75
74
} ,
75
+ AzureOpenAI : {
76
+ statusUrl : 'https://azure.status.microsoft/en-us/status' ,
77
+ apiUrl :
78
+ 'https://$AZURE_OPENAI_API_KEY.openai.azure.com/openai/deployments/gpt-4o-mini/chat/completions?api-version=2024-02-15-preview' ,
79
+ headers : {
80
+ Authorization : 'Bearer $AZURE_OPENAI_API_KEY' ,
81
+ } ,
82
+ testModel : 'gpt-4o-mini' ,
83
+ } ,
76
84
Anthropic : {
77
85
statusUrl : 'https://status.anthropic.com/' ,
78
86
apiUrl : 'https://api.anthropic.com/v1/messages' ,
@@ -181,6 +189,7 @@ const PROVIDER_ICONS: Record<ProviderName, IconType> = {
181
189
HuggingFace : SiHuggingface ,
182
190
Mistral : TbBrain ,
183
191
OpenAI : SiOpenai ,
192
+ AzureOpenAI : TbBrandAzure ,
184
193
OpenRouter : FaCloud ,
185
194
Perplexity : SiPerplexity ,
186
195
Together : BsCloud ,
@@ -208,6 +217,7 @@ const ServiceStatusTab = () => {
208
217
// Map provider names to environment variable names
209
218
const envKeyMap : Record < ProviderName , string > = {
210
219
OpenAI : 'OPENAI_API_KEY' ,
220
+ AzureOpenAI : 'AZURE_OPENAI_API_KEY' ,
211
221
Anthropic : 'ANTHROPIC_API_KEY' ,
212
222
Cohere : 'COHERE_API_KEY' ,
213
223
Google : 'GOOGLE_GENERATIVE_AI_API_KEY' ,
0 commit comments