|
@@ -119,6 +119,7 @@ import { ConsecutiveMistakeLimitControl } from "./ConsecutiveMistakeLimitControl
|
|
|
import { BedrockCustomArn } from "./providers/BedrockCustomArn"
|
|
import { BedrockCustomArn } from "./providers/BedrockCustomArn"
|
|
|
import { RooBalanceDisplay } from "./providers/RooBalanceDisplay"
|
|
import { RooBalanceDisplay } from "./providers/RooBalanceDisplay"
|
|
|
import { buildDocLink } from "@src/utils/docLinks"
|
|
import { buildDocLink } from "@src/utils/docLinks"
|
|
|
|
|
+import { BookOpenText } from "lucide-react"
|
|
|
|
|
|
|
|
export interface ApiOptionsProps {
|
|
export interface ApiOptionsProps {
|
|
|
uriScheme: string | undefined
|
|
uriScheme: string | undefined
|
|
@@ -466,6 +467,12 @@ const ApiOptions = ({
|
|
|
const [rooOption] = options.splice(rooIndex, 1)
|
|
const [rooOption] = options.splice(rooIndex, 1)
|
|
|
options.unshift(rooOption)
|
|
options.unshift(rooOption)
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ const openRouterIndex = options.findIndex((opt) => opt.value === "openrouter")
|
|
|
|
|
+ if (openRouterIndex > 0) {
|
|
|
|
|
+ const [openRouterOption] = options.splice(openRouterIndex, 1)
|
|
|
|
|
+ options.unshift(openRouterOption)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return options
|
|
return options
|
|
@@ -475,16 +482,15 @@ const ApiOptions = ({
|
|
|
<div className="flex flex-col gap-3">
|
|
<div className="flex flex-col gap-3">
|
|
|
<div className="flex flex-col gap-1 relative">
|
|
<div className="flex flex-col gap-1 relative">
|
|
|
<div className="flex justify-between items-center">
|
|
<div className="flex justify-between items-center">
|
|
|
- <label className="block font-medium mb-1">{t("settings:providers.apiProvider")}</label>
|
|
|
|
|
|
|
+ <label className="block font-medium">{t("settings:providers.apiProvider")}</label>
|
|
|
{selectedProvider === "roo" && cloudIsAuthenticated ? (
|
|
{selectedProvider === "roo" && cloudIsAuthenticated ? (
|
|
|
<RooBalanceDisplay />
|
|
<RooBalanceDisplay />
|
|
|
) : (
|
|
) : (
|
|
|
docs && (
|
|
docs && (
|
|
|
- <div className="text-xs text-vscode-descriptionForeground">
|
|
|
|
|
- <VSCodeLink href={docs.url} className="hover:text-vscode-foreground" target="_blank">
|
|
|
|
|
- {t("settings:providers.providerDocumentation", { provider: docs.name })}
|
|
|
|
|
- </VSCodeLink>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <VSCodeLink href={docs.url} target="_blank" className="flex gap-2">
|
|
|
|
|
+ {docs.name}
|
|
|
|
|
+ <BookOpenText className="size-4 inline ml-2" />
|
|
|
|
|
+ </VSCodeLink>
|
|
|
)
|
|
)
|
|
|
)}
|
|
)}
|
|
|
</div>
|
|
</div>
|
|
@@ -509,7 +515,7 @@ const ApiOptions = ({
|
|
|
routerModels={routerModels}
|
|
routerModels={routerModels}
|
|
|
selectedModelId={selectedModelId}
|
|
selectedModelId={selectedModelId}
|
|
|
uriScheme={uriScheme}
|
|
uriScheme={uriScheme}
|
|
|
- fromWelcomeView={fromWelcomeView}
|
|
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
/>
|
|
/>
|
|
@@ -524,6 +530,7 @@ const ApiOptions = ({
|
|
|
refetchRouterModels={refetchRouterModels}
|
|
refetchRouterModels={refetchRouterModels}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -535,6 +542,7 @@ const ApiOptions = ({
|
|
|
uriScheme={uriScheme}
|
|
uriScheme={uriScheme}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -545,6 +553,7 @@ const ApiOptions = ({
|
|
|
routerModels={routerModels}
|
|
routerModels={routerModels}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -556,15 +565,24 @@ const ApiOptions = ({
|
|
|
refetchRouterModels={refetchRouterModels}
|
|
refetchRouterModels={refetchRouterModels}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "anthropic" && (
|
|
{selectedProvider === "anthropic" && (
|
|
|
- <Anthropic apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
|
|
|
|
|
|
|
+ <Anthropic
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
|
|
+ />
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "claude-code" && (
|
|
{selectedProvider === "claude-code" && (
|
|
|
- <ClaudeCode apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
|
|
|
|
|
|
|
+ <ClaudeCode
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
|
|
+ />
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "openai-native" && (
|
|
{selectedProvider === "openai-native" && (
|
|
@@ -572,15 +590,24 @@ const ApiOptions = ({
|
|
|
apiConfiguration={apiConfiguration}
|
|
apiConfiguration={apiConfiguration}
|
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
|
selectedModelInfo={selectedModelInfo}
|
|
selectedModelInfo={selectedModelInfo}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "mistral" && (
|
|
{selectedProvider === "mistral" && (
|
|
|
- <Mistral apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
|
|
|
|
|
|
|
+ <Mistral
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
|
|
+ />
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "baseten" && (
|
|
{selectedProvider === "baseten" && (
|
|
|
- <Baseten apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
|
|
|
|
|
|
|
+ <Baseten
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
|
|
+ />
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "bedrock" && (
|
|
{selectedProvider === "bedrock" && (
|
|
@@ -588,6 +615,7 @@ const ApiOptions = ({
|
|
|
apiConfiguration={apiConfiguration}
|
|
apiConfiguration={apiConfiguration}
|
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
|
selectedModelInfo={selectedModelInfo}
|
|
selectedModelInfo={selectedModelInfo}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -595,7 +623,7 @@ const ApiOptions = ({
|
|
|
<Vertex
|
|
<Vertex
|
|
|
apiConfiguration={apiConfiguration}
|
|
apiConfiguration={apiConfiguration}
|
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
|
- fromWelcomeView={fromWelcomeView}
|
|
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -603,7 +631,7 @@ const ApiOptions = ({
|
|
|
<Gemini
|
|
<Gemini
|
|
|
apiConfiguration={apiConfiguration}
|
|
apiConfiguration={apiConfiguration}
|
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
|
- fromWelcomeView={fromWelcomeView}
|
|
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -613,27 +641,48 @@ const ApiOptions = ({
|
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "lmstudio" && (
|
|
{selectedProvider === "lmstudio" && (
|
|
|
- <LMStudio apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
|
|
|
|
|
|
|
+ <LMStudio
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
|
|
+ />
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "deepseek" && (
|
|
{selectedProvider === "deepseek" && (
|
|
|
- <DeepSeek apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
|
|
|
|
|
|
|
+ <DeepSeek
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
|
|
+ />
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "doubao" && (
|
|
{selectedProvider === "doubao" && (
|
|
|
- <Doubao apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
|
|
|
|
|
|
|
+ <Doubao
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
|
|
+ />
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "qwen-code" && (
|
|
{selectedProvider === "qwen-code" && (
|
|
|
- <QwenCode apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
|
|
|
|
|
|
|
+ <QwenCode
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
|
|
+ />
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "moonshot" && (
|
|
{selectedProvider === "moonshot" && (
|
|
|
- <Moonshot apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} />
|
|
|
|
|
|
|
+ <Moonshot
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
|
|
+ />
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{selectedProvider === "minimax" && (
|
|
{selectedProvider === "minimax" && (
|
|
@@ -671,6 +720,7 @@ const ApiOptions = ({
|
|
|
routerModels={routerModels}
|
|
routerModels={routerModels}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -680,6 +730,7 @@ const ApiOptions = ({
|
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -697,6 +748,7 @@ const ApiOptions = ({
|
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -707,6 +759,7 @@ const ApiOptions = ({
|
|
|
routerModels={routerModels}
|
|
routerModels={routerModels}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -733,6 +786,7 @@ const ApiOptions = ({
|
|
|
cloudIsAuthenticated={cloudIsAuthenticated}
|
|
cloudIsAuthenticated={cloudIsAuthenticated}
|
|
|
organizationAllowList={organizationAllowList}
|
|
organizationAllowList={organizationAllowList}
|
|
|
modelValidationError={modelValidationError}
|
|
modelValidationError={modelValidationError}
|
|
|
|
|
+ simplifySettings={fromWelcomeView}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
@@ -801,24 +855,25 @@ const ApiOptions = ({
|
|
|
</>
|
|
</>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
- {selectedProvider === "roo" ? (
|
|
|
|
|
- <SimpleThinkingBudget
|
|
|
|
|
- key={`${selectedProvider}-${selectedModelId}`}
|
|
|
|
|
- apiConfiguration={apiConfiguration}
|
|
|
|
|
- setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
- modelInfo={selectedModelInfo}
|
|
|
|
|
- />
|
|
|
|
|
- ) : (
|
|
|
|
|
- <ThinkingBudget
|
|
|
|
|
- key={`${selectedProvider}-${selectedModelId}`}
|
|
|
|
|
- apiConfiguration={apiConfiguration}
|
|
|
|
|
- setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
- modelInfo={selectedModelInfo}
|
|
|
|
|
- />
|
|
|
|
|
- )}
|
|
|
|
|
|
|
+ {!fromWelcomeView &&
|
|
|
|
|
+ (selectedProvider === "roo" ? (
|
|
|
|
|
+ <SimpleThinkingBudget
|
|
|
|
|
+ key={`${selectedProvider}-${selectedModelId}`}
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ modelInfo={selectedModelInfo}
|
|
|
|
|
+ />
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <ThinkingBudget
|
|
|
|
|
+ key={`${selectedProvider}-${selectedModelId}`}
|
|
|
|
|
+ apiConfiguration={apiConfiguration}
|
|
|
|
|
+ setApiConfigurationField={setApiConfigurationField}
|
|
|
|
|
+ modelInfo={selectedModelInfo}
|
|
|
|
|
+ />
|
|
|
|
|
+ ))}
|
|
|
|
|
|
|
|
{/* Gate Verbosity UI by capability flag */}
|
|
{/* Gate Verbosity UI by capability flag */}
|
|
|
- {selectedModelInfo?.supportsVerbosity && (
|
|
|
|
|
|
|
+ {!fromWelcomeView && selectedModelInfo?.supportsVerbosity && (
|
|
|
<Verbosity
|
|
<Verbosity
|
|
|
apiConfiguration={apiConfiguration}
|
|
apiConfiguration={apiConfiguration}
|
|
|
setApiConfigurationField={setApiConfigurationField}
|
|
setApiConfigurationField={setApiConfigurationField}
|