Skip to content

Add non-relay Anthropic MPS e2e tests - #472

Draft
masonc08 wants to merge 1 commit into
masonc08/e2e-pin-ci-anthropic-mpsfrom
masonc08/e2e-anthropic-nonrelay-tests
Draft

Add non-relay Anthropic MPS e2e tests#472
masonc08 wants to merge 1 commit into
masonc08/e2e-pin-ci-anthropic-mpsfrom
masonc08/e2e-anthropic-nonrelay-tests

Conversation

@masonc08

@masonc08 masonc08 commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

What & why

Stacked on #471 (the CI-MPS pins), which this depends on for the CI_ANTHROPIC_MPS / CI_ANTHROPIC_MODEL constants — hence the base is that branch, not main. Retarget to main once #471 lands.

Adds e2e coverage for the non-relay (api-key) Anthropic MPS path:

  • TestAnthropicNonRelayMps — binary-free, direct Anthropic Messages calls through the pinned CI MPS:
    • test_direct_inference_routes_to_haiku — real inference: HTTP 200 + response model == claude-haiku-4-5-20251001.
    • test_rejects_model_outside_allowlist — a disallowed model → 403 "not in the allowed models list".
    • test_mps_is_listed_usable_and_nonrelayed — discovery: listed, usable-for-claude, non-relayed.
  • Model selection (reframes the two provider-launch tests via ucode's resolver):
    • test_launch_claude_through_provider — no --model defaults to the only servable tier (Haiku).
    • test_launch_claude_model_haiku_through_provider--model haiku resolves to the declared Haiku target.
      The MPS exact-matches its allowlist, so a successful launch is itself proof Haiku was used.

How do you know it works?

Verified live on the CI workspace: the three binary-free tests pass and both resolver assertions pass. The binary launch step runs in the CI e2e job (it can't run where OS-managed Claude settings are present, e.g. a dev box).

This pull request and its description were written by Isaac.

TestAnthropicNonRelayMps (binary-free, direct Anthropic Messages calls through the
pinned CI MPS): a real Haiku inference (200 + model echoed back), allowlist
enforcement (a disallowed model -> 403 "not in the allowed models list"), and
discovery (listed, usable-for-claude, non-relayed).

Also turns the two provider-launch cases into explicit model-selection checks via
ucode's resolver: a bare launch defaults to the only servable tier (Haiku), and
--model haiku resolves to the one declared target. The MPS exact-matches its
allowlist, so a successful launch is itself proof Haiku was used.

Verified live on the CI workspace: the three binary-free tests pass and both
resolver assertions pass. The launch step can't run on a box with OS-managed
Claude settings (write_tool_config refuses the override); it runs in the CI e2e job.

Co-authored-by: Isaac <no-reply@databricks.com>
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.

1 participant