litellm icon indicating copy to clipboard operation
litellm copied to clipboard

[Bug]: Cohere Chat does not support parameters: {'extra_headers'}

Open maamalama opened this issue 7 months ago • 3 comments

What happened?

Got exception litellm.exceptions.ServiceUnavailableError: litellm.ServiceUnavailableError: CohereException - cohere_chat does not support parameters: {'extra_headers': {'Helicone-Property-Locale': 'ko'}} when trying to pass custom headers to Cohere command-r model

How to reproduce:

litellm.headers = {
  "Helicone-Property-Locale": "ko",
  }

response = litellm.completion(
    model="command-r",
    messages=[{"role": "user", "content": "testing - 0000"}],
    extra_headers={"Helicone-Property-Locale": "ko"},
)
print(response)

Relevant log output

litellm.exceptions.ServiceUnavailableError: litellm.ServiceUnavailableError: CohereException - cohere_chat does not support parameters: {'extra_headers': {'Helicone-Property-Locale': 'ko'}}, for model=command-r. To drop these, set `litellm.drop_params=True` or for proxy:

`litellm_settings:
 drop_params: true`

Twitter / LinkedIn details

No response

maamalama avatar Jul 15 '24 00:07 maamalama