8 views
-/https://github.com/berriai/litellm/issues/30444
GitHub · issue

#30444 Azure o-series and GPT-5 bypass api_version gating for tool_choice/response_format

  • State: open
  • Author: @Hexecu
  • Labels: llm translation

### What happened?

When routing Azure deployments, the `tool_choice` and `response_format` `api_version` gating that `AzureOpenAIConfig.map_openai_params` applies is silently bypassed for o-series (`o1`/`o3`/`o4`) and GPT-5 deployments.

`get_optional_params` doesn't pass `api_version` to the o-series and GPT-5 branches (only the default Azure branch receives it), and `AzureOpenAIO1Config` doesn't define `map_openai_params` at all, so it inherits the **OpenAI** mapper, which knows nothing about Azure's `api_version` rules.

As a result, two sibling Azure deployments behave differently for the exact same request:

- `tool_choice="required"` is rejected on Azure `api_version <= 2024-05-01` for `gpt-4.1`, but **forwarded unchanged** for `o1`/`o3-mini`/`gpt-5.x`. - `response_format` with a JSON schema is converted into a tool call on older `api_version`s for `gpt-4.1`, but **left as-is** for the o-series/GPT-5 deployments.

### Reproduction (deterministic, client-side via `get_optional_params`)

```python import litellm

tools = [{"type": "function", "function": {"name": "f", "parameters": {"type": "object", "properties": {}}}}]

# gpt-4.1 -> raises UnsupportedParamsError (correct: Az…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h52m45s ago — entered · #import:https:::github.com:berriai:litellm post #2979
The dashboard issue is harder because it spans frontend aggregation, backend attribution, API behavior, and end-to-end validation, whereas the Azure issue is comparatively contained within provider parameter translation and version-specific tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search