feat(litellm): add Claude Code OAuth model
This commit is contained in:
@@ -30,13 +30,21 @@ Open WebUI nunca monta ni lee `auth.json`. Envía una petición OpenAI-compatibl
|
||||
cd openwebui
|
||||
docker compose --env-file .env config
|
||||
docker compose --env-file .env up -d
|
||||
sudo install -o root -g root -m 0644 traefik-dynamic.yml /opt/traefik/dynamic/openwebui.yml
|
||||
```
|
||||
|
||||
Traefik observa `/opt/traefik/dynamic` y recarga este fichero sin reiniciar el contenedor. La ruta `/_app/immutable/` usa un router de mayor prioridad: conserva CrowdSec, omite el `ForwardAuth` repetitivo de Authentik y entrega los bundles con compresion y cache inmutable. El HTML, `/api`, `/static` y las rutas de usuario siguen protegidos por Authentik. No amplíes la excepción a rutas que puedan contener datos o recursos mutables.
|
||||
|
||||
## Verificación
|
||||
|
||||
```bash
|
||||
docker compose --env-file .env ps
|
||||
docker compose --env-file .env logs -f openwebui
|
||||
curl -I -H 'Accept-Encoding: br, gzip' \
|
||||
https://oweb.sherlockhomeless.net/_app/immutable/chunks/<bundle>.js
|
||||
curl -I https://oweb.sherlockhomeless.net/api/config
|
||||
```
|
||||
|
||||
El primer comando debe devolver `200`, `Content-Encoding` y `Cache-Control: public, max-age=31536000, immutable`. Sin una sesión activa, el segundo debe seguir redirigiendo a Authentik.
|
||||
|
||||
Si no aparecen modelos, prueba primero `/v1/models` contra LiteLLM con la misma clave. Si los modelos aparecen pero fallan sólo los alias Codex, revisa el montaje y renovación de `auth.json` en LiteLLM.
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
http:
|
||||
routers:
|
||||
openwebui-static:
|
||||
rule: Host(`oweb.sherlockhomeless.net`) && PathPrefix(`/_app/immutable/`)
|
||||
priority: 200
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
middlewares:
|
||||
- crowdsec-bouncer@file
|
||||
- openwebui-compress
|
||||
- openwebui-static-cache
|
||||
service: openwebui
|
||||
|
||||
openwebui:
|
||||
rule: Host(`oweb.sherlockhomeless.net`)
|
||||
priority: 100
|
||||
entryPoints:
|
||||
- websecure
|
||||
tls:
|
||||
certResolver: letsencrypt
|
||||
middlewares:
|
||||
- crowdsec-bouncer@file
|
||||
- ths-authentik@docker
|
||||
- openwebui-compress
|
||||
service: openwebui
|
||||
|
||||
middlewares:
|
||||
openwebui-compress:
|
||||
compress:
|
||||
minResponseBodyBytes: 1024
|
||||
encodings:
|
||||
- br
|
||||
- zstd
|
||||
- gzip
|
||||
|
||||
openwebui-static-cache:
|
||||
headers:
|
||||
customResponseHeaders:
|
||||
Cache-Control: public, max-age=31536000, immutable
|
||||
|
||||
services:
|
||||
openwebui:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://openwebui:8080
|
||||
Reference in New Issue
Block a user