diff --git a/litellm/llms/anthropic.py b/litellm/llms/anthropic.py index cb8e4f8d86c..b7b078b9b12 100644 --- a/litellm/llms/anthropic.py +++ b/litellm/llms/anthropic.py @@ -31,12 +31,12 @@ class AnthropicError(Exception): class AnthropicConfig: """ - Reference: https://docs.anthropic.com/claude/reference/complete_post + Reference: https://docs.anthropic.com/claude/reference/messages_post to pass metadata to anthropic, it's {"user_id": "any-relevant-information"} """ - max_tokens: Optional[int] = litellm.max_tokens # anthropic requires a default + max_tokens: Optional[int] = 4096 # anthropic requires a default value (Opus, Sonnet, and Haiku have the same default) stop_sequences: Optional[list] = None temperature: Optional[int] = None top_p: Optional[int] = None @@ -46,7 +46,7 @@ class AnthropicConfig: def __init__( self, - max_tokens: Optional[int] = 256, # anthropic requires a default + max_tokens: Optional[int] = 4096, # You can pass in a value yourself or use the default value 4096 stop_sequences: Optional[list] = None, temperature: Optional[int] = None, top_p: Optional[int] = None,