feat(cloud): support Anthropic provider base URL
Tests / Test passed: 665

This commit is contained in:
2026-07-14 07:58:38 +08:00
parent 8b7e5a2800
commit 9250254dec
13 changed files with 124 additions and 39 deletions
+3 -3
View File
@@ -98,7 +98,7 @@ async function saveProfile() {
saving.value = true;
try {
const baseUrl = form.provider_type === "anthropic" ? null : form.base_url.trim() || null;
const baseUrl = form.base_url.trim() || null;
if (editingId.value) {
const existing = profiles.value.find((profile) => profile.id === editingId.value);
if (!existing) throw new Error("Provider profile no longer exists");
@@ -195,8 +195,8 @@ onMounted(refresh);
</label>
<label>Model <input v-model="form.model" autocomplete="off" /></label>
<label>Timeout seconds <input v-model="form.timeout_seconds" inputmode="decimal" /></label>
<label v-if="form.provider_type === 'openai-compatible'" class="field-full">Base URL
<input v-model="form.base_url" placeholder="Official OpenAI endpoint when blank" autocomplete="url" />
<label class="field-full">Base URL
<input v-model="form.base_url" placeholder="Official provider endpoint when blank" autocomplete="url" />
</label>
<label class="field-full">{{ editingId ? "Rotate API key" : "API key" }}
<input v-model="form.api_key" type="password" autocomplete="new-password" />