--- import BaseLayout from "@/layouts/BaseLayout.astro"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { parseAIConfigFromStorage, sanitizeAIConfigForClient, type PublicAIConfig, } from "@/lib/ai-config"; const user = Astro.locals.user; if (!user) return Astro.redirect("/login"); // Parse existing config let aiConfig: PublicAIConfig = { provider: "openai", model: "gpt-4-turbo", apiKeys: { openai: { isSet: false }, anthropic: { isSet: false }, groq: { isSet: false }, bytez: { isSet: false }, openrouter: { isSet: false }, together: { isSet: false }, google: { isSet: false }, local: { isSet: false }, externalAgent: { isSet: false }, }, localBaseUrl: "", externalAgentWebhookUrl: "", }; try { if (user.aiConfig) { aiConfig = sanitizeAIConfigForClient(parseAIConfigFromStorage(user.aiConfig)); } } catch (e) {} const sideNav = [ { name: "Profile", href: "/settings/profile" }, { name: "Account", href: "/settings/account" }, { name: "Security", href: "/settings/security" }, { name: "SSH Keys", href: "/settings/ssh-keys" }, { name: "Notification Preferences", href: "/settings/notification-preferences", }, { name: "AI Settings", href: "/settings/ai", active: true }, ]; --- AI Settings Configure AI providers for code review and generation features. Default Provider Select which AI provider to use for automated code reviews. Active Provider OpenAI (Default) Groq (Fast & Cheap) Bytez (Many Models) OpenRouter (Free models) Together AI (Open models) Google Gemini External Agent (Greptile-like) Anthropic Local LLM (Ollama/OpenAI-compatible) Model Name Leave blank to use provider default. Recommended: `gpt-4-turbo` (OpenAI), `llama3-70b-8192` (Groq), `meta-llama/llama-3.1-8b-instruct:free` (OpenRouter), `llama3.1` (Local). API Keys Your keys are stored securely and encrypted in the database. OpenAI API Key Anthropic API Key Groq API Key Get a free key at console.groq.com Bytez API Key Get a key at bytez.com OpenRouter API Key Together API Key Google AI API Key Local AI Base URL Local AI API Key (optional) External Agent Webhook URL External Agent Token Save Changes
Configure AI providers for code review and generation features.
Leave blank to use provider default. Recommended: `gpt-4-turbo` (OpenAI), `llama3-70b-8192` (Groq), `meta-llama/llama-3.1-8b-instruct:free` (OpenRouter), `llama3.1` (Local).
Get a free key at console.groq.com
Get a key at bytez.com