Skip to content

Update main.py#5

Merged
ishaan-jaff merged 1 commit into
mainfrom
add-replicate
Jul 28, 2023
Merged

Update main.py#5
ishaan-jaff merged 1 commit into
mainfrom
add-replicate

Conversation

@ghost

@ghost ghost commented Jul 28, 2023

Copy link
Copy Markdown

No description provided.

@ishaan-jaff ishaan-jaff merged commit 2463dc2 into main Jul 28, 2023
@ghost ghost deleted the add-replicate branch July 28, 2023 21:21
@danilo26 danilo26 mentioned this pull request Apr 29, 2024
uc4w6c pushed a commit that referenced this pull request Jan 6, 2026
…error

fix: upgraded mcp sdk depency version for fixing ClosedResourceError
Harshit28j referenced this pull request in Harshit28j/litellm Mar 6, 2026
…il traces

- Remove redundant set_attributes() call from raw_gen_ai_request spans so they
  only contain provider-specific llm.{provider}.{param} attributes (Issue #3)
- Replace full set_attributes() on litellm_proxy_request with minimal attributes
  (model, call_type, response.id) when litellm_request child span exists (Issue #4)
- Skip guardrail span creation when no parent context exists to prevent orphaned
  root-level traces in the "All Spans" view (Issue #5)
- Fall back to litellm_call_id for gen_ai.response.id when response object has no
  id field (EmbeddingResponse, ImageResponse) (Issue BerriAI#8)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Harshit28j referenced this pull request in Harshit28j/litellm Mar 6, 2026
…onse IDs

Addresses 4 critical OpenTelemetry span issues in LiteLLM:

Issue #3: Remove redundant attributes from raw_gen_ai_request spans
- Removed self.set_attributes() call that was duplicating all parent span
  attributes (gen_ai.*, metadata.*) onto the raw span
- Raw span now only contains provider-specific llm.{provider}.* attributes
- Reduces storage and eliminates search confusion from duplicate data

Issue #4: Prevent attribute duplication on litellm_proxy_request parent span
- When litellm_request child span exists, removed redundant
  set_attributes() call on the parent proxy span
- Child span already carries all attributes; parent duplication doubles
  storage and complicates search

Issue #5: Fix orphaned guardrail traces
- Guardrail spans were created with context=None when no parent proxy span
  existed, resulting in orphaned root spans (separate trace_id)
- Added _resolve_guardrail_context() helper to ensure guardrails always
  have a valid parent (litellm_request or proxy span)
- Applied fix to both _handle_success and _handle_failure paths

Issue BerriAI#8: Add gen_ai.response.id for embeddings and image generation
- EmbeddingResponse and ImageResponse types don't have provider response IDs
- Added fallback to standard_logging_payload["id"] (litellm call ID) for
  correlation across LiteLLM UI, Phoenix traces, and provider logs
- Completions still use provider ID (e.g. "chatcmpl-xxx") when available

Tests added:
- TestRawSpanAttributeIsolation: Verify raw span has no gen_ai/metadata attrs
- TestNoParentSpanDuplication: Verify parent span doesn't get duplicated attrs
- TestGuardrailSpanParenting: Verify guardrails are children (not orphaned)
- TestResponseIdFallback: Verify response ID set for all call types

All existing OTEL tests pass (73 passed, 14 pre-existing protocol failures).

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
ghost pushed a commit that referenced this pull request Mar 18, 2026
docs: Learn page updates, card links, integrations, sidebar changes
This was referenced Mar 21, 2026
ishaan-berri pushed a commit that referenced this pull request Mar 31, 2026
- Gap #1: block key/update on jwt-bound keys for non-admins (403)
- Gap #2: stamp jwt_bound metadata + restrict allowed_routes on mapping creation
- Gap #3: /jwt_client/new unified endpoint — atomically creates key + mapping, returns cleartext key
- Gap #4: unregistered_jwt_client_behavior config (reject/fallback_team_mapping/auto_register)
- Gap #5: issuer column on LiteLLM_JWTKeyMapping for multi-IdP support
- Gap #6: /jwt/key/mapping/info and /jwt_client/update expose virtual key fields
- 31 unit tests covering all gaps
Sameerlite pushed a commit that referenced this pull request Apr 7, 2026
pghuge-cloudwiz added a commit to pghuge-cloudwiz/litellm that referenced this pull request May 13, 2026
…riAI#6 BerriAI#7

- Move MAVVRIK_EXPORT_INTERVAL_MINUTES/JOB_NAME to top-level imports (#3)
- Extract _schedule_job() helper to eliminate 3× duplicated scheduler
  registration blocks in initialize(), update_settings(), proxy_server.py (BerriAI#4)
- delete() now logs informatively on LookupError instead of bare pass (BerriAI#5)
- Logger.__init__ warns at startup if credentials are not configured (BerriAI#6)
- Rename _stream_pages/_stream_upload to stream_pages/stream_upload (BerriAI#7)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
tyh-carl added a commit to tyh-carl/litellm that referenced this pull request May 19, 2026
…-tab links

Compute a safeHref that only passes through http/https URLs to prevent
DOM-based XSS via tainted window.location data in href sinks (items BerriAI#4 and BerriAI#5).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…source_error

fix: upgraded mcp sdk depency version for fixing ClosedResourceError
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…onse IDs

Addresses 4 critical OpenTelemetry span issues in LiteLLM:

Issue BerriAI#3: Remove redundant attributes from raw_gen_ai_request spans
- Removed self.set_attributes() call that was duplicating all parent span
  attributes (gen_ai.*, metadata.*) onto the raw span
- Raw span now only contains provider-specific llm.{provider}.* attributes
- Reduces storage and eliminates search confusion from duplicate data

Issue BerriAI#4: Prevent attribute duplication on litellm_proxy_request parent span
- When litellm_request child span exists, removed redundant
  set_attributes() call on the parent proxy span
- Child span already carries all attributes; parent duplication doubles
  storage and complicates search

Issue BerriAI#5: Fix orphaned guardrail traces
- Guardrail spans were created with context=None when no parent proxy span
  existed, resulting in orphaned root spans (separate trace_id)
- Added _resolve_guardrail_context() helper to ensure guardrails always
  have a valid parent (litellm_request or proxy span)
- Applied fix to both _handle_success and _handle_failure paths

Issue BerriAI#8: Add gen_ai.response.id for embeddings and image generation
- EmbeddingResponse and ImageResponse types don't have provider response IDs
- Added fallback to standard_logging_payload["id"] (litellm call ID) for
  correlation across LiteLLM UI, Phoenix traces, and provider logs
- Completions still use provider ID (e.g. "chatcmpl-xxx") when available

Tests added:
- TestRawSpanAttributeIsolation: Verify raw span has no gen_ai/metadata attrs
- TestNoParentSpanDuplication: Verify parent span doesn't get duplicated attrs
- TestGuardrailSpanParenting: Verify guardrails are children (not orphaned)
- TestResponseIdFallback: Verify response ID set for all call types

All existing OTEL tests pass (73 passed, 14 pre-existing protocol failures).
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
docs: Learn page updates, card links, integrations, sidebar changes
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.

1 participant