docs: mark Phase 2 backend consolidation complete

All 4 steps done in commit 747e703:
- Step 2.1: Message type alias (inference.go, adapter.go)
- Step 2.2: GenOpts extension with TopK/TopP/RepeatPenalty
- Step 2.3: StreamingBackend deprecation
- Step 2.4: CLAUDE.md Backend Architecture section

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-02-20 02:06:49 +00:00
parent 747e703c7b
commit 57c8a97dfe

View file

@ -107,7 +107,7 @@ All other consumers (service.go, judge.go, agent.go, expand.go, go-ai tools_ml.g
### Step 2.1: Unify Message types
- [ ] **Type alias ml.Message → inference.Message** — In `inference.go`, replace the `Message` struct with:
- [x] **Type alias ml.Message → inference.Message** — In `inference.go`, replace the `Message` struct with:
```go
type Message = inference.Message
```
@ -115,7 +115,7 @@ All other consumers (service.go, judge.go, agent.go, expand.go, go-ai tools_ml.g
### Step 2.2: Unify GenOpts
- [ ] **Add inference fields to GenOpts** — Extend `ml.GenOpts` to include the extra fields from `inference.GenerateConfig`:
- [x] **Add inference fields to GenOpts** — Extend `ml.GenOpts` to include the extra fields from `inference.GenerateConfig`:
```go
type GenOpts struct {
Temperature float64
@ -130,7 +130,7 @@ All other consumers (service.go, judge.go, agent.go, expand.go, go-ai tools_ml.g
### Step 2.3: Deprecate StreamingBackend
- [ ] **Mark StreamingBackend as deprecated** — Add deprecation comment:
- [x] **Mark StreamingBackend as deprecated** — Add deprecation comment:
```go
// Deprecated: StreamingBackend is retained for backward compatibility.
// New code should use inference.TextModel with iter.Seq[Token] directly.
@ -141,7 +141,7 @@ All other consumers (service.go, judge.go, agent.go, expand.go, go-ai tools_ml.g
### Step 2.4: Document migration path
- [ ] **Update CLAUDE.md** — Add "Backend Architecture" section documenting:
- [x] **Update CLAUDE.md** — Add "Backend Architecture" section documenting:
- `inference.TextModel` (iterator-based) is the preferred API for new code
- `ml.Backend` (string-based) is the compatibility layer, still supported
- `StreamingBackend` is deprecated, use `iter.Seq[Token]` directly