Model API Foundations practice test
What the harness has to read, build and handle on every model call, before there is a loop at all: the four fields in a response and the stop reason the loop branches on, the message list and the pairing rule for tool results, sampling settings and why temperature zero is not determinism, streaming deltas and tool-call fragments, provider wire differences behind one adapter, rate limits and retries inside a run, per-step deadlines and max_tokens, choosing a model by agent-shaped probes, and the failure modes a capable model still has inside a loop. The pool for this topic holds 11 easy, 10 medium and 7 hard items. Each answer comes with its reasoning and a link to the question or concept page it was drawn from.
Sample items with answers
On a tool turn many APIs leave the text content empty or null and put the request in a tool-calls field, with a stop reason that says so. A harness that tests content before the stop reason turns a correct tool request into a blank answer. Branch on the stop reason first.
Truncated prose has no marker in the text, and truncated JSON only fails loudly if nobody repairs it. The stop reason is the one reliable signal that generation ended because the output allowance ran out. Comparing output tokens with max_tokens sometimes works but misses providers that count hidden tokens differently.
After the test
Recognising a right option is not the same as producing the answer for a panel. For that, work through these: