Repository navigation
feat(decisions): add hosted_vllm provider - #45501
Merged
Merged
Conversation
Adds HostedVLLMDecisionsConfig so hosted_vllm/<served model> works on POST /v1/systemone and POST /v1/decisions against a vLLM server that serves the System One body (vllm-project/vllm#59299, after v0.31.0). vLLM only supports choice questions and rejects others, so the base decisions config gains a per-provider health_check_questions attribute and the evaluation-mode health probe sends a choice question for hosted_vllm while every other provider keeps the noul probe. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
kerry seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
kerrylu-berri
approved these changes
Oct 9, 2026
5 of 6 tasks
This was referenced Oct 9, 2026
DeoLeung
pushed a commit
to aiyou178/litellm
that referenced
this pull request
Oct 11, 2026
* feat(decisions): add hosted_vllm provider Adds HostedVLLMDecisionsConfig so hosted_vllm/<served model> works on POST /v1/systemone and POST /v1/decisions against a vLLM server that serves the System One body (vllm-project/vllm#59299, after v0.31.0). vLLM only supports choice questions and rejects others, so the base decisions config gains a per-provider health_check_questions attribute and the evaluation-mode health probe sends a choice question for hosted_vllm while every other provider keeps the noul probe. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor(decisions): move the hosted_vllm placeholder key to constants Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: kerry <kerry@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 61e5f2d)
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.
TLDR
Problem this solves:
/v1/systemonehosted_vllmon/v1/decisionsand/v1/systemone/healthprobes Decisions deployments with anoulquestion, which vLLM rejectsHow it solves it:
HostedVLLMDecisionsConfig, registered inget_provider_decisions_configHOSTED_VLLM_API_BASE(required) andHOSTED_VLLM_API_KEY(optional)BaseDecisionsConfig.health_check_questions, which vLLM overrides with achoiceprobeUser Flow
Before: a proxy admin who points a
mode: evaluationdeployment at a vLLM server gets a 400 on every Decisions call, and the deployment shows as unhealthymodel: hosted_vllm/Qwen/Qwen3-0.6B,api_base: http://vllm:8000/v1,model_info: {mode: evaluation}choicesquestionUnknown Decisions provider 'hosted_vllm', and POST /v1/systemone returns the same errorAfter: the same calls reach vLLM and come back as typed answers, and the deployment shows as healthy
choicesquestionchoiceanswer, and POST /v1/systemone with a Jevchoicequestion also returns 200healthy_count: 1Linear ticket
Resolves LIT-9367
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
A real vLLM server, a CPU image built from vllm main
702ce313f(vllm-project/vllm#59299 is not in v0.31.0), servesQwen/Qwen3-0.6Bon :8000. The proxy config is the same on both sides:Before (0ae62c5)
/v1/decisions
curl -X POST http://localhost:4002/v1/decisionswith an OpenAI-specchoicesquestionHTTP 400 {"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'hosted_vllm'. Supported providers: openai, openrouter, perplexity, typesafe, strands_decider, cloudflare ..."}}/health
curl "http://localhost:4002/health?model=qwen-vllm"HTTP 503 {"healthy_endpoints":[],"unhealthy_endpoints":[{"model":"hosted_vllm/Qwen/Qwen3-0.6B","error":"litellm.BadRequestError: Unknown Decisions provider 'hosted_vllm' ..."}],"healthy_count":0,"unhealthy_count":1}After (7b7fa51)
/v1/decisions
curl -X POST http://localhost:4003/v1/decisionswith the samechoicesquestionHTTP 200 {"model":"Qwen/Qwen3-0.6B","answers":[{"type":"choice","name":"is_defect","choice":"yes","probabilities":[{"value":"yes","probability":0.8175744828610095},{"value":"no","probability":0.18242551713899047}],"confidence":0.8159867393125323}],"usage":{"input_tokens":45,"output_tokens":1,"total_tokens":46,...}}curl -X POST http://localhost:4003/v1/systemonewith a JevchoicequestionHTTP 200 {"model":"Qwen/Qwen3-0.6B","answers":{"is_urgent":{"type":"choice","choice":"yes","confidence":0.9649145337527952,"probabilities":{"yes":0.9669140238756562,"no":0.03308597612434374}}},"usage":{"input_tokens":61,"output_tokens":1},"id":"decision-890b2c7fa31bb494","object":"structured_decision","created":1791520584,"diagnostics":{...}}custom_llm_provider=hosted_vllm,call_type=adecisions,api_base=http://localhost:8000/v1/systemone,status=success/health
curl "http://localhost:4003/health?model=qwen-vllm"HTTP 200 {"healthy_endpoints":[{"api_base":"http://localhost:8000/v1","model":"hosted_vllm/Qwen/Qwen3-0.6B",...}],"unhealthy_endpoints":[],"healthy_count":1,"unhealthy_count":0}Type
🆕 New Feature
Caveats (if any)
Medium
choicequestions todaypredicateandlevelsreturn a 400:unknown question type 'noul'; supported: ['choice']Low
HostedVLLMDecisionsConfig.resolve_api_keydrops thefake-api-keyplaceholder thathosted_vllmchat injects, so no Authorization header is sentFinal Attestation
Link to Devin session: https://app.devin.ai/sessions/3d0a4b725c1d4d65968372a35704cdd2
Open in Devin Desktop: https://app.devin.ai/desktop/session/3d0a4b725c1d4d65968372a35704cdd2?variant=devin
Requested by: @kerry-berri
Note
Devin errored when opening this Pull Request as kerry-berri.
As a fallback, Devin opened this PR as itself.