{"record":{"id":"089f48d39a585632","repo":"BerriAI/litellm","slug":"prop-type-is-not-supported","errorCode":null,"errorMessage":"Prop `{type}` is not supported","messagePattern":"Prop `(.+?)` is not supported","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/llms/bytez/chat/transformation.py","lineNumber":398,"sourceCode":"\n    new_messages: Final = []\n\n    for message in messages:\n        role = message[\"role\"]\n        content: list = message[\"content\"]\n\n        new_content = []\n\n        for content_item in content:\n            type: str | None = content_item.get(\"type\")\n\n            if not type:\n                raise Exception(\"Prop `type` is not a string\")\n\n            content_item_map = open_ai_to_bytez_content_item_map[type]\n\n            if not content_item_map:\n                raise Exception(f\"Prop `{type}` is not supported\")\n\n            new_type = content_item_map[\"type\"]\n\n            value_name = content_item_map[\"value_name\"]\n\n            value: str | None = content_item.get(value_name)\n\n            if not value:\n                raise Exception(f\"Prop `{value_name}` is not a string\")\n\n            new_content.append({\"type\": new_type, value_name: value})\n\n        new_messages.append({\"role\": role, \"content\": new_content})\n\n    return new_messages\n\n\n# \"content\": \"The cat ran so fast\"","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bytez/chat/transformation.py#L380-L416","documentation":"Thrown by the Bytez adapter when a chat message content item has a `type` that has no Bytez mapping. The mapping (`open_ai_to_bytez_content_item_map`) only supports `text`, `image_url`, `input_audio`, and `video_url`; `document` and `file` are explicitly mapped to None, and any other type raises a KeyError before this check. This is a request-shape error: the OpenAI-style content you sent cannot be translated to Bytez's format.","triggerScenarios":"Calling `litellm.completion(..., model=\"bytez/...\", messages=[{\"role\": \"user\", \"content\": [{\"type\": \"document\", ...}]}])` or sending a content item with type `file`, `input_video`, `audio`, or any non-mapped type. Also a plain `KeyError` if the type string is entirely unknown to the map dict.","commonSituations":"Porting a multimodal OpenAI app (PDF/file uploads, newer content types like `file` or `input_video`) to Bytez; using a prompt built for another provider that supports document parts; copying example payloads from OpenAI docs that Bytez has not implemented.","solutions":["Remove or replace unsupported content items: only `text`, `image_url`, `input_audio`, and `video_url` types are accepted by Bytez.","If you sent a `document`/`file` part, extract the text yourself and send it as a `{\"type\": \"text\", \"text\": ...}` item.","Filter messages with a pre-flight check (see validation) before calling litellm so unsupported types are dropped or converted client-side.","If you need file/document chat, switch to a provider that supports those content types (e.g. OpenAI, Anthropic, Gemini) instead of Bytez."],"exampleFix":"// before\nmessages = [{\"role\": \"user\", \"content\": [\n    {\"type\": \"text\", \"text\": \"summarize\"},\n    {\"type\": \"document\", \"document\": {\"file_id\": \"doc_123\"}}\n]}]\nlitellm.completion(model=\"bytez/openai/gpt-4o\", messages=messages)\n\n// after\nmessages = [{\"role\": \"user\", \"content\": [\n    {\"type\": \"text\", \"text\": \"summarize this: <extracted document text>\"}\n]}]\nlitellm.completion(model=\"bytez/openai/gpt-4o\", messages=messages)","handlingStrategy":"validation","validationCode":"SUPPORTED = {\"text\", \"image_url\", \"input_audio\", \"video_url\"}\n\ndef validate_bytez_messages(messages):\n    for i, m in enumerate(messages):\n        content = m.get(\"content\")\n        if not isinstance(content, list):\n            continue\n        for j, part in enumerate(content):\n            if isinstance(part, dict) and part.get(\"type\") not in SUPPORTED:\n                raise ValueError(f\"messages[{i}].content[{j}] type {part.get('type')!r} unsupported by bytez\")","typeGuard":"def is_bytez_supported_part(part) -> bool:\n    return isinstance(part, dict) and part.get(\"type\") in {\"text\", \"image_url\", \"input_audio\", \"video_url\"}","tryCatchPattern":null,"preventionTips":["Build message content through a helper that whitelists part types per provider.","Convert documents/files to extracted text before sending to Bytez.","Unit-test message builders against the provider's supported part-type set."],"tags":["bytez","multimodal","content-parts","request-validation"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}