Skip to content

docs(http-api): add the HTTP API guide (#390) - #490

Merged
NandhaKishorM merged 1 commit into
NandhaKishorM:mainfrom
aashish254:docs-http-api-guide
Sep 27, 2026
Merged

NandhaKishorM merged 1 commit into
NandhaKishorM:mainfrom
aashish254:docs-http-api-guide

Conversation

@aashish254

Copy link
Copy Markdown
Contributor

Part of #390 — this is item 3, the HTTP API guide. Claimed in a comment there; no open PR touches a page like this.

docs/http-api.md documents the shipped laya-serve surface from the current code, including the behaviors that landed recently and are described nowhere except their PRs: the 413 request caps from #335, the 422 for questions that exceed the head budget, the fixed 500 string, the 503 refuse-don't-queue admission bound, and the Server-Timing / X-Inference-Time-Ms headers. The confidence section follows the note on #390: answer_confidence is presented as the calibrated quantity only in the sense the docstring supports — it is what temperature scaling fits and what the reported ECE is computed on, and the page says explicitly that the calibration holds for a checkpoint whose temperature fit was validated on the caller's traffic. It also flags the TypeSafe portability trap from #302: (n·p_max − 1)/(n − 1) is not Laya's entropy confidence.

Deliberately coordinated rather than duplicated:

Verified:

  • zensical build --strict --clean — no issues, page renders under Guides;
  • python -m pytest tests/test_serve.py — 30 passed (every status code in the error table is exercised there);
  • ruff check laya/ --select=E9,F63,F7,F82,F401,F811 --line-length=120 and compileall — clean (no code touched).

@sirgio03

Copy link
Copy Markdown
Contributor

Thanks for coordinating with #387! Appreciate you leaving the batch surface clean to avoid merge conflicts. Great write-up on the HTTP guide bravooo

@NandhaKishorM
NandhaKishorM merged commit 15c2b5c into NandhaKishorM:main Sep 27, 2026
22 checks passed
@NandhaKishorM

Copy link
Copy Markdown
Owner

Thanks @aashish254, merged. The HTTP guide is a good addition to the docs site. It ships in 0.3.21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants