For organizations standardized on AWS Bedrock, AI Router can be configured to recommend only models available on your Bedrock instance. This ensures alignment with existing cloud infrastructure and maintaining your input data private while still optimizing model selection within the Bedrock ecosystem.
In the first step compare your available models in Bedrock with the models listed on the dashboard Models page, then add them to the models parameter. Set the full_privacy parameter to True to ensure your input data is not exposed.
from airouter import AiRouter, Model
client = AiRouter(
api_key="<THE-API-KEY-YOU-GENERATED>"
)
best_model = client.get_best_model(
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the meaning of life?"}
],
model=Model.CLAUDE_4_5_SONNET, # the default model
models=[
Model.CLAUDE_4_5_SONNET,
Model.CLAUDE_4_5_HAIKU,
Model.MISTRAL_LARGE,
Model.LLAMA_33_70B,
Model.QWEN3_235B_A22B,
Model.GPT_OSS_120B,
], # the models to consider
full_privacy=True
)
if best_model == Model.CLAUDE_4_5_SONNET:
# call your bedrock claude-4-5-sonnet model
elif best_model == Model.CLAUDE_4_5_HAIKU:
# call your bedrock claude-4-5-haiku model
...