Tested rootless-podman deployment shape:
* read_only: true on every service
* userns_mode: keep-id (host UID 1000 -> container UID 1000)
* tmpfs mounts for /tmp, /run, /var/run, /var/log, /root, /home
* bind mounts on ./data (no named volumes: podman auto-creates
them with the userns-mapped root UID 100000, which 755's
incorrectly against the host)
* loopback-only port bindings (drop the 127.0.0.1: prefix to
expose on all interfaces)
* PocketBase sidecar uses the corrected /pb_data, /pb_public,
/pb_hooks mount paths from the docker-compose fix.
The entrypoint chowns /app/data and gosu-drops to the unprivileged
deeptutor user (UID 1000) before starting supervisord, so under
userns_mode: keep-id the running process is your host user.
.env.example carries only the host-side loopback bindings and TZ. URL
knowledge lives in data/user/settings/system.json (read by the
entrypoint on every start -> DEEPTUTOR_API_BASE_URL -> proxy.ts). No
compose env var for the API base.
DeepSeek only supports high/max for reasoning_effort; minimal is a
DeepTutor convention that maps to thinking.type=disabled. Update comments
to be accurate for each provider.
Register Gemini as a first-class embedding provider with endpoint/env defaults, expose it in start_tour embedding selection, and add regression coverage for runtime resolution and wizard options
Generalises #368: adds an explicit per-model `send_dimensions` opt-in
exposed as a Settings UI toggle and an EMBEDDING_SEND_DIMENSIONS env var.
Tri-state semantics:
true -> always send (user knows their provider supports it)
false -> never send (e.g. Qwen text-embedding-v4 via litellm gateway
which returns HTTP 400 when `dimensions` is sent)
unset -> fall back to the text-embedding-3* heuristic from #368
Backend:
- Adapter base accepts `send_dimensions`; OpenAI-compatible adapter
decides via `_should_send_dimensions(model)` (replaces the hardcoded
startswith check from #368).
- ResolvedEmbeddingConfig / EmbeddingConfig carry the flag through.
- EnvStore reads/writes EMBEDDING_SEND_DIMENSIONS, dropping the line
entirely when empty so legacy `.env` files keep the Auto behaviour.
- ModelCatalogService syncs the flag from .env back into the catalog.
Frontend:
- Settings page shows a "Send dimensions" checkbox next to Dimension,
with an instant CSS-only info tooltip (replaces native `title` to
avoid the browser's ~1s delay). Disabling the toggle greys out the
Dimension input.
- New models default to send_dimensions=true.
- en/zh i18n strings added.
Tests (46 new cases, including the unit tests #368 marked added but
did not actually ship):
- adapter `_should_send_dimensions` tri-state + parametrized non-3 family
- httpx-mocked payload assertions for all four combinations
- runtime resolver: catalog wins over env, garbage values -> None
- env_store helpers + render_from_catalog + write skip-empty round-trip
- EmbeddingClient propagates the flag to the adapter config dict
Made-with: Cursor
Closes#227. Auth is disabled by default (AUTH_ENABLED=false) so
localhost usage is unaffected. Set AUTH_ENABLED=true +
NEXT_PUBLIC_AUTH_ENABLED=true to require login when hosting publicly.
Backend
- New deeptutor/services/auth.py: bcrypt password hashing, JWT
create/decode, multi-user JSON store with role + created_at schema,
auto-migration of old flat-hash format, first-user → admin bootstrap
- New deeptutor/api/routers/auth.py: require_auth / require_admin
FastAPI dependencies; public endpoints /login /logout /status
/register /is_first_user; admin-only /users /users/{u}/role
- deeptutor/api/main.py: Depends(require_auth) applied to all 14
protected routers
- deeptutor/api/routers/unified_ws.py: cookie-based JWT check before
ws.accept() when AUTH_ENABLED
- Added bcrypt>=4.0.0 and python-jose[cryptography]>=3.3.0 to
requirements/server.txt and pyproject.toml extras
Frontend
- web/middleware.ts: route protection; /login and /register are public
- web/lib/api.ts: apiFetch wrapper — credentials:include + 401→login
- web/lib/auth.ts: login/logout/fetchAuthStatus + register() +
checkIsFirstUser()
- web/lib/admin-api.ts: listUsers / deleteUser / setUserRole
- web/lib/session-api.ts: credentials:include on all fetches;
expectJson redirects to /login on 401 instead of throwing
- web/app/(auth)/login/page.tsx: auto-redirects to /register when no
users exist; shows success banner after registration
- web/app/(auth)/register/page.tsx: new registration page with
first-user admin notice and password confirmation
- web/app/(admin)/admin/users/page.tsx: admin dashboard — user table
with role toggle and delete; guards against self-demotion/deletion
- AdminLink and LogoutButton hidden when AUTH_ENABLED=false
- .env.example and README.md updated with auth vars and setup guide
Made-with: Cursor
The Settings → LLM diagnostic hardcoded max_tokens=200. Reasoning-capable
models (minimax-m2, o1, Gemini thinking) spend most of that budget on
internal thinking tokens and return empty visible content, which the
probe then reports as "LLM returned an empty response" even though the
API call succeeded.
Read the budget from LLM_TEST_MAX_TOKENS with a 1024 default (falls back
on non-numeric values). Documented in .env.example and plumbed through
docker-compose.yml.