Merge features-c2: the docs portal and its links in English and Turkish

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-05 00:15:25 +02:00
commit e8a62b23b7
201 files changed
+26276 -630

No files matched your search

+35 -18
View File
@@ -20,6 +20,7 @@ import (
"gitea.mynodes.xyz/ilker/llmgw/internal/control/catalog"
"gitea.mynodes.xyz/ilker/llmgw/internal/guard"
"gitea.mynodes.xyz/ilker/llmgw/internal/notify"
"gitea.mynodes.xyz/ilker/llmgw/internal/obs"
"gitea.mynodes.xyz/ilker/llmgw/internal/secrets"
"gitea.mynodes.xyz/ilker/llmgw/internal/tlsconf"
)
@@ -94,10 +95,11 @@ type Server struct {
// Monitoring is where the dashboard reads its history from.
Monitoring Monitoring `koanf:"monitoring"`
// Tracing sends a trace of each inference request to an OpenTelemetry
// collector. Off unless an endpoint is set here or in
// Tracing sends traces to an OpenTelemetry collector: each inference
// request, and on a control plane each placement, replica start and
// model job. Off unless an endpoint is set here or in
// OTEL_EXPORTER_OTLP_ENDPOINT.
Tracing Tracing `koanf:"tracing"`
Tracing obs.Tracing `koanf:"tracing"`
// Mirror points the control plane at a model mirror it can administer.
// Empty means there is none, and /admin/mirror stays unmounted.
@@ -197,21 +199,6 @@ type Monitoring struct {
Timeout time.Duration `koanf:"timeout"`
}
// Tracing is where request traces go, over OTLP/HTTP.
//
// One span per inference request, with admission, scheduling and each attempt
// at an engine beneath it, and the trace carried on to the engine in a
// traceparent header. The request's X-Request-Id is on the span, so a trace
// and `llmgw ctl request` name the same request.
type Tracing struct {
// Endpoint is the collector, for example http://otel.internal:4318.
// Empty falls back to OTEL_EXPORTER_OTLP_ENDPOINT, and to no tracing.
Endpoint string `koanf:"endpoint"`
// SampleRatio is the share of requests traced, 0 to 1, when the caller
// did not decide it with a sampled traceparent of its own. Zero takes 1.
SampleRatio float64 `koanf:"sample_ratio"`
}
// Mirror is a model mirror this control plane administers over its API.
//
// The mirror is a separate machine with a large disk, not part of the gateway,
@@ -265,6 +252,13 @@ type Landing struct {
// a language with the switcher at the foot of every page and whose
// browser asks for none it speaks: "en" or "tr". Empty is English.
Language string `koanf:"language"`
// DocsSignIn serves the docs portal at /docs only to someone signed in.
// Off, the portal is public like this page: its client guide is for the
// person who has no account yet, and the operator documents describe
// llmgw in general — no address, model or key of this installation —
// which the project's repository publishes anyway. On, a visitor is sent
// to sign in, and without accounts the portal needs an API key.
DocsSignIn bool `koanf:"docs_sign_in"`
}
// Threads configures conversation and memory storage for a gateway without
@@ -396,6 +390,11 @@ type Control struct {
// Timezone is where models' scaling schedules are read, an IANA name
// like Europe/Istanbul; empty is the control plane's own.
Timezone string `koanf:"timezone"`
// EvalDir is where quality suites are read from by name, for `llmgw ctl
// eval MODEL --suite NAME`, a model's eval gate and the console. The
// suites the binary carries (arithmetic, json-format) are found when it
// has none of the name; a suite here of the same name replaces one.
EvalDir string `koanf:"eval_dir"`
// Enabled runs the control plane even when configuration declares no
// models.
@@ -480,6 +479,11 @@ type Router struct {
// another. Needs the store.
Batch Batch `koanf:"batch"`
// Cache bounds the answers kept for the projects that reuse them
// (llmgw keys cache). Which projects do, and for how long, is theirs
// to set; this is only how much memory it may take.
Cache Cache `koanf:"cache"`
// TrustedProxies are the reverse proxies in front of the client port,
// as addresses or CIDR prefixes. Their X-Forwarded-For, -Proto and -Host
// are believed; anyone else's are not, since they decide the address
@@ -613,6 +617,18 @@ type Batch struct {
RetainDays int `koanf:"retain_days"`
}
// Cache is how much of this process's memory reused answers may take. The
// answers are held here and nowhere else: each gateway process keeps its
// own, and a restart begins them again.
type Cache struct {
// MaxBytes bounds every project's answers together; 128 MB unless set.
// Past it, the answers used longest ago go first.
MaxBytes int64 `koanf:"max_bytes"`
// MaxEntryBytes bounds one answer; a longer one is not kept. 1 MB
// unless set.
MaxEntryBytes int64 `koanf:"max_entry_bytes"`
}
// Default returns the configuration used when nothing is specified.
func Default() Server {
return Server{
@@ -629,6 +645,7 @@ func Default() Server {
LostAfter: 60 * time.Second,
PortRange: []int{20000, 20999},
MgmtInterface: "eth0",
EvalDir: "/etc/llmgw/eval",
},
Router: Router{
ScrapeInterval: 2 * time.Second,