🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
feat: add ai.model.id parsing in otel processor (#10236)
Steffen Schmitz833b370db4bd
diff --git a/packages/shared/src/server/otel/OtelIngestionProcessor.ts b/packages/shared/src/server/otel/OtelIngestionProcessor.tsindex e611a7239c..72a07bd29a 100644--- a/packages/shared/src/server/otel/OtelIngestionProcessor.ts+++ b/packages/shared/src/server/otel/OtelIngestionProcessor.ts@@ -1730,6 +1730,7 @@ export class OtelIngestionProcessor {): string | undefined {const modelNameKeys = [LangfuseOtelSpanAttributes.OBSERVATION_MODEL,+ "ai.model.id","gen_ai.request.model","gen_ai.response.model","llm.response.model",diff --git a/web/src/__tests__/server/api/otel/otelMapping.servertest.ts b/web/src/__tests__/server/api/otel/otelMapping.servertest.tsindex 6100b4dfe2..8f873885d7 100644--- a/web/src/__tests__/server/api/otel/otelMapping.servertest.ts+++ b/web/src/__tests__/server/api/otel/otelMapping.servertest.ts@@ -1697,6 +1697,16 @@ describe("OTel Resource Span Mapping", () => {entityAttributeValue: "gpt-4",},],+ [+ "should extract providedModelName from ai.model.id",+ {+ entity: "observation",+ otelAttributeKey: "ai.model.id",+ otelAttributeValue: { stringValue: "gemini-embedding-001" },+ entityAttributeKey: "model",+ entityAttributeValue: "gemini-embedding-001",+ },+ ],["should extract providedModelName from llm.model_name",{