feat(langchain): Broaden AI provider detection beyond OpenAI and Anthropic #5707
1 issue
code-review: Found 1 issue (1 medium)
Medium
Breaking change in gen_ai.system values without migration guidance - `sentry_sdk/integrations/langchain.py:458-460`
The refactored _get_ai_system() now returns raw LangChain _type values (e.g., "openai-chat", "anthropic-chat") instead of normalized provider names ("openai", "anthropic"). This breaks backwards compatibility for users querying Sentry data with filters like gen_ai.system:openai. Additionally, there's now inconsistency across integrations: direct OpenAI integration reports "openai" while LangChain+OpenAI reports "openai-chat".
Duration: 2m 5s · Tokens: 789.5k in / 8.6k out · Cost: $1.54 (+extraction: $0.00)
Annotations
Check warning on line 460 in sentry_sdk/integrations/langchain.py
sentry-warden / warden: code-review
Breaking change in gen_ai.system values without migration guidance
The refactored `_get_ai_system()` now returns raw LangChain `_type` values (e.g., "openai-chat", "anthropic-chat") instead of normalized provider names ("openai", "anthropic"). This breaks backwards compatibility for users querying Sentry data with filters like `gen_ai.system:openai`. Additionally, there's now inconsistency across integrations: direct OpenAI integration reports "openai" while LangChain+OpenAI reports "openai-chat".