@tencent-ai/cloud-agent-sdk 0.3.1 → 0.3.2-next.bd7ff53.20260508
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.cjs
CHANGED
|
@@ -284,7 +284,8 @@ var RestClient = class {
|
|
|
284
284
|
"Content-Type": "application/json",
|
|
285
285
|
"Accept": "application/json"
|
|
286
286
|
};
|
|
287
|
-
if (this.opts.apiKey) headers["
|
|
287
|
+
if (this.opts.apiKey) if (this.opts.apiKey.startsWith("pt_")) headers["Authorization"] = `Bearer ${this.opts.apiKey}`;
|
|
288
|
+
else headers["X-Api-Key"] = this.opts.apiKey;
|
|
288
289
|
if (this.opts.sourceApp) headers["X-Source-App"] = this.opts.sourceApp;
|
|
289
290
|
if (this.opts.sourceTenantId) headers["X-Source-Tenant-Id"] = this.opts.sourceTenantId;
|
|
290
291
|
if (this.opts.userId) headers["X-User-Id"] = this.opts.userId;
|