#26786 [Bug]: Model replicate/anthropic/claude-opus-4.6 did not work
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
In the replicate log I see:
Prediction failed
Error: Prediction input failed validation: {"detail":[{"loc":["body","input","max_new_tokens"],"msg":"Unexpected field 'max_new_tokens'","type":"value_error.extra"},{"loc":["body","input","stream"],"msg":"Unexpected field 'stream'","type":"value_error.extra"},{"loc":["body","input","temperature"],"msg":"Unexpected field 'temperature'","type":"value_error.extra"}]}
I patched as follows as a workaround:
_REPLICATE_ANTHROPIC_MIN_MAX_TOKENS = 1024 _original_map_openai_params = litellm.ReplicateConfig.map_openai_params
def _patched_map_openai_params( self: litellm.ReplicateConfig, non_default_params: dict[str, Any], optional_params: dict[str, Any], model: str, drop_params: bool, ) -> dict[str, Any]: if "/anthropic/" in model or model.startswith("anthropic/"): for param, value in non_default_params.items(): if param == "max_tokens": optional_params["max_tokens"] = max(value, _REPLICATE_ANTHROPIC_MIN_MAX_TOKENS) # Intentionally dā¦