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

(Feat) - Allow calling Nova models on /bedrock/invoke/ #8397

Merged
merged 14 commits into from
Feb 8, 2025

Conversation

ishaan-jaff
Copy link
Contributor

@ishaan-jaff ishaan-jaff commented Feb 8, 2025

(Feat) - Allow calling Nova models on /bedrock/invoke/

  • Uses the existing Nova transformations for the /invoke routes
  • There's a minor difference between Nova on converse vs invoke - which we handle in the AmazonInvokeNovaConfig
  • Minor difference in where the stream content is located from the converse vs invoke routes
response = litellm.completion(
  model="bedrock/invoke/us.amazon.nova-micro-v1:0",
  messages=[]
)

Relevant issues

Type

🆕 New Feature
✅ Test

Changes

[REQUIRED] Testing - Attach a screenshot of any new tests passing locally

If UI changes, send a screenshot/GIF of working UI fixes

e2e testing for Nova JSON mode

Copy link

vercel bot commented Feb 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2025 9:02pm

Copy link

codecov bot commented Feb 8, 2025

Codecov Report

Attention: Patch coverage is 57.50000% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...voke_transformations/amazon_nova_transformation.py 42.85% 12 Missing ⚠️
...voke_transformations/base_invoke_transformation.py 66.66% 3 Missing ⚠️
litellm/llms/bedrock/chat/invoke_handler.py 33.33% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ishaan-jaff
Copy link
Contributor Author

increased test cov based on codecov report

@ishaan-jaff ishaan-jaff merged commit 12ac414 into main Feb 8, 2025
5 of 32 checks passed
abhijitherekar pushed a commit to acuvity/litellm that referenced this pull request Feb 20, 2025
* add nova to BEDROCK_INVOKE_PROVIDERS_LITERAL

* BedrockInvokeNovaRequest

* nova + invoke config

* add AmazonInvokeNovaConfig

* AmazonInvokeNovaConfig

* run transform_request for invoke/nova models

* AmazonInvokeNovaConfig

* rename invoke tests

* fix linting error

* TestBedrockInvokeNovaJson

* TestBedrockInvokeNovaJson

* add converse_chunk_parser

* test_nova_invoke_remove_empty_system_messages

* test_nova_invoke_streaming_chunk_parsing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant