Skip to content

RFC: harness × provider (Magpie-inspired gateway, routing groups, profiles) #366

Closed

Description

@hsliuustc0106

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:

Magpie patterns to learn (精髓)

  1. Split: agent/harness × provider/model.
  2. Local gateway that speaks OpenAI / Anthropic / Gemini and translates streaming, tools, reasoning.
  3. Routing groups: ordered failover across accounts/models; the agent does not see the 429.
  4. Profiles: save and restore a whole map of agent→model in one move.
  5. 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)

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

  1. Gateway: embed / use Magpie / FlyBot-native?
  2. v1 providers: API keys only, or subscription plans too?
  3. Is "harness" only DSH pins, or any Bot-contract runtime?
  4. Deployment step 1: official image and one isolated instance per person #352 image: one container many runtimes vs sidecar per harness?
  5. Who may change a child's pair in team mode — owner or assigner?
  6. How do cost/rate limits aggregate tree vs Bot ([Team] Bound agent loops and resource consumption #56)?

Acceptance for this RFC

Process

Discussion here; implementation via OpenCode + Codex review.

Activity

  1. added
    enhancementNew feature or request
    area:automationScheduled tasks and automation
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Oct 19, 2026
  2. Birfy commented on Oct 19, 2026

    @Birfy
    Collaborator

    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?

  3. Birfy commented on Oct 20, 2026

    @Birfy
    Collaborator

    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_bot starts a new Bot on its parent's model unless one is named, and update_bot / list_models change and list models (core/src/host/tools.js). list_bots shows 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.

  4. added
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    and removed
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Oct 20, 2026
  5. Birfy commented on Oct 20, 2026

    @Birfy
    Collaborator

    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.

  6. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 20, 2026
  7. self-assigned this
    on Oct 20, 2026
  8. Birfy commented on Oct 20, 2026

    @Birfy
    Collaborator

    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.

  9. Birfy commented on Oct 20, 2026

    @Birfy
    Collaborator

    Minor details decided while building the label slice (PR #480, 2026-10-20 11:01 Asia/Shanghai):

    • Where the turn's model comes from: the Session's latest DSH 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).
    • Timeline: shown in the turn bar's tooltip, after duration and outcome, as the model id (· deepseek-v4-pro). The trace stores the full provider/model. No text inside bars, so the lanes stay uncluttered.
    • Tree: the sidebar tree is ds-bot's own Bot list, so the label is the hover text of each own Bot row (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.
    • No gateway, no routing groups and no new key storage, per the Owner decision.
  10. added a commit that references this issue on Oct 20, 2026
    cbfd13a
  11. Birfy commented on Oct 20, 2026

    @Birfy
    Collaborator

    Cleanup: RFC closed. Removing stale agent-working and assignee.

  12. removed their assignment
    on Oct 20, 2026
  13. removed
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:automationScheduled tasks and automationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions