Deployments: API keys, deploy from the library, reorganized form
- Settings → API keys (generate or paste, show again, delete). Deployments with "Require an API key" get them via LLAMA_API_KEY / VLLM_API_KEY (--api-key for several vLLM keys); values are masked in the stored/shown command and in logs. The chat proxy sends a key. - "Deploy" in the library and on the model page preselects the model and a runtime that can serve it; library rows and the model page link to the model's deployments. - Deployment form: grouped launch options with flags next to labels, command in its own step, extra arguments as flag/value rows (runtime form too). - Native selects follow the dark theme (color-scheme), fixing unreadable options. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
66e6a8c4f7
commit
ea1f18cc74
32 files changed
+2478
-183
No files matched your search
@@ -0,0 +1,20 @@
|
||||
"use client";
|
||||
|
||||
import { useSyncExternalStore } from "react";
|
||||
|
||||
/** The browser's host name; null while rendering on the server, so hydration matches. */
|
||||
export function useHostname(): string | null {
|
||||
return useSyncExternalStore(
|
||||
() => () => {},
|
||||
() => window.location.hostname,
|
||||
() => null,
|
||||
);
|
||||
}
|
||||
|
||||
/** llama-server's built-in chat UI, served at / on the published host port. */
|
||||
export function webUiUrl(
|
||||
d: { engine: string; hostPort: number | null; options: { webui?: boolean | null } },
|
||||
hostname: string | null,
|
||||
): string | null {
|
||||
return d.engine === "llama.cpp" && d.options.webui !== false && d.hostPort && hostname ? `http://${hostname}:${d.hostPort}/` : null;
|
||||
}
|
||||
Reference in new issue
Block a user