Skip to content

Build your personal knowledge base with Trilium Notes

feat(llm): mark the Claude Code provider as beta

Elian Dorandf3d25a57c85
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index e3280175bd..e28fbbd9d3 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -3075,6 +3075,7 @@
"provider_type": "Provider",
"connection_details": "Connection",
"advanced_options": "Advanced options",
+ "beta": "Beta",
"provider_desc_anthropic": "Claude models via the Anthropic API. Requires an API key.",
"provider_desc_claude_agent": "Uses your Claude Pro/Max subscription, no API key. Requires Claude Code on the machine running Trilium.",
"provider_desc_openai": "GPT models via the OpenAI API. Requires an API key.",
diff --git a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.css b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.css
index 7a8840df32..40b84b8404 100644
--- a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.css
+++ b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.css
@@ -12,4 +12,15 @@
.tn-card-section .form-group:last-child {
margin-bottom: 0;
}
+
+ /* Provider name + its beta badge sitting inline on the card. */
+ .add-provider-card-heading {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.5em;
+ }
+
+ .add-provider-beta-badge {
+ --color: var(--link-color, var(--main-text-color));
+ }
}
diff --git a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.tsx b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.tsx
index 715b5040b5..b9191b301f 100644
--- a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.tsx
+++ b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.tsx
@@ -4,6 +4,7 @@ import { createPortal } from "preact/compat";
import { useMemo, useRef, useState } from "preact/hooks";
import { t } from "../../../../services/i18n";
+import { Badge } from "../../../react/Badge";
import { Card, CardSection } from "../../../react/Card";
import FormGroup from "../../../react/FormGroup";
import FormTextBox from "../../../react/FormTextBox";
@@ -30,6 +31,8 @@ export interface ProviderType {
iconUrl: string;
/** Short blurb shown under the provider name on its selectable card. */
description: string;
+ /** Marks the provider as beta, shown as a badge next to its name. */
+ beta?: boolean;
/** When false, the provider needs no API key or base URL (e.g. subscription-based auth). */
usesApiKey?: boolean;
}
@@ -39,7 +42,7 @@ export interface ProviderType {
export const PROVIDER_TYPES: ProviderType[] = [
{ id: "anthropic", name: "Anthropic", defaultBaseUrl: "https://api.anthropic.com/v1", iconUrl: anthropicIcon, description: t("llm.provider_desc_anthropic") },
// Uses the Claude Agent SDK on the server; auth belongs to Claude Code (`claude /login`).
- { id: "claude-agent", name: "Claude Code", defaultBaseUrl: "", iconUrl: claudeAgentIcon, description: t("llm.provider_desc_claude_agent"), usesApiKey: false },
+ { id: "claude-agent", name: "Claude Code", defaultBaseUrl: "", iconUrl: claudeAgentIcon, description: t("llm.provider_desc_claude_agent"), beta: true, usesApiKey: false },
{ id: "openai", name: "OpenAI", defaultBaseUrl: "https://api.openai.com/v1", iconUrl: openaiIcon, description: t("llm.provider_desc_openai") },
{ id: "google", name: "Google Gemini", defaultBaseUrl: "https://generativelanguage.googleapis.com/v1beta", iconUrl: geminiIcon, description: t("llm.provider_desc_google") }
];
@@ -135,7 +138,9 @@ export default function AddProviderModal({ show, onHidden, onSave }: AddProvider
<SelectableCard
key={provider.id}
iconUrl={provider.iconUrl}
- title={provider.name}
+ title={provider.beta
+ ? <span className="add-provider-card-heading">{provider.name}<Badge text={t("llm.beta")} className="add-provider-beta-badge" outline /></span>
+ : provider.name}
description={provider.description}
selected={selectedProvider === provider.id}
onSelect={() => setSelectedProvider(provider.id)}