18 views
-/https://github.com/berriai/litellm/issues/22195
GitHub · issue

#22195 [Bug]: Anthropic client requests not displaying correctly in Logs View v2

  • State: open
  • Author: @RussellLuo
  • Labels: bug, proxy, llm translation, claude code

### Check for existing issues

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

### What happened?

## Problem

When using the Anthropic client SDK with LiteLLM proxy, the Logs View v2 UI fails to properly display Request & Response and Tools information.

<img width="1596" height="978" alt="Image" src="https://github.com/user-attachments/assets/a35a6ee0-b7d0-49d3-983b-a35e79cbcfc3" />

<img width="1598" height="1432" alt="Image" src="https://github.com/user-attachments/assets/ba141654-da31-4f7d-ac71-a0d024b65e7d" />

## Root Cause

Anthropic's native API format differs from OpenAI's format in two key areas: 1. **System messages**: Anthropic uses a separate `system` field, while OpenAI includes system messages in the `messages` array 2. **Tools**: Anthropic uses `input_schema` for tool parameters, while OpenAI uses `function.parameters`

When these requests are stored in spend logs without transformation, the UI (built for OpenAI format) cannot parse and display them correctly.

## Expected Behavior

- Request & Response section should display all messages including system prompts - Tools section should show tool definitions with their parame…

GitHub resolver

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

Refresh page
vote history (8 events)
#0 of 0 · 31d19h13m58s ago — entered · #import:https:::github.com:berriai:litellm post #1646
22195 spans proxy serialization, Anthropic/OpenAI schema normalization, log persistence, and Logs View v2 rendering, requiring cross-layer changes and broader regression coverage. 30825 is comparatively localized to callback metadata modeling and credential isolation, though it may require compatibility adjustments.
The right issue is harder because it spans proxy log serialization, provider-specific schema normalization, and multiple Logs View UI rendering paths, requiring broader cross-layer testing. The left issue is comparatively localized to authentication-aware MCP health-check execution and targeted backend tests.
The right-side issue is harder because it likely spans request normalization, persisted log schema compatibility, and Logs View rendering, with regression risk across multiple client formats. The left-side issue is more contained to MCP outcome classification and logging metadata.
Issue 31181 is substantially harder: it spans data modeling, CRUD/API contracts, persistence, authorization and routing integration, UI surfaces, analytics queries, logging, and validation, with significant compatibility and migration risk. Issue 22195 is narrower, primarily involving format normalization and targeted rendering changes in the logs workflow.
The right-side work is harder because it spans provider-specific data normalization, persisted log representations, UI parsing, and compatibility testing, while the left-side work is comparatively localized to a workflow script’s JSON handling.
The Logs View issue is harder because it likely spans request/response normalization, persisted log schemas, tool rendering, and frontend compatibility, requiring broader cross-layer testing. The billing issue is comparatively localized to passthrough usage propagation and pricing calculation with focused regression coverage.
Issue 22195 is harder because it spans request/response normalization, logging persistence, schema compatibility, and frontend rendering with broader regression and test coverage risk; issue 28019 is a localized routing lookup correction.
#0 of 0 · 31d17h59m35s ago — current · #import:https:::github.com:berriai:litellm post #2871
Issue 22195 is harder because it crosses proxy log normalization, data-model compatibility, and Logs View rendering, with broader integration and regression risk. Issue 27144 is comparatively localized to an event-handling path and its streaming reconstruction tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search