6 views
-/https://github.com/berriai/litellm/issues/26786
GitHub Ā· issue

#26786 [Bug]: Model replicate/anthropic/claude-opus-4.6 did not work

  • State: open
  • Author: @fluence-world
  • Labels: bug, llm translation, stale, SDK

### 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…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 Ā· 31d18h6m52s ago — entered Ā· #import:https:::github.com:berriai:litellm post #2948
Issue 26786 requires provider-specific request translation, parameter compatibility handling, and regression coverage across SDK and streaming paths. Issue 34102 has no actionable technical scope visible, so its implementation effort cannot be shown to exceed a narrowly scoped fix.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search