@mupt-ai/dari-gateway 1.0.360 → 1.0.362

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.
Files changed (41) hide show
  1. package/dist/ingress/client_harness.d.ts +6 -0
  2. package/dist/ingress/client_harness.js +17 -1
  3. package/dist/ingress/models.js +0 -3
  4. package/dist/models/runtime_overrides.js +5 -0
  5. package/dist/platform/platform.d.ts +2 -1
  6. package/dist/platform/routing_contract.d.ts +1 -1
  7. package/dist/platform/routing_contract.js +3 -3
  8. package/dist/providers/pi.js +10 -2
  9. package/dist/runtime/prepare_routed_completion.d.ts +1 -0
  10. package/dist/runtime/prepare_routed_completion.js +1 -0
  11. package/dist/runtime/routed_completion.js +2 -0
  12. package/dist/self_host/connected.d.ts +29 -16
  13. package/dist/self_host/connected.js +64 -68
  14. package/dist/self_host/hosted_sync.d.ts +0 -2
  15. package/dist/self_host/hosted_sync.js +2 -10
  16. package/dist/self_host/main.d.ts +2 -2
  17. package/dist/self_host/main.js +10 -9
  18. package/dist/self_host/resolve.d.ts +7 -4
  19. package/dist/self_host/resolve.js +72 -18
  20. package/dist/self_host/subscriptions/http.js +13 -3
  21. package/dist/self_host/subscriptions/store.d.ts +3 -15
  22. package/dist/self_host/subscriptions/store.js +11 -27
  23. package/dist/telemetry/report.js +4 -0
  24. package/dist/types.d.ts +1 -0
  25. package/package.json +2 -2
  26. package/src/ingress/client_harness.ts +18 -1
  27. package/src/ingress/models.ts +0 -3
  28. package/src/models/runtime_overrides.ts +4 -0
  29. package/src/platform/platform.ts +5 -4
  30. package/src/platform/routing_contract.ts +3 -3
  31. package/src/providers/pi.ts +10 -2
  32. package/src/runtime/prepare_routed_completion.ts +2 -0
  33. package/src/runtime/routed_completion.ts +2 -0
  34. package/src/self_host/connected.ts +102 -82
  35. package/src/self_host/hosted_sync.ts +2 -13
  36. package/src/self_host/main.ts +10 -9
  37. package/src/self_host/resolve.ts +75 -19
  38. package/src/self_host/subscriptions/http.ts +12 -3
  39. package/src/self_host/subscriptions/store.ts +11 -25
  40. package/src/telemetry/report.ts +3 -0
  41. package/src/types.ts +2 -0
@@ -638,8 +638,11 @@ export class RequestReporter {
638
638
  }),
639
639
  };
640
640
 
641
+ let subscriptionCredentialId: string | undefined;
642
+ if (keySource === "subscription") subscriptionCredentialId = outcome.providerExecution?.subscriptionCredentialId;
641
643
  gatewayPlatform().recordRequest({
642
644
  ...(link === undefined ? {} : { link }),
645
+ ...(subscriptionCredentialId === undefined ? {} : { subscriptionCredentialId }),
643
646
  router: requestRecordRouter(a.credentials),
644
647
  candidates: a.candidates.map(({ model, reasoningEffort }) => ({ model, reasoningEffort })),
645
648
  ...(a.sessionPinKey === undefined ? {} : { sessionPinKey: a.sessionPinKey }),
package/src/types.ts CHANGED
@@ -119,6 +119,8 @@ export type ResolvedRouterModelConfig = {
119
119
  native_model_id: string;
120
120
  api: string;
121
121
  base_url?: string | null;
122
+ // Sent with every call to the endpoint.
123
+ headers?: Record<string, string>;
122
124
  context_window?: number | null;
123
125
  standard_context_limit?: number | null;
124
126
  allow_long_context?: boolean;