Daily Tech Briefing
AI 科技速览

每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。

AI 快讯
AWS ML Blog · 2026/7/30 16:02:32
Introducing explicit prompt caching for OpenAI GPT-5.6 models on Amazon Bedrock

Introducing explicit prompt caching for OpenAI GPT-5.6 models on Amazon Bedrock

AI 中文解读
GPT-5.6来了!这次亚马逊云服务给AI装上了“记忆芯片”——开发者可以手动标记哪些提示内容需要缓存复用,缓存部分还能打一折。新模型家族分三个档位:最强推理用的Sol、日常干活平衡的Terra、以及快跑速分类的Luna,全都按用量付费且享受AWS的安全控制。 通俗点说,以前AI对话每回都要从头读一遍长篇说明书,又慢又贵;现在你可以告诉AI“这段系统指令和工具列表请记住半小时内别重复读”。这在复杂任务里特别管用,比如让AI自动处理流程时,那些反复出现的规则就能省去90%的输入成本,运行速度也更快。设置起来也不复杂,用OpenAI的SDK加上AWS临时令牌就能用。 这对普通人的直接影响是:未来用到AI客服、代码助手或文档总结时,响应会更流畅,背后的开发者也能省下不少钱,最终让AI服务更便宜、更好用。如果你已经在用旧版GPT模型,迁移到5.6也很方便,不论是在Amazon Bedrock还是其他平台。
<p><i>This post is co-written with Chris Dickens from OpenAI.</i></p> <p>OpenAI GPT-5.6 Sol, Terra, and Luna are <a href="https://aws.amazon.com/blogs/machine-learning/openai-gpt-5-6-sol-terra-and-luna-are-now-generally-available-on-amazon-bedrock/" target="_blank" rel="noopener">now generally available on Amazon Bedrock</a>. With GPT-5.6 on Amazon Bedrock, you get the newest generation of OpenAI frontier models with pay-per-token pricing, AWS security and governance controls, and usage that counts toward your existing AWS commitments. The family covers three capability tiers: GPT-5.6 Sol for the most complex reasoning and agentic coding work, GPT-5.6 Terra for balanced everyday production workloads, and GPT-5.6 Luna for fast, high-volume tasks such as classification and summarization.</p> <p>Alongside the new models, GPT-5.6 introduces <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html" target="_blank" rel="noopener">explicit prompt caching</a> on Amazon Bedrock, a new capability that gives you precise control over which portions of your prompt are cached and reused across requests. Cached input is billed at a 90 percent discount (see the <a href="https://aws.amazon.com/bedrock/pricing/" target="_blank" rel="noopener">Amazon Bedrock pricing page</a>) and stays available for reuse for 30 minutes. You get the most value from this in agentic workflows, where system instructions, tool definitions, and reference documents repeat across many calls.</p> <p>In this post, we introduce explicit prompt caching for GPT-5.6 on Amazon Bedrock, a new capability that gives you control over which parts of your prompt are cached and reused across requests. We show how it differs from implicit caching and when to use each mode, how to set it up and verify that it is working, and how it performs in an agentic workflow. We also cover how to migrate workloads from earlier GPT models onto GPT-5.6, whether they run on Amazon Bedrock today or on another platform.</p> <h2 id="get-started-with-gpt-5.6-on-amazon-bedrock">Get started with GPT-5.6 on Amazon Bedrock</h2> <p>GPT-5.6 models are served through the OpenAI-compatible Responses API on the Amazon Bedrock <code>bedrock-mantle</code> endpoint.</p> <h3 id="set-up-the-client">Set up the client</h3> <p>The recommended way to authenticate is with short-term bearer tokens generated from your AWS credentials. Install the token generator alongside the OpenAI SDK:</p> <div class="hide-language"> <pre><code class="language-bash">pip install openai aws-bedrock-token-generator</code></pre> </div> <p>Then create a client. The token generator uses the standard AWS credential chain (IAM roles, environment variables, or your CLI profile), so your code stays free of long-lived secrets:</p> <div class="hide-language"> <pre><code class="language-python">from openai import OpenAI from aws_bedrock_token_generator import provide_token REGION = "us-east-2" client = OpenAI( base_url=f"https://bedrock-mantle.{REGION}.api.aws/openai/v1", api_key=provide_token(region=REGION), # short-term token from your AWS credentials )</code></pre> </div> <h3 id="make-your-first-request">Make your first request</h3> <p>GPT-5.6 models use the Responses API. A minimal request looks like this:</p> <div class="hide-language"> <pre><code class="language-python">response = client.responses.create( model="openai.gpt-5.6-terra", instructions="You are a concise technical assistant.", input="What is Amazon Bedrock?", max_output_tokens=500, ) print(response.output_text)</code></pre> </div> <p>The three model IDs are <code>openai.gpt-5.6-sol</code>, <code>openai.gpt-5.6-terra</code>, and <code>openai.gpt-5.6-luna</code>. GPT-5.6 Sol is available in US East (N. Virginia) and US East (Ohio). Terra and Luna are additionally available in US West (Oregon). For model availability by Region, refer to Supported models by AWS Region in Amazon Bedrock (<a href="https://docs.aws.a
分享
阅读原文