import { useFormContext } from "react-hook-form"; import { LabelWrapper } from "@/components/label-wrapper"; import { Input } from "@/components/ui/input"; export interface AnthropicSettingsFormData { apiKey: string; } export function AnthropicSettingsForm({ modelsError, isLoadingModels, }: { modelsError?: Error | null; isLoadingModels?: boolean; }) { const { register, formState: { errors }, } = useFormContext(); const apiKeyError = modelsError ? "Invalid Anthropic API key. Verify or replace the key." : errors.apiKey?.message; return (
{apiKeyError && (

{apiKeyError}

)} {isLoadingModels && (

Validating API key...

)}

Configure language models in the Settings page after saving your API key. Note: Anthropic does not provide embedding models.

); }