Skip to content

Consolidate pkg/termite into monorepo and move API to /ml/v1/* - #52

Merged
ajroetker merged 3 commits into
mainfrom
monorepo
Apr 21, 2026
Merged

Consolidate pkg/termite into monorepo and move API to /ml/v1/*#52
ajroetker merged 3 commits into
mainfrom
monorepo

Conversation

@ajroetker

Copy link
Copy Markdown
Contributor

Summary

  • Moves the Termite server (pkg/termite) and its Go SDK (pkg/termite-client) out of the termite/ submodule into this monorepo as independent Go modules, and deletes the submodule. Matches the pattern set by pkg/termite-{operator,proxy} in Consolidate proxy and operator modules into the monorepo #51.
  • Breaking: Termite HTTP API moves from /api/* to /ml/v1/* so it can be hosted on antfly's own listener. /openai/v1/*, /anthropic/v1/*, /healthz, /readyz keep their paths.
  • Swarm mode mounts Termite in-process at /ml/v1/ on the metadata listener (no separate :11433 process) when --termite-api-url is unset; setting it falls back to the old reverse-proxy for out-of-process deployments.
  • Ports termite-go.yml and termite-container.yml workflows into .github/ and adds Dockerfile.termite + Dockerfile.termite-omni at repo root. Release tag prefix pkg/termite/v* triggers the termite container build.

Test plan

  • go build ./... in repo root, pkg/termite, pkg/termite-client, and e2e/
  • go test ./... in pkg/termite (unit tests pass)
  • Smoke test: antfly swarmPOST /ml/v1/embed returns 200 with embeddings, GET /ml/v1/models returns 200, no listener on :11433
  • Smoke test: /api/embed no longer served as an API (falls through to Antfarm SPA)
  • make e2e E2E_TEST=TestQuickstart — exercises the full quickstart path through the renamed URLs
  • CI: termite-go.yml triggers on pkg/termite/** / pkg/termite-client/**
  • CI: termite-container.yml triggers on pkg/termite/v* tags

Moves the Termite server (pkg/termite) and its Go SDK (pkg/termite-client)
out of the termite submodule and into this monorepo as independent Go
modules, matching the pattern established by pkg/termite-{operator,proxy}
in #51. The termite submodule is deleted.

Breaking: the Termite HTTP API moves from /api/* to /ml/v1/* so it can be
hosted alongside antfly's own API on the metadata listener. /openai/v1/*,
/anthropic/v1/*, /healthz and /readyz keep their paths.

Swarm mode now mounts the Termite handler in-process under /ml/v1/ on the
metadata listener (no separate :11433 process) when --termite-api-url is
unset. Setting --termite-api-url falls back to the old reverse-proxy
behavior for out-of-process deployments.

Ports termite-go.yml and termite-container.yml workflows into .github/
with path filters, tag patterns, and contexts rewritten for the monorepo
layout. Adds Dockerfile.termite and Dockerfile.termite-omni at repo root.

Release tag prefix pkg/termite/v* triggers the termite container build.
@ajroetker
ajroetker merged commit c10336a into main Apr 21, 2026
7 of 11 checks passed
@ajroetker
ajroetker deleted the monorepo branch April 21, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant