Repository navigation
docs(http-api): add the HTTP API guide (#390) - #490
Merged
Merged
Conversation
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 |
Owner
|
Thanks @aashish254, merged. The HTTP guide is a good addition to the docs site. It ships in 0.3.21. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.mddocuments the shippedlaya-servesurface from the current code, including the behaviors that landed recently and are described nowhere except their PRs: the413request caps from #335, the422for questions that exceed the head budget, the fixed500string, the503refuse-don't-queue admission bound, and theServer-Timing/X-Inference-Time-Msheaders. The confidence section follows the note on #390:answer_confidenceis 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 entropyconfidence.Deliberately coordinated rather than duplicated:
docker.md,evals.mdandbenchmarks.mdinstead of repeating their content;docs/.nav.yml(theglob: "*"picks it up under Guides) and nodocs/index.md, so it can't conflict with docs: add command line and MCP server guide #430 or docs(router): add routing guide #461. If they'd like, the maintainer can drop "the HTTP API" from the index footer line when this lands.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=120andcompileall— clean (no code touched).