fix: route LLMaaS health probes through proxy - #31
Merged
Conversation
aelttil
force-pushed
the
fix/llmaas-health-proxy
branch
2 times, most recently
from
July 3, 2026 06:03
2fe38c8 to
04fdd7a
Compare
aelttil
force-pushed
the
fix/llmaas-health-proxy
branch
from
July 3, 2026 06:04
04fdd7a to
1b01999
Compare
chrlesur
approved these changes
Jul 8, 2026
chrlesur
left a comment
Collaborator
There was a problem hiding this comment.
Review
Verdict: APPROVE — this fixes a real health-check blind spot: in a proxied environment, the LLMaaS probes went out direct while every real LLM call goes through PROXY_URL, so /health and system_health could report a path that production traffic never takes (false negative — or worse, false positive when only the direct route works).
Checks performed
- Full suite on the PR branch: 415 passed + 1 xfailed (baseline 413 + the 2 new tests).
- Pattern is strictly aligned with
ConsolidatorService(explicithttpx.AsyncClient(proxy=...)injected ashttp_client); the explicitly created proxy client is closed infinally— no leak on that path. models.list()result is consumed via.dataonly (already loaded), so reading it afteraclose()is safe — no lazy pagination after close.- Error sanitization on the public
/healthendpoint: already covered by the pre-existing LM2-24 handler (generic "LLMaaS unreachable", details logged server-side only) which wraps this change — no proxy URL/credential can leak in the response. A malformedPROXY_URLis additionally rejected at startup by config validation. - No-proxy behavior unchanged (
http_client=None→ SDK-managed client). - The two tests assert the meaningful contract: proxy kwarg + timeout,
http_clienthanded toAsyncOpenAI,acloseawaited, final status.
Optional (no change requested)
- This is now the third copy of the proxy+
AsyncOpenAIconstruction pattern (middleware, system tool, consolidator) — a small shared helper would be a nice future factorization, also the right place for an exception-safe close. - Public
/healthtriggers one LLMaaS hit per request; bounded by the global rate limit today. A short-TTL cache would be a future improvement if monitoring traffic ever makes this noisy.
Merged
pull Bot
pushed a commit
to moul/live-memory
that referenced
this pull request
Jul 8, 2026
Bump VERSION, __version__ and version assert to 2.6.0; add CHANGELOG entry for the health-probe proxy fix (Cloud-Temple#31); document PROXY_URL in ARCHITECTURE.md (now covers S3, LLMaaS consolidation and health probes); refresh version badges in both READMEs. Minor bump: server-side behavior change on the outbound network path. Consumes the 2.6.0 slot; the graph_push volatile guardrail (Wave B, PR Cloud-Temple#29) moves to the next minor once its blocking review items land.
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.
Summary
/healthandsystem_healthLLMaaS probes to usePROXY_URLwhen configuredhttpx.AsyncClient(proxy=...)pattern already used byConsolidatorServicesystem_healthTests
uv run pytest tests/test_proxy.py -quv run pytest -q