Repository navigation
tools: say what happened to your default model, name the URL and "(your pair)" (journey 2a J2-e/f/g; stacked on #1904) - #1911
Merged
Conversation
…ir)"
Journey 2a (pair-2, `.144`) found three things in a start with
`--opencode` / `--hermes`:
- J2-g: neither of the user's OpenCode files set a default model, so
Darkbloom's became his default, said only at the end of the `Use it:`
line; and Hermes' line didn't name the main model it replaced.
- J2-e: "Darkbloom already serves on 0.0.0.0:8001" named the address the
pair's API listens on, not the URL a tool uses.
- J2-f: the pair's model was "Qwen 3.8 27B (this Mac)".
Tests first; the skeleton adds only the names the tests use, with today's
behaviour: `OpenCodeConfigPlan.GlobalDefault`, `otherGlobalDefault` (the
old yes/no as `.unnamed` / `.none`) and the planner's `defaultElsewhere`;
`ToolConfigSummary.keptDefault` / `replacedDefault` (never set);
`IntegrationModel.Location.yourPair`, `resolve(_:catalog:here:)` (`here`
unused), `IntegrationEndpoint.servesThePair` and `live(pairPart:)` (never
set); `ToolIntegrationStep.alreadyServes` (today's words, now used by the
start).
- ToolSetupWordsTests (a temp home with his two OpenCode files and his
Hermes config, a faked endpoint and catalog; no tool runs, no port):
- no global file sets a default: Darkbloom's becomes it, said on its own
line ("New OpenCode sessions now use Darkbloom's Qwen 3.8 27B. Switch
back with /models."), the Undo line kept, his opencode.json untouched;
- a default in either file stays and is named ("Your default stays
exo/llama-3.3-70b; pick Darkbloom with /models."), and no `model` is
written;
- OpenCode 1's config.json sets no default (OpenCode 2 doesn't load it);
- Hermes names the main model it replaced ("(before: gpt-6-astra via
opencodex). Switch back: hermes model");
- "Darkbloom already serves at http://127.0.0.1:8001/v1" for an API on
0.0.0.0;
- the pair's API: its models are "(your pair)", the pair's model is
Hermes' main one, and a run again (online and offline) changes nothing.
- OpenCodeConfigPlanTests: the kept default is named (this file's wins);
the global files merged as OpenCode 2 merges them, `null` or an
unreadable file as an unnamed default, config.json ignored.
- HermesConfigPlanTests: the replaced main model with its provider (no
`custom:`), none for no model, null, or Darkbloom's own; a pair's model
is the main one.
- IntegrationModelsTests: a pair's own models are "(your pair)", the
others keep where they run.
- StartToolIntegrationTests: both tools' new lines.
Red (prod identity, CPU-only, sandboxed): ToolSetupWordsTests 6 of 6 fail
(13 issues); the planners and IntegrationModelsTests 8 of 46 (16 issues);
StartToolIntegrationTests 1 of 16 (2 issues). ModelLoadWaitTests and
ToolAddressTests pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ur pair)"
- OpenCode (J2-g): the planner reads the default the global files set,
merged as OpenCode 2 merges them (`opencode.json`, then
`opencode.jsonc`, the later winning; OpenCode 2's ConfigDiscovery.names,
and it doesn't load OpenCode 1's `config.json`). The file Darkbloom
edits is the last that exists, so its own `model` wins. Any default
there means no `model` is written, and the summary names it
(`keptDefault`); `""`, `null`, or a file that can't be read is a default
that stays without a name. None: Darkbloom's first model becomes the
default, and the `Changed:` line says so ("and the default model").
- The step says it on its own line instead of the end of `Use it:`:
"New OpenCode sessions now use Darkbloom's Qwen 3.8 27B. Switch back
with /models.", or "Your default stays exo/llama-3.3-70b; pick
Darkbloom with /models." (Darkbloom's own: "…; switch with /models.";
no name: "Your default model stays as your config sets it; …"). The
Undo line stays.
- Hermes: Darkbloom stays the main model, and the summary names the one it
replaced (`replacedDefault`: `default`, or the `model` alias, or a bare
ID, with its provider without `custom:`; none for no model, null, or
Darkbloom's own): "New Hermes chats now use Darkbloom's Qwen 3.8 27B
(before: gpt-6-astra via opencodex). Switch back: hermes model". The
headline and `Changed:` line follow OpenCode's ("✓ Hermes can use
Darkbloom: 1 model.", "added the "darkbloom" provider and made it the
main model").
- J2-e: `alreadyServes` names the URL a tool uses (`LocalEndpoint.Info`'s
`baseURL`: 127.0.0.1 for 0.0.0.0), not the bind address.
- J2-f: `IntegrationEndpoint.live` marks an endpoint that this Mac's
running pair part serves (`ClusterPairSummary.runningPartPID()` is the
`local.json` writer's pid, as `status` decides whose API it is), and
`IntegrationModels.resolve(here:)` names its own models "(your pair)":
true for a pair of any size, the same on every run, and read back
without it (`displayName(in:)`), so offline runs keep the name. Hermes'
main model is the nearest usable one that isn't on the network, so a
pair's model qualifies; the refusal says "this Mac, its pair or your
other Macs".
Green (prod identity, CPU-only, sandboxed): ToolSetupWordsTests 6/6; the
planners and IntegrationModelsTests 46/46; StartToolIntegrationTests,
ModelLoadWaitTests and ToolAddressTests 34/34; DarkbloomCLITests 1224
tests in 174 suites (the usual hardware and slow skips).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…air)" - local-first.md: "already serves at http://127.0.0.1:8001/v1"; a "Your default model" item (OpenCode's stays when any global file sets one, merged as OpenCode 2 merges them, config.json not read; else Darkbloom's, on its own line; Hermes names the main model before); where each model runs, "(your pair)" included; the example block's default line and the note after it. - quickstart.md: the start says which default on a line of its own. - cli-reference.md: the already-serves line names the URL (`alreadyServes`); the result block's default-model lines and the models' names. - direct-mode.md: how the tools name `this-mac`, `my-macs` and `darkbloom` models, `(your pair)` on a pair's API. - architecture/tool-integrations.md: `servesThePair`, the merged global default (`otherGlobalDefault`, `GlobalDefault`, `keptDefault`), Hermes' main model and `replacedDefault`, the step's lines; code map. - developer/test.md: ToolSetupWordsTests and the new coverage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`IntegrationModels.resolve(here: .yourPair)` changes a pair's own models' location and name only. The test decodes the list as the endpoint gives it, `input_modalities` included, so once this branch takes #1897 (dev d9d36fe), whose `resolve` takes the engine's image input only for `location == .thisMac`, it fails until that check takes `.yourPair` too: the merge itself is clean, so nothing else would say a Gemma 4 pair's models now claim images. Passes before and after the fix (a guard for the merge). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ix/tools-default-model-and-names - IntegrationModels.resolve: #1897 takes the engine's image input for a model served here, which it tells by `location == .thisMac`. A pair's own models are `.yourPair` on this branch, so it is `location <= .yourPair` now: a Gemma 4 pair's models keep the text-only input its engine lists instead of the catalog's vision. Git merged it without a conflict; `aPairsModelsAreServedHere` (222c66f) is the test that says so. - cli-reference.md: #1897's image-input sentences, then this branch's model names and default-model lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ariants said where they hold Refactor pass for #1911 (AGENTS.md, "Required Refactor Pass"). Behaviour preserved: every line the start prints and every byte the planners write are unchanged. - OpenCode's config order, once: `OpenCodeConfigPlan.globalFileNames` now says what Darkbloom relies on, from OpenCode 2's source (v2.2.6, dc2ffcf8bf): `opencode.json`, then `opencode.jsonc`, and no `config.json` (`discovery.ts` `names`, `config.ts` `loadDirectory`, its test "does not load legacy config.json files"); the default is the `model` of the last config loaded (`provider.ts`, `Config.latest`); OpenCode saves to the last file that exists (`config.ts` `update`); what loads before and after the global files (`config.ts` `load`); `OPENCODE_CONFIG_DIR`, which `configFile` doesn't follow. `configFile`, `plan` and `otherGlobalDefault` point to it instead of restating it. In the docs: tool-integrations.md's new "OpenCode's config order" table, linking that commit. - One rule for "the later file wins": `GlobalDefault.merged`, used by `otherGlobalDefault` and by `plan` (this file over the other). It replaces a loop and an inline ternary, with the same results. - The invariants, where they hold: `plan` never sets a default over the owner's, and a run again finds the one it set; Hermes is the exception (`HermesConfigPlan.plan`); names are read back without where a model runs (`IntegrationModel.displayName(in:)`); `IntegrationEndpoint.live`'s defaults read this Mac's own state, so a test gives its own. - Tests never read this Mac's cluster service. `IntegrationEndpoint.live` asks `ClusterPairSummary.runningPartPID()` by default, which `runningLocalAPIShortcut`, `waitsForTheLocalAPI`, the `liveEndpoint` child and the opt-in OpenCode smoke reached. They now bind a test pair (`ClusterPairSummary.readerForTesting`, `keepCommandsOffThisMacsCluster()`) or pass `pairPart`. No expectation changed. - Tests added, none changed or dropped: `thisFilesOwnDefaultWins` (this file's `""` beats another's name, its name beats another's unnamed default, two `model` keys name none), `aDefaultWithoutANameStays` (`""`, `null` or a broken `opencode.json`: the line without a name, no `model` written), `everyChangedAndDefaultLine` (every `Changed:` wording and default line; four of them no test said). - Docs: plain words for the default model in local-first.md, cli-reference.md and the changelog fragment, with the project and `OPENCODE_CONFIG` case; test.md's coverage and isolation. Checks (Xcode 27.2, prod identity, nice 19, CPU only, in a sandbox that denies ~/.darkbloom*, the real OpenCode and Hermes configs, the GPU and ports 8000/47420-47423): ToolSetupWordsTests 8/8; OpenCodeConfigPlanTests, HermesConfigPlanTests, IntegrationModelsTests 48/48; StartToolIntegrationTests, ModelLoadWaitTests, ToolAddressTests 38/38; the other tool suites 47/47; DarkbloomCLITests 1241/1241 in 175 suites (the usual binary and Metal skips); the isolated cases pass with a planted home whose cluster service names their pid. docs-check, docs-impact-check (#1904's head), changelog check and git diff --check pass. The tested tree differs from this one in one doc comment line (`GlobalDefault.merged`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`IntegrationModels.resolve` took the engine's image input for a model served here as `location <= .yourPair` (this branch's merge of #1897). That holds only while `.yourPair` is declared right after `.thisMac`, the order the tools list models in. `IntegrationModel.Location.servedHere` now says it with an exhaustive switch: this Mac and its pair, not your Macs or the network, so a new place must say whether its engine's word counts. `whereAModelIsServedHere` pins the set; `aPairsModelsAreServedHere` still pins the behaviour. Behaviour preserved. For whoever merges #1914 with this branch: its `engineReasoning = location == .thisMac` merges without a conflict and would leave a pair's own models without their engine's reasoning word; it needs `location.servedHere` too. `aPairsModelsAreServedHere` lists no `supported_features`, so it can't see that. Checks, as for the commit before (sandboxed, CPU only, prod identity, on this tree): ToolSetupWordsTests 8/8; OpenCodeConfigPlanTests, HermesConfigPlanTests, IntegrationModelsTests 49/49; StartToolIntegrationTests, ModelLoadWaitTests, ToolAddressTests 38/38; the other tool suites 47/47; DarkbloomCLITests 1242/1242 in 175 suites (the usual binary and Metal skips); the isolated cases pass with a planted home. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tools-default-model-and-names #1904's fixes from its independent review (Ctrl-C as the wait ends, `localhost` as this Mac, the run-again line by the process's word, the wiring tests) and its merge of dev (#1899, #1900, #1905, #1885, #1917). - ToolIntegrationStep.configure: #1904's `afterWait` (the wait's list and the process's word), then this branch's `resolve(here:)` for a pair. - local-first.md: this branch's URL in the "already serves" line, then #1899's Only me wait. - developer/test.md: the three new suites in the filter, and both rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
added a commit
that referenced
this pull request
Nov 9, 2026
… fix/local-models-list-reasoning No conflicts. #1916 is in, so #1914's review condition C2 holds: Gemma 4 lists reasoning, and an effort now turns its thinking on. #1904 (tools wait for the model) adds no location.servedHere and no pair location. IntegrationModels.Location is still thisMac, yourMacs and network, and a pair's own /v1/models entries are still this-mac. So this PR's `location == .thisMac` remains exactly "served here", and a pair keeps its engine's "no". #1911, which merges after this PR, makes the switch to location.servedHere (review condition C1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-default-model-and-names - tool-integrations.md, step 4 (Hermes): both sentences, this branch's main model, then #1914's "The block says nothing of reasoning". - Not resolved here, on purpose: #1914's `engineReasoning = location == .thisMac` merged without a conflict beside this branch's `.yourPair`, so a pair's own models lose their engine's "no" on reasoning (the review's F3). The next commit pins it red; the one after sets `location.servedHere`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mber's relay, a pair's reasoning The independent review of #1911 (`review-1911.md`, changes needed): - F1: OpenCode 2.2.6's TUI starts a new session on the config's `model`, else on the model last picked with /models (`recent` in `model.json`, in its state folder), else on the first it lists. So a `model` Darkbloom writes overrides the remembered pick at every launch, and "Switch back with /models" lasts only until OpenCode quits. Decision (orchestrator): write `model` only when OpenCode has neither a config default nor a remembered pick; otherwise "Pick Darkbloom once with /models; OpenCode remembers it."; and when it writes one, say how to undo it for real. - F2: a member's relay writes `local.json` with its cluster service's pid, which isn't the part's, so its pair's models were "(this Mac)". - F3: #1914 merged first with `engineReasoning = location == .thisMac`, so a pair's own models lost their engine's "no" (the merge before). Tests first; the skeleton adds the names and keeps today's behaviour: `OpenCodeConfigPlan.rememberedPick` (reads nothing), the plan's `rememberedPick` and `ToolConfigSummary.rememberedPick` (unused), `IntegrationTool.plan(environment:)`, `openCodeDefault(file:)` (today's words), `IntegrationEndpoint.live(pairProcesses:)` and `ClusterPairSummary.runningPairProcesses()` / `pairProcesses(of:)` (the part's pid only, as before). - ToolSetupWordsTests (temp homes, a fake `model.json`): a remembered pick stays (no `model`, its line), under `XDG_STATE_HOME` too and not from another folder, and a config's default outranks it; no pick OpenCode would read (empty `recent`, favorites only, unnamed entries, broken or non-object JSON) writes Darkbloom's default with the undo words; the pair's processes include the cluster service's; every default line. - OpenCodeConfigPlanTests: the plan with a remembered pick; the reader (the first named `recent` entry, `XDG_STATE_HOME`, empty, malformed). - IntegrationModelsTests: a pair's model keeps its engine's word on reasoning ("no" too), online and offline (the review's R8). - StartToolIntegrationTests: both default lines' new words. Red (prod identity, CPU-only, sandboxed): 10 tests fail with 23 issues: ToolSetupWordsTests 6 of 11 (14), the planners and models suites 3 of 61 (7, R8's 2 among them), StartToolIntegrationTests 1 (2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…for the pair, a pair's reasoning - F1, OpenCode's default: `OpenCodeConfigPlan.rememberedPick` reads the model OpenCode's TUI remembers from /models, as OpenCode 2.2.6 does: the first `recent` entry with a non-empty `providerID` and `modelID` in `model.json`, in `$XDG_STATE_HOME/opencode`, else `~/.local/state/opencode` (`tui/src/context/local.tsx` `fallbackModel` and its `model.json`; `tui/src/model-preference.ts` `addRecent` and `decodeModelPreference`; `util/src/global-roots.ts`). The plan writes `model` only when OpenCode has neither a config default nor such a pick; with a pick it notes it (`ToolConfigSummary.rememberedPick`) and the line says "Pick Darkbloom once with /models; OpenCode remembers it." When it writes `model`, the line says how to undo it for real: "To go back, remove "model" from <file> or run the Undo below." A config default that is Darkbloom's own is named as the config's `model`, not with /models. `IntegrationTool.plan` takes the environment, for `XDG_STATE_HOME`. - F2, a member's relay: `ClusterPairSummary.pairProcesses(of:)` is the part's pid and the cluster service's own (`servicePID`, whose relay writes `local.json`), while the part runs; `IntegrationEndpoint.live` counts either as the pair's. - F3, #1914's line: `engineReasoning` holds for a model served here (`location.servedHere`), as `engineImageInput` does, so a pair's own models keep their engine's "no". - The changelog fragment says the above. Green (prod identity, CPU-only, sandboxed): ToolSetupWordsTests 11/11; the planners, IntegrationModelsTests, EngineImageInputTests and EngineReasoningTests 61/61; StartToolIntegrationTests, ModelLoadWaitTests, ToolAddressTests and ToolIntegrationTests 51/51; DarkbloomCLITests 1346 tests in 185 suites (the usual binary and Metal skips). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lt, a member's relay - local-first.md: a `/models` pick OpenCode remembers stays its default (`model.json`), and the line for it; Darkbloom's default only when OpenCode has neither, with the way back that lasts (remove "model", or the Undo; not /models); `(your pair)` on a member's relay too. - quickstart.md: OpenCode remembers a /models pick; the three lines. - cli-reference.md: the result block's default rule and lines; a relay's pid (the cluster service's) counts as the pair's. - direct-mode.md: `(your pair)` on a member's relay. - architecture/tool-integrations.md: step 1 (`runningPairProcesses`), step 3 (`rememberedPick`, the way back), the config-order table's row for the TUI's remembered pick (cited at `v2.2.6`), invariant 3. - developer/test.md: the new coverage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1894 (every Mac of a pair answers locally in Both, me first) merged after this branch's last merge of dev. - StartCommand+Tools.swift: this branch's `alreadyServes` line, then #1894's `relayed` passed to `setUpToolsWithSavedSettings`. - tool-integrations.md, step 1: #1894's key-file sentences, then this branch's `servesThePair`, which counts the cluster service's pid while the part runs: #1894's Both relay writes `local.json` with it too (`ClusterService.relayDiscovery`, `getpid()`), so its models are the pair's as the local-only relay's are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
marked this pull request as ready for review
November 9, 2026 03:08
jonathan308
added a commit
that referenced
this pull request
Nov 9, 2026
This was referenced Nov 9, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Base
dev(#1904 merged asc5263deaf1). The independent review (review-1911.md) asked for three changes (F1–F3); they are incc000199ac–ebfff8ad3ebelow.Why
Journey 2a, step 4 (pair-2 on DevNet
.144, with a real user's OpenCode and Hermes configs;validation-evidence/journey-2a.md,journey-2a/s4-*.txt) found three things indarkbloom --opencode/--hermes:~/.config/opencode/opencode.jsoncnor hisopencode.json(providersexo,omlx) set a default model, so Darkbloom's became his OpenCode default. That was said only at the end of theUse it:line, and theChanged:line said "nothing else changed" thoughmodelhad been added. Hermes' line didn't name the main model it replaced (gpt-6-astraviaopencodex).Darkbloom already serves on 0.0.0.0:8001named the pair's bind address, not the URL a tool uses.Qwen 3.8 27B (this Mac).Hermes' B-J2-1 (
reasoning_effort→ 400) is not in this PR.What changes
sst/opencodeis nowanomalyco/opencode. OpenCode 2 (v2.0.29tov2.2.6anddev) loadsopencode.json, thenopencode.jsonc, from the global folder, and the later one wins (packages/core/src/config/discovery.ts:names = ["opencode.json", "opencode.jsonc"], loaded in that order byconfig.ts'sloadDirectory). It no longer loads OpenCode 1'sconfig.json(its test "does not load legacy config.json files"). OpenCode 1 (v1.19.5) mergedconfig.json→opencode.json→opencode.jsonc, but Darkbloom refuses OpenCode 1. Soconfig.jsondoesn't count: documented and tested.modelwhen the other file set one (bd9b18fe64, Tool integrations: the OpenCode and Hermes config writers (I-D2a) #1873's review). NowOpenCodeConfigPlan.otherGlobalDefault(besides:)returns aGlobalDefault(.none,.model(name),.unnamed), and the edited file's ownmodelwins, as it's the last global file.model: nothing is written for it, and the start names it:Your default stays exo/llama-3.3-70b; pick Darkbloom with /models.For Darkbloom's own default it saysYour default stays darkbloom/… (the "model" in your OpenCode config).For"",nullor a file it can't read, it saysYour default model stays as your config sets it; pick Darkbloom with /models./modelspick (review F1): OpenCode 2.2.6's TUI starts a new session on--model, else the config'smodel, else the first valid model inrecent, else the first model listed (local.tsxfallbackModel)./modelsadds each pick torecent(dialog-model.tsx→local.tsxset;model-preference.tsaddRecent), which OpenCode keeps inmodel.jsonin its state folder,$XDG_STATE_HOME/opencode, else~/.local/state/opencode(local.tsx:path.join(paths.state, "model.json");global-roots.ts). AmodelDarkbloom wrote would come first at every launch, so nothing is written, and the start saysPick Darkbloom once with /models; OpenCode remembers it.OpenCodeConfigPlan.rememberedPickreads the file as OpenCode does (decodeModelPreference): the firstrecententry with a non-emptyproviderIDandmodelID; a file it can't read holds none.New OpenCode sessions now use Darkbloom's Qwen 3.8 27B. To go back, remove "model" from ~/.config/opencode/opencode.jsonc or run the Undo below.(/modelsisn't one: the config'smodelcomes first again at the next launch.) TheChanged:line now says… and the default model. TheUndo:line stays.New Hermes chats now use Darkbloom's Qwen 3.8 27B (before: gpt-6-astra via opencodex). Switch back: hermes model.model.default, its aliasmodel.model, or a baremodel:, withmodel.provider(withoutcustom:).null/""), or when it was Darkbloom's already.Changed:line now read like OpenCode's:✓ Hermes can use Darkbloom: 1 model.,(added the "darkbloom" provider and made it the main model).Darkbloom already serves at http://127.0.0.1:8001/v1; setting up OpenCode for it.This islocal.json'sbase_url: the URL the tools are given, with127.0.0.1for0.0.0.0(ToolIntegrationStep.alreadyServes).Qwen 3.8 27B (your pair).IntegrationEndpoint.livesetsservesThePairwhenlocal.json's pid is one of this Mac's running pair's processes (ClusterPairSummary.runningPairProcesses()): its part's, asstatusdecides whose API it is (LocalAPIServer.of), or, while the part runs, the cluster service's own, whose relay answers a member's local API and writeslocal.jsonwith the service's pid (ClusterService.relayTick; review F2).IntegrationModel.Location.servedHere): they take their engine's word on image input (provider: this Mac's /v1/models says what each model takes, and a long prompt shows progress (R-FULL D7, D8; stacked on #1893) #1897) and, sinceaf948d743b–b46587e759, on reasoning too (provider: this Mac's model list says which models reason, and OpenCode follows it (B-J2-1 part 2, stacked on #1909) #1914'sengineReasoning; review F3), as this Mac's do.IntegrationModels.resolve(here:)names the endpoint's own models(your pair).IntegrationModel.Location.yourPaircomes right after.thisMacin the tools' order.displayName(in:)), so a run again, online or offline, changes nothing (tested).on this Mac, its pair or your other Macs.Two wording differences to check:
Your default stays X; pick Darkbloom with /models., not the decision'sPick Darkbloom once with /models; OpenCode remembers it.: OpenCode starts a new session on a config'smodelbefore any remembered pick, so "OpenCode remembers it" would be false there (the pick lasts until it quits). The remembered-pick line is used only when no config setsmodel.Use it:line named it too. To drop the name, changeToolIntegrationStep.openCodeDefault, the Hermes line inlines, and the tests' strings.Before / After: what a user sees
flowchart LR subgraph BEFORE["Before"] direction TB b1["darkbloom --opencode, then --hermes<br/>(pair-2's leading Mac, its API up)"] --> b2["Darkbloom already serves on 0.0.0.0:8001"] b2 --> b3["opencode.jsonc and opencode.json:<br/>no model"] b3 --> b4["model written to opencode.jsonc<br/>Changed: ... nothing else changed<br/>Use it: ... new sessions use darkbloom-dev/EigenLabs/..."] b2 --> b5["Hermes uses Darkbloom: new Hermes chats run<br/>Qwen 3.8 27B (this Mac)<br/>gpt-6-astra via opencodex replaced, unnamed"] b4 --> b6["models named Qwen 3.8 27B (this Mac)"] end subgraph AFTER["After"] direction TB a1["darkbloom --opencode, then --hermes<br/>(same Mac)"] --> a2["Darkbloom already serves at<br/>http://127.0.0.1:8001/v1"] a2 --> a3{"model in opencode.json<br/>or opencode.jsonc?"} a3 -->|"yes"| a4["nothing written for it<br/>Your default stays exo/...;<br/>pick Darkbloom with /models."] a3 -->|"no"| a8{"a /models pick OpenCode<br/>remembers (model.json)?"} a8 -->|"yes"| a9["nothing written for it<br/>Pick Darkbloom once with /models;<br/>OpenCode remembers it."] a8 -->|"no"| a5["model written; Changed: ... and the default model<br/>New OpenCode sessions now use Darkbloom's Qwen 3.8 27B.<br/>To go back, remove model from ... or run the Undo below."] a2 --> a6["New Hermes chats now use Darkbloom's Qwen 3.8 27B<br/>(before: gpt-6-astra via opencodex).<br/>Switch back: hermes model"] a5 --> a7["models named Qwen 3.8 27B (your pair)<br/>a run again changes nothing"] end classDef cmd fill:#e8eefc,stroke:#3c5aa6,color:#111111 classDef ok fill:#e3f6e8,stroke:#1e8449,color:#111111 classDef err fill:#fde2e1,stroke:#c0392b,color:#111111 classDef text fill:#fff4d6,stroke:#b7791f,color:#111111 class b1,a1 cmd class a4,a5,a6,a7,a9 ok class b4,b5,b6 err class b2,b3,a2,a3,a8 textBlue: what the user types. Green: what the user is told, true and on its own line. Red: a silent change or a wrong name. Yellow: what the start reads or says first.
Before / After: code flow
flowchart LR subgraph BEFORE["Before"] direction TB B0["Start.setUpToolsForRunningLocalAPI<br/>prints live.host:live.port"] --> B1["IntegrationEndpoint.live<br/>baseURL, keyFile"] B1 --> B2["IntegrationModels.resolve<br/>this-mac: .thisMac"] B2 --> B3["OpenCodeConfigPlan.plan<br/>defaultModelElsewhere: Bool<br/>(otherGlobalConfigSetsModel)"] B2 --> B4["HermesConfigPlan.plan<br/>mainModel: .thisMac, else .yourMacs"] B3 --> B5["ToolIntegrationStep.lines<br/>Use it: ... / Your default model is unchanged"] B4 --> B5 end subgraph AFTER["After"] direction TB A0["Start.setUpToolsForRunningLocalAPI<br/>ToolIntegrationStep.alreadyServes(live): live.baseURL"] --> A1["IntegrationEndpoint.live(pairProcesses:)<br/>servesThePair: local.json's pid in<br/>ClusterPairSummary.runningPairProcesses()<br/>(the part's, the cluster service's)"] A1 --> A2["IntegrationModels.resolve(here:)<br/>this-mac: .yourPair on a pair's API<br/>Location.servedHere: the engine's<br/>image input and reasoning"] A2 --> A3["OpenCodeConfigPlan.plan(defaultElsewhere:, rememberedPick:)<br/>GlobalDefault.merged: otherGlobalDefault(besides:),<br/>then globalDefault(in:) of the edited file<br/>rememberedPick(home:variables:): model.json<br/>summary.keptDefault, summary.rememberedPick"] A2 --> A4["HermesConfigPlan.plan<br/>currentMain, replacedMain: summary.replacedDefault<br/>mainModel: nearest not on the network"] A3 --> A5["ToolIntegrationStep.lines<br/>changed, openCodeDefault, name(of:in:)"] A4 --> A5 end classDef same fill:#eef2f7,stroke:#64748b,color:#111111 classDef changed fill:#ede4fb,stroke:#6b46c1,color:#111111 class B0,B1,B2,B3,B4,B5 same class A0,A1,A2,A3,A4,A5 changedPurple: new or changed. Grey: as before.
Every new line
Darkbloom already serves on 0.0.0.0:8001; setting up OpenCode for it.Darkbloom already serves at http://127.0.0.1:8001/v1; setting up OpenCode for it.Changed:(added the "darkbloom-dev" provider; nothing else changed)(added the "darkbloom-dev" provider and the default model; nothing else changed). A new file:(a new file with the "darkbloom" provider and the default model). An updated provider:(updated the "darkbloom" provider and the default model; nothing else changed). Only the default:(added the default model; nothing else changed)Use it: in OpenCode, /models → Darkbloom Dev; new sessions use darkbloom-dev/EigenLabs/Qwen3.8-27B-4bit-mtp.New OpenCode sessions now use Darkbloom's Qwen 3.8 27B. To go back, remove "model" from ~/.config/opencode/opencode.jsonc or run the Undo below./modelspickPick Darkbloom once with /models; OpenCode remembers it.(Changed:without the default)Use it: in OpenCode, /models → Darkbloom. Your default model is unchanged.Your default stays exo/llama-3.3-70b; pick Darkbloom with /models.Your default stays darkbloom/gemma-4-26b-qat-4bit (the "model" in your OpenCode config)."",null, or a file it can't readYour default model stays as your config sets it; pick Darkbloom with /models.✓ Hermes uses Darkbloom: new Hermes chats run Qwen 3.8 27B (this Mac).✓ Hermes can use Darkbloom: 1 model.Changed:(added the "darkbloom-dev" provider, made the main model)(added the "darkbloom-dev" provider and made it the main model). A new file:(a new file with the "darkbloom" provider as the main model). An updated provider:(updated the "darkbloom" provider and made it the main model). Only the main model:(made the "darkbloom" provider the main model)New Hermes chats now use Darkbloom's Qwen 3.8 27B (before: gpt-6-astra via opencodex). Switch back: hermes model(no(before: …)without one)Switch back: hermes model · Undo: cp '…' '…' · Chats already open keep their model.Undo: cp '…' '…' · Chats already open keep their model.… on this Mac or your other Macs; …Hermes needs a main model with at least 64K context on this Mac, its pair or your other Macs; Darkbloom lists such models only on the network here.Qwen 3.8 27B (this Mac)Qwen 3.8 27B (your pair)Journey 2a's step 4, before and after
Before (
journey-2a/s4-opencode-first.txt, the Hermes block fromjourney-2a.md; theRequests:andOther tools:lines are unchanged and left out):After: what
ToolSetupWordsTestsasserts for his two OpenCode files and his Hermes config, with no/modelspick remembered (journey 2a didn't record his OpenCode state; with a pick, nothing is written for the default and the line isPick Darkbloom once with /models; OpenCode remembers it.). It's shown here with thedarkbloom-devidentity; the tests usedarkbloom.The model in both files is
Qwen 3.8 27B (your pair).Commits
8b99a13f93: red tests, with a skeleton that adds only the names the tests use and keeps today's behaviour:GlobalDefault,otherGlobalDefault(the old yes/no),keptDefault/replacedDefault(never set),.yourPair,resolve(here:)andlive(pairPart:)(unused), andalreadyServes(today's words).112bf1fe9b: the fix, pluschangelog.d/tools-say-the-default-and-the-pair.md.b5cbb9351d: docs:local-first.md,quickstart.md,cli-reference.md,direct-mode.md,architecture/tool-integrations.mdanddeveloper/test.md.222c66f25f: a guard test for provider: this Mac's /v1/models says what each model takes, and a long prompt shows progress (R-FULL D7, D8; stacked on #1893) #1897's merge (see Coordination). It passes before and after the fix.e124080878: merge of tools:darkbloom --opencode/--hermeswait for the model to load, and a start says when a tool points elsewhere (LS-4) #1904's head6f0e0e9130(its refactor pass), signed and clean.7b405625ce: merge of tools:darkbloom --opencode/--hermeswait for the model to load, and a start says when a tool points elsewhere (LS-4) #1904's head103e4cd0cd(dev8d545e85a8: provider: a single Mac serves its model's whole window and holds every request to it #1893, provider: this Mac's /v1/models says what each model takes, and a long prompt shows progress (R-FULL D7, D8; stacked on #1893) #1897, fix(provider): the update check asks again, 15 s a try, and says what failed #1890), signed. It resolvescli-reference.md(provider: this Mac's /v1/models says what each model takes, and a long prompt shows progress (R-FULL D7, D8; stacked on #1893) #1897's image-input sentences, then this PR's) and the silent conflict inIntegrationModels.resolve: the engine's image input now holds for a model served here,location <= .yourPair, and no longer only for.thisMac.94fc79f2ce,d7af7826cb: the refactor pass, running (another agent): OpenCode's config order in one place, from its source; "served here" by name (IntegrationModel.Location.servedHere) instead of the tools' order. Behaviour preserved.3b09e1cc40: merge of tools:darkbloom --opencode/--hermeswait for the model to load, and a start says when a tool points elsewhere (LS-4) #1904's head10093d776c(its fixes after its independent review, and its merge of devc76445a61e: LS-1 PR-b: Only me serves in the background, and the service always serves the saved choice #1899, LS-1 PR-c: a simpler start — Autopilot only for the network, a picker that opens on what fits, no key on screen #1900, desktop, cluster: the app on a paired Mac offers Start serving, never Autopilot, and its lines say what happened #1905, ci: restore the prompt parity fixtures from a verified cache #1885, ci: hourly full CI (dev) run of dev (workflow_dispatch selects every suite) #1917), signed. Conflicts:ToolIntegrationStep.configure(tools:darkbloom --opencode/--hermeswait for the model to load, and a start says when a tool points elsewhere (LS-4) #1904'safterWait, then this PR'sresolve(here:)),local-first.md(this PR's URL, then LS-1 PR-b: Only me serves in the background, and the service always serves the saved choice #1899's Only me wait),developer/test.md(the three new suites in the filter, and both rows).a0e0dadcf0: merge of tools:darkbloom --opencode/--hermeswait for the model to load, and a start says when a tool points elsewhere (LS-4) #1904's head2a9158e875(dev344fd29b3e: cluster, status: a paired start says what it does, Apple's check reads as progress, and both Macs show the pause, from now #1908, cli:darkbloom route this-mac|my-macs|my-macs-firstsaves the route (LS-6, R12) #1902, cluster:darkbloom cluster leaveleaves a pair in one command, from either Mac (LS-6, R14) #1903), signed, clean. cli:darkbloom route this-mac|my-macs|my-macs-firstsaves the route (LS-6, R12) #1902's requiredsettingsFile:inLocalRouterConfig.host(...)touches no call of this PR's, andClusterPairSummary.readerForTesting, which its tests bind, is unchanged. Locally:ToolSetupWordsTests8/8, the planners withEngineImageInputTests53/53, the start's three suites 44/44,DarkbloomCLITests1335/1335 in 184 suites; CI run 42536888304 passed.af948d743b: merge ofdevefb61cc2f1(provider: this Mac's model list says which models reason, and OpenCode follows it (B-J2-1 part 2, stacked on #1909) #1914, provider: a streamed local request that can't get this Mac's memory is a 503 before any header (R-FULL PR B; stacked on #1910) #1912, provider: me first re-routes Darkbloom work that hasn't answered when your request waits (R-FULL PR A) #1910, provider: Gemma 4 thinks for an effort, GPT-OSS renders its Harmony level; the coordinator's effort table is checked against the provider's (B-J2-1, stacked on #1909) #1916), signed.tool-integrations.mdstep 4 keeps both sentences (this PR's main model, then provider: this Mac's model list says which models reason, and OpenCode follows it (B-J2-1 part 2, stacked on #1909) #1914's "The block says nothing of reasoning"). provider: this Mac's model list says which models reason, and OpenCode follows it (B-J2-1 part 2, stacked on #1909) #1914'sengineReasoning = location == .thisMacmerged silently; the next two commits pin it red and fix it (F3).cc000199ac: red tests for the review's F1–F3, with a skeleton that adds the names and keeps today's behaviour (rememberedPickreads nothing;pairProcesses(of:)is the part's pid only;openCodeDefault(file:)keeps today's words).b46587e759: the fixes (F1:rememberedPick, the plan's rule, the lines; F2: the cluster service's pid; F3:engineReasoning = location.servedHere) and the changelog fragment.ebfff8ad3e: docs:local-first.md,quickstart.md,cli-reference.md,direct-mode.md,architecture/tool-integrations.md(step 1, step 3, a row for the TUI's remembered pick in "OpenCode's config order", invariant 3) anddeveloper/test.md.ca8a57bf13: merge ofdev5347bc3b81(cluster: every Mac of a pair answers locally in Both, me first (member relay, one key per Mac) — LS-3 #1894, which merged afterefb61cc2f1), signed. Conflicts:StartCommand+Tools.swift(this PR'salreadyServesline, then cluster: every Mac of a pair answers locally in Both, me first (member relay, one key per Mac) — LS-3 #1894'srelayed) andtool-integrations.mdstep 1 (cluster: every Mac of a pair answers locally in Both, me first (member relay, one key per Mac) — LS-3 #1894's key-file sentences, then this PR'sservesThePair). cluster: every Mac of a pair answers locally in Both, me first (member relay, one key per Mac) — LS-3 #1894's Both relay writeslocal.jsonwith the cluster service's pid (relayDiscovery), whichrunningPairProcesses()counts (F2). Locally: the same suites 11/11, 61/61, 51/51;DarkbloomCLITests1364/1364 in 186 suites. CI run 42551025634 passed, cluster jobs included.Validation
Local runs used Xcode 27.2 and the prod identity (
DARKBLOOM_RELEASE_ENVIRONMENT=prod, as CI), withnice -n 19, CPU only. They ran inside a sandbox that denies~/.darkbloom*, the real OpenCode and Hermes configs, the GPU,~/Library/LaunchAgentswrites and ports 8000/47420–47423. Every test uses fakes: temp homes holding the user's two OpenCode files and his Hermes config as journey 2a found them, a faked/v1/modelsand catalog, and a pair given by a pid closure. No tool runs, no port is bound, and no real config is read.8b99a13f93)112bf1fe9b)6f0e0e9130(e124080878)103e4cd0cd, with dev (7b405625ce)ToolSetupWordsTests(new): the default's own line with none set, hisopencode.jsonuntouched, a default in either file kept and named,config.jsonignored, Hermes' "before", the URL for an API on0.0.0.0, a pair's(your pair), and a run again (online and offline) that changes nothingOpenCodeConfigPlanTests,HermesConfigPlanTests,IntegrationModelsTests(kept default named, the merged global view,null/unreadable/config.json, the replaced main model, a pair's model as Hermes' main one, a pair's names); with dev, #1897'sEngineImageInputTestsStartToolIntegrationTests(both tools' new lines),ModelLoadWaitTests,ToolAddressTestsDarkbloomCLITests(skips below)location == .thisMacput back on7b405625ceaPairsModelsAreServedHerefails, 2 issues (online and offline)scripts/docs-check.sh,docs-impact-check.py --base#1904's branch andorigin/dev,changelog.py check,git diff --checkAfter #1904's
10093d776c(3b09e1cc40):ToolSetupWordsTests8/8 (with the refactor pass's two);OpenCodeConfigPlanTests,HermesConfigPlanTests,IntegrationModelsTestsand #1897'sEngineImageInputTests53/53;StartToolIntegrationTests,ModelLoadWaitTestsandToolAddressTests44/44;DarkbloomCLITests1284/1284 in 180 suites;docs-check,docs-impact-check --base#1904's branch,changelog.py checkandgit diff --checkOK. CI (dev): run 42532893178 on3b09e1cc40passed (Build provider test products, Provider Unit Tests shards 1 and 2, Provider Tests).CI (dev), earlier: run 42480918704 on
7b405625cepassed: Build provider test products, Provider Unit Tests shards 1 and 2, and Provider Tests.ToolSetupWordsTestsandaPairsModelsAreServedHereran there. No CI ran on the earlier heads: GitHub listed the PR as conflicting with its base once #1904 merged dev. The two Vercel deployments (d-inference,d-inference-console-ui-dev) fail on every open PR, unrelated.The review's changes (
cc000199ac→b46587e759, ondevefb61cc2f1): red: 10 tests fail with 23 issues.ToolSetupWordsTests6 of 11 (14: a remembered pick stays, underXDG_STATE_HOMEtoo and not from another folder, a config's default outranking it; no pick OpenCode would read writes the default with the way back; the pair's processes; every default line);OpenCodeConfigPlanTestsandIntegrationModelsTests3 of 61 withHermesConfigPlanTests,EngineImageInputTestsandEngineReasoningTests(7: the plan with a pick, the reader, and R8's two: a pair's model keeps its engine's "no" on reasoning, online and offline);StartToolIntegrationTests1 (2). Green: 11/11, 61/61, andStartToolIntegrationTests,ModelLoadWaitTests,ToolAddressTestsandToolIntegrationTests51/51;DarkbloomCLITests1346/1346 in 185 suites;docs-check,docs-impact-check --base origin/dev,changelog.py check,git diff --checkOK. No test reads a real OpenCode state: the reader takes the start's environment, and every test passes a temp home. CI (dev): run 42548029385 onebfff8ad3epassed on its second attempt: Build provider and cluster test products, Provider Unit Tests shards 1 and 2 (the new tests ran there), the cluster checks and Provider Tests. The first attempt failed only in Cluster Focused Checks shard 1, atOrphanWiredCheck.probes("a zombie counted as running": a spawned process hadn't exited within its 500 ms on the runner), a timing check in the cluster library this PR doesn't touch; the re-run of the failed jobs passed. The cluster jobs ran because this round changesClusterPairSummary+Live.swift.Skipped locally, as before (CI runs them): the suites that run the built
darkbloombinary on this production host (CLIDispatchTests,AppAttestQualificationCommandTests,UpdateRollbackEndToEndTests,ClusterServiceUpdateTests,DesktopExecutableWatchTests,MacOSUpgradeNoticeTests,DesktopRuntimeProfileTests), and the two tests that open Metal (localPreloadDisabled,preloadReportsAndHonorsStop).Not run: the real-Mac re-run of journey 2a's step 4 on pair-2 (this worker may not run
darkbloom).Coordination
darkbloom --opencode/--hermeswait for the model to load, and a start says when a tool points elsewhere (LS-4) #1904: merged intodev(c5263deaf1); its heads were merged here up to2a9158e875(ata0e0dadcf0).efb61cc2f1: merged ataf948d743b. provider: this Mac's model list says which models reason, and OpenCode follows it (B-J2-1 part 2, stacked on #1909) #1914's reasoning line takeslocation.servedHerehere (F3), withaPairsReasoningIsServedHere.c76445a61e(provider: a single Mac serves its model's whole window and holds every request to it #1893, provider: this Mac's /v1/models says what each model takes, and a long prompt shows progress (R-FULL D7, D8; stacked on #1893) #1897, fix(provider): the update check asks again, 15 s a try, and says what failed #1890, LS-1 PR-b: Only me serves in the background, and the service always serves the saved choice #1899, LS-1 PR-c: a simpler start — Autopilot only for the network, a picker that opens on what fits, no key on screen #1900, desktop, cluster: the app on a paired Mac offers Start serving, never Autopilot, and its lines say what happened #1905, ci: restore the prompt parity fixtures from a verified cache #1885, ci: hourly full CI (dev) run of dev (workflow_dispatch selects every suite) #1917): in through tools:darkbloom --opencode/--hermeswait for the model to load, and a start says when a tool points elsewhere (LS-4) #1904, last at3b09e1cc40.7b405625ce: provider: this Mac's /v1/models says what each model takes, and a long prompt shows progress (R-FULL D7, D8; stacked on #1893) #1897'sIntegrationModels.resolvetook the engine's image input only forlocation == .thisMac. A pair's own models are.yourPairhere, so it holds for a model served here:location <= .yourPairthen,location.servedHeresince the refactor pass (d7af7826cb). Otherwise a Gemma 4 pair's models would claim image input. Git merged both sides without a conflict.aPairsModelsAreServedHere(222c66f25f) decodesinput_modalitiesand fails with provider: this Mac's /v1/models says what each model takes, and a long prompt shows progress (R-FULL D7, D8; stacked on #1893) #1897's own line (checked).dev, and in here atca8a57bf13(conflicts above). Its Both relay publishes the cluster service's pid (relayDiscovery), whichrunningPairProcesses()counts as the pair's (F2), so its models are(your pair)too.darkbloom --opencode/--hermeswait for the model to load, and a start says when a tool points elsewhere (LS-4) #1904 at3b09e1cc40, withlocal-first.md's "already serves" sentence as this PR's URL, then LS-1 PR-b: Only me serves in the background, and the service always serves the saved choice #1899's Only me wait.Limitations
opencode.json,/Library/Application Support/opencode, MDM) outrank the global files: amodelthere wins over Darkbloom's too. The line speaks of the global default, as before.Your default stays darkbloom/<old> (the "model" in your OpenCode config).OpenCode skips a model it can't find (review N5).(your pair)needs the API's process to be this Mac's running pair's: the part's (the cluster service's published child pid) or, while the part runs, the cluster service's (servicePID). The service publishes both right after it spawns the part, in the same tick, well before the part or the relay can writelocal.json.modelkept unnamed, amodelwithoutprovider/named; amodelinOPENCODE_CONFIG, a project or.opencode/(OpenCode uses it; documented); remote or integration defaults outranked;OPENCODE_CONFIG_DIRnot followed.updated the provider).Your default stays Xnames OpenCode's rawprovider/model, not a display name: it is the owner's own string.base_urlby its model alone.94fc79f2ce,d7af7826cb;refactor-1911.md). Independent review: changes needed (review-1911.md, ata0e0dadcf0); F1–F3 are fixed here, and N6 (this body) too.