mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-08 11:02:26 +00:00
fix(types): narrow provider auth metadata
This commit is contained in:
@@ -945,7 +945,11 @@ function createClient(
|
||||
return { client, isOAuthToken: false };
|
||||
}
|
||||
|
||||
if (model.provider === "microsoft-foundry" && model.authHeader === true) {
|
||||
const foundryAuthHeader =
|
||||
model.provider === "microsoft-foundry"
|
||||
? (model as Model<"anthropic-messages"> & { authHeader?: unknown }).authHeader
|
||||
: undefined;
|
||||
if (foundryAuthHeader === true) {
|
||||
const client = new Anthropic({
|
||||
apiKey: null,
|
||||
authToken: apiKey,
|
||||
|
||||
Reference in New Issue
Block a user