tests: verify LLM forwards all attributes to LiteLLM (exposes missing custom_llm_provider) #981
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
Add a unit test that validates all relevant LLM attributes are forwarded to LiteLLM when invoking completion(). The test patches openhands.sdk.llm.llm.litellm_completion and inspects the kwargs it receives.
What it tests
Expected outcome
This test is expected to fail on current main due to custom_llm_provider not being forwarded to LiteLLM (see discussion in PR #963). The failure is intentional to surface the gap.
Why this is useful
This ensures regression coverage so any attributes defined on LLM that should be visible to LiteLLM are actually passed through, not only the ones handled specially in select_chat_options().
Notes
Co-authored-by: openhands [email protected]
@enyst can click here to continue refining the PR