Fiks config-generering: skriv til prosjektrot, ikke web/

process.cwd() i SvelteKit er web/, men config.yaml skal ligge i
prosjektrotens config/litellm/. Endret til relativ sti opp én mappe.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
vegard 2026-03-16 07:19:39 +01:00
parent a28c61605c
commit c67beb6086

View file

@ -57,8 +57,8 @@ export const POST: RequestHandler = async ({ locals, url }) => {
yaml += '\ngeneral_settings:\n'; yaml += '\ngeneral_settings:\n';
yaml += ' master_key: "os.environ/LITELLM_MASTER_KEY"\n'; yaml += ' master_key: "os.environ/LITELLM_MASTER_KEY"\n';
// Skriv til config-fil // Skriv til config-fil (prosjektrot er én mappe opp fra web/)
const configPath = join(process.cwd(), 'config', 'litellm', 'config.yaml'); const configPath = join(process.cwd(), '..', 'config', 'litellm', 'config.yaml');
writeFileSync(configPath, yaml, 'utf-8'); writeFileSync(configPath, yaml, 'utf-8');
// Restart ai-gateway container hvis forespurt // Restart ai-gateway container hvis forespurt