mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-26 00:46:23 +02:00
show api-key input for openai-compatible provider
This commit is contained in:
parent
38b2e162f6
commit
cce3a7e53c
2 changed files with 10 additions and 4 deletions
|
|
@ -98,6 +98,7 @@ export function OnboardingModal({ open, onComplete }: OnboardingModalProps) {
|
||||||
)
|
)
|
||||||
|
|
||||||
const activeConfig = providerConfigs[llmProvider]
|
const activeConfig = providerConfigs[llmProvider]
|
||||||
|
const showApiKey = llmProvider === "openai" || llmProvider === "anthropic" || llmProvider === "google" || llmProvider === "openrouter" || llmProvider === "aigateway" || llmProvider === "openai-compatible"
|
||||||
const requiresApiKey = llmProvider === "openai" || llmProvider === "anthropic" || llmProvider === "google" || llmProvider === "openrouter" || llmProvider === "aigateway"
|
const requiresApiKey = llmProvider === "openai" || llmProvider === "anthropic" || llmProvider === "google" || llmProvider === "openrouter" || llmProvider === "aigateway"
|
||||||
const requiresBaseURL = llmProvider === "ollama" || llmProvider === "openai-compatible"
|
const requiresBaseURL = llmProvider === "ollama" || llmProvider === "openai-compatible"
|
||||||
const showBaseURL = llmProvider === "ollama" || llmProvider === "openai-compatible" || llmProvider === "aigateway"
|
const showBaseURL = llmProvider === "ollama" || llmProvider === "openai-compatible" || llmProvider === "aigateway"
|
||||||
|
|
@ -690,9 +691,11 @@ export function OnboardingModal({ open, onComplete }: OnboardingModalProps) {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{requiresApiKey && (
|
{showApiKey && (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<span className="text-xs font-medium text-muted-foreground uppercase tracking-wider">API Key</span>
|
<span className="text-xs font-medium text-muted-foreground uppercase tracking-wider">
|
||||||
|
{llmProvider === "openai-compatible" ? "API Key (optional)" : "API Key"}
|
||||||
|
</span>
|
||||||
<Input
|
<Input
|
||||||
type="password"
|
type="password"
|
||||||
value={activeConfig.apiKey}
|
value={activeConfig.apiKey}
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,7 @@ function ModelSettings({ dialogOpen }: { dialogOpen: boolean }) {
|
||||||
const [showMoreProviders, setShowMoreProviders] = useState(false)
|
const [showMoreProviders, setShowMoreProviders] = useState(false)
|
||||||
|
|
||||||
const activeConfig = providerConfigs[provider]
|
const activeConfig = providerConfigs[provider]
|
||||||
|
const showApiKey = provider === "openai" || provider === "anthropic" || provider === "google" || provider === "openrouter" || provider === "aigateway" || provider === "openai-compatible"
|
||||||
const requiresApiKey = provider === "openai" || provider === "anthropic" || provider === "google" || provider === "openrouter" || provider === "aigateway"
|
const requiresApiKey = provider === "openai" || provider === "anthropic" || provider === "google" || provider === "openrouter" || provider === "aigateway"
|
||||||
const showBaseURL = provider === "ollama" || provider === "openai-compatible" || provider === "aigateway"
|
const showBaseURL = provider === "ollama" || provider === "openai-compatible" || provider === "aigateway"
|
||||||
const requiresBaseURL = provider === "ollama" || provider === "openai-compatible"
|
const requiresBaseURL = provider === "ollama" || provider === "openai-compatible"
|
||||||
|
|
@ -398,9 +399,11 @@ function ModelSettings({ dialogOpen }: { dialogOpen: boolean }) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* API Key */}
|
{/* API Key */}
|
||||||
{requiresApiKey && (
|
{showApiKey && (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<span className="text-xs font-medium text-muted-foreground uppercase tracking-wider">API Key</span>
|
<span className="text-xs font-medium text-muted-foreground uppercase tracking-wider">
|
||||||
|
{provider === "openai-compatible" ? "API Key (optional)" : "API Key"}
|
||||||
|
</span>
|
||||||
<Input
|
<Input
|
||||||
type="password"
|
type="password"
|
||||||
value={activeConfig.apiKey}
|
value={activeConfig.apiKey}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue