feat(docs): Serve the Anthropic Messages API (Claude Code) end to end#360
Conversation
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
|
@haarchri is attempting to deploy a commit to the upbound Team on Vercel. A member of the Team first needs to authorize it. |
| # by default. Set NIX_SH_PORTS to a space-separated list of docker -p specs, | ||
| # e.g. NIX_SH_PORTS="8080:8080" to expose a `kubectl port-forward` bound to | ||
| # 0.0.0.0:8080 inside the container. | ||
| PORT_FLAGS="" |
There was a problem hiding this comment.
add opt-in NIX_SH_PORTS so services in the in-container kind cluster can be reached from the host for local testing (dev-only, inert unless set)...
helps with: kubectl -n traefik-system port-forward --address 0.0.0.0 svc/traefik 8080:80 from inside the develop nix shell to get access on the host ,,,
dennis-upbound
left a comment
There was a problem hiding this comment.
One gap worth closing on the EPP bump: nothing asserts the image or the EndpointPickerConfig apiVersion, so a wrong tag/registry path or config group passes CI and only surfaces as an EPP crashloop at deploy. Two levels:
- Unit guard (cheap): in the tests that already build the EPP objects (test_backends.py → TestUnifiedMultiPod / TestDisaggregated), assert the EPP Deployment image is
_EPP_IMAGE, the decode pod's sidecar is _SIDECAR_IMAGE, and the ConfigMap carries apiVersion: llm-d.ai/v1alpha1. That locks the values so any change is deliberate and reviewed — it catches typos, not compatibility. - Real validation (for a version bump like this): an e2e that composes a multi-pod (or PrefillDecode) replica on the kind cluster and waits for the -epp Deployment to report Available. That's the only thing that actually catches v0.9.0 rejecting the current plugin config or RBAC group — a unit test can't, since it never runs the image.
Given this bump changes the image name (not just the tag) and the config group, can we do the unit guard here, and ideally the e2e before we rely on v0.9.0.
|
@dennis-upbound i was running e2e curls visible ... Do we have more e2e ? |
sorry I missed your curl comment in the PR |
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
|
@dennis-upbound added 2 unittests |
Description of your changes
Enables the Anthropic Messages API (
/v1/messages) to work through Modelplane's serving path, and adds a validated, copy-paste example showing how to deploy a model on it and drive it from Claude Code viaANTHROPIC_BASE_URL.Why bump the endpoint-picker image:
Even for Unified single-pod serving, a replica is fronted by a GAIE
InferencePool+ endpoint picker (EPP), which sits in the request path as an Envoy ext_proc and parses the request body to score endpoints. At the pinnedllm-d-inference-scheduler:v0.8.0(gateway-api-inference-extension v1.5.0) the EPP's body parser is OpenAI-only: an Anthropic Messages request (messages+max_tokens, noprompt) is dispatched to the completions parser and rejected before it reaches vLLM:vLLM itself serves
/v1/messagesfine, the picker was the blocker...llm-d-inference-schedulerv0.9.0 adds a native Anthropic parser (/v1/messages, tools,messages/count_tokens) and enables all HTTP parsers by default, so Anthropic-shaped requests route through the picker. v0.9.0 also renamed the images (the oldllm-d-inference-scheduler/llm-d-routing-sidecarpackages stop at v0.8.0); the scheduler/sidecar now ship asllm-d-router-endpoint-picker/llm-d-router-disagg-sidecar. ref: llm-d/llm-d-router#1508 llm-d/llm-d-router#1554updated the APIGroup from inference.networking.x-k8s.io APIGroup to llm-d.ai APIGroup for
EndpointPickerConfigllm-d/llm-d-router#972Fixes #283
I have:
nix flake check(or./nix.sh flake check) and made sure it passes.git commit -s.Tested