@alvin0/ai-agent-sdk-provider-http 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GenerateOptions, ModelAdapter, ModelError, ModelFailure, ModelInfo, ModelInvocationContext, ModelModality, ModelReasoningInfo, NativeToolName, PreparedAdapterCall, ProviderInfo, ProviderRequestId, ResolvedModelInfo, ResolvedRetryPolicy, RetryPolicyConfig, StreamChunk, UsageCounters } from "@alvin0/ai-agent-sdk-core";
1
+ import { GenerateOptions, ModelAdapter, ModelCatalogOptions, ModelCatalogSnapshot, ModelContext, ModelError, ModelFailure, ModelInfo, ModelInvocationContext, ModelModality, ModelReasoningInfo, NativeToolName, PreparedAdapterCall, ProviderInfo, ProviderRequestId, ResolvedModelInfo, ResolvedRetryPolicy, RetryPolicyConfig, StreamChunk, UsageCounters } from "@alvin0/ai-agent-sdk-core";
2
2
  import { CredentialInput, GenerateOptions as GenerateOptions$1, ModelInvocationContext as ModelInvocationContext$1, ResolvedModelInfo as ResolvedModelInfo$1, RetryPolicyConfig as RetryPolicyConfig$1, StreamChunk as StreamChunk$1, UsageCounters as UsageCounters$1 } from "@alvin0/ai-agent-sdk-core/provider";
3
3
  import { EmbeddingModelInfo, EmbeddingNormalization, EmbeddingPurposeHandling, ResolvedEmbeddingModelInfo } from "@alvin0/ai-agent-sdk-core/embedding";
4
4
  //#region src/stream/sse.d.ts
@@ -78,6 +78,10 @@ interface HttpTransportConnection {
78
78
  readonly headers: Readonly<Record<string, string>>;
79
79
  /** Auth-produced names that must be redacted regardless of spelling. */
80
80
  readonly sensitiveHeaderNames?: readonly string[];
81
+ /** Auth-produced query-string parameters (`auth: [{ kind: 'query', ... }]`), merged onto the request path. */
82
+ readonly queryOverrides?: Readonly<Record<string, string>>;
83
+ /** Names in {@link queryOverrides} that must be redacted in logs. */
84
+ readonly sensitiveQueryParamNames?: readonly string[];
81
85
  /** End-to-end request/stream timeout. */
82
86
  readonly requestTimeoutMs?: number;
83
87
  /** Maximum serialized outbound request bytes. */
@@ -185,7 +189,11 @@ interface ProviderCatalogModel {
185
189
  maxTokens?: number;
186
190
  /** Default output budget, independently of the ceiling. Falls back to maxTokens. */
187
191
  defaultMaxTokens?: number;
188
- /** Accepted request modalities; omission is treated as text-only. */
192
+ /**
193
+ * Accepted request modalities. Omission is UNKNOWN, not text-only — the
194
+ * registry fills the SDK's own permissive default (text + image + document)
195
+ * when neither this nor a runtime default names one. See RuntimeDefaults.
196
+ */
189
197
  inputModalities?: readonly ModelModality[];
190
198
  /** Modalities this model route may return. */
191
199
  outputModalities?: readonly ModelModality[];
@@ -193,6 +201,10 @@ interface ProviderCatalogModel {
193
201
  nativeTools?: readonly NativeToolName[];
194
202
  /** Reasoning levels this model offers, when any. */
195
203
  reasoning?: ModelReasoningInfo;
204
+ /** Extra headers for requests to this exact model; wins over the route's own, loses to the agent's. */
205
+ headers?: Readonly<Record<string, string>>;
206
+ /** Fields to deep-merge into the body for requests to this exact model; wins over the route's own, loses to the agent's. */
207
+ body?: Readonly<Record<string, unknown>>;
196
208
  }
197
209
  /**
198
210
  * Everything needed to issue ONE generation request, captured as a single snapshot.
@@ -217,10 +229,18 @@ interface HttpConnection extends HttpTransportConnection {
217
229
  readonly maxSseEventChars?: number;
218
230
  /** Advisory catalog; requests are never restricted to it. */
219
231
  readonly models: readonly ProviderCatalogModel[];
220
- /** Output cap applied when neither the caller nor the model entry names one. */
221
- readonly defaultMaxTokens: number;
222
- /** Context capacity used when the selected model has no exact value. */
223
- readonly defaultContextWindow: number;
232
+ /**
233
+ * Output cap applied when neither the caller nor the model entry names one.
234
+ * Absent means this ROUTE names no default either — the registry's own
235
+ * RuntimeDefaults tier may still fill it; if nothing does, no cap is sent.
236
+ */
237
+ readonly defaultMaxTokens?: number;
238
+ /**
239
+ * Context capacity used when the selected model has no exact value. Absent
240
+ * means this route names no default either — the registry's own
241
+ * RuntimeDefaults/SDK-constant tier fills it instead of this connection.
242
+ */
243
+ readonly defaultContextWindow?: number;
224
244
  }
225
245
  /** What {@link HttpModelAdapter.buildBody} and `translate` receive. */
226
246
  interface ProviderRequest {
@@ -230,8 +250,17 @@ interface ProviderRequest {
230
250
  readonly model: ResolvedModelInfo;
231
251
  /** The connection snapshot this call is bound to. */
232
252
  readonly connection: HttpConnection;
233
- /** Output cap to send; always resolved to a number, which some APIs require. */
234
- readonly maxTokens: number;
253
+ /**
254
+ * Output cap to send. Absent when neither the caller, the model, nor the
255
+ * route names one — an endpoint that requires the field regardless (such as
256
+ * Anthropic's Messages API) supplies its own fallback at the protocol layer,
257
+ * not here.
258
+ */
259
+ readonly maxTokens?: number;
260
+ /** Stable code-owned agent identity, when this call belongs to one and the caller supplied it. */
261
+ readonly agentId?: string;
262
+ /** The agent's own body fields, when it configured one. Merged in by `buildBody`, agent wins over the route. */
263
+ readonly providerOptionsBody?: Readonly<Record<string, unknown>>;
235
264
  }
236
265
  /**
237
266
  * One exact wire request observed immediately before the shared pipeline calls `fetch`.
@@ -259,6 +288,37 @@ interface ProviderRequestLogRecord {
259
288
  * @deprecated High-risk compatibility diagnostics; prefer structured observation.
260
289
  */
261
290
  type ProviderRequestLogger = (record: ProviderRequestLogRecord) => Promise<void> | void;
291
+ /**
292
+ * The provider's exact wire answer to one streamed call, observed once the
293
+ * stream ends (successfully, with an error, or aborted).
294
+ *
295
+ * The counterpart {@link ProviderRequestLogRecord} misses entirely: a trace
296
+ * that shows what went OUT but not what came BACK still leaves "did the
297
+ * provider actually receive this the way I meant it" unanswered from the
298
+ * response alone. `frames` is every decoded SSE event in arrival order,
299
+ * BEFORE this provider's own `translate()` reshapes them into the SDK's
300
+ * neutral `StreamChunk`s — this is the provider's own vocabulary
301
+ * (`response.output_text.delta`, `content_block_delta`, …), not a
302
+ * lossy summary of it.
303
+ */
304
+ interface ProviderResponseLogRecord {
305
+ /** Version of this durable/debug record shape. */
306
+ readonly schemaVersion: 1;
307
+ readonly type: 'provider-response';
308
+ /** Same value as the matching {@link ProviderRequestLogRecord.id}. */
309
+ readonly id: string;
310
+ readonly timestamp: string;
311
+ readonly provider: string;
312
+ readonly model: string;
313
+ readonly status: number;
314
+ /** Response headers; redacted the same way as the request's. */
315
+ readonly headers: Readonly<Record<string, string>>;
316
+ readonly providerRequestId?: string;
317
+ /** Every decoded SSE frame, in arrival order. May contain the full answer. */
318
+ readonly frames: readonly SseEvent[];
319
+ }
320
+ /** Optional observer for exact provider-wire responses. */
321
+ type ProviderResponseLogger = (record: ProviderResponseLogRecord) => Promise<void> | void;
262
322
  /** Base for every HTTP provider adapter in this package. */
263
323
  declare abstract class HttpModelAdapter extends ModelAdapter {
264
324
  /** Human-readable provider name reported by {@link providerInfo}. */
@@ -270,8 +330,12 @@ declare abstract class HttpModelAdapter extends ModelAdapter {
270
330
  * credential here, together with the endpoint.
271
331
  * @param provider - the route being served.
272
332
  * @param signal - cancellation for any I/O this resolution performs.
333
+ * @param context - correlation/accounting context, when the caller has one.
334
+ * @param model - the exact model id, when the caller already knows it (absent
335
+ * for `listModels()`, which resolves a connection before any one model is
336
+ * chosen).
273
337
  */
274
- protected abstract connect(provider: string, signal?: AbortSignal, context?: ModelInvocationContext): Promise<HttpConnection>;
338
+ protected abstract connect(provider: string, signal?: AbortSignal, context?: ModelInvocationContext, model?: string): Promise<HttpConnection>;
275
339
  /** Path appended to {@link HttpConnection.baseUrl}, e.g. `/v1/messages`. */
276
340
  protected abstract endpointPath(request: ProviderRequest): string;
277
341
  /** Convert the normalized request into this provider's wire JSON. */
@@ -297,6 +361,15 @@ declare abstract class HttpModelAdapter extends ModelAdapter {
297
361
  * @deprecated High-risk compatibility diagnostics; prefer structured observation.
298
362
  */
299
363
  protected observeRequest(_record: ProviderRequestLogRecord): Promise<void> | void;
364
+ /**
365
+ * Observe the exact, header-redacted wire response once a stream ends.
366
+ *
367
+ * The default is a no-op so library users do not silently persist model
368
+ * output. Fired best-effort from a `finally`, after the consumer has
369
+ * already seen every chunk — a slow or failing sink here can neither delay
370
+ * nor break the real call.
371
+ */
372
+ protected observeResponse(_record: ProviderResponseLogRecord): Promise<void> | void;
300
373
  /**
301
374
  * Map a non-2xx response to a stable code. Override only to add codes this
302
375
  * provider reports that the shared mapping cannot infer from the status.
@@ -343,6 +416,8 @@ declare abstract class HttpModelAdapter extends ModelAdapter {
343
416
  * @returns the provider's chunks, with incomplete usage held back.
344
417
  */
345
418
  private decodeSse;
419
+ /** Best-effort delivery of one response record; see `observeResponse`'s doc comment. */
420
+ private emitResponseLog;
346
421
  private prepareWireBody;
347
422
  }
348
423
  //#endregion
@@ -407,7 +482,9 @@ interface ModelContextPolicyOptions {
407
482
  readonly models?: readonly ProviderCatalogModel[];
408
483
  readonly defaultContextWindow?: number;
409
484
  }
410
- declare function applyModelContextPolicy(info: ResolvedModelInfo, policy: ModelContextPolicy | undefined, configured?: ProviderCatalogModel, providerOverride?: number): ResolvedModelInfo;
485
+ declare function applyModelContextPolicy(info: Omit<ResolvedModelInfo, 'context'> & {
486
+ readonly context?: Partial<ModelContext>;
487
+ }, policy: ModelContextPolicy | undefined, configured?: ProviderCatalogModel, providerOverride?: number): ResolvedModelInfo;
411
488
  /** Capture configuration so later caller mutations cannot change model resolution. */
412
489
  declare function createModelContextPolicy(policies: Readonly<Record<string, ModelContextPolicy>>, models: readonly ProviderCatalogModel[] | undefined, providerOverride?: number): (info: ResolvedModelInfo) => ResolvedModelInfo;
413
490
  //#endregion
@@ -420,6 +497,7 @@ declare const HTTP_PROVIDER_ERROR_CODES: Readonly<{
420
497
  readonly HEADER_INVALID: 'HTTP_HEADER_INVALID';
421
498
  readonly HEADER_RESERVED: 'HTTP_HEADER_RESERVED';
422
499
  readonly HEADER_COLLISION: 'HTTP_HEADER_COLLISION';
500
+ readonly QUERY_INVALID: 'HTTP_QUERY_INVALID';
423
501
  readonly WIRE_BODY_INVALID: 'HTTP_WIRE_BODY_INVALID';
424
502
  readonly WIRE_BODY_TOO_LARGE: 'HTTP_WIRE_BODY_TOO_LARGE';
425
503
  readonly STREAM_MEDIA_TYPE_INVALID: 'HTTP_STREAM_MEDIA_TYPE_INVALID';
@@ -443,7 +521,13 @@ interface ProtocolRequest {
443
521
  readonly options: GenerateOptions$1;
444
522
  readonly model: ResolvedModelInfo$1;
445
523
  readonly connection: HttpConnection;
446
- readonly maxTokens: number;
524
+ /**
525
+ * Output cap to send. Absent when neither the caller, the model, nor the
526
+ * route names one; an endpoint that requires the field regardless (such as
527
+ * Anthropic's Messages API) supplies its own fallback in its own protocol
528
+ * package, not here.
529
+ */
530
+ readonly maxTokens?: number;
447
531
  }
448
532
  /** Versioned executable protocol accepted by the runtime HTTP adapter. */
449
533
  interface RuntimeWireProtocol<Dialect extends object> {
@@ -525,6 +609,25 @@ type AnyWireProtocol = WireProtocol<never>;
525
609
  */
526
610
  declare function resolveDialect<Dialect extends object>(protocol: WireProtocol<Dialect>, overrides: Partial<Dialect> | undefined): Dialect;
527
611
  //#endregion
612
+ //#region src/common/endpoint-headers.d.ts
613
+ /**
614
+ * What a context-aware `headers` function receives.
615
+ *
616
+ * No `model` here: headers resolve once per connection at `connect()` time,
617
+ * which a route may reuse across several models — carrying `model` would
618
+ * imply a per-request guarantee this layer cannot make. `transformRequest`'s
619
+ * `RequestContext` is the place for a model-scoped hook.
620
+ */
621
+ interface HeaderContext {
622
+ /** Registered provider route. */
623
+ readonly provider: string;
624
+ /** Stable code-owned agent identity, when this call belongs to one and the caller supplied it. */
625
+ readonly agentId?: string;
626
+ readonly signal?: AbortSignal;
627
+ }
628
+ /** Capture custom endpoint headers per operation, rejecting reserved names and collisions. */
629
+ declare function endpointHeaders(headers: Readonly<Record<string, string>> | ((ctx: HeaderContext) => Readonly<Record<string, string>>) | undefined, defaults?: Readonly<Record<string, string>>): (ctx: HeaderContext) => Readonly<Record<string, string>>;
630
+ //#endregion
528
631
  //#region src/configurable/http-provider.d.ts
529
632
  /** A credential, either literal or resolved per operation. */
530
633
  type CredentialSource = string | ((signal?: AbortSignal, context?: ModelInvocationContext) => string | Promise<string>);
@@ -557,7 +660,28 @@ type AuthScheme =
557
660
  {
558
661
  kind: 'dynamic';
559
662
  resolve: (signal?: AbortSignal, context?: ModelInvocationContext, provider?: string) => Record<string, string> | Promise<Record<string, string>>;
663
+ } |
664
+ /**
665
+ * A named query-string parameter, e.g. Azure's `?key=`. Never a header —
666
+ * the value reaches the URL instead — but still resolved alongside every
667
+ * other scheme and still redacted in logs by name.
668
+ */
669
+ {
670
+ kind: 'query';
671
+ name: string;
672
+ value: CredentialSource;
673
+ label?: string;
560
674
  };
675
+ /** What `transformRequest` sees alongside the body. */
676
+ interface RequestContext {
677
+ /** Registered provider route. */
678
+ readonly provider: string;
679
+ /** Exact model id for this call. */
680
+ readonly model: string;
681
+ /** Stable code-owned agent identity, when this call belongs to one and the caller supplied it. */
682
+ readonly agentId?: string;
683
+ readonly signal?: AbortSignal;
684
+ }
561
685
  /** What a model-discovery hook receives. */
562
686
  interface ModelDiscoveryContext {
563
687
  /** The endpoint base, with no trailing slash. */
@@ -582,16 +706,46 @@ interface HttpProviderOptions<Dialect extends object> {
582
706
  allowInsecureHttp?: boolean;
583
707
  /** Captured fetch implementation for tests, custom runtimes, and transport policy. */
584
708
  fetch?: typeof globalThis.fetch;
585
- /** How to authenticate. */
586
- auth: AuthScheme;
709
+ /**
710
+ * How to authenticate. An array resolves every scheme and unions their
711
+ * headers — a gateway key alongside an upstream key, for instance. Each
712
+ * entry's headers are marked sensitive and redacted in logs; two entries
713
+ * producing the same header name fail fast, before either credential
714
+ * resolves.
715
+ */
716
+ auth: AuthScheme | readonly AuthScheme[];
587
717
  /**
588
718
  * Per-endpoint protocol knobs, merged over the protocol's defaults.
589
719
  *
590
720
  * Partial, so a protocol can gain a knob without any endpoint needing an edit.
591
721
  */
592
722
  dialect?: Partial<Dialect>;
593
- /** Extra static headers, or a resolver for them. */
594
- headers?: Record<string, string> | (() => Record<string, string>);
723
+ /** Extra static headers, or a resolver receiving `{ provider, agentId?, signal? }`. */
724
+ headers?: Record<string, string> | ((ctx: HeaderContext) => Record<string, string>);
725
+ /**
726
+ * Override the request path every protocol would otherwise pick for itself
727
+ * (e.g. an Azure OpenAI deployment path). Applies uniformly to every request
728
+ * this endpoint sends; a protocol's own default stays in force when unset.
729
+ */
730
+ path?: string;
731
+ /**
732
+ * Extra query-string parameters, or a resolver for them (e.g. Azure's
733
+ * `api-version`). Never for secrets — a value here is NOT redacted in logs;
734
+ * put a credential in `auth` instead.
735
+ */
736
+ query?: Record<string, string> | (() => Record<string, string>);
737
+ /**
738
+ * Fields to deep-merge into the serialized body, route-wide. The caller's
739
+ * value always wins, even over a field the SDK set (`model`, `max_tokens`,
740
+ * `reasoning`, `stream`, …) — decision 12. A `null` value deletes the field.
741
+ */
742
+ body?: Readonly<Record<string, unknown>>;
743
+ /**
744
+ * Last-resort hook with full authority over the body, run after `body` is
745
+ * merged in and right before the request is sent (and logged). Prefer
746
+ * `body` when a deep-merge already says what you mean.
747
+ */
748
+ transformRequest?: (body: unknown, ctx: RequestContext) => unknown;
595
749
  /**
596
750
  * Advisory model catalog.
597
751
  *
@@ -665,6 +819,14 @@ interface HttpProviderOptions<Dialect extends object> {
665
819
  * @deprecated High-risk compatibility bridge. Prefer structured observation.
666
820
  */
667
821
  requestLogger?: ProviderRequestLogger;
822
+ /**
823
+ * Observe the exact, header-redacted wire response once a stream ends.
824
+ * `frames` is every decoded SSE event in this provider's own vocabulary,
825
+ * before `translate()` reshapes it — the counterpart `requestLogger` is
826
+ * missing entirely, and without it a trace can show what went out but not
827
+ * what came back.
828
+ */
829
+ responseLogger?: ProviderResponseLogger;
668
830
  }
669
831
  /**
670
832
  * Create a provider adapter from configuration.
@@ -673,6 +835,39 @@ interface HttpProviderOptions<Dialect extends object> {
673
835
  */
674
836
  declare function createHttpProvider<Dialect extends object>(options: HttpProviderOptions<Dialect>): HttpModelAdapter;
675
837
  //#endregion
838
+ //#region src/configurable/field-fallback.d.ts
839
+ interface FieldFallbackOptions {
840
+ /**
841
+ * Tests one dispatch failure to decide whether the optional field caused
842
+ * it. Consulted only up to the first `true`: once the fallback trips, this
843
+ * adapter instance never tries the field again, so a persistently failing
844
+ * route costs one extra round trip total, not one per call.
845
+ */
846
+ readonly isFieldRejection: (error: unknown) => boolean;
847
+ }
848
+ /**
849
+ * Delegates to `withField` until a dispatch fails in a way
850
+ * `isFieldRejection` recognizes, then delegates to `withoutField` for the
851
+ * rest of this instance's lifetime — including the call that just failed,
852
+ * retried transparently so the caller never sees the rejection.
853
+ *
854
+ * Metadata methods (`resolveModel`, `listModels`, `modelCatalog`,
855
+ * `providerInfo`, `providerRetryPolicy`) always read from `withField`: the
856
+ * two builds differ only in the one wire field this wraps, never in what
857
+ * models or capabilities the route reports.
858
+ */
859
+ declare class FieldFallbackAdapter extends ModelAdapter {
860
+ #private;
861
+ constructor(withField: ModelAdapter, withoutField: ModelAdapter, options: FieldFallbackOptions);
862
+ providerInfo(provider: string): ProviderInfo;
863
+ providerRetryPolicy(provider: string): ResolvedRetryPolicy | undefined;
864
+ listModels(provider: string, signal?: AbortSignal): Promise<readonly ModelInfo[]>;
865
+ modelCatalog(provider: string, options?: ModelCatalogOptions): Promise<ModelCatalogSnapshot>;
866
+ resolveModel(provider: string, model: string, signal?: AbortSignal): Promise<ResolvedModelInfo>;
867
+ prepareCall(provider: string, model: string, signal?: AbortSignal, context?: ModelInvocationContext): Promise<PreparedAdapterCall>;
868
+ stream(options: GenerateOptions, context?: ModelInvocationContext): AsyncIterable<StreamChunk>;
869
+ }
870
+ //#endregion
676
871
  //#region src/configurable/runtime-types.d.ts
677
872
  type RuntimeCredentialSource = CredentialInput;
678
873
  type RuntimeAuthScheme = {
@@ -689,6 +884,11 @@ type RuntimeAuthScheme = {
689
884
  } | {
690
885
  readonly kind: 'dynamic';
691
886
  readonly resolve: (options: HttpAuthResolveOptions) => Readonly<Record<string, string>> | Promise<Readonly<Record<string, string>>>;
887
+ } | {
888
+ readonly kind: 'query';
889
+ readonly name: string;
890
+ readonly value: RuntimeCredentialSource;
891
+ readonly label?: string;
692
892
  };
693
893
  interface RuntimeModelDiscoveryContext {
694
894
  readonly provider: string;
@@ -702,11 +902,37 @@ interface RuntimeHttpProviderOptions<Dialect extends object> {
702
902
  readonly protocol: RuntimeWireProtocol<Dialect>;
703
903
  readonly baseUrl: string | URL;
704
904
  readonly allowInsecureHttp?: boolean;
705
- readonly auth: RuntimeAuthScheme;
905
+ /**
906
+ * How to authenticate. An array resolves every scheme and unions their
907
+ * headers — a gateway key alongside an upstream key, for instance.
908
+ */
909
+ readonly auth: RuntimeAuthScheme | readonly RuntimeAuthScheme[];
706
910
  readonly models?: readonly ProviderCatalogModel[];
707
911
  readonly dialect?: Partial<Dialect>;
708
912
  readonly fetch?: typeof globalThis.fetch;
709
- readonly headers?: Readonly<Record<string, string>> | (() => Readonly<Record<string, string>>);
913
+ /** Extra static headers, or a resolver receiving `{ provider, agentId?, signal? }`. */
914
+ readonly headers?: Readonly<Record<string, string>> | ((ctx: {
915
+ provider: string;
916
+ agentId?: string;
917
+ signal?: AbortSignal;
918
+ }) => Readonly<Record<string, string>>);
919
+ /** Override the request path every protocol would otherwise pick for itself. */
920
+ readonly path?: string;
921
+ /** Extra query-string parameters, or a resolver for them. Never for secrets. */
922
+ readonly query?: Readonly<Record<string, string>> | (() => Readonly<Record<string, string>>);
923
+ /**
924
+ * Fields to deep-merge into the serialized body, route-wide. The caller's
925
+ * value always wins, even over a field the SDK set. A `null` value deletes
926
+ * the field.
927
+ */
928
+ readonly body?: Readonly<Record<string, unknown>>;
929
+ /** Last-resort hook with full authority over the body, run after `body` is merged in. */
930
+ readonly transformRequest?: (body: unknown, ctx: {
931
+ readonly provider: string;
932
+ readonly model: string;
933
+ readonly agentId?: string;
934
+ readonly signal?: AbortSignal;
935
+ }) => unknown;
710
936
  readonly discoverModels?: (context: RuntimeModelDiscoveryContext) => Promise<readonly ProviderCatalogModel[]>;
711
937
  readonly catalogTtlMs?: number;
712
938
  readonly catalogStaleTtlMs?: number;
@@ -729,6 +955,7 @@ interface RuntimeHttpProviderOptions<Dialect extends object> {
729
955
  readonly errorCode?: (status: number, detail: string) => string | undefined;
730
956
  readonly baseHeaders?: Readonly<Record<string, string>>;
731
957
  readonly requestLogger?: ProviderRequestLogger;
958
+ readonly responseLogger?: ProviderResponseLogger;
732
959
  }
733
960
  //#endregion
734
961
  //#region src/configurable/runtime-provider.d.ts
@@ -739,10 +966,6 @@ declare function createRuntimeHttpProvider<Dialect extends object>(options: Runt
739
966
  declare function observeCredentialOperation<T>(context: ModelInvocationContext | undefined, provider: string, operation: 'resolve' | 'refresh' | 'login', task: () => Promise<T>): Promise<T>;
740
967
  declare function observeModelCatalogOperation<T>(context: ModelInvocationContext | undefined, provider: string, origin: string, task: () => Promise<T>): Promise<T>;
741
968
  //#endregion
742
- //#region src/common/endpoint-headers.d.ts
743
- /** Capture custom endpoint headers per operation, rejecting reserved names and collisions. */
744
- declare function endpointHeaders(headers: Readonly<Record<string, string>> | (() => Readonly<Record<string, string>>) | undefined, defaults?: Readonly<Record<string, string>>): () => Readonly<Record<string, string>>;
745
- //#endregion
746
969
  //#region src/transport/embedding-connection.d.ts
747
970
  /**
748
971
  * One embedding model an HTTP route declares.
@@ -913,6 +1136,13 @@ interface HttpTransportSession {
913
1136
  readonly signal: AbortSignal;
914
1137
  /** Provider correlation id, when the response carried one. */
915
1138
  readonly providerRequestId?: ProviderRequestId;
1139
+ /**
1140
+ * The id this request's own diagnostic record carries, whether or not
1141
+ * `observeRequest` was configured to receive one. A response-side observer
1142
+ * reuses it so the two halves of one call — sent and received — correlate
1143
+ * without either side having to compute a fingerprint of its own.
1144
+ */
1145
+ readonly requestLogId: string;
916
1146
  /** Media type the pipeline asked for; see {@link HttpTransportRequestInput.accept}. */
917
1147
  readonly accept: string;
918
1148
  readonly limits: ResolvedTransportLimits;
@@ -944,5 +1174,5 @@ declare function transportJson<T>(input: HttpTransportRequestInput, decode: (ses
944
1174
  /** True when a `content-type` value names one of {@link JSON_MEDIA_TYPES}. */
945
1175
  declare function isJsonMediaType(contentType: string | null): boolean;
946
1176
  //#endregion
947
- export { AnyWireProtocol, AuthScheme, CredentialSource, DEFAULT_MAX_ERROR_BODY_BYTES, DEFAULT_MAX_REQUEST_BYTES, DEFAULT_MAX_RESPONSE_BYTES, DEFAULT_MAX_RESPONSE_CHUNKS, DEFAULT_REQUEST_LOGGER_TIMEOUT_MS, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_STREAM_IDLE_TIMEOUT_MS, EmbeddingCatalogModel, EmbeddingHttpConnection, HTTP_PROTOCOL_API_VERSION, HTTP_PROVIDER_ERROR_CODES, type HttpAuthResolveOptions, type HttpConnection, HttpModelAdapter, HttpProviderOptions, type HttpTransportConnection, type HttpTransportRequestInput, type HttpTransportSession, JSON_MEDIA_TYPES, ModelContextPolicy, ModelContextPolicyOptions, ModelDiscoveryContext, type ParsedErrorBody, type PreparedWireBody, type ProtocolRequest, type ProtocolSseEvent, type ProtocolStreamChunk, type ProviderCatalogModel, type ProviderRequest, type ProviderRequestLogRecord, type ProviderRequestLogger, type ResolvedTransportLimits, type RuntimeAuthScheme, type RuntimeCredentialSource, type RuntimeHttpProviderOptions, type RuntimeModelDiscoveryContext, type RuntimeWireProtocol, SseEvent, type WireBodySource, WireProtocol, WireProtocolChunk, type WireProtocolDefinition, applyModelContextPolicy, captureTransportConnection, createHttpProvider, createModelContextPolicy, createRuntimeHttpProvider, defineWireProtocol, embeddingCatalogModelInfo, endpointHeaders, httpErrorCode, isJsonMediaType, observeCredentialOperation, observeModelCatalogOperation, parseErrorBody, parseSse, redactHeaders, requestIdFrom, resolveDialect, resolveTransportLimits, resolvedEmbeddingCatalogModelInfo, retryAfterMs, transportJson };
1177
+ export { AnyWireProtocol, AuthScheme, CredentialSource, DEFAULT_MAX_ERROR_BODY_BYTES, DEFAULT_MAX_REQUEST_BYTES, DEFAULT_MAX_RESPONSE_BYTES, DEFAULT_MAX_RESPONSE_CHUNKS, DEFAULT_REQUEST_LOGGER_TIMEOUT_MS, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_STREAM_IDLE_TIMEOUT_MS, EmbeddingCatalogModel, EmbeddingHttpConnection, FieldFallbackAdapter, type FieldFallbackOptions, HTTP_PROTOCOL_API_VERSION, HTTP_PROVIDER_ERROR_CODES, type HeaderContext, type HttpAuthResolveOptions, type HttpConnection, HttpModelAdapter, HttpProviderOptions, type HttpTransportConnection, type HttpTransportRequestInput, type HttpTransportSession, JSON_MEDIA_TYPES, ModelContextPolicy, ModelContextPolicyOptions, ModelDiscoveryContext, type ParsedErrorBody, type PreparedWireBody, type ProtocolRequest, type ProtocolSseEvent, type ProtocolStreamChunk, type ProviderCatalogModel, type ProviderRequest, type ProviderRequestLogRecord, type ProviderRequestLogger, type ProviderResponseLogRecord, type ProviderResponseLogger, RequestContext, type ResolvedTransportLimits, type RuntimeAuthScheme, type RuntimeCredentialSource, type RuntimeHttpProviderOptions, type RuntimeModelDiscoveryContext, type RuntimeWireProtocol, SseEvent, type WireBodySource, WireProtocol, WireProtocolChunk, type WireProtocolDefinition, applyModelContextPolicy, captureTransportConnection, createHttpProvider, createModelContextPolicy, createRuntimeHttpProvider, defineWireProtocol, embeddingCatalogModelInfo, endpointHeaders, httpErrorCode, isJsonMediaType, observeCredentialOperation, observeModelCatalogOperation, parseErrorBody, parseSse, redactHeaders, requestIdFrom, resolveDialect, resolveTransportLimits, resolvedEmbeddingCatalogModelInfo, retryAfterMs, transportJson };
948
1178
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/stream/sse.ts","../src/stream/types.ts","../src/transport/connection.ts","../src/transport/http.ts","../src/transport/limits.ts","../src/base/http-adapter.ts","../src/transport/errors.ts","../src/base/context-policy.ts","../src/common/config.ts","../src/protocol/runtime-types.ts","../src/protocol/definition.ts","../src/protocol/protocol.ts","../src/configurable/http-provider.ts","../src/configurable/runtime-types.ts","../src/configurable/runtime-provider.ts","../src/observation/operations.ts","../src/common/endpoint-headers.ts","../src/transport/embedding-connection.ts","../src/transport/session.ts","../src/transport/json.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAmCiB;;;;;;;;EAQf;;EAEA;;;;;;;;;;;;;;iBAeqB,SACrB,QAAQ,eAAe,aACvB,yBACA,6BACC,eAAe;;;;KC7DN,wBACR,QAAQ;WAAwB;;WACrB;WAAwB,OAAO;;;;;UCiB7B;;WAEN;;;;;;;WAOA,SAAS,SAAS;;WAElB;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,eAAe,WAAW;;WAE1B,aAAa;;;;;;;;;;;;;;;;;iBAkBR,2BAA2B,UAAU,yBACnD,YAAY,GACZ,kBAAkB,SAAS,0BAC1B;;;;iBCyJa,cACd,SAAS,SAAS,yBAClB,2CACC;;;;cCrNU;;cAEA;;cAEA;;cAEA;;cAEA;;cAEA;;;;;;;UAsBI;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;;;;;;;;;iBAYK,uBACd,YAAY,0BACX;;;;cCEU;;UAGI;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,2BAA2B;;EAE3B,4BAA4B;;EAE5B,uBAAuB;;EAEvB,YAAY;;;;;;;;;;;;;;;;UAiBG,uBAAuB;;WAE7B;;WAEA;;WAEA;;WAEA,iBAAiB;;WAEjB;;WAEA;;;UAIM;;WAEN,SAAS;;WAET,OAAO;;WAEP,YAAY;;WAEZ;;;;;;UAOM;;WAEN;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA,SAAS,SAAS;;WAElB;WACA;;;;;;KAOC,yBACV,QAAQ,6BACL;;uBA6CiB,yBAAyB;;8BAEjB;;;;;;;;;qBAUT,QACjB,kBACA,SAAS,aACT,UAAU,yBACT,QAAQ;;qBAGQ,aAAa,SAAS;;qBAGtB,UAA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;;;;;;;;;KAWC,iBACR,qBACE,QAAQ,gBAAgB,mBAAmB,QAAQ;;;;;;;UAQxC;WACN;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA,SAAS,SAAS;;WAElB;WACA;;;UAIM;;WAEN,YAAY;;WAEZ;;WAEA;;WAEA;;WAEA;;;;;;;;WAQA;WACA,MAAM;;WAEN,SAAS;WACT,UAAU;;WAEV,aAAa,gBAAgB;;WAE7B,kBAAkB,QAAQ,sBAAsB;;;KAI/C;;UAGK;;WAEN,UAAU;WACV;WACA;;WAEA,QAAQ;;WAER,oBAAoB;;WAEpB;WACA,QAAQ;;;;;;;WAOR;EACT,YAAY,OAAO,eAAe;;EAElC,cAAc,QAAQ,wBAAwB,UAAU;;;;;cCrH7C;;;;;;;;;;iBAWS,cAAc,GAClC,OAAO,2BACP,SAAS,SAAS,sBAAsB,kBAAkB,IAAI,QAAQ,KACrE,QAAQ;;iBA4BK,gBAAgB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/stream/sse.ts","../src/stream/types.ts","../src/transport/connection.ts","../src/transport/http.ts","../src/transport/limits.ts","../src/base/http-adapter.ts","../src/transport/errors.ts","../src/base/context-policy.ts","../src/common/config.ts","../src/protocol/runtime-types.ts","../src/protocol/definition.ts","../src/protocol/protocol.ts","../src/common/endpoint-headers.ts","../src/configurable/http-provider.ts","../src/configurable/field-fallback.ts","../src/configurable/runtime-types.ts","../src/configurable/runtime-provider.ts","../src/observation/operations.ts","../src/transport/embedding-connection.ts","../src/transport/session.ts","../src/transport/json.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAmCiB;;;;;;;;EAQf;;EAEA;;;;;;;;;;;;;;iBAeqB,SACrB,QAAQ,eAAe,aACvB,yBACA,6BACC,eAAe;;;;KC7DN,wBACR,QAAQ;WAAwB;;WACrB;WAAwB,OAAO;;;;;UCiB7B;;WAEN;;;;;;;WAOA,SAAS,SAAS;;WAElB;;WAEA,iBAAiB,SAAS;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