Skip to content

Let the main agent choose each child's model - #45

Merged
Crokily merged 1 commit into
mainfrom
child-model-choice
Nov 13, 2026
Merged

Crokily merged 1 commit into
mainfrom
child-model-choice

Conversation

@Crokily

@Crokily Crokily commented Nov 12, 2026

Copy link
Copy Markdown
Owner

The main agent now picks each child's model and thinking level. This replaces childModel and childThinking in bot.json. Colin approved the design on 2026-11-13.

  • task start: new model (provider/modelId). thinking now takes all of pi's levels, off through max. With no model given, a child uses the main model and still follows it when bot.json changes it. With no thinking given, it uses xhigh. No profiles and no presets.
  • A chosen model persists. The child record has an optional model field, so no migration is needed. On a bot.json model change and at each start, only children without their own model get the main model. Before, every child got childModel or the main model.
  • Refused at start, not at the first request:
    • Unknown model: Not started: unknown model fake/nope; …
    • Not signed in (pi's getAvailable for the provider is empty): Not started: locked/model is not signed in on this computer: pi has no login or key for "locked". A person signs in with pots login in their terminal; …
    • A provider whose login cannot use that model gets its own message.
    • Each refusal ends with how to list the usable models: models.getAvailableOfType("chat") in a codemode script.
  • Compaction: every model a child uses gets its own modelOverrides entry, sized to that model's window. Before, only the one childModel did.
  • childModel / childThinking removed from BotDefinition and the schema. An old bot.json still loads. The repo had no pattern for deprecated fields, so the gateway prints one line on start or apply: "childModel" and "childThinking" in bot.json are no longer used, and ignored: … Remove them from bot.json. It is not an error and does not create bot.json.error. Children started before the upgrade without a recorded model take the main model.
  • Prompt (Children section):
    • States that the agent chooses a child's model and thinking and how to list signed-in models.
    • States the default: the agent talks at medium, and children work at xhigh or max.
    • Says per-task model preferences are the person's and go in AGENTS.md.
    • Says a child reports only when it ends, so for long work the agent can set itself a pots wake to check in.
    • "the child is usually the stronger model" became "the child works them out".
    • The bot.json line in the folder section no longer lists the two fields.
  • pots init: the first wake also asks the person whether they want particular models for particular work, and has the bot write the answer in AGENTS.md.
  • Docs: README (helpers paragraph, model table, pots children), docs/for-agents.md (after setup), docs/development.md (test rows), and CHANGELOG (Unreleased).

Tests:

  • children.test.ts:
    • c1 is started on fake/helper at thinking low and c2 with no choice. The bot's model changes while both work. c1 stays on helper; c2 goes from coworker to other. After a restart, each keeps its model on its next message.
    • That bot.json still has childModel and childThinking. They are ignored, and the gateway reports it.
    • locked/model (a provider without a key) and fake/nope are refused with the messages above, and no child starts.
  • definition.test.ts: an old bot.json with childModel: "nobody/knows" and childThinking: "huge" loads, gets no error file, and logs the notice.

npm run check passes. npm test: 300 passed, 2 skipped.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T16:13:18.756000Z 5de86b7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The task tool's start takes a model ("provider/modelId") and any of pi's
thinking levels. A child started without them has the main model, also
after bot.json changes it, and thinking xhigh. The child record keeps a
chosen model, so the child keeps it across bot.json changes and restarts;
only children without one follow the main model. Compaction gets a policy
for each model a child has.

A model that is unknown or not signed in is refused at start, with the
reason and how to list the signed-in models, instead of failing at the
child's first request.

childModel and childThinking leave bot.json. A bot.json that still has
them loads; the gateway prints that they are ignored.

The prompt's Children section says the agent chooses a child's model and
thinking, how to list signed-in models, that it talks at medium while
children work at xhigh or max, that model preferences are the person's
and go into AGENTS.md, and that a child reports only when it ends, so for
long work it can set itself a wake to look in. pots init's first wake asks
the person about model preferences.
@Crokily
Crokily merged commit b124f1e into main Nov 13, 2026
6 checks passed
@Crokily
Crokily deleted the child-model-choice branch November 13, 2026 06:15
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.

1 participant