@openclaw/amazon-bedrock-provider 2026.9.1-beta.1 → 2026.9.2

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 (193) hide show
  1. package/dist/discovery.js +2 -1
  2. package/dist/embedding-provider.js +23 -15
  3. package/dist/register.sync.runtime.js +9 -11
  4. package/dist/stream.runtime.js +46 -42
  5. package/dist/thinking-policy.js +4 -17
  6. package/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js +1 -1
  7. package/node_modules/@aws-sdk/client-bedrock/dist-types/models/models_0.d.ts +1 -1
  8. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/package.json +5 -5
  9. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/token-providers/package.json +6 -6
  10. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  11. package/node_modules/@aws-sdk/client-bedrock/package.json +9 -9
  12. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -1
  13. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/package.json +5 -5
  14. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/token-providers/package.json +6 -6
  15. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  16. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +13 -13
  17. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/package.json +5 -5
  18. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  19. package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -10
  20. package/node_modules/@smithy/node-http-handler/CHANGELOG.md +9 -0
  21. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +7 -2
  22. package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
  23. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
  24. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  25. package/package.json +8 -8
  26. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/CHANGELOG.md +0 -1138
  27. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/LICENSE +0 -201
  28. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/README.md +0 -9
  29. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -852
  30. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
  31. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
  32. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -12
  33. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -50
  34. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
  35. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -251
  36. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -136
  37. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -46
  38. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -173
  39. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +0 -2
  40. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-https.js +0 -2
  41. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
  42. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
  43. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
  44. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
  45. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
  46. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
  47. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +0 -10
  48. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +0 -5
  49. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -4
  50. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +0 -46
  51. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +0 -3
  52. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -47
  53. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -46
  54. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -36
  55. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -76
  56. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +0 -2
  57. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +0 -2
  58. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
  59. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +0 -6
  60. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -6
  61. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
  62. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +0 -9
  63. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +0 -10
  64. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -5
  65. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -4
  66. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +0 -46
  67. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +0 -3
  68. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -47
  69. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -46
  70. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -36
  71. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -76
  72. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +0 -2
  73. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +0 -2
  74. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
  75. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +0 -6
  76. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
  77. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
  78. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +0 -9
  79. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -12
  80. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -12
  81. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +0 -56
  82. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/CHANGELOG.md +0 -1138
  83. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/LICENSE +0 -201
  84. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/README.md +0 -9
  85. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -852
  86. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
  87. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
  88. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -12
  89. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -50
  90. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
  91. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -251
  92. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -136
  93. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -46
  94. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -173
  95. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +0 -2
  96. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-https.js +0 -2
  97. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
  98. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
  99. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
  100. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
  101. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
  102. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
  103. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +0 -10
  104. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +0 -5
  105. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -4
  106. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +0 -46
  107. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +0 -3
  108. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -47
  109. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -46
  110. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -36
  111. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -76
  112. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +0 -2
  113. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +0 -2
  114. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
  115. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +0 -6
  116. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -6
  117. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
  118. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +0 -9
  119. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +0 -10
  120. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -5
  121. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -4
  122. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +0 -46
  123. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +0 -3
  124. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -47
  125. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -46
  126. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -36
  127. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -76
  128. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +0 -2
  129. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +0 -2
  130. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
  131. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +0 -6
  132. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
  133. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
  134. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +0 -9
  135. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -12
  136. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -12
  137. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +0 -56
  138. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/CHANGELOG.md +0 -1138
  139. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/LICENSE +0 -201
  140. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/README.md +0 -9
  141. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -852
  142. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
  143. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
  144. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -12
  145. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -50
  146. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
  147. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -251
  148. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -136
  149. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -46
  150. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -173
  151. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +0 -2
  152. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/node-https.js +0 -2
  153. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
  154. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
  155. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
  156. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
  157. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
  158. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
  159. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +0 -10
  160. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +0 -5
  161. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -4
  162. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +0 -46
  163. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +0 -3
  164. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -47
  165. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -46
  166. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -36
  167. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -76
  168. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +0 -2
  169. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +0 -2
  170. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
  171. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +0 -6
  172. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -6
  173. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
  174. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +0 -9
  175. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +0 -10
  176. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -5
  177. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -4
  178. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +0 -46
  179. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +0 -3
  180. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -47
  181. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -46
  182. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -36
  183. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -76
  184. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +0 -2
  185. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +0 -2
  186. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
  187. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +0 -6
  188. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
  189. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
  190. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +0 -9
  191. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -12
  192. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -12
  193. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-http-handler/package.json +0 -56
package/dist/discovery.js CHANGED
@@ -162,7 +162,8 @@ function resolveDefaultMaxTokens(config) {
162
162
  }
163
163
  function matchesProviderFilter(summary, filter) {
164
164
  if (filter.length === 0) return true;
165
- const normalized = normalizeOptionalLowercaseString(summary.providerName ?? (typeof summary.modelId === "string" ? summary.modelId.split(".")[0] : void 0));
165
+ const providerName = summary.providerName ?? (typeof summary.modelId === "string" ? summary.modelId.split(".")[0] : void 0);
166
+ const normalized = normalizeOptionalLowercaseString(providerName);
166
167
  if (!normalized) return false;
167
168
  return filter.includes(normalized);
168
169
  }
@@ -167,9 +167,9 @@ function buildCohereBody(family, texts, inputType, dims) {
167
167
  }
168
168
  return JSON.stringify(body);
169
169
  }
170
- function parseBedrockEmbeddingResponseJson(raw) {
170
+ function parseEmbeddingResponseJson(raw) {
171
171
  try {
172
- const parsed = JSON.parse(raw);
172
+ const parsed = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(raw));
173
173
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("Amazon Bedrock embedding response returned malformed JSON");
174
174
  return parsed;
175
175
  } catch {
@@ -189,7 +189,7 @@ function asNumberArrayBatch(value) {
189
189
  return value.map((entry) => asNumberArray(entry));
190
190
  }
191
191
  function parseSingle(family, raw) {
192
- const data = parseBedrockEmbeddingResponseJson(raw);
192
+ const data = parseEmbeddingResponseJson(raw);
193
193
  switch (family) {
194
194
  case "nova": return asNumberArray(Array.isArray(data.embeddings) ? data.embeddings[0]?.embedding : null);
195
195
  case "twelvelabs": {
@@ -202,7 +202,7 @@ function parseSingle(family, raw) {
202
202
  }
203
203
  }
204
204
  function parseCohereBatch(family, raw) {
205
- const embeddings = parseBedrockEmbeddingResponseJson(raw).embeddings;
205
+ const embeddings = parseEmbeddingResponseJson(raw).embeddings;
206
206
  if (!embeddings) throw malformedBedrockEmbeddingResponse();
207
207
  if (family === "cohere-v4" && !Array.isArray(embeddings)) {
208
208
  const embeddingRecord = asOptionalRecord(embeddings);
@@ -231,13 +231,12 @@ async function createBedrockEmbeddingProvider(options) {
231
231
  useDualstackEndpoint: client.useDualstackEndpoint
232
232
  });
233
233
  try {
234
- const res = await sdk.send(new InvokeModelCommand({
234
+ return (await sdk.send(new InvokeModelCommand({
235
235
  modelId: client.model,
236
236
  body,
237
237
  contentType: "application/json",
238
238
  accept: "application/json"
239
- }), signal ? { abortSignal: signal } : void 0);
240
- return new TextDecoder().decode(res.body);
239
+ }), signal ? { abortSignal: signal } : void 0)).body;
241
240
  } finally {
242
241
  sdk.destroy();
243
242
  }
@@ -251,13 +250,15 @@ async function createBedrockEmbeddingProvider(options) {
251
250
  const raw = await invoke(buildCohereBody(family, texts, inputType, client.dimensions), signal);
252
251
  return parseCohereBatch(family, raw).map((e) => sanitizeAndNormalizeEmbedding(e));
253
252
  };
254
- const embedQuery = async (text, optionsValue) => {
253
+ const embedQuery = async (text, signal) => {
255
254
  if (!text.trim()) return [];
256
- if (isCohere) return (await embedCohere([text], "search_query", optionsValue?.signal))[0] ?? [];
257
- return embedSingle(text, optionsValue?.signal);
255
+ if (isCohere) return (await embedCohere([text], "search_query", signal))[0] ?? [];
256
+ return embedSingle(text, signal);
258
257
  };
259
- const embedBatch = async (texts, optionsLocal) => {
258
+ const embedBatch = async (inputs, optionsLocal) => {
259
+ const texts = inputs.map((input) => typeof input === "string" ? input : input.text);
260
260
  if (texts.length === 0) return [];
261
+ if (optionsLocal?.inputType === "query") return await Promise.all(texts.map((text) => embedQuery(text, optionsLocal.signal)));
261
262
  if (isCohere) return embedCohere(texts, "search_document", optionsLocal?.signal);
262
263
  return Promise.all(texts.map((t) => t.trim() ? embedSingle(t, optionsLocal?.signal) : Promise.resolve([])));
263
264
  };
@@ -266,7 +267,14 @@ async function createBedrockEmbeddingProvider(options) {
266
267
  id: "bedrock",
267
268
  model: client.model,
268
269
  maxInputTokens: spec?.maxTokens,
269
- embedQuery,
270
+ embed: async (input, optionsValue) => {
271
+ const text = typeof input === "string" ? input : input.text;
272
+ if (optionsValue?.inputType === "query") return await embedQuery(text, optionsValue.signal);
273
+ return (await embedBatch([text], {
274
+ ...optionsValue,
275
+ inputType: "document"
276
+ }))[0] ?? [];
277
+ },
270
278
  embedBatch
271
279
  },
272
280
  client
@@ -308,9 +316,9 @@ function resolveBedrockEmbeddingClient(options, BedrockRuntimeClient) {
308
316
  }
309
317
  }
310
318
  let dimensions;
311
- if (options.outputDimensionality != null) {
312
- if (spec?.validDims && !spec.validDims.includes(options.outputDimensionality)) throw new Error(`Invalid dimensions ${options.outputDimensionality} for ${model}. Valid values: ${spec.validDims.join(", ")}`);
313
- dimensions = options.outputDimensionality;
319
+ if (options.dimensions != null) {
320
+ if (spec?.validDims && !spec.validDims.includes(options.dimensions)) throw new Error(`Invalid dimensions ${options.dimensions} for ${model}. Valid values: ${spec.validDims.join(", ")}`);
321
+ dimensions = options.dimensions;
314
322
  } else dimensions = spec?.dims;
315
323
  return {
316
324
  region,
@@ -1,11 +1,10 @@
1
1
  import { refreshAwsSharedConfigCacheForBedrock } from "./aws-credential-refresh.js";
2
2
  import { supportsBedrockPromptCaching } from "./bedrock-options.js";
3
3
  import { loadBedrockControlPlaneSdk, runBedrockControlPlaneRequest } from "./control-plane.js";
4
- import { mergeImplicitBedrockProvider, resolveBedrockConfigApiKey } from "./discovery-shared.js";
4
+ import { resolveBedrockConfigApiKey } from "./discovery-shared.js";
5
5
  import { bedrockMemoryEmbeddingProviderAdapter } from "./memory-embedding-adapter.js";
6
6
  import { isLatestAdaptiveBedrockModelRef, isOpus47OrNewerBedrockModelRef, resolveBedrockClaudeThinkingProfile, resolveBedrockNativeThinkingLevelMap, supportsBedrockNativeMaxEffort } from "./thinking-policy.js";
7
7
  import { streamSimpleBedrock } from "./stream.runtime.js";
8
- import { adaptMemoryEmbeddingProviderAdapter } from "openclaw/plugin-sdk/memory-core-host-engine-embeddings";
9
8
  import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
10
9
  import { buildProviderReplayFamilyHooks, normalizeProviderId, resolveClaudeFable5ModelIdentity, resolveClaudeModelIdentity, resolveClaudeMythos5ModelIdentity, resolveClaudeOpus5ModelIdentity, resolveClaudeSonnet5ModelIdentity } from "openclaw/plugin-sdk/provider-model-shared";
11
10
  import { createPayloadPatchStreamWrapper } from "openclaw/plugin-sdk/provider-stream-shared";
@@ -216,7 +215,7 @@ function registerAmazonBedrockPlugin(api) {
216
215
  function resolveCurrentPluginConfig(config) {
217
216
  return resolvePluginConfigObject(config, providerId) ?? (config ? void 0 : startupPluginConfig);
218
217
  }
219
- api.registerEmbeddingProvider(adaptMemoryEmbeddingProviderAdapter(bedrockMemoryEmbeddingProviderAdapter));
218
+ api.registerEmbeddingProvider(bedrockMemoryEmbeddingProviderAdapter);
220
219
  const baseWrapStreamFn = ({ modelId, model, streamFn }) => {
221
220
  const modelRef = {
222
221
  id: modelId,
@@ -290,10 +289,7 @@ function registerAmazonBedrockPlugin(api) {
290
289
  env: ctx.env
291
290
  });
292
291
  if (!implicit) return null;
293
- return { provider: mergeImplicitBedrockProvider({
294
- existing: ctx.config.models?.providers?.[providerId],
295
- implicit
296
- }) };
292
+ return { provider: implicit };
297
293
  }
298
294
  },
299
295
  resolveConfigApiKey: ({ env }) => resolveBedrockConfigApiKey(env),
@@ -323,10 +319,12 @@ function registerAmazonBedrockPlugin(api) {
323
319
  streamFn
324
320
  })) ?? void 0;
325
321
  const serviceTier = resolveBedrockServiceTier(extraParams, (message) => api.logger.warn(message));
326
- if (serviceTier && wrapped) if ((fable5 || opus5 || sonnet5) && serviceTier !== "default") {
327
- const modelLabel = fable5 ? "Fable 5" : opus5 ? "Opus 5" : "Sonnet 5";
328
- api.logger.warn(`ignoring unsupported ${modelLabel} Bedrock service tier: ${serviceTier}`);
329
- } else wrapped = createBedrockServiceTierWrapper(wrapped, serviceTier);
322
+ if (serviceTier && wrapped) {
323
+ if ((fable5 || opus5 || sonnet5) && serviceTier !== "default") {
324
+ const modelLabel = fable5 ? "Fable 5" : opus5 ? "Opus 5" : "Sonnet 5";
325
+ api.logger.warn(`ignoring unsupported ${modelLabel} Bedrock service tier: ${serviceTier}`);
326
+ } else wrapped = createBedrockServiceTierWrapper(wrapped, serviceTier);
327
+ }
330
328
  const region = resolveBedrockRegion(config) ?? extractRegionFromBaseUrl(model?.baseUrl) ?? currentPluginConfig?.discovery?.region;
331
329
  const mayNeedCacheInjection = isBedrockAppInferenceProfile(modelId) && !sharedRuntimeWouldInjectCachePoints(modelId);
332
330
  const shouldOmitTemperature = opus47OrNewer || fable5 || isLatestAdaptiveBedrockModelRef(modelId, model?.params);
@@ -8,7 +8,7 @@ import { NodeHttpHandler } from "@smithy/node-http-handler";
8
8
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
9
9
  import { AssistantMessageEventStream, adjustMaxTokensForThinking, buildBaseOptions, calculateCost, clampReasoning, createHttpProxyAgentsForTarget, parseStreamingJson, sanitizeSurrogates, transformMessages } from "openclaw/plugin-sdk/llm";
10
10
  import { canonicalizeBase64 } from "openclaw/plugin-sdk/media-runtime";
11
- import { describeToolResultMediaPlaceholder, finalizeTerminalToolCallArguments, notifyProviderHttpMetadata } from "openclaw/plugin-sdk/provider-transport-runtime";
11
+ import { describeToolResultMediaPlaceholder, failTransportStream, finalizeTerminalToolCallArguments, notifyProviderHttpMetadata } from "openclaw/plugin-sdk/provider-transport-runtime";
12
12
  //#region extensions/amazon-bedrock/stream.runtime.ts
13
13
  /**
14
14
  * Amazon Bedrock Converse streaming runtime. It maps OpenClaw messages/tools,
@@ -75,7 +75,7 @@ const streamBedrock = (model, context, options = {}) => {
75
75
  const pendingToolCallEnds = [];
76
76
  const redactedReasoningChunks = /* @__PURE__ */ new Map();
77
77
  const fable5 = usesClaudeFable5BedrockContract(model);
78
- const refusalBuffer = usesClaudeStreamingRefusalBedrockContract(model) ? createDeferredEventBuffer(stream, () => notifyLlmRequestActivity(options.signal)) : void 0;
78
+ const refusalBuffer = usesClaudeStreamingRefusalBedrockContract(model) ? createDeferredEventBuffer(stream) : void 0;
79
79
  const eventSink = refusalBuffer ?? stream;
80
80
  const config = { profile: options.profile };
81
81
  const configuredRegion = getConfiguredBedrockRegion(options);
@@ -143,29 +143,32 @@ const streamBedrock = (model, context, options = {}) => {
143
143
  });
144
144
  }
145
145
  let sawMessageStop = false;
146
- for await (const item of { [Symbol.asyncIterator]: () => responseIterator }) if (item.messageStart) {
147
- if (item.messageStart.role !== ConversationRole.ASSISTANT) throw new Error("Unexpected assistant message start but got user message start instead");
148
- eventSink.push({
149
- type: "start",
150
- partial: output
151
- });
152
- } else if (item.contentBlockStart) handleContentBlockStart(item.contentBlockStart, blocks, output, eventSink);
153
- else if (item.contentBlockDelta) handleContentBlockDelta(item.contentBlockDelta, blocks, output, eventSink, redactedReasoningChunks);
154
- else if (item.contentBlockStop) handleContentBlockStop(item.contentBlockStop, blocks, output, eventSink, redactedReasoningChunks, pendingToolCallEnds);
155
- else if (item.messageStop) {
156
- sawMessageStop = true;
157
- if (item.messageStop.stopReason === "refusal") applyAnthropicRefusal(output, readBedrockStopDetails(item.messageStop.additionalModelResponseFields), model.provider);
158
- else {
159
- const mappedStop = mapStopReason(item.messageStop.stopReason);
160
- output.stopReason = mappedStop.stopReason;
161
- if (mappedStop.errorMessage) output.errorMessage = mappedStop.errorMessage;
162
- }
163
- } else if (item.metadata) handleMetadata(item.metadata, model, output);
164
- else if (item.internalServerException) throw item.internalServerException;
165
- else if (item.modelStreamErrorException) throw item.modelStreamErrorException;
166
- else if (item.validationException) throw item.validationException;
167
- else if (item.throttlingException) throw item.throttlingException;
168
- else if (item.serviceUnavailableException) throw item.serviceUnavailableException;
146
+ for await (const item of { [Symbol.asyncIterator]: () => responseIterator }) {
147
+ notifyLlmRequestActivity(options.signal);
148
+ if (item.messageStart) {
149
+ if (item.messageStart.role !== ConversationRole.ASSISTANT) throw new Error("Unexpected assistant message start but got user message start instead");
150
+ eventSink.push({
151
+ type: "start",
152
+ partial: output
153
+ });
154
+ } else if (item.contentBlockStart) handleContentBlockStart(item.contentBlockStart, blocks, output, eventSink);
155
+ else if (item.contentBlockDelta) handleContentBlockDelta(item.contentBlockDelta, blocks, output, eventSink, redactedReasoningChunks);
156
+ else if (item.contentBlockStop) handleContentBlockStop(item.contentBlockStop, blocks, output, eventSink, redactedReasoningChunks, pendingToolCallEnds);
157
+ else if (item.messageStop) {
158
+ sawMessageStop = true;
159
+ if (item.messageStop.stopReason === "refusal") applyAnthropicRefusal(output, readBedrockStopDetails(item.messageStop.additionalModelResponseFields), model.provider);
160
+ else {
161
+ const mappedStop = mapStopReason(item.messageStop.stopReason);
162
+ output.stopReason = mappedStop.stopReason;
163
+ if (mappedStop.errorMessage) output.errorMessage = mappedStop.errorMessage;
164
+ }
165
+ } else if (item.metadata) handleMetadata(item.metadata, model, output);
166
+ else if (item.internalServerException) throw item.internalServerException;
167
+ else if (item.modelStreamErrorException) throw item.modelStreamErrorException;
168
+ else if (item.validationException) throw item.validationException;
169
+ else if (item.throttlingException) throw item.throttlingException;
170
+ else if (item.serviceUnavailableException) throw item.serviceUnavailableException;
171
+ }
169
172
  if (!sawMessageStop) throw new Error("Bedrock stream ended before messageStop");
170
173
  if (options.signal?.aborted) throw new Error("Request was aborted");
171
174
  if (output.stopReason === "error" || output.stopReason === "aborted") throw new Error(output.errorMessage ?? "An unknown error occurred");
@@ -179,23 +182,24 @@ const streamBedrock = (model, context, options = {}) => {
179
182
  });
180
183
  stream.end();
181
184
  } catch (error) {
182
- output.content = output.content.filter((block) => block.type !== "toolCall");
183
- for (const block of output.content) {
184
- delete block.index;
185
- delete block.partialJson;
186
- }
187
- if (refusalBuffer) {
188
- refusalBuffer.discard();
189
- output.content = [];
190
- }
191
- output.stopReason = options.signal?.aborted ? "aborted" : "error";
192
- output.errorMessage = formatBedrockError(error);
193
- stream.push({
194
- type: "error",
195
- reason: output.stopReason,
196
- error: output
185
+ failTransportStream({
186
+ stream,
187
+ output,
188
+ signal: options.signal,
189
+ error,
190
+ cleanup: () => {
191
+ output.content = output.content.filter((block) => block.type !== "toolCall");
192
+ for (const block of output.content) {
193
+ delete block.index;
194
+ delete block.partialJson;
195
+ }
196
+ if (refusalBuffer) {
197
+ refusalBuffer.discard();
198
+ output.content = [];
199
+ }
200
+ output.errorMessage = formatBedrockError(error);
201
+ }
197
202
  });
198
- stream.end();
199
203
  } finally {
200
204
  client?.destroy();
201
205
  }
@@ -221,6 +225,7 @@ const BEDROCK_ERROR_PREFIXES = {
221
225
  * extend BedrockRuntimeServiceException. We map the `.name` to a stable
222
226
  * human-readable prefix so downstream consumers (retry logic, context-overflow
223
227
  * detection) can distinguish error categories via simple string matching.
228
+ * The shared transport owner projects errorType, errorCode, and diagnostics.
224
229
  */
225
230
  function formatBedrockError(error) {
226
231
  const message = error instanceof Error ? error.message : JSON.stringify(error);
@@ -438,7 +443,6 @@ function handleContentBlockStop(event, blocks, output, stream, redactedReasoning
438
443
  block,
439
444
  contentIndex: index
440
445
  });
441
- break;
442
446
  }
443
447
  }
444
448
  function flushPendingBedrockToolCalls(pending, blocks, output, stream) {
@@ -10,19 +10,15 @@ const BASE_CLAUDE_THINKING_LEVELS = [
10
10
  function isOpus5BedrockModelRef(modelRef) {
11
11
  return /(?:^|[/.:])(?:(?:us|eu|ap|apac|au|jp|global)\.)?(?:anthropic\.)?claude-opus-5(?:$|[-.:/])/i.test(modelRef);
12
12
  }
13
- function isOpus48BedrockModelRef(modelRef) {
14
- return /(?:^|[/.:])(?:(?:us|eu|ap|apac|au|jp|global)\.)?(?:anthropic\.)?claude-opus-4[.-]8(?:$|[-.:/])/i.test(modelRef);
13
+ function isOpus47Or48BedrockModelRef(modelRef) {
14
+ return /(?:^|[/.:])(?:(?:us|eu|ap|apac|au|jp|global)\.)?(?:anthropic\.)?claude-opus-4[.-][78](?:$|[-.:/])/i.test(modelRef);
15
15
  }
16
16
  function isOpus46BedrockModelRef(modelRef) {
17
17
  return /(?:^|[/.:])(?:(?:us|eu|ap|apac|au|jp|global)\.)?(?:anthropic\.)?claude-opus-4[.-]6(?:$|[-.:/])/i.test(modelRef);
18
18
  }
19
- /** Return whether a Bedrock model ref names Claude Opus 4.7. */
20
- function isOpus47BedrockModelRef(modelRef) {
21
- return /(?:^|[/.:])(?:(?:us|eu|ap|apac|au|jp|global)\.)?(?:anthropic\.)?claude-opus-4[.-]7(?:$|[-.:/])/i.test(modelRef);
22
- }
23
19
  /** Return whether a Bedrock model ref names Claude Opus 4.7 or newer. */
24
20
  function isOpus47OrNewerBedrockModelRef(modelRef) {
25
- return isOpus5BedrockModelRef(modelRef) || isOpus47BedrockModelRef(modelRef) || isOpus48BedrockModelRef(modelRef);
21
+ return isOpus5BedrockModelRef(modelRef) || isOpus47Or48BedrockModelRef(modelRef);
26
22
  }
27
23
  function isMythosPreviewBedrockModelRef(modelRef) {
28
24
  return /(?:^|[/.:])(?:(?:us|eu|ap|apac|au|jp|global)\.)?(?:anthropic\.)?claude-mythos-preview(?:$|[-.:/])/i.test(modelRef);
@@ -122,16 +118,7 @@ function resolveBedrockClaudeThinkingProfile(modelId, params) {
122
118
  ],
123
119
  defaultLevel: "high"
124
120
  };
125
- if (modelRefs.some(isOpus48BedrockModelRef)) return {
126
- levels: [
127
- ...BASE_CLAUDE_THINKING_LEVELS,
128
- { id: "xhigh" },
129
- { id: "adaptive" },
130
- { id: "max" }
131
- ],
132
- defaultLevel: "off"
133
- };
134
- if (modelRefs.some(isOpus47BedrockModelRef)) return {
121
+ if (modelRefs.some(isOpus47Or48BedrockModelRef)) return {
135
122
  levels: [
136
123
  ...BASE_CLAUDE_THINKING_LEVELS,
137
124
  { id: "xhigh" },
@@ -86,7 +86,7 @@ const commonParams = {
86
86
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
87
87
  };
88
88
 
89
- var version = "3.1112.0";
89
+ var version = "3.1116.0";
90
90
  var packageInfo = {
91
91
  version: version};
92
92
 
@@ -233,7 +233,7 @@ export interface InferenceConfiguration {
233
233
  */
234
234
  export interface ModelConfiguration {
235
235
  /**
236
- * <p>The ID of the model to use for optimization.</p>
236
+ * <p>The model to use for optimization. The value depends on the resource that you use:</p> <ul> <li> <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-cards.html">Models at a glance</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use a cross-Region (system-defined) inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for inference profiles</a> in the Amazon Bedrock User Guide.</p> </li> <li> <p>If you use an application inference profile, specify its full ARN, including the account ID and Region.</p> </li> </ul>
237
237
  * @public
238
238
  */
239
239
  modelId: string | undefined;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.977.8",
3
+ "version": "3.977.9",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/core",
6
6
  "license": "Apache-2.0",
@@ -124,12 +124,12 @@
124
124
  "test:temp:retry": "SMITHY_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && AWS_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && node ./integ/retry.integ.spec"
125
125
  },
126
126
  "dependencies": {
127
- "@aws-sdk/types": "^3.974.4",
128
- "@aws-sdk/xml-builder": "^3.972.39",
127
+ "@aws-sdk/types": "^3.974.5",
128
+ "@aws-sdk/xml-builder": "^3.972.40",
129
129
  "@aws/lambda-invoke-store": "^0.3.0",
130
- "@smithy/core": "^3.31.1",
130
+ "@smithy/core": "^3.33.3",
131
131
  "@smithy/signature-v4": "^5.6.12",
132
- "@smithy/types": "^4.16.1",
132
+ "@smithy/types": "^4.17.2",
133
133
  "bowser": "^2.11.0",
134
134
  "tslib": "^2.6.2"
135
135
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.1113.0",
3
+ "version": "3.1117.0",
4
4
  "description": "A collection of token providers",
5
5
  "keywords": [
6
6
  "aws",
@@ -48,11 +48,11 @@
48
48
  "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
49
49
  },
50
50
  "dependencies": {
51
- "@aws-sdk/core": "^3.977.8",
52
- "@aws-sdk/nested-clients": "^3.997.43",
53
- "@aws-sdk/types": "^3.974.4",
54
- "@smithy/core": "^3.31.1",
55
- "@smithy/types": "^4.16.1",
51
+ "@aws-sdk/core": "^3.977.9",
52
+ "@aws-sdk/nested-clients": "^3.997.44",
53
+ "@aws-sdk/types": "^3.974.5",
54
+ "@smithy/core": "^3.33.3",
55
+ "@smithy/types": "^4.17.2",
56
56
  "tslib": "^2.6.2"
57
57
  },
58
58
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/xml-builder",
3
- "version": "3.972.39",
3
+ "version": "3.972.40",
4
4
  "description": "XML utilities for the AWS SDK",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/xml-builder",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
47
47
  "test:fuzz": "jazzer tests/xml-parser.fuzz.js corpus --sync -i xml-parser -- -max_total_time=300"
48
48
  },
49
49
  "dependencies": {
50
- "@smithy/types": "^4.16.1",
50
+ "@smithy/types": "^4.17.2",
51
51
  "tslib": "^2.6.2"
52
52
  },
53
53
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock",
3
- "version": "3.1113.0",
3
+ "version": "3.1117.0",
4
4
  "description": "AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock",
6
6
  "license": "Apache-2.0",
@@ -46,14 +46,14 @@
46
46
  "test:index": "tsc -p tsconfig.test.json && node ./test/index-objects.spec.mjs"
47
47
  },
48
48
  "dependencies": {
49
- "@aws-sdk/core": "^3.977.8",
50
- "@aws-sdk/credential-provider-node": "^3.972.80",
51
- "@aws-sdk/token-providers": "3.1113.0",
52
- "@aws-sdk/types": "^3.974.4",
53
- "@smithy/core": "^3.31.1",
54
- "@smithy/fetch-http-handler": "^5.6.13",
55
- "@smithy/node-http-handler": "^4.9.13",
56
- "@smithy/types": "^4.16.1",
49
+ "@aws-sdk/core": "^3.977.9",
50
+ "@aws-sdk/credential-provider-node": "^3.972.81",
51
+ "@aws-sdk/token-providers": "3.1117.0",
52
+ "@aws-sdk/types": "^3.974.5",
53
+ "@smithy/core": "^3.33.3",
54
+ "@smithy/fetch-http-handler": "^5.7.2",
55
+ "@smithy/node-http-handler": "^4.11.3",
56
+ "@smithy/types": "^4.17.2",
57
57
  "tslib": "^2.6.2"
58
58
  },
59
59
  "devDependencies": {
@@ -90,7 +90,7 @@ const commonParams = {
90
90
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
91
91
  };
92
92
 
93
- var version = "3.1112.0";
93
+ var version = "3.1116.0";
94
94
  var packageInfo = {
95
95
  version: version};
96
96
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.977.8",
3
+ "version": "3.977.9",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/core",
6
6
  "license": "Apache-2.0",
@@ -124,12 +124,12 @@
124
124
  "test:temp:retry": "SMITHY_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && AWS_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && node ./integ/retry.integ.spec"
125
125
  },
126
126
  "dependencies": {
127
- "@aws-sdk/types": "^3.974.4",
128
- "@aws-sdk/xml-builder": "^3.972.39",
127
+ "@aws-sdk/types": "^3.974.5",
128
+ "@aws-sdk/xml-builder": "^3.972.40",
129
129
  "@aws/lambda-invoke-store": "^0.3.0",
130
- "@smithy/core": "^3.31.1",
130
+ "@smithy/core": "^3.33.3",
131
131
  "@smithy/signature-v4": "^5.6.12",
132
- "@smithy/types": "^4.16.1",
132
+ "@smithy/types": "^4.17.2",
133
133
  "bowser": "^2.11.0",
134
134
  "tslib": "^2.6.2"
135
135
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.1113.0",
3
+ "version": "3.1117.0",
4
4
  "description": "A collection of token providers",
5
5
  "keywords": [
6
6
  "aws",
@@ -48,11 +48,11 @@
48
48
  "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
49
49
  },
50
50
  "dependencies": {
51
- "@aws-sdk/core": "^3.977.8",
52
- "@aws-sdk/nested-clients": "^3.997.43",
53
- "@aws-sdk/types": "^3.974.4",
54
- "@smithy/core": "^3.31.1",
55
- "@smithy/types": "^4.16.1",
51
+ "@aws-sdk/core": "^3.977.9",
52
+ "@aws-sdk/nested-clients": "^3.997.44",
53
+ "@aws-sdk/types": "^3.974.5",
54
+ "@smithy/core": "^3.33.3",
55
+ "@smithy/types": "^4.17.2",
56
56
  "tslib": "^2.6.2"
57
57
  },
58
58
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/xml-builder",
3
- "version": "3.972.39",
3
+ "version": "3.972.40",
4
4
  "description": "XML utilities for the AWS SDK",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/xml-builder",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
47
47
  "test:fuzz": "jazzer tests/xml-parser.fuzz.js corpus --sync -i xml-parser -- -max_total_time=300"
48
48
  },
49
49
  "dependencies": {
50
- "@smithy/types": "^4.16.1",
50
+ "@smithy/types": "^4.17.2",
51
51
  "tslib": "^2.6.2"
52
52
  },
53
53
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock-runtime",
3
- "version": "3.1113.0",
3
+ "version": "3.1117.0",
4
4
  "description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime",
6
6
  "license": "Apache-2.0",
@@ -54,21 +54,21 @@
54
54
  "test:index": "tsc -p tsconfig.test.json && node ./test/index-objects.spec.mjs"
55
55
  },
56
56
  "dependencies": {
57
- "@aws-sdk/core": "^3.977.8",
58
- "@aws-sdk/credential-provider-node": "^3.972.80",
59
- "@aws-sdk/eventstream-handler-node": "^3.972.33",
60
- "@aws-sdk/middleware-eventstream": "^3.972.28",
61
- "@aws-sdk/middleware-websocket": "^3.972.51",
62
- "@aws-sdk/token-providers": "3.1113.0",
63
- "@aws-sdk/types": "^3.974.4",
64
- "@smithy/core": "^3.31.1",
65
- "@smithy/fetch-http-handler": "^5.6.13",
66
- "@smithy/node-http-handler": "^4.9.13",
67
- "@smithy/types": "^4.16.1",
57
+ "@aws-sdk/core": "^3.977.9",
58
+ "@aws-sdk/credential-provider-node": "^3.972.81",
59
+ "@aws-sdk/eventstream-handler-node": "^3.972.34",
60
+ "@aws-sdk/middleware-eventstream": "^3.972.29",
61
+ "@aws-sdk/middleware-websocket": "^3.972.52",
62
+ "@aws-sdk/token-providers": "3.1117.0",
63
+ "@aws-sdk/types": "^3.974.5",
64
+ "@smithy/core": "^3.33.3",
65
+ "@smithy/fetch-http-handler": "^5.7.2",
66
+ "@smithy/node-http-handler": "^4.11.3",
67
+ "@smithy/types": "^4.17.2",
68
68
  "tslib": "^2.6.2"
69
69
  },
70
70
  "devDependencies": {
71
- "@smithy/snapshot-testing": "^2.2.16",
71
+ "@smithy/snapshot-testing": "^2.3.2",
72
72
  "@tsconfig/node20": "20.1.8",
73
73
  "@types/node": "^20.14.8",
74
74
  "concurrently": "7.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.977.8",
3
+ "version": "3.977.9",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/core",
6
6
  "license": "Apache-2.0",
@@ -124,12 +124,12 @@
124
124
  "test:temp:retry": "SMITHY_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && AWS_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && node ./integ/retry.integ.spec"
125
125
  },
126
126
  "dependencies": {
127
- "@aws-sdk/types": "^3.974.4",
128
- "@aws-sdk/xml-builder": "^3.972.39",
127
+ "@aws-sdk/types": "^3.974.5",
128
+ "@aws-sdk/xml-builder": "^3.972.40",
129
129
  "@aws/lambda-invoke-store": "^0.3.0",
130
- "@smithy/core": "^3.31.1",
130
+ "@smithy/core": "^3.33.3",
131
131
  "@smithy/signature-v4": "^5.6.12",
132
- "@smithy/types": "^4.16.1",
132
+ "@smithy/types": "^4.17.2",
133
133
  "bowser": "^2.11.0",
134
134
  "tslib": "^2.6.2"
135
135
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/xml-builder",
3
- "version": "3.972.39",
3
+ "version": "3.972.40",
4
4
  "description": "XML utilities for the AWS SDK",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/xml-builder",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
47
47
  "test:fuzz": "jazzer tests/xml-parser.fuzz.js corpus --sync -i xml-parser -- -max_total_time=300"
48
48
  },
49
49
  "dependencies": {
50
- "@smithy/types": "^4.16.1",
50
+ "@smithy/types": "^4.17.2",
51
51
  "tslib": "^2.6.2"
52
52
  },
53
53
  "devDependencies": {