@@ -88,6 +88,10 @@ async function checkBilling(apiKey, apiUrl) {
88
88
}
89
89
}
90
90
91
+ function isUsingSpecialCustomModel ( configOrSession ) {
92
+ return isUsingCustomModel ( configOrSession ) && ! configOrSession . apiMode
93
+ }
94
+
91
95
export function GeneralPart ( { config, updateConfig, setTabIndex } ) {
92
96
const { t, i18n } = useTranslation ( )
93
97
const [ balance , setBalance ] = useState ( null )
@@ -173,7 +177,7 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
173
177
style = {
174
178
isUsingOpenAiApiModel ( config ) ||
175
179
isUsingMultiModeModel ( config ) ||
176
- isUsingCustomModel ( config ) ||
180
+ isUsingSpecialCustomModel ( config ) ||
177
181
isUsingAzureOpenAiApiModel ( config ) ||
178
182
isUsingClaudeApiModel ( config ) ||
179
183
isUsingMoonshotApiModel ( config )
@@ -255,7 +259,7 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
255
259
) }
256
260
</ span >
257
261
) }
258
- { isUsingCustomModel ( config ) && (
262
+ { isUsingSpecialCustomModel ( config ) && (
259
263
< input
260
264
style = "width: 50%;"
261
265
type = "text"
@@ -328,7 +332,7 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
328
332
</ span >
329
333
) }
330
334
</ span >
331
- { isUsingCustomModel ( config ) && (
335
+ { isUsingSpecialCustomModel ( config ) && (
332
336
< input
333
337
type = "text"
334
338
value = { config . customModelApiUrl }
@@ -339,7 +343,7 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
339
343
} }
340
344
/>
341
345
) }
342
- { isUsingCustomModel ( config ) && (
346
+ { isUsingSpecialCustomModel ( config ) && (
343
347
< input
344
348
type = "password"
345
349
value = { config . customApiKey }
@@ -424,17 +428,6 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
424
428
} }
425
429
/>
426
430
) }
427
- { isUsingAzureOpenAiApiModel ( config ) && (
428
- < input
429
- type = "text"
430
- value = { config . azureDeploymentName }
431
- placeholder = { t ( 'Azure Deployment Name' ) }
432
- onChange = { ( e ) => {
433
- const deploymentName = e . target . value
434
- updateConfig ( { azureDeploymentName : deploymentName } )
435
- } }
436
- />
437
- ) }
438
431
{ isUsingGithubThirdPartyApiModel ( config ) && (
439
432
< input
440
433
type = "text"
0 commit comments