Skip to content

[Bug]: Anthropic redacted thinking #9058

@johannkm

Description

@johannkm

What happened?

Redacted thinking blocks are currently dropped. See #9044 for tests that reproduce this.

Relevant log output

RAW RESPONSE: {"id":"msg_01XNCArz96RcefiWe7b7CAHt","type":"message","role":"assistant","model":"claude-3-7-sonnet-20250219","content":[{"type":"redacted_thinking","data":"ErYECkYIARgCKkAdMlvlPe34/2BkL54QTcx6fnnuMECKrwrPDmq8vfJNG14sW2tjM7Yy7I4hiR2vE8rFi96heEQub4IiclcswuuWEgzesvafGsK05jSERi4aDH0AhnGTynFcyeUEkiIwYwZl74Fa5G04WSpxgxpWEpyONRt0YUXVMkT6/nIhL2aemKQWBvSlX4WOae8YgZ43Kp0DC5dIwVea8edZxkpWIW7rYQ25am/hPygSaVN2BUnM33YXcMm3MDhMfF3dusxRgld1ER8+8V8z5VJ/s30t/g+lP9uINFRnsD+Zkm8PEZQ6qXnCfHKNC2X8Aztu8TERek1uR6hM9ZpeLB2LsKVGExBJ4W9iRkSYImokokvoYphngMIMVMn8XSI+TVMWimP6TdfrlarsEfXFLd3Y+HpYl5juz17bSH+xAZY1GEGouBfRDif7b77Yv20Koc4s6jEVaJrVknH5JA5QQzJUKQtYdt85+Md+cu/zNM8O0OGbzHJYyx9uO1MuxC8Rw0PlIzMukWLrVlXibNNqR4MWU/n3cT+sHmvajWlL69CbfZl1Ao0kfNnGY1b+1kv9Qx9NZWTgNNGlciYU8vlKvSZfxR3Txomev0W73vlFfnRcgEqxIesRq2DeMfsmJY1byrOKzP3pbhQNZRh1BsInVdBt+ljKSU37Zu/scH6LIdJzrB/A5vs6vuzLfS2Z4w8c91k5pEbIJ87+XTMxaFaBUOWtakx+TqjZv2xRAmB/R76RF7aIaqU="},{"type":"text","text":"I don't have any special modes or backdoors that can be activated with strings like this. There's no \"redacted thinking\" feature or hidden functionality that can be accessed through special commands.\n\nI'm designed to be helpful, harmless, and honest in my regular operation. Is there something specific you'd like help with today? I'm happy to assist with legitimate questions or tasks."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":92,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":174}}

ModelResponse(id='chatcmpl-ac3bbde9-9475-4525-84d3-d09b54b17bd5', created=1741336888, model='claude-3-7-sonnet-20250219', object='chat.completion', system_fingerprint=None, choices=[Choices(finish_reason='stop', index=0, message=Message(content='I don\'t have any special modes or backdoors that can be activated with strings like this. There\'s no "redacted thinking" feature or hidden functionality that can be accessed through special commands.\n\nI\'m designed to be helpful, harmless, and honest in my regular operation. Is there something specific you\'d like help with today? I\'m happy to assist with legitimate questions or tasks.', role='assistant', tool_calls=None, function_call=None, provider_specific_fields={'citations': None, 'thinking_blocks': None}))], usage=Usage(completion_tokens=174, prompt_tokens=92, total_tokens=266, completion_tokens_details=None, prompt_tokens_details=PromptTokensDetailsWrapper(audio_tokens=None, cached_tokens=0, text_tokens=None, image_tokens=None), cache_creation_input_tokens=0, cache_read_input_tokens=0))

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

main, 04e839d

Twitter / LinkedIn details

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions