Skip to content

CAN-287-Add opt-in per-model check to /healthz - #77

Open
nickhuo wants to merge 1 commit into
cli/llm-proxyfrom
nickhuo/llm_proxy
Open

CAN-287-Add opt-in per-model check to /healthz#77
nickhuo wants to merge 1 commit into
cli/llm-proxyfrom
nickhuo/llm_proxy

Conversation

@nickhuo

@nickhuo nickhuo commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

This is an issue found in the end2end test across 100 repos, because the model names they use are outdated or have been renamed. Since this is unlikely to affect most real users, who typically use up-to-date model versions in production, it’s not a high-priority issue but rather a nice-to-have compatibility improvement.

  • /healthz never verified credentials or model access, so a valid key against a deprecated/inaccessible model would silently 404 downstream (CAN-287).
  • Adds an check: GET /healthz?<provider>_model=<id> now makes a real upstream call — free GET /v1/models/{id} for OpenAI/Anthropic, bedrock:GetFoundationModel catalog check for Bedrock
  • Stacked on [Integration] Integrating LLM-proxy (#54/#63) onto PR stack #73

Manual verification

CLI smoke test against real upstreams:

export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
uv run python -m ventis.llm_proxy   # listens on 127.0.0.1:8080
# unchanged zero-arg behavior
curl -s localhost:8080/healthz | python3 -m json.tool
# {"status": "ok", "providers": ["anthropic", "bedrock", "openai"]}

# valid model -> ok
curl -s 'localhost:8080/healthz?openai_model=gpt-4o-mini' | python3 -m json.tool
# {"status": "ok", "models": {"openai": {"model": "gpt-4o-mini", "ok": true}}, ...}

# deprecated/unknown model -> degraded
curl -s 'localhost:8080/healthz?anthropic_model=claude-ancient-fake' | python3 -m json.tool
# {"status": "degraded", "models": {"anthropic": {"model": "claude-ancient-fake", "ok": false, "error": "upstream returned 404"}}, ...}

# key not configured -> degraded, no upstream call made
curl -s 'localhost:8080/healthz?openai_model=gpt-4o-mini' | python3 -m json.tool
# {"status": "degraded", "models": {"openai": {"model": "gpt-4o-mini", "ok": false, "error": "no API key configured"}}, ...}

/healthz previously only listed compiled-in provider adapters without
verifying credentials or model access, so a valid key against a
deprecated/inaccessible model would silently 404 downstream. Callers
can now pass <provider>_model=<id> to get a real upstream check
(free GET /v1/models/{id} for OpenAI/Anthropic, bedrock:GetFoundationModel
catalog check for Bedrock) while the zero-arg response stays unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 9b577313-db6a-4e13-b565-49d7731a36ba

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nickhuo nickhuo changed the title Add opt-in per-model deep check to /healthz (CAN-287) Add opt-in per-model deep check to /healthz Sep 8, 2026
@nickhuo
nickhuo marked this pull request as draft September 8, 2026 22:35
@nickhuo nickhuo changed the title Add opt-in per-model deep check to /healthz CAN-287-Add opt-in per-model deep check to /healthz Sep 8, 2026
@nickhuo nickhuo changed the title CAN-287-Add opt-in per-model deep check to /healthz CAN-287-Add opt-in per-model check to /healthz Sep 8, 2026
@nickhuo
nickhuo marked this pull request as ready for review September 9, 2026 18:04
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