こちらのアップデートです。
Model Servingは、Google Gemini 2.5 ProおよびGemini 2.5 Flashモデルをサポートするようになりました。これらのモデルには、Foundation Model APIs pay-per-tokenを使用してアクセスでき、Function callingおよびStructured outputもサポートしています。
- Query reasoning modelsを参照してください。
注意
執筆時点では、AWS東京リージョンで動作確認してきます。
サービングにアクセスするとGemini 2.5 FlashとProが表示されています。

せっかくなので上の推論モデルのクエリも試してみます。
%pip install -U openai
from openai import OpenAI
import base64
import httpx
client = OpenAI(
api_key="<Databricksアクセストークン>",
base_url="https://xxxx.cloud.databricks.com/serving-endpoints/"
)
response = client.chat.completions.create(
model="databricks-gemini-2-5-flash",
messages=[{"role": "user", "content": "なぜ空は青いのでしょうか?"}],
max_tokens=20480,
extra_body={
"thinking": {
"type": "enabled",
"budget_tokens": 10240
}
}
)
msg = response.choices[0].message
reasoning = msg.content[0]["summary"][0]["text"]
answer = msg.content[1]["text"]
print("Reasoning:", reasoning)
print("Answer:", answer)
最初に推論ステップを踏んでいることが確認できます。
Reasoning: Alright, here's how I'd approach answering the question "Why is the sky blue?" given my knowledge of atmospheric physics.
First and foremost, the answer is **Rayleigh scattering**. That's the core concept. Now, to make this understandable, I'd break it down like this:
1. **Lead with the punchline:** The sky appears blue because of a phenomenon called Rayleigh scattering. It's the key.
2. **Explain Rayleigh Scattering Simply:** The sun's light is a mixture of all the colors of the rainbow, appearing white to us. That light enters our atmosphere, which is full of tiny molecules – mostly nitrogen and oxygen. As this sunlight hits these tiny molecules, the light scatters in all directions. Now, the key is that how much the light scatters depends on its color, which is related to its wavelength.
3. **Why Blue?** Light with shorter wavelengths, like blue and violet, is scattered much more strongly than light with longer wavelengths, like red and orange. Because blue light is scattered so effectively, it gets spread all over the sky. When we look up, we are seeing this scattered blue light from all directions, which is why the sky appears blue. Even though violet light is also scattered strongly, our eyes are more sensitive to blue, and there is also a bit less violet in the sun's light to begin with.
4. **Add a touch of extra context**: It's helpful to then include a couple of related phenomena to really cement understanding:
* **Sunset's reds and oranges**: When the sun is near the horizon, its light has to travel a much longer path through the atmosphere. The blue light has been scattered away, leaving the longer wavelength colors – red and orange – to reach our eyes.
* **Clouds are White**: This is related, but different. Clouds are made of water droplets or ice crystals, which are much larger than the air molecules. Because of their size, the light scatters, but it's not Rayleigh scattering. Instead, it’s Mie scattering. Light of all colors scatters equally, thus mixing together and making the clouds appear white.
The key here is to keep it straightforward, avoid jargon as much as possible, and use analogies to highlight the key relationship between wavelength and scattering. My goal is clarity and an intuitive grasp of the physics.
Answer: 空が青く見えるのは、「**レイリー散乱(Rayleigh scattering)**」という現象が主な原因です。
詳しく説明すると、以下のようになります。
1. **太陽の光は様々な色の光の集まり**
太陽の光は、私たちが「白色光」と呼んでいますが、実際には赤、オレンジ、黄、緑、青、藍、紫といった、様々な色の光(電磁波)が混ざり合ってできています。虹がその良い例です。
2. **大気中の分子による光の散乱**
地球の空(大気)には、窒素や酸素などの非常に小さな分子がたくさん漂っています。太陽の光がこれらの分子に当たると、光はあらゆる方向に散らばります。これを「散乱」と呼びます。
3. **青い光が特に散乱されやすい**
この散乱のされやすさは、光の「波長」によって異なります。
* **波長が短い光(青や紫)**:大気中の小さな分子に強く衝突し、より広範囲に散乱されやすい性質があります。
* **波長が長い光(赤やオレンジ)**:大気中の分子に衝突しても、あまり散乱されずに直進しやすい性質があります。
4. **空が青く見える理由**
太陽の光が地球の大気に入ってくると、波長の短い青い光や紫の光は、大気中の分子によって非常に強く散乱されます。この散乱された青い光が、空全体に広がり、私たちの目に届くため、空は青く見えるのです。
ちなみに、紫の光も青い光より強く散乱されますが、太陽光に含まれる紫の割合が青より少ないことや、人間の目の感度が青い光に対して高いため、青が優勢に見えます。
**補足:関連する現象**
* **夕焼けが赤い理由**:夕方や朝方、太陽が地平線に近い位置にあると、太陽光は日中よりもはるかに長い距離を大気の中を通過して私たちの目に届きます。その長い道のりの間に、青い光はほとんど散乱し尽くされてしまい、散乱されにくい赤い光やオレンジ色の光が直接目に届くため、夕焼けや朝焼けは赤く見えるのです。
* **雲が白い理由**:雲を構成する水滴や氷の粒は、空気分子よりもずっと大きい粒子です。これらの大きな粒子に光が当たると、波長に関係なくすべての色の光がほぼ均等に散乱されます(これは「ミー散乱」と呼ばれます)。すべての色が均等に散乱されて混ざり合うと、白く見えるため、雲は白く見えるのです。
このように、空の色の変化は、光と大気中の粒子の相互作用によって生まれる、美しい自然現象なのです。
OpenAI GPT 5 models are now generally available in Mosaic AI Model Servingもリリースにありますが、まだAWS東京リージョンでは確認できていないです。来たら改めて記事書きます。
