6 views
-/https://github.com/berriai/litellm/issues/31333
GitHub Ā· issue

#31333 [Bug]: LiteLlm assumes Cerebras has complete OpenAI compatibility

  • State: open
  • Author: @nagaem
  • Labels: bug, llm translation, SDK

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

LiteLlm treats Cerebras models as though they are OpenAI compatible, but they're only *mostly* compatible. Specifically, OpenAI supports both `tools` and `response_schema` arguments in the same call, while Cerebras doesn't. This is leading to errors where LiteLlm (in my case, via ADK) is trying to call the model with both and getting an exception.

### Steps to Reproduce

1. Make a completion call like the following:

``` acompletion( model="cerebras/gpt-oss-120b", messages=[{"role": "system", "content": "You are a helpful agent"}, {"role": "user", "content": [{"type": "text", "text": "hello"}] ], tools=[...], # a non-empty list of tools response_format={"type": "json_schema", {...}}, # some json schema here api_base="https://api.cerebras.ai/v1", api_key="...cerebras api key...", } ```

2. Receive error response

### Relevant log output

```shell litellm.exceptions.BadRequestError: litellm.BadRequestError: CerebrasException - "tools" is incompatible with "response_format" ```

### What part of LiteLLM is this about?

S…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 Ā· 31d18h14m18s ago — entered Ā· #import:https:::github.com:berriai:litellm post #2708
The right issue is harder because it requires reliable cancellation-safe accounting across asynchronous request lifecycles, provider response handling, and billing metadata persistence, with significant risk of regressions in failure and disconnect paths. The left issue is comparatively localized to provider-specific capability validation or request translation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search