The admin serializer only sets the field when the catalog declares
`codex_supported_reasoning_levels`, but both non-admin serializers copied the
raw `.get(...)` result, which is `null` for every model that declares nothing.
The web composer guards with `supported_reasoning_efforts !== undefined` before
calling `.map`, so any ordinary account granted such a model crashed on
`/chat` — admins were unaffected, which is why a fresh home never reproduced
it (#2732, #2833).
Share one `declared_reasoning_levels` helper across the admin serializer,
`redacted_model_access`, `allowed_llm_options`, and the personal sign-in rows:
each now either emits a normalized list or omits the key.
An account granted a model other than the deployment active one got an
option list with no flagged default, so the chat composer fell back to
"Select model" while the turn path already pinned the first granted
model. Flag that same option so both agree (#2438).
Adds a `claude_code` LLM provider that runs turns through the local Claude
Code CLI via `claude-agent-sdk`, so DeepTutor can use the account signed in
with `claude /login` (including a Claude subscription) without an Anthropic
API key.
- One long-lived Claude Code process per DeepTutor session, mirroring the
CodeBuddy SDK provider's owner-task pattern.
- Claude Code's built-in tools, settings, CLAUDE.md and hooks are disabled;
DeepTutor tools are exposed through an in-process SDK MCP server and tool
calls are returned to DeepTutor's dispatcher.
- Tool turns end via max_turns=1 and are drained instead of interrupted, so
the transcript does not record an interrupted request.
- System messages become Claude's real system prompt.
- Optional extra: `pip install deeptutor[claude-code]`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.
Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
* feat: add codebuddy provider
* fix: treat codebuddy as login-backed provider
* feat: sync codebuddy account models
* fix: ignore no-key placeholder for codebuddy
* feat: add codebuddy web login
* fix: streamline codebuddy settings and latency
* fix: support switching codebuddy accounts
* fix: preserve codebuddy sessions and tool calls
* feat: use CodeBuddy HTTP provider over Agent SDK
Chat with CodeBuddy over plain HTTP by reusing the login state that the
IDE plugin / CLI stores on disk, instead of bundling the ~130MB Agent SDK.
- add codebuddy_http_provider (OpenAI-compatible /chat/completions on
<endpoint>/v2) with codebuddy_credentials for local OAuth session reuse
- provider_factory picks HTTP transport whenever a login state or API key
is available; Agent SDK stays as fallback for CLI agent features
- demote codebuddy-agent-sdk from core deps to optional codebuddy extra
- default model codebuddy/default -> codebuddy/hy3
- update auth card UX and locales for SDK-less sign-in flow
* chore: label codebuddy provider as codebuddy/workbuddy in the dashboard
* style: apply pre-commit formatting after upstream merge
* chore: capitalise codebuddy provider label as CodeBuddy/WorkBuddy
---------
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
A Codex token authorizes one person's ChatGPT plan, so the profile is
correctly never grantable — but the OAuth endpoints were admin-only too,
which left ordinary users unable to reach Codex by any route: they could
neither be given the administrator's profile nor sign in for themselves.
What made per-user sign-in unsafe was where the profile landed:
``get_model_catalog_service()`` resolves a non-admin to the ADMIN catalog, so
a user's sync would have published their profile into the shared one. A
sign-in now publishes into the owner's own catalog, keyed by the same owner
resolution as the credential store, so a login and its profile can never
land in different places. Ordinary users get
``data/users/<uid>/settings/model_catalog.json``; an administrator gets the
shared catalog exactly as before.
``redacted_model_access`` — the one place grants are resolved — gains those
personal rows (source="personal") for the caller's OWN id only, so the
option list, the capability gate, and selection validation agree without
three separate merges, and an administrator inspecting somebody's grants
still sees only what they assigned. The resolution path merges the same
profiles so a personal selection resolves to a real profile, with the
owner's copy winning over a shared profile of the same managed id (the ids
are per-provider constants, and the administrator's copy lists their models,
not the user's).
Runtime token ownership needed no change: the provider already reads the
token per owner. Endpoint gating is narrower rather than absent — a partner
is refused, since it is a synthetic user whose owner is a real account and
admitting one would mean acting on that person's login, sign-out included.
The restricted-user Settings → LLM page grows the connect/refresh/sign-out
card (no catalog, no credentials), and a sign-in now drops the cached model
options so a freshly connected account does not keep seeing the old list.
Replaces the oauth_cli_kit indirection with DeepTutor's own PKCE loopback
sign-in, an account-scoped live model catalog, and a Settings card that exposes
only the OAuth surface. Credentials live in `<user-root>/private/openai-codex/`
with owner-only permissions, atomic writes, and a generation guard that stops a
late refresh from resurrecting a signed-out session; `~/.codex` is never read or
modified. A CLI path shares the same service.
A Codex token authorizes one person's ChatGPT plan, so credentials anchor to the
signing-in account's own root and the managed profile is marked `owner_bound`:
`redacted_model_access` drops it for every caller, and it is not offered as an
assignable model. Signing in publishes the profile but only activates it when no
LLM is configured yet, so it never repoints a deployment that already has one.
Also from review: reschedule the status poll so one dropped response cannot
strand the card on "waiting"; defer the catalog reload when the operator has
unsaved edits instead of discarding them; log the real cause behind the generic
provider error; stop promising a retry when the token refresh actually failed;
bind both loopback stacks since `localhost` may resolve to either; and drop the
provider metadata fields nothing consumed.