Blog

LLM Parameters

alt

Bold = name differs from the OpenAI Chat Completions spec (gpt-4o = baseline). Dashes = not supported.

1. Sampling / decoding

Model (API) n max_tokens temperature top_p top_k stop seed
gpt-4o (Chat Completions) n max_completion_tokens ¹ temperature ² top_p ³ stop seed
gpt-5.2 (Responses) — ⁴ max_output_tokens temperature ² top_p ³
claude-opus-4.8 (Messages) ⁵ max_tokens ⁶ temperature ⁷ top_p top_k stop_sequences
gemini-3.5-flash (generateContent) ⁸ candidateCount maxOutputTokens temperature ¹⁰ topP ¹¹ topK stopSequences seed
mistral-large (Chat) n max_tokens temperature top_p ³ stop random_seed
command-a (Cohere v2) max_tokens temperature p k stop_sequences seed
llama / OSS (vLLM) n max_tokens temperature top_p top_k ¹² stop seed
  1. max_tokens still works on non-reasoning models.
  2. Default 1, range 0–2.
  3. Default 1.
  4. Not supported — send multiple requests.
  5. Identical shape for sonnet-5 and all Claude 4.x.
  6. Required — only API where it isn't optional.
  7. Default 1, range 0–1.
  8. Identical shape for gemini-2.5-pro and all Gemini 2.x/3.x.
  9. Alternative candidates per input.
  10. Default 1.0.
  11. Default 0.95.
  12. vLLM extension, not in the OpenAI spec.

2. Structural

Model (API) system prompt stream penalties logprobs tools response_format
gpt-4o messages[role="system"] stream frequency_penalty, presence_penalty logprobs + top_logprobs tools, tool_choice response_format
gpt-5.2 instructions / role developer stream top_logprobs tools, tool_choice text.format
claude-opus-4.8 system (top-level) stream tools, tool_choice — ¹
gemini-3.5-flash systemInstruction separate endpoint ² frequencyPenalty, presencePenalty responseLogprobs + logprobs tools, toolConfig responseMimeType + responseSchema
mistral-large messages[role="system"] stream frequency_penalty, presence_penalty tools, tool_choice response_format
command-a messages[role="system"] stream frequency_penalty, presence_penalty logprobs tools, tool_choice response_format
llama / OSS messages[role="system"] stream both logprobs tools guided_json
  1. No JSON mode — use a tool schema or prefill.
  2. streamGenerateContent, not a flag.

3. Reasoning / thinking

Baseline for bolding here is gpt-5.2 — gpt-4o has no reasoning params.

Model (API) enable depth control token budget visibility constraints
gpt-4o n/a
gpt-5.2 on by default reasoning.effort ¹ max_output_tokens (shared) reasoning.summary reasoning tokens billed as output
claude-opus-4.8 thinking object ² output_config.effort thinking.budget_tokens ³ thinking blocks; display: "omitted" no temperature / top_k / forced tools; top_p only 0.95–1 ⁴
gemini-3.5-flash thinkingConfig thinkingLevel thinkingBudget includeThoughts budget 0 disables on Flash; not disableable on Pro
mistral-large n/a ⁶
command-a thinking object ⁷ thinking.token_budget thinking block
llama / OSS chat_template_kwargs reasoning_effort ⁹ max_tokens reasoning_content varies per template
  1. none / low / medium / high / xhigh.
  2. {"type": "adaptive"} on 4.6+; omitting it defaults to adaptive.
  3. Min 1024, must be < max_tokens. Deprecated on 4.6+ in favor of effort.
  4. The gotcha — table 1 partly stops applying once thinking is on.
  5. -1 = model decides.
  6. Model choice (magistral), not a param.
  7. On command-a-reasoning.
  8. e.g. {"enable_thinking": true}.
  9. Some vLLM builds only.

Takeaways

  • Google camelCases everything and moves sampling into a nested generationConfig; streaming is a different endpoint.
  • Anthropic renames a few and drops n, seed, logprobs, and penalties entirely; max_tokens is mandatory.
  • Mistral, Cohere, vLLM are ~OpenAI clones — Cohere's p/k and Mistral's random_seed are the only real trip-ups.
  • OpenAI's own two APIs disagree (Chat Completions vs Responses) more than some cross-vendor pairs do.
  • Reasoning is converging on an effort knob; explicit token budgets are on the way out.

Get the params cheat sheet one-pager