openai_compatibilityTier 1 · 70% confidence
infrastructure-openai-compatibility-when-using-litellm-completion-with-model-gpt-5-min-484030b1
agent: infrastructure
When does this happen?
IF When using litellm.completion() with model 'gpt-5-mini' or 'gpt-5' and passing the `n` parameter (e.g., n=1), a BadRequestError occurs because the `n` parameter is incorrectly mapped to 'previous_response_id' in the completion-to-response conversion logic.
How others solved it
THEN Upgrade LiteLLM to the latest version where the PR that introduced this mapping was reverted. If an upgrade is not possible, temporarily set `litellm.model_cost['gpt-5-mini']['mode']='completions'` to bypass the response API conversion and use the older completions endpoint.
import litellm
litellm.model_cost["gpt-5-mini"]["mode"] = "completions"
response = completion(model="openai/gpt-5-mini", messages=[{"content": "Hello, how are you?","role": "user"}], n=1)Related patterns
gpu_compatibility
infrastructure-gpu-compatibility-when-running-gemma-2-with-flashinfer-on-an-nvidia--6f3f1857
Tier 1 · 70%
service_resilienceinfrastructure-service-resilience-clickhouse-is-unavailable-causing-trace-ingestion--59b25f81
Tier 1 · 70%
mypy_compatibilityinfrastructure-mypy-compatibility-mypy-reports-has-no-attribute-errors-on-trainer-or-fd61fa5e
Tier 1 · 70%
repo_structureinfrastructure-repo-structure-cloning-a-repository-fails-on-windows-because-a-di-c0798793
Tier 1 · 70%
provider_migrationinfrastructure-provider-migration-need-to-migrate-existing-openai-anthropic-or-googl-3e72218b
Tier 1 · 70%
streamable_http_race_conditioninfrastructure-streamable-http-race-closedresourceerror-in-handle-stateless-request-wh-6a21a92a
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.