Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Nova <thinking> sections are not removed #9063

Open
adampauls opened this issue Mar 7, 2025 · 0 comments
Open

[Bug]: Nova <thinking> sections are not removed #9063

adampauls opened this issue Mar 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@adampauls
Copy link

What happened?

When Amazon Nova is invokes tools, it returns <thinking> messages as text content (see note here). For example:

{'content': '<thinking> The user has provided their email address. I will use the `find_user_id_by_email` tool to locate the user ID. </thinking>

', 'function_call': None, 'role': 'assistant', 'tool_calls': [{'function': {'arguments': '{"email": "[email protected]"}', 'name': 'find_user_id_by_email'}, 'id': 'tooluse_ImoUPIm6SlueNzyx9xXNzg', 'index': 1, 'type': 'function'}]}

<thinking> can also occur without tool use, though the Amazon documentation is less clear here. I think the intended use is that everything between <thinking> and </thinking> tags should be stripped before being returned out to the user, but I'm not sure what Amazon is intending here, or why they didn't structure their API more like other APIs that have reasoning blocks.

Relevant log output

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.63.3

Twitter / LinkedIn details

No response

@adampauls adampauls added the bug Something isn't working label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant