Skip to content

The assistant can search the web and be asked as a persona (M3c) - #40

Merged
davior merged 1 commit into
mainfrom
claude/beautiful-wright-og4xur
Nov 4, 2026
Merged

davior merged 1 commit into
mainfrom
claude/beautiful-wright-og4xur

Conversation

@davior

@davior davior commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Summary

GVC's half of M3c (davior/gam#61 is GAM's). No suite change was needed: the suite already served web search and personas to apps and applied a persona_id in chat. Merging this changes nothing until AI_BACKEND=suite (the same switch as the assistant's model and the narration).

  • web_search, a reading tool. For what the library can't say: a fact for the narration, who someone is, when something happened. The suite runs it, as the signed-in user, credited to the project. It is offered only where there is a suite to run it (tools.specs_for), so a model is never told about a tool it can't use. Results come back numbered, for the model to cite and capped at a page; a failed search is a result the model reads, not a failed turn; a request may make only eight. It never changes the video, and the prompt says to say where a fact came from, to put web facts in the script only if the person asked for facts, and never to treat the web as footage.
  • Personas. A turn can be asked as one of the suite's personas, chosen in a picker above the message box that appears only when the suite has some. The suite applies the persona's system prompt first and its model for the task; this app only names it. The clip-picking pass does not use the persona (it is a smaller job with its own task).
    • Kept on the turn row (new nullable column, migration b6d29f0c4e17), so a turn a restart reruns is asked as the same persona. It belongs to the turn: the next message is asked as whatever the picker then says.
    • GET /api/assistant/personas returns only what a picker shows (id, name, description, avatar), never a system prompt, and is empty for any reason at all (none made, the suite down, no session token, not in suite mode), so a missing picker is never an error.
    • A persona deleted in the suite since it was chosen is dropped from the picker's state on the next load; one the suite refuses mid-turn ends that turn with the suite's own sentence.

Test plan

  • cd backend && pytest -q: 821 passed (9 new: the search end to end (credited to GVC and to the project, numbered results, a step, the video untouched), a failed search read by the model, the tool offered only where there is a web, the search cap and an empty query, the picker without prompts, no personas when none/down/no session/local, a persona sent to the suite and kept per turn, a refused persona's sentence).
  • cd frontend && npm run format:check && npm run lint && npm test && npm run build: 217 tests passed (4 new).
  • CI green, including the Docker image build.
  • A real search and a real persona against a real suite. Not run here: everything is against a faked suite. (To try it: make a persona on the suite's side first.)

Deployment

Merging and redeploying changes nothing until you use the assistant on the suite.

  1. Before pulling: nothing; the suite needs no change. To use personas, create one in the suite (for Video Creator or for every app).
  2. Configuration: nothing new.
  3. Deploy: rebuilds the backend and the frontend; the server needs outbound access to github.com for the client:
    git pull origin main
    docker compose up --build -d
    docker compose ps
    curl -f http://localhost:${APP_PORT}/api/health
  4. Migration: b6d29f0c4e17 (add_assistant_persona) runs on container start and adds one nullable column, persona_id, to assistant_turn. Existing turns read as "no persona". It downgrades by dropping the column; nothing needs backing up first.
  5. Other apps: none.
  6. Verify: with AI_BACKEND=suite, ask the assistant "write a line about the history of water wars". A step says it searched the web, and the reply says where a fact came from. With a persona made in the suite, a picker appears above the message box; ask as it, and the suite's Usage shows the call under GVC. With AI_BACKEND=local there is no picker and no web tool.
  7. Roll back: the previous commit (the column is harmless if left).


Generated by Claude Code

…ersonas

web_search is a reading tool, offered only where there is a suite to run it (so a model is
never told about a tool it cannot use): numbered results to cite, a failed search is a
result and not a failed turn, a handful per request, and it never changes the video. A turn
may be asked as one of the suite's personas, chosen in a picker that appears only when the
suite has some; the persona is kept on the turn row so a rerun after a restart is asked as
the same one, and the suite applies its prompt and model. The personas endpoint returns only
what a picker shows, never a system prompt, and is empty for any reason at all.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD2ELWgL2sDpxYbx3Aw
@davior
davior marked this pull request as ready for review November 4, 2026 04:38
@davior
davior merged commit b759023 into main Nov 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants