Models that know about each other, and have a self

Three features sharing one idea: a model here started from nothing every
conversation and had no notion that anything else existed.

THE ROSTER. `chat.roster_block` builds one line per model this *person* can
reach -- through `permissions.models_visible_to`, never the table -- and
`{{model_roster}}` carries it, gated on the `friend` family for the reason the
memories block is gated on `memory`: a list of peers a model cannot talk to is
context spent on nothing, and one checkbox is then the whole switch. New
`Model.notes` column, a column and not a `capabilities_json` key for the reason
`context_length` and `reasoning_efforts` both carry.

ASKING A FRIEND. A second entry point in `services/subagent.py` rather than a
second module, so one place still owns the bounds and the lifecycle. `_create_
child` takes the friend's (model_id, connection_id) *pair*, because Model is
unique on both and an id alone does not say which endpoint. Three things differ
from a helper: the effort is the friend's own default and never the parent's (the
1.3.0 bug by another door -- the vocabularies differ and a level a model does not
take raises inside its chat template), the chat is ordinary even when the asker's
is an agent chat, and `scope_json["role"]` marks it so `core.friend` speaks
instead of `core.subagent`. `friend` joins the unattended withdrawal set: a
friend that could ask a friend is the same unbounded fan-out in politer clothes.
Budget, concurrency and quota are shared with helpers, so one reply cannot spend
the allowance twice.

PERSONALITY. One table, two roles, `owner_id IS NULL` the discriminator: the
model's own persona, and its read of one person. Keyed on the model's *text* id
with no foreign key, because "Test & refresh" deletes a model the endpoint has
stopped listing and a personality must not be collateral. `PersonaRevision`
copies SkillRevision, and so does the argument: the safety story for a model
rewriting itself is a record and a way back, not a gate. The reflection is shown
to the person it is about, in their own settings, which is the whole of why
keeping one is acceptable. `persona` is withdrawn from any unattended chat --
a helper's task, a friend's question and a schedule's instruction are all words
nobody watched being written.

Two bugs found while reading for this, both silent:

`review_model_id` stored a `Model` primary key, so a refresh taken while an
endpoint was not listing that model unset the administrator's choice -- and
`_reviewer` then fell back to the chat's own model, so pictures were judged by
a model nobody chose. Now the text id, with the primary key still accepted.

`_messages_after` used a bare `>` on `created_at`, so a row sharing the edited
turn's microsecond survived a rewind -- and `_send` writes a user turn and its
placeholder back to back, which is exactly that tie. Deliberately NOT
`thread_tail`'s `(created_at, id)` tiebreak: ids are random UUIDs, so that
settles a tie by coin toss. A tie now reads as "later", which is the safe
direction for an operation whose purpose is to discard what follows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 02:04:55 +00:00
co-authored by Claude Opus 5
parent 54fee49810
commit df52ec9d96
30 changed files with 2710 additions and 32 deletions
+60
View File
@@ -16,6 +16,66 @@ for 1.0.0 have something to be assembled from.
## Unreleased
## 1.4.0
- **Models can be told about each other.** A model may now be given a list of
the other models on this instance — their names, the id to refer to one by, and
what each is for — so that it knows what else is available and what each is
better at. The list is built per person from the models *they* can reach, so it
never names one they have no access to.
Each model's page has a new **Facts for other models** box for this: parameters,
quantisation, a benchmark figure, what it is bad at. The existing description is
used too, so filling in nothing at all still produces a usable list — but note
that the description is now read by models as well as by people.
- **A model can ask another model a question.** New **Ask another model** switch
on each model's page and a matching permission. The model picks who to ask from
the list above, writes the question, and gets that model's answer back to use —
a second opinion from something that is better at the subject, or a check on its
own reasoning by something that will not make the same mistakes.
The model answering sees only the question, not the conversation; it answers as
itself, and it is told to say so if it thinks the question is wrong. It cannot
ask anybody anything in turn, and it cannot pass the question on.
It shares the **Helpers** switch and allowance on Admin → Agents, because it
costs the same thing: one reply setting another reply going. On a single local
endpoint that also means a model swap out and back, so it is not free.
- **A model can have a personality of its own, and keep its own read of you.**
New **Edit its own personality** switch per model. Its character is carried into
every conversation rather than being an instruction for one, and it is the model
that writes it — you can seed it, read it, and put any earlier version back from
the **Personality** card on the model's page. Every version is kept.
Separately, each model keeps its own impression of how you work: what you
expect, how you like being answered, what keeps going wrong between you. Its
point of view rather than facts about you, which is what a memory is for. It is
per model and per person — two models may honestly reach different conclusions
about you, and nobody on a shared instance inherits anybody else's.
**You can read and delete all of it**, under Memory in your own settings. That
is the whole reason a model is allowed to keep one.
Two honest limits. A model that has just read a hostile web page can rewrite its
own character; what stops that being permanent is that every version is kept and
visible, not that it was prevented — the same position this takes on
model-written skills. And neither is available to a model running as somebody's
helper, answering another model's question, or working through a schedule: those
run on words nobody is watching being written.
- Fixed: **the model chosen to review generated images was silently forgotten**
whenever a connection was refreshed while its endpoint happened not to be
listing that model. Nothing failed — reviewing fell back to the chat's own
model, so pictures were being judged by a model you had not chosen, with nothing
saying so. Existing settings keep working.
- Fixed: **editing a message could leave one of the messages below it behind.**
Only when two were written in the same millionth of a second, which is exactly
what happens to a question and the reply being started for it — so the orphan
stayed in the conversation and in everything sent to the model afterwards.
## 1.3.2
- Fixed: **the model page could not save anything below the reasoning efforts**,