I Tried Web Search for GPT Models on Amazon Bedrock with GPT-5.6 Luna
This page has been translated by machine translation. View original
Introduction
On August 4, 2026, the Web Search tool for OpenAI GPT models on Amazon Bedrock became generally available.
Web Search is a server-side built-in tool that you enable through the tools parameter, which is compatible with the OpenAI Responses API. As of this writing, searches are served from a web index and cache operated by Amazon, and request data does not leave the AWS boundary. Responses include the source URLs and page titles as citations.
In this article, I use Web Search with GPT-5.6 Luna and verify that it returns answers in Japanese along with source citations. How to use the Mantle endpoint and the required IAM settings are covered in the following articles.
Verification
Test environment
| Item | Value |
|---|---|
| Region | us-east-1 |
| Endpoint | https://bedrock-mantle.us-east-1.api.aws/openai/v1 |
| Model | openai.gpt-5.6-luna |
| Python | 3.12 |
| openai | 2.40.0 |
| aws-bedrock-token-generator | 1.1.0 |
As of this writing, the regions where Web Search is available are us-east-1, us-east-2, and us-west-2. The supported models are GPT-5.4, GPT-5.5, and GPT-5.6 (Sol/Terra/Luna). For the latest region and model support, check the official documentation.
Enabling Web Search
It is enabled simply by adding tools=[{"type": "web_search"}]. In this article, I also specify external_web_access: False to make the search source explicit.
from openai import OpenAI
from aws_bedrock_token_generator import provide_token
REGION = "us-east-1"
MODEL = "openai.gpt-5.6-luna"
BASE_URL = f"https://bedrock-mantle.{REGION}.api.aws/openai/v1"
client = OpenAI(base_url=BASE_URL, api_key=provide_token(region=REGION))
response = client.responses.create(
model=MODEL,
instructions="あなたは親切なアシスタントです。必ず日本語で回答してください。",
input="週間aws 2026",
tools=[{"type": "web_search", "external_web_access": False}],
)
The external_web_access parameter controls the search source. The documentation states that retrieval from the external web may become possible in a future release, but at present, even if you specify this value, results are retrieved from Bedrock's web index and cache.
Today, retrieval is served entirely from the Amazon Bedrock web index and cache, so no request data leaves the AWS boundary even when this permission is granted. In a future release, this configuration may allow search and fetch to retrieve content from the live external web.
https://docs.aws.amazon.com/bedrock/latest/userguide/web-search.html
I use the instructions parameter to request answers in Japanese. In this verification, when I omitted it, the answer came back in a language other than Japanese, so I specified it explicitly. As of this writing, I could not find a dedicated language-specification parameter in the OpenAI Responses API.
Results
I tested with two query patterns.
| Pattern | Query | Purpose |
|---|---|---|
| 1 | "Weekly AWS 2026" | Simple query |
| 2 | "Tell me how to run a Bedrock Mantle GPT model in a Lambda layer" | Technical question |
Pattern 1: Simple query
I ran the code shown in "Enabling Web Search" as is.
Expansion of search queries
The model expands the user's input "Weekly AWS 2026" into multiple search queries and runs the searches. You can see this expansion process in the web_search_call items of response.output.
{
"type": "web_search_call",
"status": "completed",
"action": {
"type": "search",
"query": "週間AWS 2026",
"queries": ["週間AWS 2026", "AWS 週間 2026 日本", "週刊AWS 2026"]
}
}
In the additional searches, a site: restriction is added, and the search is narrowed to official AWS domains.
{
"type": "web_search_call",
"status": "completed",
"action": {
"type": "search",
"query": "site:aws.amazon.com/jp/blogs/news/ \"週刊AWS – 2026/8\"",
"queries": [
"site:aws.amazon.com/jp/blogs/news/ \"週刊AWS – 2026/8\"",
"site:aws.amazon.com/jp/blogs/news/ \"週刊AWS – 2026/8/3週\"",
"site:aws.amazon.com/jp/blogs/news/ \"週刊AWS\" \"2026/7/27週\""
]
}
}
Final answer and source citations
The answer generated from the search results is contained in the message block of response.output. The referenced sources are attached as url_citation in annotations (only one is excerpted).
{
"type": "message",
"phase": "final_answer",
"content": [
{
"type": "output_text",
"text": "「**週刊AWS 2026**」をお探しなら...",
"annotations": [
{
"type": "url_citation",
"title": "週刊AWS | Amazon Web Services ブログ",
"url": "https://aws.amazon.com/jp/blogs/news/tag/%E9%80%B1%E5%88%8Aaws/",
"start_index": 41,
"end_index": 124
}
]
}
]
}
start_index and end_index indicate the relevant span within the answer text. The code to extract the citations is as follows.
for item in response.output:
if item.type == "message":
for block in item.content:
if block.type == "output_text":
for ann in block.annotations:
if ann.type == "url_citation":
print(f"{ann.title}: {ann.url}")
Token usage was 11,516 input, 495 output, and 12,011 total. The input side is large because the snippets from the search results are loaded into the context.
Pattern 2: Technical question
response = client.responses.create(
model=MODEL,
instructions="あなたは親切なアシスタントです。必ず日本語で回答してください。",
input="bedrock mantle GPT モデルを Lambdaレイヤで実行する方法を教えて",
tools=[{"type": "web_search", "external_web_access": False}],
)
Expansion of search queries
For technical questions, more search patterns are generated.
{
"type": "web_search_call",
"action": {
"type": "search",
"query": "Amazon Bedrock Mantle GPT model Lambda layer 実行方法",
"queries": [
"Amazon Bedrock Mantle GPT model Lambda layer 実行方法",
"site:docs.aws.amazon.com Amazon Bedrock Mantle GPT Lambda",
"site:aws.amazon.com/bedrock Mantle GPT"
]
}
}
The additional searches also run queries targeting documentation and GitHub.
{
"type": "web_search_call",
"action": {
"type": "search",
"query": "site:docs.aws.amazon.com/bedrock/latest/userguide bedrock mantle IAM bearer token Lambda",
"queries": [
"site:docs.aws.amazon.com/bedrock/latest/userguide bedrock mantle IAM bearer token Lambda",
"site:github.com/aws aws-bedrock-token-generator-python Lambda",
"site:docs.aws.amazon.com/lambda/latest/dg layers python dependencies"
]
}
}
Final answer and citations
After two searches and one page fetch, a detailed answer containing 11 citations was returned.
{
"type": "message",
"phase": "final_answer",
"content": [
{
"type": "output_text",
"text": "以下は、**Amazon Bedrock Mantle 経由の GPT モデルを、Python Lambda+Lambda Layer から呼び出す構成**です...",
"annotations": [
{
"type": "url_citation",
"title": "Inference using Responses API - Amazon Bedrock",
"url": "https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html",
"start_index": 278,
"end_index": 473
},
{
"type": "url_citation",
"title": "Endpoints supported by Amazon Bedrock - Amazon Bedrock",
"url": "https://docs.aws.amazon.com/en_us/bedrock/latest/userguide/endpoints.html",
"start_index": 278,
"end_index": 473
}
]
}
]
}
Referenced sources (excerpted from 11 citations and 4 unique URLs):
docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.htmldocs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-luna.htmlaws.amazon.com/blogs/machine-learning/get-started-with-openai-gpt-5-6-sol-terra-and-luna-on-amazon-bedrock/
Structure of response.output
response.output contains the entire process from search to answer generation.
| type | Content |
|---|---|
reasoning |
Reasoning process (encrypted) |
web_search_call |
Search (action.type: search) or page fetch (action.type: open_page) |
message |
Final answer + annotations |
The model autonomously performs multiple searches and page fetches, gathers the necessary information, and then generates the answer. For the full text, see "Full response.output" at the end of the article.
Summary
Even when you want GPT models on Bedrock to reference the latest information, you no longer need to set up your own search infrastructure. In this verification, I could use the tools specification for the OpenAI API as is.
Looking at response.output, you can see that the model autonomously performs multiple searches and page fetches. In the two AWS-related queries I tried, domain restrictions such as site:docs.aws.amazon.com and site:aws.amazon.com were added to the search queries, and official AWS documentation and blogs were frequently referenced.
If retrieval from the external web becomes possible with external_web_access: True, the scope of search targets would expand and more use cases seem likely.
Full response.output (IDs masked)
Pattern 1: Simple query (Weekly AWS 2026)
[
{
"id": "rs_xxxxx",
"type": "reasoning",
"encrypted_content": "(暗号化された思考過程)"
},
{
"id": "ws_xxxxx",
"type": "web_search_call",
"status": "completed",
"action": {
"type": "search",
"query": "週間AWS 2026",
"queries": ["週間AWS 2026", "AWS 週間 2026 日本", "週刊AWS 2026"]
}
},
{
"id": "rs_xxxxx",
"type": "reasoning",
"encrypted_content": "(暗号化された思考過程)"
},
{
"id": "ws_xxxxx",
"type": "web_search_call",
"status": "completed",
"action": {
"type": "search",
"query": "site:aws.amazon.com/jp/blogs/news/ \"週刊AWS – 2026/8\"",
"queries": [
"site:aws.amazon.com/jp/blogs/news/ \"週刊AWS – 2026/8\"",
"site:aws.amazon.com/jp/blogs/news/ \"週刊AWS – 2026/8/3週\"",
"site:aws.amazon.com/jp/blogs/news/ \"週刊AWS\" \"2026/7/27週\""
]
}
},
{
"id": "rs_xxxxx",
"type": "reasoning",
"encrypted_content": "(暗号化された思考過程)"
},
{
"id": "ws_xxxxx",
"type": "web_search_call",
"status": "completed",
"action": {
"type": "open_page",
"url": "https://aws.amazon.com/jp/blogs/news/tag/%E9%80%B1%E5%88%8Aaws/"
}
},
{
"id": "msg_xxxxx",
"type": "message",
"role": "assistant",
"status": "completed",
"phase": "final_answer",
"content": [
{
"type": "output_text",
"text": "「**週刊AWS 2026**」をお探しなら、AWS公式ブログの一覧はこちらです...",
"annotations": [
{
"type": "url_citation",
"title": "週刊AWS | Amazon Web Services ブログ",
"url": "https://aws.amazon.com/jp/blogs/news/tag/%E9%80%B1%E5%88%8Aaws/",
"start_index": 41,
"end_index": 124
},
{
"type": "url_citation",
"title": "週刊AWS | Amazon Web Services ブログ",
"url": "https://aws.amazon.com/jp/blogs/news/tag/%E9%80%B1%E5%88%8Aaws/",
"start_index": 499,
"end_index": 582
},
{
"type": "url_citation",
"title": "週刊AWS | Amazon Web Services ブログ",
"url": "https://aws.amazon.com/jp/blogs/news/tag/%E9%80%B1%E5%88%8Aaws/",
"start_index": 715,
"end_index": 798
}
]
}
]
}
]
Pattern 2: Technical question (how to run it in a Lambda layer)
[
{
"id": "rs_xxxxx",
"type": "reasoning",
"encrypted_content": "(暗号化された思考過程)"
},
{
"id": "ws_xxxxx",
"type": "web_search_call",
"status": "completed",
"action": {
"type": "search",
"query": "Amazon Bedrock Mantle GPT model Lambda layer 実行方法",
"queries": [
"Amazon Bedrock Mantle GPT model Lambda layer 実行方法",
"site:docs.aws.amazon.com Amazon Bedrock Mantle GPT Lambda",
"site:aws.amazon.com/bedrock Mantle GPT"
]
}
},
{
"id": "ws_xxxxx",
"type": "web_search_call",
"status": "completed",
"action": {
"type": "search",
"query": "site:docs.aws.amazon.com/bedrock/latest/userguide bedrock mantle IAM bearer token Lambda",
"queries": [
"site:docs.aws.amazon.com/bedrock/latest/userguide bedrock mantle IAM bearer token Lambda",
"site:github.com/aws aws-bedrock-token-generator-python Lambda",
"site:docs.aws.amazon.com/lambda/latest/dg layers python dependencies"
]
}
},
{
"id": "ws_xxxxx",
"type": "web_search_call",
"status": "completed",
"action": {
"type": "open_page",
"url": "https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html"
}
},
{
"id": "msg_xxxxx",
"type": "message",
"role": "assistant",
"status": "completed",
"phase": "final_answer",
"content": [
{
"type": "output_text",
"text": "以下は、**Amazon Bedrock Mantle 経由の GPT モデルを、Python Lambda+Lambda Layer から呼び出す構成**です...",
"annotations": [
{
"type": "url_citation",
"title": "Inference using Responses API - Amazon Bedrock",
"url": "https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html",
"start_index": 278,
"end_index": 473
},
{
"type": "url_citation",
"title": "Endpoints supported by Amazon Bedrock - Amazon Bedrock",
"url": "https://docs.aws.amazon.com/en_us/bedrock/latest/userguide/endpoints.html",
"start_index": 278,
"end_index": 473
},
{
"type": "url_citation",
"title": "Get started with OpenAI GPT-5.6 Sol, Terra, and Luna on Amazon Bedrock",
"url": "https://aws.amazon.com/blogs/machine-learning/get-started-with-openai-gpt-5-6-sol-terra-and-luna-on-amazon-bedrock/",
"start_index": 1089,
"end_index": 1224
},
{
"type": "url_citation",
"title": "Get started with OpenAI GPT-5.6 Sol, Terra, and Luna on Amazon Bedrock",
"url": "https://aws.amazon.com/blogs/machine-learning/get-started-with-openai-gpt-5-6-sol-terra-and-luna-on-amazon-bedrock/",
"start_index": 2044,
"end_index": 2179
},
{
"type": "url_citation",
"title": "Get started with OpenAI GPT-5.6 Sol, Terra, and Luna on Amazon Bedrock",
"url": "https://aws.amazon.com/blogs/machine-learning/get-started-with-openai-gpt-5-6-sol-terra-and-luna-on-amazon-bedrock/",
"start_index": 4776,
"end_index": 4911
},
{
"type": "url_citation",
"title": "GPT-5.6 Luna - Amazon Bedrock",
"url": "https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-luna.html",
"start_index": 5209,
"end_index": 5456
},
{
"type": "url_citation",
"title": "Get started with OpenAI GPT-5.6 Sol, Terra, and Luna on Amazon Bedrock",
"url": "https://aws.amazon.com/blogs/machine-learning/get-started-with-openai-gpt-5-6-sol-terra-and-luna-on-amazon-bedrock/",
"start_index": 5209,
"end_index": 5456
},
{
"type": "url_citation",
"title": "GPT-5.6 Luna - Amazon Bedrock",
"url": "https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-luna.html",
"start_index": 6647,
"end_index": 6894
},
{
"type": "url_citation",
"title": "Get started with OpenAI GPT-5.6 Sol, Terra, and Luna on Amazon Bedrock",
"url": "https://aws.amazon.com/blogs/machine-learning/get-started-with-openai-gpt-5-6-sol-terra-and-luna-on-amazon-bedrock/",
"start_index": 6647,
"end_index": 6894
},
{
"type": "url_citation",
"title": "Inference using Responses API - Amazon Bedrock",
"url": "https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html",
"start_index": 7275,
"end_index": 7372
},
{
"type": "url_citation",
"title": "Inference using Responses API - Amazon Bedrock",
"url": "https://docs.aws.amazon.com/bedrock/latest/userguide/bedrock-mantle.html",
"start_index": 8069,
"end_index": 8166
}
]
}
]
}
]

