@@ -17,24 +17,24 @@ const AI_MODEL_PROVIDER = "ai.model.provider";
1717// Vendor mapping from AI SDK provider prefixes to standardized LLM_SYSTEM values
1818// Uses prefixes to match AI SDK patterns like "openai.chat", "anthropic.messages", etc.
1919const VENDOR_MAPPING : Record < string , string > = {
20- " openai" : "OpenAI" ,
21- " anthropic" : "Anthropic" ,
22- " cohere" : "Cohere" ,
23- " mistral" : "MistralAI" ,
24- " groq" : "Groq" ,
25- " replicate" : "Replicate" ,
26- " together" : "TogetherAI" ,
27- " fireworks" : "Fireworks" ,
28- " deepseek" : "DeepSeek" ,
29- " perplexity" : "Perplexity" ,
20+ openai : "OpenAI" ,
21+ anthropic : "Anthropic" ,
22+ cohere : "Cohere" ,
23+ mistral : "MistralAI" ,
24+ groq : "Groq" ,
25+ replicate : "Replicate" ,
26+ together : "TogetherAI" ,
27+ fireworks : "Fireworks" ,
28+ deepseek : "DeepSeek" ,
29+ perplexity : "Perplexity" ,
3030 "amazon-bedrock" : "AWS" ,
31- " bedrock" : "AWS" ,
32- " azure" : "Azure" ,
33- " google" : "Google" ,
34- " vertex" : "Google" ,
35- " ollama" : "Ollama" ,
36- " huggingface" : "HuggingFace" ,
37- " openrouter" : "OpenRouter" ,
31+ bedrock : "AWS" ,
32+ azure : "Azure" ,
33+ google : "Google" ,
34+ vertex : "Google" ,
35+ ollama : "Ollama" ,
36+ huggingface : "HuggingFace" ,
37+ openrouter : "OpenRouter" ,
3838} ;
3939
4040export const transformAiSdkSpanName = ( span : ReadableSpan ) : void => {
@@ -110,7 +110,7 @@ export const calculateTotalTokens = (attributes: Record<string, any>): void => {
110110export const transformVendor = ( attributes : Record < string , any > ) : void => {
111111 if ( AI_MODEL_PROVIDER in attributes ) {
112112 const vendor = attributes [ AI_MODEL_PROVIDER ] ;
113-
113+
114114 // Find matching vendor prefix in mapping
115115 let mappedVendor = null ;
116116 if ( vendor && vendor . length > 0 ) {
@@ -121,7 +121,7 @@ export const transformVendor = (attributes: Record<string, any>): void => {
121121 }
122122 }
123123 }
124-
124+
125125 attributes [ SpanAttributes . LLM_SYSTEM ] = mappedVendor || vendor ;
126126 delete attributes [ AI_MODEL_PROVIDER ] ;
127127 }
0 commit comments