Awesome Reviewers

Adopt a model/provider-aware configuration standard: before sending requests to LLM APIs, validate that every model-specific parameter (reasoning effort, thinking features, temperature constraints, system support) is supported for that exact model/provider, and apply overrides safely without accidentally changing unrelated limits.

Apply these rules: 1) Validate model capability before passing parameters

2) Distinguish input-token vs output-token limits

3) When overriding, cap instead of overwriting

4) Use real token measurement—avoid heuristic clipping

5) Don’t introduce model/provider IDs without authoritative references

Example pattern (safe reasoning_effort + capability validation):

supported = {
  # model_prefix: allowed_values (or None to omit)
  "gpt-5": {"minimal","low","medium","high"},
  "gpt-5.1": {"none","low","medium","high"},
  "gpt-5.2": {"none","minimal","low","medium","high","xhigh"},
}

def choose_reasoning_effort(model: str, requested: str | None) -> str | None:
    # pick the best match (implementation depends on your naming scheme)
    allowed = None
    for prefix, vals in supported.items():
        if model.startswith(prefix):
            allowed = vals
            break
    if not allowed:
        return requested  # or None (omit) if you don’t know

    if requested in allowed:
        return requested
    return "medium"  # or omit parameter so API defaults apply

Once this standard is in place, you’ll prevent common production failures: API errors from unsupported parameter combinations, truncated outputs from incorrect token caps, and accidental behavior changes from overwritten limits.