feat: let fleet harness launch against a gateway with no Spinloop - #201
Merged
Conversation
A gateway resolves the model per request, so requiring a Spinloop only to name a model it ignores was a leftover restriction from node routing. `spinloop fleet harness` now launches straight from a fleet file's gateway section with no Spinloop at all, populates opencode's and Pi's model list from the gateway's live GET /v1/models, and names the configured provider from the gateway's address or an optional gateway.name so it reads distinctly in a model picker.
…gn notes Adds coverage for two paths the earlier commit left untested: the integration-level warning when a reachable gateway's /v1/models fails, and fetchGatewayModels' own connection-failure branch, distinct from an HTTP-level failure. Documents the no-Spinloop gateway launch in spinloop-file.md, and corrects design.md/proposal.md to describe the final gatewayLabel parameter rather than the modelOptional bool it replaced.
The provider key already carried "gateway-", but the display name a harness's model picker actually shows and searches was built from the catalogue's generic "OpenAI-compatible" engine label, so it never contained the word a user would search for. Found by testing against a real gateway: opencode's picker showed nothing for "gateway" except an unrelated, coincidentally-named provider. The label now leads with the literal "Gateway" instead.
Syncs the fleet-client and fleet-config delta specs into the main specs and moves the change to the archive.
Resolves conflicts between this branch's fleet-gateway no-Spinloop launch and main's --env-alone auto-configure launch: both changed applyRoutedSpinloop's signature/body independently. Kept both features — autoConfigure (from main) and gatewayLabel/model discovery (from this branch) now coexist in applyRoutedSpinloop, and the "Applying" print covers all three cases (normal, gateway-only, auto-configure). Verified after resolving: go build, gofmt, go vet, go test ./... -race -cover, openspec validate --all --strict, both CI shell scripts, and the full remote/ TypeScript suite (typecheck, vitest, cdk synth) all pass.
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.
Lets
spinloop fleet harnesslaunch against a fleet's gateway with no Spinloop at all, since a gateway resolves the model per request and has never needed one to route by.Summary
GET /v1/models, for harnesses whose config format holds more than one model per provider (opencode, Pi); a failure to fetch it is non-fatal — the launch still succeeds with an empty list. lucinate has no such concept, so it still gets a working connection with no pre-populated model.gateway.namefield in the fleet file, or the gateway's address when none is given — so it reads distinctly in a model picker (e.g.OpenAI-compatible (remote-llms)) the way a remote environment already does (llama.cpp (dev-2)), and a second gateway doesn't overwrite the first's config block..envlookup for the gateway's token now resolves beside the fleet file rather than the working directory the command happens to run from, matching what the error message already claimed.Implementation details
Planned and implemented via an OpenSpec change (
openspec/changes/fleet-harness-gateway-no-spinloop) against thefleet-clientandfleet-configcapabilities — see itsproposal.md/design.mdfor the fuller rationale, including why this needed more than just "apply no model": opencode has no built-in way to discover a provider's models at runtime, so Spinloop populates the list itself at apply time from the same endpoint the gateway already serves for this purpose.