Files
anyllm-proxy/docker-entrypoint.sh
whit3rabbitandClaude Opus 4.8 e96ec18b24 feat: admin UI on by bare launch + tier-router review fixes
Admin/browser:
- Enable admin UI on bare (zero-arg) launch; auto-open default browser
  (main_helpers::bootstrap::admin_enabled / is_default_launch, browser.rs).
- Guard Docker (docker-entrypoint.sh) and systemd (packaging/anyllm-proxy.service)
  so headless server installs keep admin opt-in (DISABLE_ADMIN default off).

Claude Code tier router fixes (from code review):
- put.rs: validate only *enabled* tiers, and accept statically-configured
  (all_backends) targets via new SharedState.static_backends, not just managed.
- openai_signals: drop historical reasoning_content check so a plain follow-up
  in a reasoning conversation isn't misrouted to the Think tier.
- resolve_router_tier: warn! on fail-open when an active tier's backend is
  unknown instead of silently bypassing the router.

Tests: static-config backend acceptance; existing router coverage still green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 20:38:25 -05:00

26 lines
959 B
Bash
Executable File

#!/bin/sh
set -e
# Translate WEBUI=1 or ADMIN=1 into the --webui CLI flag so Docker users
# can enable the admin UI via environment variables without overriding CMD.
if [ "${WEBUI:-0}" = "1" ] || [ "${ADMIN:-0}" = "1" ]; then
set -- --webui "$@"
fi
# The binary enables the admin UI by default on a bare (no-arg) launch. In a
# container that has no CMD, a plain `docker run` would therefore start an
# (unreachable, loopback-only) admin server on every run. Keep admin opt-in in
# Docker as before: unless it was explicitly requested via WEBUI/ADMIN or a
# --webui/--admin flag, and unless the operator already set DISABLE_ADMIN, force
# it off. Operators still enable it with WEBUI=1 (+ ADMIN_BIND=0.0.0.0).
case " $* " in
*" --webui "* | *" --admin "*) ;; # explicit request -> leave admin on
*)
if [ -z "${DISABLE_ADMIN:-}" ]; then
export DISABLE_ADMIN=1
fi
;;
esac
exec /usr/local/bin/anyllm-proxy "$@"