Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: let fleet harness launch against a gateway with no Spinloop - #201

Merged
outofcoffee merged 6 commits into
mainfrom
fleet-harness-no-outfit
Sep 13, 2026
Merged

feat: let fleet harness launch against a gateway with no Spinloop#201
outofcoffee merged 6 commits into
mainfrom
fleet-harness-no-outfit

Conversation

@outofcoffee

Copy link
Copy Markdown
Collaborator

Lets spinloop fleet harness launch 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

  • When a fleet file names a gateway and no Spinloop is given (none named, none beside the fleet file), the command no longer fails — it configures the active harness with a generic OpenAI-compatible provider pointed at the gateway, instead of requiring a throwaway Spinloop just to name a model the gateway would ignore.
  • The same applies to a hand-written Spinloop that names a provider but no model or alias.
  • The harness's model list is populated from the gateway's own live 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.
  • The provider this configures is named and keyed by the gateway itself, not the shared catalogue id — either an explicit new gateway.name field 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.
  • Fixed a related bug found in manual testing: with no Spinloop, the .env lookup 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 the fleet-client and fleet-config capabilities — see its proposal.md/design.md for 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.

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.
@outofcoffee outofcoffee added enhancement New feature or request go Pull requests that update go code labels Sep 13, 2026
…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.
@outofcoffee
outofcoffee marked this pull request as ready for review September 13, 2026 16:46
@outofcoffee
outofcoffee merged commit acb2310 into main Sep 13, 2026
3 checks passed
@outofcoffee
outofcoffee deleted the fleet-harness-no-outfit branch September 13, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant