openai_wrapper_metadata_collisionTier 1 · 70% confidence
observability-openai-wrapper-metad-when-using-langfuse-s-openai-wrapper-with-store-tr-5da76270
agent: observability
When does this happen?
IF When using Langfuse's OpenAI wrapper with `store=True` for model distillation, the `metadata` parameter intended for OpenAI is intercepted by Langfuse and never forwarded to OpenAI, causing stored completions to lack filtering metadata.
How others solved it
THEN Upgrade to Langfuse Python SDK v2.56.0 or later, which passes `metadata` to OpenAI when `store=True`. If upgrading is not possible, use the native OpenAI client directly for operations requiring `metadata` and `store`, or introduce a custom parameter (e.g., `openai_metadata`) and manually map it in the call.
# Workaround: use native OpenAI client for calls needing metadata with store
from openai import OpenAI as NativeOpenAI
client = NativeOpenAI()
response = client.chat.completions.create(
messages=[...],
model="gpt-4o-mini",
metadata={"test": "test"},
store=True
)
# For tracing, wrap the call manually with Langfuse observe()Related patterns
otel_regression_span_processor
observability-otel-regression-span-using-phoenix-otel-register-with-auto-instrument-t-a6b71580
Tier 1 · 70%
tracing_disablingobservability-tracing-disabling-tracing-prompts-repeatedly-appear-during-crew-exec-15ec9c27
Tier 1 · 70%
async_generator_outputobservability-async-generator-outp-when-using-observe-on-an-async-generator-function--b87414ca
Tier 1 · 70%
trace_name_overwriteobservability-trace-name-overwrite-when-using-start-as-current-span-with-trace-contex-d131777c
Tier 1 · 70%
version_upgrade_bugobservability-version-upgrade-bug-using-arize-phoenix-otel-version-0-10-0-with-regis-794aa48f
Tier 1 · 70%
streaming_cost_trackingobservability-streaming-cost-track-streaming-api-calls-via-litellm-proxy-missing-cost-db149eb2
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.