BerriAI/litellm · error · Exception
param `{key}` is not supported on Bytez
Error message
param `{key}` is not supported on Bytez What it means
The Bytez chat transformation maps OpenAI parameter names to Bytez equivalents via openai_to_bytez_param_map. Parameters explicitly mapped to False are known-unsupported; passing any of them raises this bare Exception unless drop_params is set, in which case they are silently skipped. Params mapped to None pass through unchanged; params with an alias are renamed.
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 6c2dcb801b)
Solutions
- Pass drop_params=True (or set litellm.drop_params) so unsupported params are dropped instead of raising.
- Remove the offending param named in the message for Bytez calls.
- Branch your request builder per provider so only mapped params reach Bytez.
Example fix
# before
litellm.completion(model="bytez/meta-llama/Llama-3-8b", messages=m, logit_bias={"1": -100})
# after
litellm.completion(model="bytez/meta-llama/Llama-3-8b", messages=m, drop_params=True) Defensive patterns
Strategy: validation
Validate before calling
BYTEZ_SAFE_PARAMS = {"temperature", "max_tokens", "top_p", "stream"} # subset known to pass through
bytez_params = {k: v for k, v in kwargs.items() if k in BYTEZ_SAFE_PARAMS} Try / catch
try:
litellm.completion(model="bytez/...", messages=m, **kwargs)
except Exception as e:
if "not supported on Bytez" in str(e):
litellm.completion(model="bytez/...", messages=m, drop_params=True, **kwargs)
else:
raise Prevention
- Enable litellm.drop_params globally in multi-provider applications.
- Build request params per provider from a whitelist, not a shared dict.
- Wrap provider calls so param errors degrade to dropped params rather than failed requests.
When it happens
Trigger: Calling a bytez/ chat completion with a parameter the map marks False (e.g. certain OpenAI-only params) while drop_params is not enabled — for example forwarding a generic kwargs dict containing that param to litellm.completion(model="bytez/...").
Common situations: Provider-agnostic wrapper code that sends the same optional params (logit_bias, user, function-style args, etc.) to every provider; switching an OpenAI-targeted call to a Bytez model without pruning params.
Related errors
- Parameter {k} is not supported for model {model}. Supported
- Parameter {k} is not supported for model {model}. Supported
- Error transforming text to image params: {e}. Got params: {t
- kwarg `messages` must be an array of messages that follow th
- Prop `type` is not a string
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/e858d81cf62325d3.
Report an issue: GitHub.