BerriAI/litellm · error · Exception

param ` ` is not supported on Bytez

Error message

param `{key}` is not supported on Bytez

What it means

BytezChatConfig maps OpenAI params to Bytez params via openai_to_bytez_param_map; entries with value False (seed, stop, logit_bias, logprobs, frequency_penalty, presence_penalty, top_logprobs, modalities, prediction, stream_options, tools, tool_choice, function_call, functions, extra_headers, parallel_tool_calls, audio, web_search_options) are explicitly unsupported pending backend work. Passing any of them without drop_params raises this generic Exception. Unknown keys not in the map are passed through unchanged, so the error fires only for the explicitly-blocked set.

Solutions

  1. Pass drop_params=True on the call, or set litellm.drop_params = True / proxy drop_params, so blocked params are silently dropped.
  2. Remove the unsupported param(s) for bytez calls (branch your payload when provider is bytez).
  3. Pre-check with BytezChatConfig().get_supported_openai_params(model) before building the request.

Example fix

# before
litellm.completion(
    model="bytez/meta-llama/Llama-3.1-8B-Instruct",
    messages=msgs,
    tools=tools,  # raises: tools unsupported on Bytez
)

# after
litellm.completion(
    model="bytez/meta-llama/Llama-3.1-8B-Instruct",
    messages=msgs,
    drop_params=True,  # tools dropped silently
)
Defensive patterns

Strategy: validation

Validate before calling

from litellm.llms.bytez.chat.transformation import BytezChatConfig

BYTEZ_SUPPORTED = set(BytezChatConfig().get_supported_openai_params("model"))

def sanitize_bytez_kwargs(kwargs: dict) -> dict:
    return {k: v for k, v in kwargs.items() if k in BYTEZ_SUPPORTED}

Try / catch

try:
    litellm.completion(model="bytez/org/model", messages=msgs, **kwargs)
except Exception as e:
    if "not supported on Bytez" in str(e):
        litellm.completion(model="bytez/org/model", messages=msgs, drop_params=True, **kwargs)
    else:
        raise

Prevention

When it happens

Trigger: Calling litellm.completion(model="bytez/...", tools=[...], tool_choice="auto"); passing stop=["END"], seed=42, frequency_penalty, presence_penalty, or logprobs to a bytez model without drop_params=True; reusing an OpenAI-ready payload against bytez.

Common situations: Agent frameworks that always attach tools/tool_choice; migrating a shared completion wrapper across providers where bytez is the only one without tool support; forgetting that drop_params is opt-in (default False).

Related errors


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/e858d81cf62325d3. Report an issue: GitHub.

Appendix: source

Thrown at litellm/llms/bytez/chat/transformation.py:106

    def map_openai_params(
        self,
        non_default_params: dict,
        optional_params: dict,
        model: str,
        drop_params: bool,
    ) -> dict:
        adapted_params: Final = {}

        all_params: Final = {**non_default_params, **optional_params}

        for key, value in all_params.items():
            alias = self.openai_to_bytez_param_map.get(key)

            if alias is False:
                if drop_params:
                    continue

                raise Exception(f"param `{key}` is not supported on Bytez")

            if alias is None:
                adapted_params[key] = value
                continue

            adapted_params[alias] = value

        return adapted_params

    def validate_environment(
        self,
        headers: dict,
        model: str,
        messages: list[AllMessageValues],
        optional_params: dict,
        litellm_params: dict,
        api_key: str | None = None,
        api_base: str | None = None,

View on GitHub (pinned to 77b7c6c40c)