gemini-4-hydrogen is listed as Flex-supported in the Flex inference docs, and Flex works for it on the Gemini API. The X-Gemini-Service-Tier: flex response header confirms it. On Vertex AI (location="global"), the same Flex PayGo request that works for gemini-3.8-flash returns 400 Flex API is not supported for model: gemini-4-hydrogen.
The Interactions API on Vertex accepts service_tier="flex" for Hydrogen and returns 200. But neither the response body nor its headers report which tier served the request, and that is also true for gemini-3.8-flash. So there is no way to tell whether Flex was applied or silently ignored.
Expected:
- Flex PayGo works for
gemini-4-hydrogenon VertexgenerateContent, as it does forgemini-3.8-flash. - The Interactions API reports the serving tier, as
generateContentdoes withusageMetadata.trafficType.
# google-genai==3.3.0, Vertex AI, location="global"
import os
from google import genai
from google.genai import types
client = genai.Client(vertexai=True, project=os.environ["GOOGLE_CLOUD_PROJECT"], location="global")
FLEX = types.HttpOptions(headers={
"X-Vertex-AI-LLM-Request-Type": "shared",
"X-Vertex-AI-LLM-Shared-Request-Type": "flex",
})
# 1) Control: gemini-3.8-flash on Flex PayGo
r = client.models.generate_content(model="gemini-3.8-flash", contents="Say OK.",
config=types.GenerateContentConfig(http_options=FLEX))
print(r.usage_metadata.traffic_type)
# -> TrafficType.ON_DEMAND_FLEX
# 2) Same request on gemini-4-hydrogen
client.models.generate_content(model="gemini-4-hydrogen", contents="Say OK.",
config=types.GenerateContentConfig(http_options=FLEX))
# -> 400 INVALID_ARGUMENT: "Flex API is not supported for model: gemini-4-hydrogen."
# 3) Interactions API: accepted, but the serving tier is not reported anywhere
raw = client.interactions.with_raw_response.create(
model="gemini-4-hydrogen", input="Say OK.", service_tier="flex", store=False)
print(raw.status_code, raw.parse().model_dump(exclude_none=True).get("service_tier"), sorted(raw.headers))
# -> 200 None ['alt-svc', 'content-encoding', 'content-type', 'date', 'server', 'transfer-encoding',
# 'vary', 'x-content-type-options', 'x-frame-options', 'x-request-id', 'x-xss-protection']