Sampling parameters differ by provider, and they change over time: the OpenAI API exposes temperature and top_p but does not expose top_k, while local runtimes such as llama.cpp and vLLM expose all three, and some providers have deprecated temperature, top_p and top_k. Never assume a setting exists because another provider has it. Check the provider’s own API reference for the API you use, and write the result down.
Prerequisites
- The list of sampling settings your task needs: temperature, top_p, top_k, penalties, seed.
- The API reference for each provider you use.
- A note of the model and API version you checked, with the date.
Steps
Step 1: List the settings you need
Write the settings your task relies on. A task that needs top-k is tied to runtimes that expose it; a task that needs only temperature works almost everywhere.
Step 2: Check each provider’s reference
Open each provider’s current API reference and find each setting: its name, its range, its default, and whether it is marked deprecated. Do not trust a blog post or a remembered default; references change.
Step 3: Write the support table
Write a table of provider against setting, with the range and default for each. Keep it with the project, and re-check it when you change provider or model.
Worked example: Three providers, four settings
The table below records what the references available on 2026-11-29 show for the settings in this pack.
| Setting | OpenAI API | Local llama.cpp / vLLM | Note |
|---|---|---|---|
| temperature | 0 to 2, default 1 | Supported | Most widely available |
| top_p | 0 to 1, default 1 | Supported | Widely available |
| top_k | Not exposed | Supported | Local runtimes only |
| frequency_penalty | -2 to 2, default 0 | Supported | Check the runtime name |
The table shows top_k as the gap: it is supported locally but not exposed by the OpenAI API, so a task needing top-k cannot run on that API.
Expected result. You have a written support table from the providers’ own references, dated, showing which settings each provider offers. UNTESTED: this guide was not run against a live model or API. The worked example below is fictional practice material, and its result is the expected result, not a measured one.
Limits
- Provider references change; a table is current only on the day it was checked.
- Deprecated does not always mean removed; check what the provider actually rejects.
- This guide does not cover model-specific limits, which can differ from the API-wide ones.
