@@ -88,6 +88,10 @@ async function checkBilling(apiKey, apiUrl) {
8888 }
8989}
9090
91+ function isUsingSpecialCustomModel ( configOrSession ) {
92+ return isUsingCustomModel ( configOrSession ) && ! configOrSession . apiMode
93+ }
94+
9195export function GeneralPart ( { config, updateConfig, setTabIndex } ) {
9296 const { t, i18n } = useTranslation ( )
9397 const [ balance , setBalance ] = useState ( null )
@@ -173,7 +177,7 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
173177 style = {
174178 isUsingOpenAiApiModel ( config ) ||
175179 isUsingMultiModeModel ( config ) ||
176- isUsingCustomModel ( config ) ||
180+ isUsingSpecialCustomModel ( config ) ||
177181 isUsingAzureOpenAiApiModel ( config ) ||
178182 isUsingClaudeApiModel ( config ) ||
179183 isUsingMoonshotApiModel ( config )
@@ -255,7 +259,7 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
255259 ) }
256260 </ span >
257261 ) }
258- { isUsingCustomModel ( config ) && (
262+ { isUsingSpecialCustomModel ( config ) && (
259263 < input
260264 style = "width: 50%;"
261265 type = "text"
@@ -328,7 +332,7 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
328332 </ span >
329333 ) }
330334 </ span >
331- { isUsingCustomModel ( config ) && (
335+ { isUsingSpecialCustomModel ( config ) && (
332336 < input
333337 type = "text"
334338 value = { config . customModelApiUrl }
@@ -339,7 +343,7 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
339343 } }
340344 />
341345 ) }
342- { isUsingCustomModel ( config ) && (
346+ { isUsingSpecialCustomModel ( config ) && (
343347 < input
344348 type = "password"
345349 value = { config . customApiKey }
@@ -424,17 +428,6 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
424428 } }
425429 />
426430 ) }
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- ) }
438431 { isUsingGithubThirdPartyApiModel ( config ) && (
439432 < input
440433 type = "text"
0 commit comments