Shared inference interfaces (TextModel, Backend, Token). Zero deps, compiles everywhere.
Find a file
Claude e0ec07e667
test(inference): complete Phase 1 foundation tests
Add comprehensive tests for all three Phase 1 items:

- Option application: DefaultGenerateConfig idempotency, field isolation
  (WithMaxTokens leaves others at defaults), bad-input acceptance
  (negative temperature, negative TopK), empty variadic StopTokens,
  WithLogits default-is-false, partial-options preserve defaults,
  last-wins overrides for all GenerateOption and LoadOption types.

- Backend registry: concurrent read/write safety (70 goroutines with
  -race), overwrite-keeps-count, capturingBackend verifies LoadModel
  forwards all options to both explicit and default backends, Get
  after overwrite returns latest, List returns independent slices.

- Default() platform preference: registration order is irrelevant
  (metal wins regardless), all-preferred-unavailable falls back to
  custom, multiple custom backends finds the available one, empty
  path forwarding.

85 tests, 100% statement coverage, -race clean.

Co-Authored-By: Charon <developers@lethean.io>
2026-02-20 11:45:59 +00:00
CLAUDE.md feat: define shared TextModel, Backend, Token, Message interfaces 2026-02-19 19:37:27 +00:00
discover.go feat: add Discover() for scanning model directories 2026-02-19 23:37:30 +00:00
discover_test.go test(inference): add comprehensive tests for all exported API 2026-02-20 02:06:49 +00:00
FINDINGS.md feat: define shared TextModel, Backend, Token, Message interfaces 2026-02-19 19:37:27 +00:00
go.mod test(inference): add comprehensive tests for all exported API 2026-02-20 02:06:49 +00:00
go.sum test(inference): add comprehensive tests for all exported API 2026-02-20 02:06:49 +00:00
inference.go fix: add json struct tags to Message for API serialization 2026-02-20 02:05:46 +00:00
inference_test.go test(inference): complete Phase 1 foundation tests 2026-02-20 11:45:59 +00:00
options.go feat: add batch inference API (Classify, BatchGenerate) 2026-02-19 23:29:28 +00:00
options_test.go test(inference): complete Phase 1 foundation tests 2026-02-20 11:45:59 +00:00
README.md Initial commit 2026-02-19 19:35:54 +00:00
TODO.md docs: mark Phase 2 integration complete — all 3 backends migrated 2026-02-20 09:06:19 +00:00

go-inference

Shared inference interfaces (TextModel, Backend, Token). Zero deps, compiles everywhere.