docs: v0.2 features

README, examples, and a comment update covering v0.2's four features:

- README: new Caching section (key semantics incl. requestedModel +
  endpoint, hit/miss header, count-requests-free-tokens, group override,
  redis-required) and Admin section (enable flag, admin:true users,
  browser key-entry flow, sessionStorage, what's exposed/redacted,
  poll-counts-against-quota, unauthenticated-shell). Retry and Image/audio
  sections already existed from T3/T4; left as-is. Config reference gains
  cache/admin rows at the top level, GroupConfig.cache, UserConfig.admin,
  and full CacheConfig/AdminConfig tables. Known limitations gains
  images/audio-not-cost-accounted and cache-shares-entries-across-users.
- examples/kubernetes.yaml: adds cache{enabled:true,ttl:5m} (this example
  already configures redis) and admin{enabled:false} with a comment on
  enabling it, plus an inline admin:true user gated behind that flag.
  Round-trips through New() cleanly (verified with a throwaway test).
- examples/docker-compose.yml: adds retry, cache (left disabled — this
  minimal demo runs no Redis), and admin (left disabled, with a comment
  on enabling it). Round-trips through New() cleanly (verified the same
  way).
- admin.go: pluginVersion's doc comment now says to keep it in sync with
  the release tag.
This commit is contained in:
2026-08-20 20:15:41 +01:00
parent 63459b0c24
commit 2fe71c25eb
4 changed files with 186 additions and 1 deletions
+17
View File
@@ -60,6 +60,23 @@ configs:
- name: demo
group: default
apiKey: "${LLMGW_DEMO_KEY:-sk-demo-local}"
# v0.2 features — see ../README.md#retry, #caching, #admin.
retry:
enabled: true
attempts: 1
backoff: 250ms
cache:
# Left disabled: this minimal demo runs no Redis, and
# cache.enabled: true with no `redis` block configured
# silently stays off anyway (one warning logged) — see
# ../README.md#caching. Add a `redis` service and block
# to this compose file to actually exercise it.
enabled: false
admin:
# Flip to true, then add `admin: true` to the "demo"
# user above, to try the dashboard at
# http://localhost:${LLMGW_DEMO_PORT:-8080}/admin.
enabled: false
services:
whoami: