@@ -104,7 +104,10 @@ function buildObservationFingerprint(params: {
104104 return getApiErrorPayloadFingerprint ( params . raw ) ;
105105}
106106
107- export function buildApiErrorObservationFields ( rawError ?: string ) : {
107+ export function buildApiErrorObservationFields (
108+ rawError ?: string ,
109+ opts ?: { provider ?: string } ,
110+ ) : {
108111 rawErrorPreview ?: string ;
109112 rawErrorHash ?: string ;
110113 rawErrorFingerprint ?: string ;
@@ -146,6 +149,7 @@ export function buildApiErrorObservationFields(rawError?: string): {
146149 providerRuntimeFailureKind : classifyProviderRuntimeFailureKind ( {
147150 status : parsed ?. httpCode ? Number ( parsed . httpCode ) : undefined ,
148151 message : trimmed ,
152+ provider : opts ?. provider ,
149153 } ) ,
150154 providerErrorType : parsed ?. type ,
151155 providerErrorMessagePreview : truncateForObservation (
@@ -159,7 +163,10 @@ export function buildApiErrorObservationFields(rawError?: string): {
159163 }
160164}
161165
162- export function buildTextObservationFields ( text ?: string ) : {
166+ export function buildTextObservationFields (
167+ text ?: string ,
168+ opts ?: { provider ?: string } ,
169+ ) : {
163170 textPreview ?: string ;
164171 textHash ?: string ;
165172 textFingerprint ?: string ;
@@ -169,7 +176,7 @@ export function buildTextObservationFields(text?: string): {
169176 providerErrorMessagePreview ?: string ;
170177 requestIdHash ?: string ;
171178} {
172- const observed = buildApiErrorObservationFields ( text ) ;
179+ const observed = buildApiErrorObservationFields ( text , opts ) ;
173180 return {
174181 textPreview : observed . rawErrorPreview ,
175182 textHash : observed . rawErrorHash ,
0 commit comments