Skip to content

feat: SystemOne / TypeSafe API compatibility and multi-variant Docker image matrix - #1

Merged
chneau merged 16 commits into
mainfrom
fork/auenkr
Sep 24, 2026
Merged

chneau merged 16 commits into
mainfrom
fork/auenkr

Conversation

@chneau

@chneau chneau commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

This PR integrates changes from the fork auenkr/docker-laya with comprehensive refactoring for dual API support, unified schemas, and a multi-variant container publishing pipeline.


✨ Added

  • SystemOne / TypeSafe API Compatibility:
    • Added POST /v1/systemone and root alias POST /systemone, fully compliant with the OpenRouter System One specification and TypeSafe SDKs.
    • Added clean, route-aligned schemas: SystemOneRequest, SystemOneResponse, SystemOneChoiceAnswer, SystemOneScoreAnswer, and SystemOneNoulAnswer.
    • Added flexible model resolution supporting laya-english, english, typesafe/*, laya/*, jev-1.13, etc.
    • Generates standard response metadata (id, provider: "Laya", usage).
  • Multi-Variant Matrix Publishing (CI):
    • Updated .github/workflows/publish.yml to build and publish multi-arch (linux/amd64 and linux/arm64) images across multiple tags:
      • :latest / :vX.Y.Z (Slim, ~300 MB, dynamic model download on startup)
      • :english / :vX.Y.Z-english (Pre-baked English model, ~1.3 GB, offline-ready)
      • :multilingual / :vX.Y.Z-multilingual (Pre-baked Multilingual model, ~1.8 GB)
      • :typed-decisions / :vX.Y.Z-typed-decisions (Pre-baked Typed-Decisions model, ~1.3 GB)
      • :all / :vX.Y.Z-all (Full bundle with all 3 models, ~3.5 GB)
  • Tooling:
    • Added make build-model MODEL=<name> to Makefile for building local pre-baked images.

🔄 Refactored & Unified

  • Unified Question Schemas:
    • Extended standard ChoiceQuestion, ScoreQuestion, and NoulQuestion to support InstructionValue (str | dict | list), removing duplicate schema definitions.
  • Dual API Support:
    • Retained all original native endpoints (/predict, /predict/bulk, /models, /presets, /detect, /email/state, /healthz) alongside /v1/systemone.
  • Dockerfile Layer Caching:
    • Created /data/hf permissions before preloading under USER appuser to prevent model layer duplication while preserving online dynamic fetching for slim images.
  • Documentation & OpenAPI:
    • Regenerated openapi.json covering all 8 endpoints and clean schemas.
    • Updated README.md with image tag tables, configuration options, and curl examples for both native and SystemOne endpoints.

🗑️ Removed

  • Removed hardcoded Kubernetes deployment manifest (deploy/laya-deployment.yaml).
  • Removed unused _PRESET_NAMES constant in app/main.py.

@chneau chneau changed the title feat: sync changes from fork (auenkr) feat: SystemOne / TypeSafe API compatibility and multi-variant Docker image matrix Sep 24, 2026
@chneau
chneau merged commit 2fea943 into main Sep 24, 2026
3 checks passed
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.

2 participants