Files
homelab-frontend/tasks/2.4-legacy-path-aliases.md
T

31 lines
1.8 KiB
Markdown
Raw Normal View History

2026-08-19 20:52:13 -07:00
# 2.4 — Legacy path aliases (GREEN)
Phase: 2 — LLM surface
Stage: GREEN
Depends on: [2.2](2.2-body-based-dispatch.md)
- [ ] `POST /v1/reasoning/chat/completions` behaves as the canonical endpoint with `model` forced to `reasoning`
- [ ] `POST /v1/ornith/chat/completions` behaves as the canonical endpoint with `model` forced to `ornith:35b`
- [ ] `POST /v1/qwen/chat/completions` behaves as the canonical endpoint with `model` forced to `qwen2.5:3b-instruct`
- [ ] The forced value overrides whatever `model` the body carries, including a conflicting one, and the upstream receives the forced value
- [ ] The upstream sees the canonical path `/v1/chat/completions`, not the alias path
- [ ] Streaming, disconnect cancellation and `reasoning_content` passthrough behave identically to the canonical endpoint
- [ ] The alias set is configuration, so removal is a config change and needs no code change
- [ ] Each alias is marked temporary where it is defined, with the condition for removal stated: all callers migrated
These three paths exist only because Kong OSS could not dispatch on the request body.
They keep the cutover reversible — pi is a live caller today. They are deleted once
callers have moved to `POST /v1/chat/completions` with `model` in the body.
## Verify
```bash
curl -s -o /dev/null -w '%{http_code}\n' localhost:8080/v1/reasoning/chat/completions \
-H 'content-type: application/json' -d '{"messages":[{"role":"user","content":"hi"}]}'
# expected: 200, reasoning-predictor stub hit at /v1/chat/completions with body model=reasoning
curl -s -o /dev/null -w '%{http_code}\n' localhost:8080/v1/qwen/chat/completions \
-H 'content-type: application/json' -d '{"model":"reasoning","messages":[]}'
# expected: 200, ornith-predictor stub hit with body model=qwen2.5:3b-instruct — the body's "reasoning" is overridden
```