Repository navigation
Description
Where
11-xai-grok/01-grok-4-3.ipynb on main at b3052465ebb6330d637d9b7f070ed130e9fcc61c. Nothing in the notebook mentions service_tier: not cell 0's card summary, none of the nine sections, and no row of Things that differ (cell 24). The Rate limits row is the only place cost or scheduling comes up, and it says only "429 under load | Retry with backoff".
What is wrong
The Grok 4.3 card documents Priority and Flex support with explicit price multipliers, the service accepts both on the path this notebook uses, and the notebook's two sibling notebooks in the same directory cover the parameter in detail. A reader of the 4.3 notebook is left without the one field that halves or raises their bill.
Evidence
Grok 4.3 card, Pricing section, read 22 October 2026, verbatim:
Priority and Flex tier support: In addition to Standard, Grok 4.3 supports the Priority and Flex service tiers. Priority is billed at 1.75x the Standard per-token rate (a 75% premium) and Flex at 0.5x the Standard rate (a 50% discount); apply these multipliers to the Standard rates shown above.
Measured on https://bedrock-mantle.us-east-1.api.aws/openai/v1 with xai.grok-4.3, openai==2.50.0, 22 October 2026. Every accepted tier is echoed back on the response:
responses service_tier=default OK status=completed echoed='default' text='Canberra'
responses service_tier=flex OK status=completed echoed='flex' text='Canberra'
responses service_tier=priority OK status=completed echoed='priority' text='Canberra'
responses service_tier=auto OK status=completed echoed='default' text='Canberra'
responses service_tier=bogus 400 {'code': 'invalid_value', 'message': "Invalid value: 'bogus'.
Supported values are: 'auto', 'default', 'flex', 'priority', and 'ultrafast'.",
'param': 'service_tier'}
chat service_tier=flex OK echoed='flex' finish=stop 'Canberra'
chat service_tier=priority OK echoed='priority' finish=stop 'Canberra'
Two things there are worth a reader's attention and are in no notebook today: auto is served by default on this model, so asking for a discount means naming flex; and the validator's list includes ultrafast, which the card does not mention at all.
The same repository covers this for the other two Grok models. 11-xai-grok/02-grok-4-6.ipynb: "service_tier decides what a request costs and how it is scheduled", with a cell that loops over the tiers and prints the echoed value. 11-xai-grok/03-grok-4-7.ipynb: "service_tier takes auto, default, flex and priority. Measured o[n]...". So 4.3 is the one Grok notebook silent on it.
Severity
Medium. Nothing in the notebook breaks, but a developer who lands here for cost work finds no way to reach the 50% discount AWS documents for this model, and no hint that auto will not get it for them.
Proposed change
Add a short section before Things that differ, in the shape 02-grok-4-6.ipynb uses, and one row to the table.
Section text:
Service tiers
service_tiertrades price against scheduling. The card gives Grok 4.3 Standard, Priority at 1.75x the Standard rate and Flex at 0.5x (read 22 October 2026). The reply echoes the tier that served the request, so log that rather than the one you asked for.00-foundations/03has the general case.
Cell, sending the same question at each tier and printing the echoed value, with the checkable answer asserted as the other cells do:
for tier in ("default", "flex", "priority", "auto"):
reply = client.responses.create(
model=GROK, input="What is the capital of Australia? Answer in one word.",
reasoning={"effort": "none"}, max_output_tokens=200, store=False, service_tier=tier,
)
answer = (reply.output_text or "").strip()
print(f"asked {tier:8} served {reply.service_tier:8} status={reply.status} "
f"says Canberra: {'Canberra' in answer}")Things that differ row:
| Service tiers | flex and priority are both accepted and echoed back, and auto is served by default, so it does not find you the discount. An unknown value returns 400 Invalid value: 'bogus'. Supported values are: 'auto', 'default', 'flex', 'priority', and 'ultrafast'., a list that includes a tier the card does not mention (us-east-1, 22 October 2026) | Name flex to get the card's 0.5x rate and priority for its 1.75x one, read the echoed service_tier on the reply, and check the value in your own Region before relying on ultrafast. |
Activity
proton0210 commentedon Oct 22, 2026
I am taking this on. I will add the missing Grok 4.3 service-tier guidance and a bounded example that reports the tier returned by the API, with offline tests against the pinned SDK. I will keep this separate from #424 and complete three audit passes before submitting a PR. I will not run paid inference as part of the local checks or present the issue evidence as a new live measurement.
proton0210 commentedon Oct 22, 2026
Implemented in PR #430: #430
Added the service-tier guide, table row, and a bounded Responses example that reports the served tier, checks completion and the known answer, and does not store responses. Added nine mocked-HTTP regression tests against the pinned SDK, including missing/null tiers, different returned tiers, wrong/incomplete answers and API errors.
Three audit passes covered source/scope, SDK behavior and failure paths, and final regressions/preservation. With the pinned requirements on Python 3.12: 38 unit tests passed; all 38 notebooks validated and 381 code cells compiled; a guarded suite recorded zero socket connection attempts. The new tests detect the original notebook and also pass on Python 3.11. Existing code/output is preserved; the new cell is unexecuted with empty outputs. No paid inference or AWS writes were performed. Live observations are attributed to this issue, and the PR discloses the unrelated existing Python 3.11 full-suite test-double limitation.