Files
homelab-frontend/tasks/2.4-legacy-path-aliases.md
T
Story Crater BotandClaude Opus 5 058f11cf2b
CI / Test (push) Canceled after 0s
CI / Vet (push) Canceled after 0s
CI / Build (push) Canceled after 0s
CI / Security (govulncheck) (push) Canceled after 0s
chore: initial commit of Go API gateway
Baseline for the Kong replacement on api.riotpiao.com. Brings the working
tree under version control for the first time: gateway source, the task
board that drives the agent runs, test fixtures, and K8s manifests.

Anchor the gateway ignore rule to the repo root. Unanchored, "gateway"
also matched the cmd/gateway/ source directory, so the program entrypoint
was excluded from every commit.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
2026-08-19 20:54:34 -07:00

1.8 KiB

2.4 — Legacy path aliases (GREEN)

Phase: 2 — LLM surface Stage: GREEN Depends on: 2.2

  • 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

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