Skip to content

[Fix] 404 Not Found on /api/event_logging/batch endpoint - #20504

Merged
ishaan-jaff merged 3 commits into
mainfrom
litellm_fix_event_logging
Feb 5, 2026
Merged

[Fix] 404 Not Found on /api/event_logging/batch endpoint #20504
ishaan-jaff merged 3 commits into
mainfrom
litellm_fix_event_logging

Conversation

@ishaan-jaff

@ishaan-jaff ishaan-jaff commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

[Fix] 404 Not Found on /api/event_logging/batch endpoint

fixes: #19740

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🐛 Bug Fix
✅ Test

Changes

@vercel

vercel Bot commented Feb 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 5, 2026 6:24pm

Request Review

@greptile-apps

greptile-apps Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR fixes 404 errors from Claude Code clients by adding a stubbed /api/event_logging/batch endpoint that accepts telemetry data but doesn't process it.

Key changes:

  • Added event_logging_batch() endpoint in litellm/proxy/anthropic_endpoints/endpoints.py that returns {"status": "ok"}
  • Added _last_semantic_filter_config field to ProxyConfig class for caching semantic filter configuration
  • Added OpenRouter Qwen3-235B model configurations to model pricing data

The new endpoint is lightweight and follows the existing pattern of stubbed endpoints. The implementation correctly avoids creating database objects or Router instances in the request path.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward and low-risk: a simple stubbed endpoint that returns a static response, a caching field addition, and model configuration updates. No logic changes to existing functionality.
  • No files require special attention

Important Files Changed

Filename Overview
litellm/proxy/anthropic_endpoints/endpoints.py Added stubbed /api/event_logging/batch endpoint to prevent 404 errors from Claude Code clients
litellm/proxy/proxy_server.py Added _last_semantic_filter_config field to cache semantic filter configuration

Sequence Diagram

sequenceDiagram
    participant Client as Claude Code Client
    participant Proxy as LiteLLM Proxy
    participant Router as Anthropic Router
    participant Endpoint as event_logging_batch

    Client->>Proxy: POST /api/event_logging/batch
    Note over Client: Sends telemetry data
    Proxy->>Router: Route request
    Router->>Endpoint: Handle event_logging_batch()
    Note over Endpoint: Stubbed endpoint<br/>No processing
    Endpoint-->>Router: {"status": "ok"}
    Router-->>Proxy: Return response
    Proxy-->>Client: 200 OK {"status": "ok"}
    Note over Client: No 404 error
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ishaan-jaff
ishaan-jaff merged commit d2bd029 into main Feb 5, 2026
54 of 64 checks passed
songkuan-zheng added a commit to GhishaDev/litellm that referenced this pull request Jun 17, 2026
The proxy-infra component-allowlist test on this PR's CI was failing
with /api/event_logging/batch missing from both gateway and backend
allowlists. The route comes from upstream commit d2bd029 (PR BerriAI#20504),
not from this PR's diff, but the union-coverage test fails on every fork
PR that rebases onto internal_staging.

Add the route to GATEWAY_EXACT_PATHS: it's a stub Anthropic event-logging
endpoint that Claude Code clients hit as part of the /v1/messages data
path (the endpoint's own docstring describes it as preventing 404s from
Claude Code telemetry), so it belongs on the gateway component, not the
control-plane backend.

Drive-by because this PR's CI surfaced it; happy to extract to a separate
PR if the maintainer prefers.
songkuan-zheng added a commit to GhishaDev/litellm that referenced this pull request Jun 19, 2026
The proxy-infra component-allowlist test on this PR's CI was failing
with /api/event_logging/batch missing from both gateway and backend
allowlists. The route comes from upstream commit d2bd029 (PR BerriAI#20504),
not from this PR's diff, but the union-coverage test fails on every fork
PR that rebases onto internal_staging.

Add the route to GATEWAY_EXACT_PATHS: it's a stub Anthropic event-logging
endpoint that Claude Code clients hit as part of the /v1/messages data
path (the endpoint's own docstring describes it as preventing 404s from
Claude Code telemetry), so it belongs on the gateway component, not the
control-plane backend.

Drive-by because this PR's CI surfaced it; happy to extract to a separate
PR if the maintainer prefers.
songkuan-zheng added a commit to GhishaDev/litellm that referenced this pull request Jun 22, 2026
The proxy-infra component-allowlist test on this PR's CI was failing
with /api/event_logging/batch missing from both gateway and backend
allowlists. The route comes from upstream commit d2bd029 (PR BerriAI#20504),
not from this PR's diff, but the union-coverage test fails on every fork
PR that rebases onto internal_staging.

Add the route to GATEWAY_EXACT_PATHS: it's a stub Anthropic event-logging
endpoint that Claude Code clients hit as part of the /v1/messages data
path (the endpoint's own docstring describes it as preventing 404s from
Claude Code telemetry), so it belongs on the gateway component, not the
control-plane backend.

Drive-by because this PR's CI surfaced it; happy to extract to a separate
PR if the maintainer prefers.
songkuan-zheng added a commit to GhishaDev/litellm that referenced this pull request Jun 23, 2026
The proxy-infra component-allowlist test on this PR's CI was failing
with /api/event_logging/batch missing from both gateway and backend
allowlists. The route comes from upstream commit d2bd029 (PR BerriAI#20504),
not from this PR's diff, but the union-coverage test fails on every fork
PR that rebases onto internal_staging.

Add the route to GATEWAY_EXACT_PATHS: it's a stub Anthropic event-logging
endpoint that Claude Code clients hit as part of the /v1/messages data
path (the endpoint's own docstring describes it as preventing 404s from
Claude Code telemetry), so it belongs on the gateway component, not the
control-plane backend.

Drive-by because this PR's CI surfaced it; happy to extract to a separate
PR if the maintainer prefers.
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
* fix typing

* add event_logging_batch

* TestEventLoggingBatchEndpoint
songkuan-zheng added a commit to GhishaDev/litellm that referenced this pull request Jun 27, 2026
The proxy-infra component-allowlist test on this PR's CI was failing
with /api/event_logging/batch missing from both gateway and backend
allowlists. The route comes from upstream commit d2bd029 (PR BerriAI#20504),
not from this PR's diff, but the union-coverage test fails on every fork
PR that rebases onto internal_staging.

Add the route to GATEWAY_EXACT_PATHS: it's a stub Anthropic event-logging
endpoint that Claude Code clients hit as part of the /v1/messages data
path (the endpoint's own docstring describes it as preventing 404s from
Claude Code telemetry), so it belongs on the gateway component, not the
control-plane backend.

Drive-by because this PR's CI surfaced it; happy to extract to a separate
PR if the maintainer prefers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 404 Not Found on /api/event_logging/batch endpoint

1 participant