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

#31449 OCI provider: tool requests from coding agents fail — non-function tools hard-raise, complex function schemas rejected by OCI

  • State: open
  • Author: @cedi
  • Labels: llm translation, claude code

### What happened?

LiteLLM's OCI Generative AI provider (`oci/…`) is unusable with coding-agent clients (Codex via the Responses API, Claude Code via the Anthropic Messages API) because of how it handles tool definitions. We expose xAI Grok models served on OCI Generative AI through a LiteLLM proxy; plain chat works, but any request that carries tools fails.

There are two distinct failures, both in OCI tool handling:

**1. `adapt_tool_definition_to_oci_standard` hard-raises on any non-`function` tool.**

In `litellm/llms/oci/chat/generic.py`, the first thing the per-tool loop does is:

```python if tool["type"] != "function": raise OCIError(status_code=400, message="OCI only supports function tools") ```

Any tool whose `type` is not `"function"` aborts the **entire** request, rather than being skipped or translated. Clients that mix a built-in/server tool in with their function tools (e.g. Codex over the Responses API) can never reach the model, even though their function tools are perfectly valid. Confirmed this still raises on `main` as of filing.

Expectation: the adapter should pass `function` tools through and **skip** (or otherwise gracefully handle) tool types OCI doe…

GitHub resolver

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

Refresh page
vote history (4 events)
#0 of 0 · 31d18h35m12s ago — entered · #import:https:::github.com:berriai:litellm post #2295
31449 spans provider-specific request translation, multiple client/API tool formats, schema compatibility, graceful degradation semantics, and broader regression testing. 34633 is comparatively localized to proxy header validation/normalization and targeted transport tests.
The right-hand issue is harder because it spans provider-specific request adaptation, multiple client/API tool formats, unsupported tool semantics, schema compatibility, and regression coverage across several request paths. The left-hand issue is comparatively localized to preserving the selected deployment identity through cost and pricing lookup.
OCI integration requires broader provider-specific translation work, handling multiple request shapes and compatibility cases with higher regression risk. The budget-limiter issue is narrower and primarily involves correcting key scoping, updating related tests, and validating cache-window behavior.
#0 of 0 · 31d17h42m38s ago — current · #import:https:::github.com:berriai:litellm post #3179
The right issue is harder because it spans provider-specific request adaptation, tool-type compatibility, schema transformation, and regression coverage across multiple client protocols, while the left issue appears more localized to proxy image-generation request handling.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search