litellm.drop_params error when running the openapi server
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.5k
- Forks
- 433
- PR merge metrics
- No merged PRs in 30d
Description
I'm running the server normally with: python -m routellm.openai_server --routers mf --weak-model ollama_chat/codeqwen
and am getting this whenever I attempt a prompt:
File "C:\Users\nate\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\litellm\utils.py", line 3586, in get_optional_params
_check_valid_arg(supported_params=supported_params)
File "C:\Users\nate\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\litellm\utils.py", line 3060, in _check_valid_arg
raise UnsupportedParamsError(
litellm.exceptions.UnsupportedParamsError: litellm.UnsupportedParamsError: ollama_chat does not support parameters: {'presence_penalty': 0.0}, for model=codeqwen. To drop these, set `litellm.drop_params=True` or for proxy:
`litellm_settings:
drop_params: true`
I've tried modifying the yaml to no avail.
Please help!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the documented `python -m routellm.openai_server` command and the `ollama_chat/codeqwen` model. Inspect how the OpenAPI server builds request parameters and how its YAML configuration is loaded; done means the request succeeds without the unsupported `presence_penalty` error and the intended `drop_params` setting is honored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100