Skip to content

test: add LiteLLM Proxy runtime smoke test#31

Merged
rlippmann merged 1 commit into
mainfrom
litellm-proxy-runtime-validation
Jul 1, 2026
Merged

test: add LiteLLM Proxy runtime smoke test#31
rlippmann merged 1 commit into
mainfrom
litellm-proxy-runtime-validation

Conversation

@rlippmann

Copy link
Copy Markdown
Owner

Summary

Adds an opt-in Tier 2 runtime smoke test for the LiteLLM Proxy reference integration.

The test launches a real LiteLLM Proxy subprocess, loads the existing Context Compiler pre-call hook, sends requests through /v1/chat/completions, and verifies blocking and forwarding behavior against a local OpenAI-compatible stub upstream.

Why

Existing LiteLLM Proxy tests covered hook behavior directly, but did not prove that the real proxy runtime could:

  • start with the integration hook configured
  • load the callback
  • execute the hook during request handling
  • block confirmation-required requests before upstream forwarding
  • forward allowed requests with the injected compiler contract
  • shut down cleanly

This adds opt-in runtime evidence for the most important remaining LiteLLM Proxy gap tracked by issue #13.

Changes

  • Added python/tests/test_litellm_proxy_runtime.py
  • Added a proxy_runtime dependency group for litellm[proxy]
  • Documented the opt-in runtime smoke command in the LiteLLM Proxy README
  • Clarified callback import-path behavior for runtime configs

Scope

This PR does not:

Notes

The runtime smoke test is opt-in:

RUN_LITELLM_PROXY_RUNTIME=1 uv run --group proxy_runtime pytest python/tests/test_litellm_proxy_runtime.py

The test uses a local OpenAI-compatible stub upstream rather than a live model provider.

Issue #13 impact

This partially addresses issue #13 by adding automated runtime coverage for LiteLLM Proxy startup, hook loading, request blocking/forwarding, and teardown.

Issue #13 should remain open until maintainers decide whether this satisfies the LiteLLM Proxy runtime requirement and until the remaining OpenWebUI or other runtime validation gaps are reviewed.

@rlippmann
rlippmann merged commit e487d51 into main Jul 1, 2026
5 checks passed
@rlippmann
rlippmann deleted the litellm-proxy-runtime-validation branch July 1, 2026 07:34
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