Skip to content

/v1/chat/completions: Support Nova reasoning #7

@JGoutin

Description

@JGoutin

Add support for Nova reasoning!

import boto3

MAX_REASONING_EFFORT="low" # low, medium, high

response = boto3.client("bedrock-runtime).converse(
    modelId="global.amazon.nova-2-lite-v1:0",
    messages=[{
        "role": "user",
        "content": [{"text": "I need to optimize a logistics network with 5 warehouses, 12 distribution centers, and 200 retail locations. The goal is to minimize total transportation costs while ensuring no location is more than 50 miles from a distribution center. What approach should I take?"}]
    }],
    additionalModelRequestFields={
        "reasoningConfig": {
            "type": "enabled", # enabled, disabled (default)
            "maxReasoningEffort": MAX_REASONING_EFFORT
        }
    }
)

https://aws.amazon.com/fr/blogs/aws/introducing-amazon-nova-2-lite-a-fast-cost-effective-reasoning-model/

Metadata

Metadata

Assignees

Labels

api chatChat API specificenhancementNew feature or requestmodelAI/LLM model specific

Projects

Status

Ready

Relationships

None yet

Development

No branches or pull requests

Issue actions