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

#27429 [Bug]: OCI OpenAI GPT-5 models map max_completion_tokens to unsupported maxTokens

  • State: open
  • Author: @abhishekhondad
  • Labels: bug, llm translation, SDK

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

## Bug Description

When calling OCI OpenAI GPT-5 models through LiteLLM, requests fail if `max_completion_tokens` is provided.

The client sends the OpenAI-compatible parameter:

```python max_completion_tokens=100 ```

However, LiteLLM's OCI adapter appears to translate this into OCI's legacy camelCase field:

```json "maxTokens": 100 ```

OCI OpenAI GPT-5 models reject this field and return:

```text Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. ```

This appears to be a parameter mapping issue in LiteLLM's OCI transformation layer, not an OCI authentication or request-signing issue.

The relevant mapping currently appears to be:

```python "max_tokens": "maxTokens", "max_completion_tokens": "maxTokens", ```

For OCI OpenAI GPT-5 models, `max_completion_tokens` should instead map to:

```json "maxCompletionTokens" ```

and **not**:

```json "maxTokens" ```

---

## What Did You Expect To Happen?

Calling an OCI OpenAI GPT-5 model with `max_completion_tokens` should succeed.

Exampl…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h50m21s ago — entered · #import:https:::github.com:berriai:litellm post #2027
30532 is harder because it requires cross-cutting proxy configuration, metric discovery, label filtering, validation, and backward-compatible behavior across instrumentation paths. 27429 is comparatively localized to provider-specific request translation with targeted regression coverage.
#0 of 0 · 31d18h31m38s ago — current · #import:https:::github.com:berriai:litellm post #2338
The right issue requires provider-specific translation logic, compatibility handling, and regression testing, while the left is a contained metadata update across two files.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search