{"record":{"id":"e858d81cf62325d3","repo":"BerriAI/litellm","slug":"param-key-is-not-supported-on-bytez","errorCode":null,"errorMessage":"param `{key}` is not supported on Bytez","messagePattern":"param `(.+?)` is not supported on Bytez","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/llms/bytez/chat/transformation.py","lineNumber":106,"sourceCode":"    def map_openai_params(\n        self,\n        non_default_params: dict,\n        optional_params: dict,\n        model: str,\n        drop_params: bool,\n    ) -> dict:\n        adapted_params: Final = {}\n\n        all_params: Final = {**non_default_params, **optional_params}\n\n        for key, value in all_params.items():\n            alias = self.openai_to_bytez_param_map.get(key)\n\n            if alias is False:\n                if drop_params:\n                    continue\n\n                raise Exception(f\"param `{key}` is not supported on Bytez\")\n\n            if alias is None:\n                adapted_params[key] = value\n                continue\n\n            adapted_params[alias] = value\n\n        return adapted_params\n\n    def validate_environment(\n        self,\n        headers: dict,\n        model: str,\n        messages: list[AllMessageValues],\n        optional_params: dict,\n        litellm_params: dict,\n        api_key: str | None = None,\n        api_base: str | None = None,","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/bytez/chat/transformation.py#L88-L124","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Pass drop_params=True on the call, or set litellm.drop_params = True / proxy drop_params, so blocked params are silently dropped.","Remove the unsupported param(s) for bytez calls (branch your payload when provider is bytez).","Pre-check with BytezChatConfig().get_supported_openai_params(model) before building the request."],"exampleFix":"# before\nlitellm.completion(\n    model=\"bytez/meta-llama/Llama-3.1-8B-Instruct\",\n    messages=msgs,\n    tools=tools,  # raises: tools unsupported on Bytez\n)\n\n# after\nlitellm.completion(\n    model=\"bytez/meta-llama/Llama-3.1-8B-Instruct\",\n    messages=msgs,\n    drop_params=True,  # tools dropped silently\n)","handlingStrategy":"validation","validationCode":"from litellm.llms.bytez.chat.transformation import BytezChatConfig\n\nBYTEZ_SUPPORTED = set(BytezChatConfig().get_supported_openai_params(\"model\"))\n\ndef sanitize_bytez_kwargs(kwargs: dict) -> dict:\n    return {k: v for k, v in kwargs.items() if k in BYTEZ_SUPPORTED}","typeGuard":null,"tryCatchPattern":"try:\n    litellm.completion(model=\"bytez/org/model\", messages=msgs, **kwargs)\nexcept Exception as e:\n    if \"not supported on Bytez\" in str(e):\n        litellm.completion(model=\"bytez/org/model\", messages=msgs, drop_params=True, **kwargs)\n    else:\n        raise","preventionTips":["Prefer drop_params=True for multi-provider calls; re-enable strictness only where params are load-bearing.","Remember tools/tool_choice and stop/seed are hard-blocked for bytez — branch agent workloads to a tool-capable provider."],"tags":["bytez","params","validation","tools","drop-params"],"backgroundTag":"unsupported-parameter","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}