Commit 519bfda
feat: Phase 1 API parity with mlx-lm
- Add stop sequences (stop parameter, text trimming)
- Add /v1/completions text completion endpoint (streaming + non-streaming)
- Accurate token counting via lmInput.text.tokens.size (replaces chars÷4)
- Add seed parameter for deterministic generation (MLXRandom.seed)
- Add stream_options.include_usage for streaming token stats
- Add CORS support via --cors CLI flag with CORSMiddleware
- Extract handler closures into standalone functions (Swift type-checker fix)
- Add ServerConfig struct for CLI defaults bundling
- Expand test suite: 6 → 13 test sections (32 assertions total)
All 32 tests pass.1 parent 689df93 commit 519bfda
2 files changed
Lines changed: 811 additions & 167 deletions
0 commit comments