fix(providers): compose ClawRouter native auth · openclaw/openclaw@ed88457
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -24,14 +24,15 @@ function createClawRouterStreamWrapper(underlying: StreamFn | undefined): Stream
|
24 | 24 | } |
25 | 25 | return (model, context, options) => { |
26 | 26 | const apiKey = options?.apiKey?.trim(); |
| 27 | +const preparedModel = prepareClawRouterRequestModel(model); |
27 | 28 | if (!apiKey || apiKey === ENV_API_KEY_MARKER) { |
28 | | -return underlying(model, context, options); |
| 29 | +return underlying(preparedModel, context, options); |
29 | 30 | } |
30 | 31 | return underlying( |
31 | | -prepareClawRouterRequestModel({ |
32 | | - ...model, |
33 | | -headers: withBearerAuthorization(model.headers, apiKey), |
34 | | -}), |
| 32 | +{ |
| 33 | + ...preparedModel, |
| 34 | +headers: withBearerAuthorization(preparedModel.headers, apiKey), |
| 35 | +}, |
35 | 36 | context, |
36 | 37 | options, |
37 | 38 | ); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。