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]>
1.8 KiB
1.8 KiB
2.4 — Legacy path aliases (GREEN)
Phase: 2 — LLM surface Stage: GREEN Depends on: 2.2
POST /v1/reasoning/chat/completionsbehaves as the canonical endpoint withmodelforced toreasoningPOST /v1/ornith/chat/completionsbehaves as the canonical endpoint withmodelforced toornith:35bPOST /v1/qwen/chat/completionsbehaves as the canonical endpoint withmodelforced toqwen2.5:3b-instruct- The forced value overrides whatever
modelthe 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_contentpassthrough 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