Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Commit 48aad40

Browse files
committed
fix: redact secret in execute response headers
1 parent 93a42a2 commit 48aad40

File tree

3 files changed

+40
-39
lines changed

3 files changed

+40
-39
lines changed

package-lock.json

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@picahq/ai",
3-
"version": "2.4.12",
3+
"version": "2.5.0",
44
"description": "Pica AI SDK for Vercel AI SDK integration",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -23,13 +23,13 @@
2323
"zod": "^3.24.1"
2424
},
2525
"devDependencies": {
26-
"@ai-sdk/openai": "^1.3.10",
26+
"@ai-sdk/openai": "^1.3.21",
2727
"@types/express": "^5.0.1",
2828
"@types/node": "^20.17.14",
29-
"ai": "^4.3.5",
29+
"ai": "^4.3.13",
3030
"dotenv": "^16.5.0",
3131
"express": "^5.1.0",
3232
"typescript": "^5.7.3"
3333
},
3434
"type": "commonjs"
35-
}
35+
}

src/pica.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ ${this.system.trim()}
408408
}
409409

410410
if (returnRequestConfigWithoutExecution) {
411-
requestConfig.headers['x-pica-secret'] = "YOUR_SECRET_KEY_HERE";
411+
requestConfig.headers['x-pica-secret'] = "YOUR_PICA_SECRET_KEY_HERE";
412412

413413
return {
414414
executed: false,
@@ -418,6 +418,8 @@ ${this.system.trim()}
418418

419419
const response = await axios(requestConfig);
420420

421+
requestConfig.headers['x-pica-secret'] = "****REDACTED****";
422+
421423
return {
422424
executed: true,
423425
responseData: response.data,
@@ -737,7 +739,6 @@ ${this.system.trim()}
737739
platform: params.platform,
738740
action: fullAction.title,
739741
requestConfig: result.requestConfig,
740-
knowledge: fullAction.knowledge,
741742
content: `Executed ${fullAction.title} via ${params.platform}`,
742743
};
743744
} catch (error: any) {

0 commit comments

Comments
 (0)