Repository navigation
RFC: harness × provider (Magpie-inspired gateway, routing groups, profiles) #366
Copy link
Copy link
Closed
Labels
area:automationScheduled tasks and automationScheduled tasks and automationenhancementNew feature or requestNew feature or request
Description
Why
#365 is about per-child Bot config in a tree. The broader design deserves its own RFC: harness ≠ provider, one gateway, routing groups, profiles — ideas sharpened by yetone/magpie ("any agent × any model, one place"). FlyBot already cites Magpie-style process habits (docs/code-standards.md, review skills); this issue is the product/runtime discussion, not a license to copy Magpie's UI or code.
Parent gap tracking: #361. Tree-specific follow-through: #365. Cross-runtime: #198. Deploy: #352.
Problem
Today harness (how a Bot runs: DSH version, OpenCode, …) and provider/model (what it thinks with) are easy to conflate. Mixing them blocks:
- the same tree using DeepSeek for one child and Kimi for another,
- swapping models without rewriting harness config,
- failover when a quota or key dies,
- plugging an external runtime ([RFC] 跨运行时 Agent 对话与协作:以 OpenCode 为首个试点的目标、需求与两种方案 #198) in as just another node.
Magpie patterns to learn (精髓)
- Split: agent/harness ×
provider/model. - Local gateway that speaks OpenAI / Anthropic / Gemini and translates streaming, tools, reasoning.
- Routing groups: ordered failover across accounts/models; the agent does not see the 429.
- Profiles: save and restore a whole map of agent→model in one move.
- Atomic config edits: change only the one key that matters in each harness's own file.
What FlyBot should not copy blindly
- Menu-bar shell for dozens of CLI agents.
- Magpie docs/code verbatim (already called out in our standards).
- Differentiation stays: tree + Bot Social approvals + Timeline + per-Bot grants.
Proposed FlyBot shape
Bot node:
harness: dsh@x | opencode | external/… # how it runs
model: provider/model | group/<name> # what it thinks with
tools: allow-list (optional)
- New children inherit parent defaults; parent edits do not silently rewrite existing children (Tree: per-child Bot harness and model (mix backends for different tasks) #365).
- Timeline labels harness and provider/model on every turn.
- Optional gateway: embed Magpie-compatible, shell out to installed Magpie, or thin FlyBot-native (open question).
- Team: allow-lists and audit for who may change harness/model ([Team] Gate cross-owner agent routes by per-Bot grants (default deny; superseded the publication gate) #51, [Team] Add a human-readable authorization and task audit trail #57); caps at Bot and tree ([Team] Bound agent loops and resource consumption #56).
Phased delivery (discussion)
| Phase | Outcome |
|---|---|
| A | Docs + UI fields; same harness, different models in one tree |
| B | Routing group + failover; Timeline labels |
| C | Gateway decision implemented; second harness or #198 external node |
| D | Profiles; team allow-lists; Nightly row under #358 |
Open questions
- Gateway: embed / use Magpie / FlyBot-native?
- v1 providers: API keys only, or subscription plans too?
- Is "harness" only DSH pins, or any Bot-contract runtime?
- Deployment step 1: official image and one isolated instance per person #352 image: one container many runtimes vs sidecar per harness?
- Who may change a child's pair in team mode — owner or assigner?
- How do cost/rate limits aggregate tree vs Bot ([Team] Bound agent loops and resource consumption #56)?
Acceptance for this RFC
- Agreement recorded on the field shape and gateway choice.
- Tree: per-child Bot harness and model (mix backends for different tasks) #365 updated to match; child implementation issues opened per phase.
- No implementation claimed from this issue alone.
Process
Discussion here; implementation via OpenCode + Codex review.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:automationScheduled tasks and automationScheduled tasks and automationenhancementNew feature or requestNew feature or request
Activity
Birfy commentedon Oct 19, 2026
Triage on main
7b9e90b, 2026-10-19 ~12:10 Asia/Shanghai: needs-human, not agent-ready. RFC with no owner decision yet. Question: adopt the harness/provider split and a gateway at all, and if yes, built in or an optional sidecar?Birfy commentedon Oct 20, 2026
Triage (maintenance, 2026-10-20 08:59 Asia/Shanghai)
On main
bae4128: the provider/model half already exists. Every Bot has its own model (core/src/host/models.js).create_botstarts a new Bot on its parent's model unless one is named, andupdate_bot/list_modelschange and list models (core/src/host/tools.js).list_botsshows each Bot's model, so two children in one tree can already run on different models. The harness is one DSH for all Bots. An external runtime is the OpenCode pilot (#198,docs/interop/opencode-pilot.md). There is no gateway, routing group, failover or profile. Timeline turns do not name the model. #365 is closed into this issue.Expected behavior: you can see which model each Bot runs on and which model produced each turn. Changing a parent never rewrites its children's models, as today.
Smallest first slice: label the model on each Timeline turn and on each Bot row or tooltip in the tree. No new fields, no gateway.
Details I decided (say if you disagree)
Question for the owner
(a) No gateway for now. DSH's provider settings stay the single place for keys. Ship the label slice. Routing groups / failover get a separate issue only if quotas become a real problem.
(b) Build a thin FlyBot-native gateway with routing groups and failover.
(c) Support Magpie as an optional sidecar that Bots can point their models at.
Recommendation: (a). It is simplest and adds no new place for keys.
Birfy commentedon Oct 20, 2026
Owner decision (2026-10-20): Confirmed option (a): first step only labels which model each turn used in the Timeline and each Bot in the tree. No gateway for now; keys stay in DSH model settings. Automatic fallback models only when quota becomes a real problem.
Birfy commentedon Oct 20, 2026
Claimed by maintenance run (2026-10-20 09:54 Asia/Shanghai). Working on branch
feat/366-model-labels(fork Birfy/FlyBot), developed in parallel with sibling issues; first slice per the Owner decision only.Birfy commentedon Oct 20, 2026
Minor details decided while building the label slice (PR #480, 2026-10-20 11:01 Asia/Shanghai):
request/header(the request that actually went out), not the Bot record, since the composer's own picker can move a Session. A turn with no model call (cancelled before a step) and a friend's Bot chat get no label. A running turn shows its model once it ends (the model is known only when the first request goes out).· deepseek-v4-pro). The trace stores the fullprovider/model. No text inside bars, so the lanes stay uncluttered.Coder · DeepSeek V4 Pro, the served model name, as in Bot settings). That covers tree rows and the flat list alike. A friend's Bot keeps its own title, since it runs on its owner's model.Label the model each turn ran on in the Timeline and each Bot row (Th…
Birfy commentedon Oct 20, 2026
Cleanup: RFC closed. Removing stale agent-working and assignee.