fix(opencode): show Base URL field for all SDK types

Previously Base URL was only shown for @ai-sdk/openai-compatible.
Now it's always visible to support proxy scenarios for official SDKs
like DeepSeek, Anthropic, etc.
This commit is contained in:
Jason
2026-01-17 11:46:50 +08:00
parent 42a92c712a
commit 966d7b5782

View File

@@ -130,26 +130,24 @@ export function OpenCodeFormFields({
websiteUrl={websiteUrl}
/>
{/* Base URL (only for compatible providers) */}
{npm === "@ai-sdk/openai-compatible" && (
<div className="space-y-2">
<FormLabel htmlFor="opencode-baseurl">
{t("opencode.baseUrl", { defaultValue: "Base URL" })}
</FormLabel>
<Input
id="opencode-baseurl"
value={baseUrl}
onChange={(e) => onBaseUrlChange(e.target.value)}
placeholder="https://api.example.com/v1"
/>
<p className="text-xs text-muted-foreground">
{t("opencode.baseUrlHint", {
defaultValue:
"The base URL for OpenAI-compatible API endpoints.",
})}
</p>
</div>
)}
{/* Base URL */}
<div className="space-y-2">
<FormLabel htmlFor="opencode-baseurl">
{t("opencode.baseUrl", { defaultValue: "Base URL" })}
</FormLabel>
<Input
id="opencode-baseurl"
value={baseUrl}
onChange={(e) => onBaseUrlChange(e.target.value)}
placeholder="https://api.example.com/v1"
/>
<p className="text-xs text-muted-foreground">
{t("opencode.baseUrlHint", {
defaultValue:
"The base URL for the API endpoint. Leave empty to use the default endpoint for official SDKs.",
})}
</p>
</div>
{/* Models Editor */}
<div className="space-y-3">