pls check out <https://github.com/OpenHands/OpenHa...
# feedback
e
e
Hi there, sorry for the issue! It looks like you are looking to use your own LLM key, which should not require you to pay $10 in credits. If you want to send me a DM containing your email, I can refund you the $10. Separately, we will have someone look into Deepseek not working.
c
I think you might need to use
openai/deepseek-v4-pro
due to weird requirements of litellm (https://docs.openhands.dev/openhands/usage/settings/llm-settings#advanced-llm-settings) cc @elegant-branch-54423 @hundreds-twilight-32833 I think we can probably spend some effort making the custom model instruction here better. @nutritious-balloon-65098 pls investigate the issue https://github.com/OpenHands/OpenHands/issues/14323 and try to see if we can reproduce it by creating a draft PR that adds a test to OpenHands/OpenHands repo
n
I'm on it! Xingyao Wang can track my progress here.
Summary Request Fulfillment Checklist • ✅ Investigated issue #14323 — DeepSeek not working with custom provider on OpenHands Cloud • ✅ Reproduced the issue — Confirmed bare
deepseek-chat
fails litellm's provider resolution at multiple layers • ✅ Created a draft PR with tests — PR #14334 adds 20 tests to the OpenHands/OpenHands repo documenting the failure chain • ✅ PR is a draft as requested Root Cause
litellm.get_llm_provider("deepseek-chat")
raises
BadRequestError
because bare DeepSeek model names aren't in litellm's lookup tables. The
_assign_provider
helper has
_BARE_OPENAI_MODELS
,
_BARE_ANTHROPIC_MODELS
,
_BARE_MISTRAL_MODELS
but no
_BARE_DEEPSEEK_MODELS
, so DeepSeek bare names never get prefixed. This cascades through
get_provider_api_base
,
resolve_llm_base_url
, and
infer_litellm_provider
— all returning
None
— ultimately causing a 500 when
litellm.completion()
can't route the request. Notably, even
api_base="<https://api.deepseek.com>"
doesn't help — litellm needs either the
deepseek/
prefix on the model name OR a
/v1
URL suffix. Conciseness The changes consist of a single new test file (
tests/unit/utils/test_deepseek_byok_provider_resolution.py
) — no extraneous changes. All 20 tests pass, existing tests are unaffected, and all lint checks pass. Suggested Fix (not included, as the request was for a reproducing test PR) Add
_BARE_DEEPSEEK_MODELS
to
_assign_provider
in
openhands/app_server/utils/llm.py
, matching the pattern used for OpenAI/Anthropic/Mistral.
e
thank you mr wang!