Skip to content

Releases: thediymaker/obleth-chat

obleth-chat v0.9.3

Choose a tag to compare

@github-actions github-actions released this 28 Oct 06:50

Slurm clusters read only the person's own jobs, Chat caps what it reads from any cluster, and research runs that end as Chat checks on them are no longer marked lost.

Fixed

  • A large Slurm cluster ran Chat out of memory. A cluster's status, and the jobs and status tools, read slurmrestd's list of every job on the cluster and kept only the person's; on a large cluster that list is hundreds of megabytes. The person's running and pending jobs now come from Slurm accounting, filtered by their user name, and the queue's size from the scheduler's statistics (/diag). The jobs tool no longer lists other users' jobs.
  • Every Slurm and Kubernetes answer is capped at 32 MiB as it is read. A larger one is refused with a message that names the limit, instead of being held in memory.
  • A research run that ended just as Chat checked on it was marked lost. Chat looked for the run's exit file, then for its process; a run that finished between the two was reported lost and its result dropped. Chat now reads the exit file again once the process is gone.

obleth-chat v0.9.2

Choose a tag to compare

@github-actions github-actions released this 28 Oct 06:24

Slurm clusters work with slurmrestd v0.0.43 to v0.0.45, and a cluster can set its REST API version.

Fixed

  • Slurm clusters on newer slurmrestd. Chat looked only for REST API v0.0.40 to v0.0.42, so a slurmrestd that has dropped those answered every call with "does not offer the Slurm REST API v0.0.40 or newer". Chat now looks for v0.0.45 down to v0.0.40 and uses the newest one the server answers.

New

  • REST API version on a Slurm cluster. Optional, such as v0.0.46. When set, Chat uses only that version, so a newer slurmrestd works without a Chat release; empty keeps finding the newest. A version the server doesn't offer is refused when the cluster or a person's token is saved.

obleth-chat v0.9.1

Choose a tag to compare

@github-actions github-actions released this 28 Oct 01:47

Model load tints the model's own icon instead of adding a dot.

Changed

  • Model load tints the model's icon instead of adding a dot: amber while the model is busy, red while it is full, faint while it has no servers. Load reads "37 running on 32 slots", which stays true while servers being removed finish their requests and the slots already count only the rest.

obleth-chat v0.9.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 01:14

Research reads papers by section, Knowledge cites the section a passage comes from, long pastes become attachments, and Chat shows how busy each model is.

New

  • How busy each model is. With a gateway that reports load (obleth's GET /v1/load), the model list marks a model that is busy (amber), full (red) or has no servers running (hollow); a free model carries no mark. The model button shows the chosen model's mark. A reply that hasn't started after 3 seconds says what holds it: the model is full, with how many requests are running and waiting, or the person has reached their own in-flight limit. It offers to switch to a favorite or default model that isn't full, or to Auto; switching stops the waiting reply and sends it again. When the gateway gives up waiting for a slot, the reply says the model stayed full and offers the same switch. Gateways that don't report load show none of this.
  • Research reads papers by section. read_paper takes a link to a paper, or any web page with headings, and what the chat is looking for in it. arXiv abstract and PDF links read arXiv's HTML version. The page is fetched in the workspace, once, and kept there. Chat splits it at its headings, keeping math as TeX. One pick-one decision over the outline ranks the sections, and the likeliest three come back in full, with the outline and each pick's probability. A document with more than 255 sections is narrowed by its top-level sections first. Asked for sections by id, number or heading, it returns those. The research rules ask the chat to take a paper's settings from the section that gives them and cite it. Administrators turn the picking off with Pick sections of papers; the chat then gets the outline and names the sections itself.
  • Knowledge keeps the section each passage sits under. PDFs are split at their bookmarks, Word files at their heading styles, Markdown at its # headings and HTML at h1–h6, and a passage never spans two sections. Citations, the sources under a reply and Knowledge search show the section ("2 Method › 2.1 Schedule") with the file and page, and the chat sees it with each passage. Keyword search reads a section's headings as part of its passages, so a word only the heading has finds them. Passages are embedded as before. Files without headings are read as before, and files indexed before this have no sections until they are uploaded again.

Changed

  • Long pastes become attachments. Pasting more than 4,000 characters into the message box, or enough to pass its 12,000-character limit, attaches the text as a file named "Pasted text" instead of cutting it off where the box ends. Click the attachment's name to read it, or remove it. Text over what a conversation can hold (100 KiB) is refused with a message. The box shows how many characters it holds once it is near the limit.

Fixed

  • A Word or HTML file in which an & is followed closely by Chinese, Japanese or other multi-byte text stopped Knowledge indexing on the replica that read it, and on each replica that retried it, until Chat restarted. Such files are read correctly now, and each file is read in its own task, so a file that fails unexpectedly is marked failed on its own.

Upgrading

  • Migration 048 adds decisions.pick_sections (on).
  • Migration 049 adds knowledge_passages.section and rebuilds the keyword index of knowledge_passages to include it. The table is rewritten once.

obleth-chat v0.8.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 21:07

Research checks where each new experiment goes in the tree, and whether a reply's statements match its runs.

New

  • Research checks where each new experiment goes. experiment_create takes builds_on: what the parent established that the new idea keeps. It is required unless the parent is the baseline, and an experiment that can't name it is pointed to its parent's parent instead. Chat then asks whether the idea builds on its parent; under the baseline, once another node beats it, whether the idea is another option of the round already there rather than a new decision, which belongs under the best result. A confident no refuses the experiment once and says where it belongs; the chat can confirm it with confirm: true. The Research tab shows each node's builds_on and the check. Administrators turn it off with Check where new experiments go.
  • Research replies are checked against their runs. When a research turn ends, values a reply gives a run (run 4 reached loss 2.31, run 4: 2.31, or a table with a run column) are compared with what the run printed, at the digits written, and runs that don't exist are named. Plans, targets, differences and running runs are left alone. Comparisons and causes the code can't check go to Decisions in one request. What doesn't match shows as a step under the reply, and the next research turn is told to correct it. Administrators turn the Decisions part off with Check research reports; the value checks need no model and always run.

Changed

  • A Decisions answer that doesn't say how sure it is counts as sure in proportion to how far it is from a coin flip, instead of not at all. The new checks act only on a no that is at least 50% sure.

Upgrading

  • Migration 047 adds decisions.check_tree and decisions.check_reports (both on), experiments.builds_on and experiments.placement, and research.report_check.

obleth-chat v0.7.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 19:26

Administrators choose where Chat asks its short yes/no questions, and research checks whether each run tested its idea.

New

  • Decisions: where Chat sends short yes/no and pick-one questions. Administrators choose in Settings › Administration › System › Decisions: the gateway (the default), as the person each question is for, so it counts toward their usage; another endpoint with its own key, so usage counts against that key; or off. Questions use the verdicts format (POST /v1/verdicts), so any service that speaks it can answer. An address with no path, or one ending in /v1, gets /v1/verdicts added. The key is sealed with OBLETH_CHAT_SECRET_KEY_FILE, never shown or logged, and redirects aren't followed, so it goes only where the administrator pointed it. Model left blank lets the endpoint choose; the model must return token probabilities (logprobs). Check asks a sample question with the form's values before they are saved. When decisions are off or fail, work goes on without them.
  • Research checks whether each run tested its idea. When the chat reads a finished run on a changed node, Chat asks whether the run really tested its idea, from the node's description, its change from the parent and the end of its output. When the answer leans no, experiment_wait tells the chat to read the output before trusting the number and to put any fix in a child; the node stays frozen either way. The project's Research tab shows the check on each run, or why it was skipped. Administrators turn it off with Check research runs.

Upgrading

  • Migration 046 adds the decisions settings (the gateway, with run checks on) and research_runs.decision. With a gateway that has no /v1/verdicts, run checks are recorded as skipped; choose Off to stop asking.

obleth-chat v0.6.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 05:31

Chat can send each person's own identity provider token to the gateway, and can run with single sign-on only.

New

  • Forward people's own tokens to the gateway. With OBLETH_CHAT_GATEWAY_AUTH=forward, a gateway call carries the access token the OIDC provider issued to the signed-in person instead of a token Chat signs, so the gateway sees the person and Chat holds no key that can act as anyone. Chat keeps each sign-in's tokens encrypted, refreshes the access token shortly before it expires under a lease (so two replicas never present the same refresh token, and no database connection waits on the provider), in a task a closed tab can't interrupt, and sends it only to the gateway. Each sign-in uses its own grant, and API-token chats the grant of the sign-in the token was made in; Auto mode and Knowledge indexing use the person's most recently refreshed sign-in. When the provider refuses a refresh with invalid_grant, Chat ends that sign-in and the API tokens made in it, and work with no sign-in left stops with "Sign in again to continue": Auto mode stops nudging, and Knowledge marks the file failed. invalid_client and other client errors end nothing. A failed sign-in revokes the grant its code exchange made. An account can be linked to only one identity at the provider. Someone linked to the provider never gets Chat's signed token; local password accounts still do while a signing key is set. Forward mode needs OIDC with offline_access and OBLETH_CHAT_SECRET_KEY_FILE; the gateway signing key becomes optional. The gateway must trust the provider's issuer, keys and audience. See the README.
  • Signing out revokes the provider's refresh token. In forward mode, every way a sign-in ends (signing out, revoking a session, signing out other devices, a password change or reset, an administrator disabling the account or ending its sessions, a session expiring) revokes its refresh token at the provider's revocation_endpoint when discovery lists one, in the background so signing out never waits.
  • Sessions follow the provider in forward mode. A sign-in that keeps a grant lasts OBLETH_CHAT_SESSION_HOURS (now up to 8760) rather than ending with the ID token. Once its access token expires, its next request of any kind refreshes it, and a refused grant ends the session then, so ending the sign-in at the provider ends it in Chat within the access token's lifetime. A provider that can't be reached is trusted for 15 minutes past expiry and asked again for a sign-in at most every 30 seconds, an access token that has not expired keeps serving meanwhile, and signing out never needs the provider. A refresh token sent with no answer back is presented again only within 45 seconds, since a provider that rotated it may take a later reuse as theft; after that, or when a replica stopped in the middle of a refresh, Chat ends the sign-in itself. Shutdown starts no refresh and sends no token, and waits for refreshes under way to save what the provider answered. Password sessions stay capped at 168 hours. Installs usually set something like 2160 hours.
  • OBLETH_CHAT_PASSWORD_SIGN_IN=false turns passwords off. Password sign-in, password changes, administrator resets, invitations and reset links all refuse, the sign-in page shows only the single sign-on button, and administrators create accounts without a password and link them to single sign-on. It needs OIDC, and Chat refuses to start with a bootstrap password rather than leave one waiting in the environment. Pending forced password changes are cleared, since no one could make them. Sessions that began with a password, and the API tokens made in them, end when Chat starts and are refused on every request. Link existing administrators before turning passwords off.
  • OBLETH_CHAT_OIDC_PROVIDER_USERNAMES=true names accounts after the provider's username. An account made at sign-in takes the provider's preferred_username when it is a valid username, doesn't start with oidc_ and no other account has it; otherwise it is named oidc_ plus an id as before. Names taken this way follow the provider: on each sign-in they change to the provider's current username, or back to a generated name when another account holds it. Accounts still on a generated name take the provider's once it is free, including accounts made before the setting was turned on. Names an administrator or bootstrap chose are never changed. Off by default, since OIDC doesn't promise that this claim is unique or stable: turn it on only for providers that assign usernames themselves and never reuse them.
  • OBLETH_CHAT_OIDC_SCOPES sets the scopes Chat asks for (default openid profile; openid is always included).
  • OBLETH_CHAT_SECRET_KEY_FILE: a 32-byte key (raw, hex or base64; openssl rand -hex 32) for what Chat stores encrypted. When set, saved connection tokens are sealed with it, and while the gateway signing key is also set, tokens sealed with the key derived from it move to the secret key at startup and every five minutes, even with several replicas running together. Until they move they still open with the signing key. Adding the secret key is one-way: without it, moved tokens can't be read.

Fixed

  • Linking an identity and that identity's first sign-in no longer race. Administrators linking an account take the same lock as a first sign-in, so a sign-in finishing at the same moment no longer fails.
  • ID tokens must use an asymmetric algorithm. Chat accepts only the RSA, RSA-PSS, ECDSA and EdDSA algorithms the provider advertises. A provider advertising HS256 let an ID token signed with the client secret through; HS* and none are now always refused. Keys still come only from the discovered jwks_uri, which may be on another host than the issuer.

Upgrading

  • Migration 045 adds users.username_from_provider.
  • Migration 044 runs when Chat starts: it adds oidc_grants and oidc_revocations, and records whether each session and API token began with single sign-on. Existing ones count as single sign-on only for accounts without a password.
  • deploy/compose.connected.yaml still runs sign mode with passwords on; forward mode and passwords off need a deployment that sets their variables.
  • /api/session and /api/capabilities report passwordSignIn; features.localAuth follows it.

obleth-chat v0.5.2

Choose a tag to compare

@github-actions github-actions released this 26 Oct 21:09

Security fixes for workspace previews, uploads, personal tokens, sign-in limits and shared chats, and a simpler sign-in page.

New

  • /metrics can require a token. Set OBLETH_CHAT_METRICS_TOKEN and /metrics answers only requests with Authorization: Bearer <token>; others get 401. Unset, it stays open as before.

Changed

  • The sign-in page is one quiet column: the brand and theme switch at the top, a plain heading, the form, and the footer links, in place of the two panels with a large slogan. When single sign-on is configured, its button leads and the password form comes second. login in site.config.js now takes title (blank reads "Sign in to" and the site name), description, ssoLabel, ssoHint, help and a new helpLink ({ label, url }) at the end of the help line. The invitation, password change, session check and error screens use the same layout, and an expired session shows a notice instead of an error.
  • Making a personal API token needs a sign-in from the last 15 minutes (was 12 hours, as long as a session lasts), so a borrowed or stolen session cannot turn into a 30-day token. Otherwise the web app offers to sign out and back in.

Fixed

  • Previews only reach the workspace's own pod. Before proxying, Chat checks with the API server (at most every few seconds per pod) that the workspace pod is still running at the address on record. A pod that was evicted, deleted or lost with its node is marked stopped instead of its old address being used, which another pod may have been given. The reconciler does the same every minute.
  • Preview access ends with the sign-in. Preview tickets and the preview cookie carry the Chat session they came from. Signing out, revoking that session, disabling the account or losing workspace access ends preview access within a few seconds, and closes open preview WebSockets within a minute. The cookie lasts an hour (was eight), renewed by page loads while the sign-in lasts, and is named __Host-obleth_preview on https.
  • Only Chat can open a preview. A preview ticket is no longer a link: Chat's page redeems it with a request the browser marks as coming from Chat's origin, so a ticket sent to someone else, or posted by any other page, opens nothing. Chat's content security policy now lets it connect to preview hosts for this.
  • Other pages cannot send changes into a preview. Previews share a site, so browsers send one preview's cookie with requests from another. The proxy now refuses requests other than GET, HEAD and OPTIONS unless they come from the preview itself (Sec-Fetch-Site: same-origin, or a matching Origin). Preview pages get Referrer-Policy: same-origin (was no-referrer) so their own form posts keep their origin.
  • Preview pages check the pod once, not once per asset. Requests arriving together share a single check, and while the API server does not answer, a pod confirmed in the last minute is still served instead of every asset failing with 503. The sign-in behind a preview is likewise checked at most every few seconds.
  • Preview apps' cookies stay on their own host. The proxy strips Domain from cookies a dev server sets and drops any named like Chat's own (obleth_preview, __Host-obleth…, __Secure-obleth…).
  • Workspace file tools stay in the project. Paths with .. are refused.
  • Downloading a project no longer wakes its workspace by itself. An asleep, starting or failed workspace, or one whose pod is gone, answers 409 with a message saying which; the download button in the workspace bar shows only while the workspace runs. The Download button on a reply's result card wakes the workspace first, then downloads.
  • Starting and checking a dev server reach only the workspace's own pod, confirmed the same way as previews.
  • Research runs stop when their owner loses workspace access or the account is disabled, instead of running on in the workspace.
  • Uploaded files never open as web pages. Knowledge files, attachments, generated images and workspace files open in the browser only when they are PDFs or PNG, JPEG, GIF or WebP images. Anything else downloads, with text of any kind (HTML, XML, JSON, code) sent as plain text. Knowledge files are stored with a type taken from their name, never the one the browser sent. Documents stored by earlier versions with the uploader's type are sent by Chat itself as downloads rather than through a storage link, so they are safe whether or not the storage honours a link's type. Workspace SVGs still show in the file viewer but download when opened directly.
  • A document that expands enormously no longer exhausts memory. Word and PDF text is read as the extractor produces it, and the extractor is stopped as soon as its output passes the 64 MiB limit, so a small compressed file that inflates to gigabytes fails with "more text than Chat can index" instead of taking down the server.
  • Signing out another device ends the API tokens made on it. Revoking a session, or "Sign out other devices", also revokes the personal API tokens created in those sessions, so a token made with a stolen session ends when the person signs that session out. Tokens made on the current device stay. Tokens made before this release are not linked to a session and need revoking by hand.
  • Redeeming a password reset link ends personal API tokens, as changing or resetting a password already did. Every path that resets someone's sign-ins (password change or reset, reset link, an administrator revoking sessions, changing the role or disabling the account) now ends sessions and tokens together.
  • Forking a shared chat no longer copies its owner's instructions. The fork keeps the model and sampling settings; the owner's system prompt, which the viewer never saw, no longer steers the viewer's chat and tools.
  • Shared chats no longer show the owner's instructions on each reply. Viewers see the model and sampling settings and the tools' steps, not the system prompt. The share dialog now says that tool steps and what they returned are visible.
  • Failed sign-ins from other addresses can no longer lock someone out. The per-account limit of 50 failures a minute now stops only addresses that are failing on that account themselves. An address with no failures there in the last 10 minutes counts against a separate limit of 50 a minute per account instead, so rotating through many addresses still adds at most 50 guesses a minute. Each address keeps its own limit of 10. An address that is refused stays failing until it has been quiet for 10 minutes since its last counted attempt; retrying while refused does not restart that time. Chat logs when an account reaches either limit.
  • The web app offers a fresh sign-in only when a token needs one. Other refusals when making a token, such as a pending password change, show their own message.

Upgrading

  • Sign-in text: login.eyebrow, footer, welcomeTitle and welcomeDescription are no longer used, and login.title is now the heading above the form. Review a customized site.config.js before upgrading.
  • Open previews need reopening once: earlier preview links and cookies are refused.
  • Migration 043 runs when Chat starts: it adds api_tokens.session_id.

obleth-chat v0.5.1

Choose a tag to compare

@github-actions github-actions released this 26 Oct 15:48

Fixes the browser: opening the Browser tab now starts it.

Fixed

  • The Browser tab starts a sleeping browser. The web app asks with ?wake=1, which the server refused with 400 before doing anything, so the browser only started when the model used it. The live view now accepts 1 and true.

Images

  • ghcr.io/thediymaker/obleth-chat/chat:v0.5.1
  • ghcr.io/thediymaker/obleth-chat/workspace:v0.5.1
  • ghcr.io/thediymaker/obleth-chat/browser:v0.5.1

Pin them by digest in production.

obleth-chat v0.5.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 07:06

Chat sets itself up with one command, on Docker or Kubernetes, and workspaces come with the Kubernetes install.

New

  • ./setup.sh docker and ./setup.sh kubernetes. They ask for the address people use and the gateway's URL, generate every password and Chat's signing key, start Chat, and print the administrator password and the issuer entry the gateway needs. Run again, they keep what they made. Docker works with Docker Compose or Podman Compose and brings PostgreSQL. On Kubernetes, without --database, PostgreSQL 17 with pgvector runs in the namespace (deploy/k8s-postgres.yaml). See Install Chat.
  • Workspaces come with deploy/k8s.yaml. It gives Chat a ServiceAccount and a Role for pods, exec and volumes in its own namespace, and NetworkPolicies so only Chat reaches workspace and browser pods and they reach only DNS and public HTTP(S). The namespace enforces Pod Security restricted. Nothing else needs setting. See Enable workspaces.
  • Workspaces turn on by themselves. When Chat runs in Kubernetes with a service account token, workspaces run in its namespace (or OBLETH_CHAT_SANDBOX_NAMESPACE). The workspace and browser images default to this release's, and the browser comes with workspaces.
  • Chat says why workspaces are off. At startup it asks the API server what its service account may do. If something is missing, Settings › Administration › System and /api/admin/health give the reason.

Changed

  • Chat caps its workspace and browser pods itself, at OBLETH_CHAT_SANDBOX_SLOTS (8), because a ResourceQuota in a shared namespace would count Chat's own pods too.
  • deploy/k8s.yaml mounts the gateway key at /run/secrets/obleth-chat/. Mounted over /run/secrets, it hid the service account token's mount point and Chat didn't start.
  • Workspace pods may reach DNS on any address, so DNS works whatever the cluster runs, including node-local caches.
  • Images are named in full (docker.io/pgvector/pgvector), so Podman pulls them.
  • A workspace's notes (starting, asleep, no files yet) sit in the middle of the Files and Git panes.

Limits

  • Workspaces and the browser run only on Kubernetes.
  • Previews need a wildcard DNS name and certificate. Without one, everything else works.

Upgrading

  • Kubernetes installs that mount a service account token now try workspaces. Without the Role, they stay off and say why; OBLETH_CHAT_WORKSPACES=off turns them off.
  • The browser comes with workspaces unless OBLETH_CHAT_BROWSER=off.
  • deploy/k8s-workspaces.yaml no longer creates the ServiceAccount (now in deploy/k8s.yaml) or the gvisor RuntimeClass (see the gVisor steps in Enable workspaces). Applying it doesn't remove existing ones.
  • If you apply the new deploy/k8s.yaml, anything else you run in Chat's namespace must meet Pod Security restricted.

Images

  • ghcr.io/thediymaker/obleth-chat/chat:v0.5.0
  • ghcr.io/thediymaker/obleth-chat/workspace:v0.5.0
  • ghcr.io/thediymaker/obleth-chat/browser:v0.5.0

Pin them by digest in production.