By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
This project turns the first four modules into a small but real service. You will build the Waypoint gateway with one /v1/assist endpoint, a deterministic fake provider that can also fail on demand, request IDs, a deadline and structured errors, plus a keyless evaluation script and pytest tests. Keep the project small: the point is that every production concern has a place to live.
waypoint/ with app.py, provider.py, schemas.py, eval/cases.json, eval/run_eval.py and tests/.schemas.py: AssistRequest with exception_id, tenant_id, message; AssistResponse with request_id, status, draft, model_id, citations and approval_required.ProviderTimeout, return a 5xx-equivalent error, or simulate a rate limit when told to.cases.json, run every case against the fake provider, apply schema/contains/exact checks, and exit non-zero below 92% or on any hard-fail safety case.waypoint/
app.py # FastAPI app and /v1/assist handler
schemas.py # Pydantic request/response models
provider.py # adapter interface + FakeProvider
policies.py # tiny in-repo carrier policy fixtures
eval/
cases.json # golden cases, versioned with the repo
run_eval.py # keyless harness; exits non-zero on gate failure
tests/
test_gateway.py # contract, request id, timeout, degraded path
test_eval_gate.py # the harness itself blocks a bad releasePOST /v1/assist accepts a valid request and returns a typed response with a request_id.exception_id returns a structured 400 and never reaches the provider.eval/run_eval.py runs keyless in under a second and exits non-zero on a gate failure.pytest passes from a clean checkout with no environment variables set.python eval/run_eval.py prints one line per case and a gate decision, and returns a non-zero exit code when the gate is red.code, message and request_id.Key takeaways
The project ships one /v1/assist endpoint, a scriptable fake provider, an eval harness and keyless tests.
Every provider call goes through the adapter; the handler owns the contract, request ID and deadline.
The eval script exits non-zero on a red gate, so CI can block a release for free.
Acceptance is behavioural: deterministic responses, structured errors, no key and no network.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.