| 566 |
566
|
|
/**
|
| 567 |
567
|
|
* Every lane a `delegate` call may name, by the name a caller would use.
|
| 568 |
568
|
|
*
|
| 569 |
|
- |
* Devin is here because it brings its own credentials rather than spending this
|
| 570 |
|
- |
* session's grant. Offered as an enum so a call chooses from what exists rather
|
| 571 |
|
- |
* than from what it remembers.
|
|
569
|
+ |
* The enum is the names; `CHILD_LANES` is what each one is. Offered as an enum
|
|
570
|
+ |
* so a call chooses from what exists rather than from what it remembers.
|
| 572 |
571
|
|
*/
|
|
572
|
+ |
/**
|
|
573
|
+ |
* What each lane actually is: who runs the child, and what answers it.
|
|
574
|
+ |
*
|
|
575
|
+ |
* The two are independent and the enum reads as one list, which is how a
|
|
576
|
+ |
* session came to describe `opencode/x-preview-f-free` as a "fast preview /
|
|
577
|
+ |
* experimental" model. It is not. It is **the same model as `ox-alpha`** —
|
|
578
|
+ |
* opencode's own normalization maps `x-preview-f` to `ox-alpha` — reached
|
|
579
|
+ |
* through a different harness on a different credential. A caller choosing
|
|
580
|
+ |
* between them is choosing who runs the child, not which model thinks.
|
|
581
|
+ |
*
|
|
582
|
+ |
* So each lane says both, and says who pays.
|
|
583
|
+ |
*/
|
|
584
|
+ |
export interface ChildLane {
|
|
585
|
+ |
/** The name a `delegate` call passes as `model`. */
|
|
586
|
+ |
readonly name: string;
|
|
587
|
+ |
/** What runs the child and gives it its tools. */
|
|
588
|
+ |
readonly harness: string;
|
|
589
|
+ |
/** What answers. */
|
|
590
|
+ |
readonly model: string;
|
|
591
|
+ |
/** Where that model is served from, and whose credential pays for it. */
|
|
592
|
+ |
readonly served: string;
|
|
593
|
+ |
readonly bestFor: string;
|
|
594
|
+ |
}
|
|
595
|
+ |
|
|
596
|
+ |
export const CHILD_LANES: ReadonlyArray<ChildLane> = [
|
|
597
|
+ |
{
|
|
598
|
+ |
name: "ox-alpha",
|
|
599
|
+ |
harness: "openagents (this process, one `shell` tool)",
|
|
600
|
+ |
model: "Ox Alpha",
|
|
601
|
+ |
served: "the OpenAgents inference proxy, routed to OpenRouter `stealth/ox-alpha`, on this session's thread grant",
|
|
602
|
+ |
bestFor: "work whose shape is the question: design, architecture, an open-ended refactor",
|
|
603
|
+ |
},
|
|
604
|
+ |
{
|
|
605
|
+ |
name: "opencode/x-preview-f-free",
|
|
606
|
+ |
harness: "opencode (a separate CLI on this machine, its own tools)",
|
|
607
|
+ |
// Named as the same model on purpose. The difference between this lane and
|
|
608
|
+ |
// the one above is the harness and the credential, and a description that
|
|
609
|
+ |
// implies two models sends a caller here for the wrong reason.
|
|
610
|
+ |
model: "Ox Alpha — the same model as `ox-alpha`, under opencode's name for it",
|
|
611
|
+ |
served: "OpenCode Zen, on this machine's opencode credential",
|
|
612
|
+ |
bestFor: "the same work as `ox-alpha`, when you want opencode's harness and tools instead of ours",
|
|
613
|
+ |
},
|
|
614
|
+ |
{
|
|
615
|
+ |
name: "gemini",
|
|
616
|
+ |
harness: "opencode (a separate CLI on this machine, its own tools)",
|
|
617
|
+ |
model: "Gemini 3.7 Flash",
|
|
618
|
+ |
served: "OpenCode Zen, on this machine's opencode credential",
|
|
619
|
+ |
bestFor: "fast, straightforward coding and analysis",
|
|
620
|
+ |
},
|
|
621
|
+ |
{
|
|
622
|
+ |
name: "devin",
|
|
623
|
+ |
harness: "devin (the Devin CLI, its own tools)",
|
|
624
|
+ |
// Devin picks its own model from its own configuration and print mode does
|
|
625
|
+ |
// not report which, so naming one here would be inventing it.
|
|
626
|
+ |
model: "Devin's own, not reported",
|
|
627
|
+ |
served: "Devin, on its own credentials — it spends nothing of this account's",
|
|
628
|
+ |
bestFor: "straightforward engineering with a clear shape: a named fix, a test, a migration",
|
|
629
|
+ |
},
|
|
630
|
+ |
];
|
|
631
|
+ |
|
|
632
|
+ |
/** One lane as a line a model can read. */
|
|
633
|
+ |
export const describeChildLane = (lane: ChildLane): string =>
|
|
634
|
+ |
`\`${lane.name}\` — harness: ${lane.harness}; model: ${lane.model}; served by ${lane.served}. ` +
|
|
635
|
+ |
`Best for ${lane.bestFor}.`;
|
|
636
|
+ |
|
| 573 |
637
|
|
export const CHILD_MODELS: ReadonlyArray<string> = [
|
| 574 |
638
|
|
// Deduplicated: `ox-alpha` and `openagents` are two names for one lane, and
|
| 575 |
639
|
|
// offering both in the enum would read as two choices.
|