Skip to content

Fix outdated assertion

351475f
Select commit
Loading
Failed to load commit list.
Merged

feat(langchain): Broaden AI provider detection beyond OpenAI and Anthropic #5707

Fix outdated assertion
351475f
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-review completed Mar 25, 2026 in 2m 6s

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

See this annotation in the file changed.

@sentry-warden 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".