promptguard-sdk 1.7.0 → 1.7.1

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/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ [![npm version](https://img.shields.io/npm/v/promptguard)](https://www.npmjs.com/package/promptguard)
2
+ [![CI](https://github.com/acebot712/promptguard-node/actions/workflows/ci.yml/badge.svg)](https://github.com/acebot712/promptguard-node/actions/workflows/ci.yml)
3
+ [![License](https://img.shields.io/github/license/acebot712/promptguard-node)](https://github.com/acebot712/promptguard-node/blob/main/LICENSE)
4
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue)](https://www.typescriptlang.org/)
5
+
1
6
  # PromptGuard Node.js SDK
2
7
 
3
8
  Drop-in security for AI applications. Secure any GenAI app - regardless of framework or LLM provider.
@@ -24,7 +29,7 @@ const client = new OpenAI();
24
29
 
25
30
  // This call is automatically scanned by PromptGuard.
26
31
  const response = await client.chat.completions.create({
27
- model: 'gpt-4o',
32
+ model: 'gpt-5-nano',
28
33
  messages: [{ role: 'user', content: 'Hello!' }],
29
34
  });
30
35
  ```
@@ -86,7 +91,7 @@ const pg = new PromptGuard({ apiKey: 'pg_xxx' });
86
91
 
87
92
  // Use exactly like the OpenAI client.
88
93
  const response = await pg.chat.completions.create({
89
- model: 'gpt-4o',
94
+ model: 'gpt-5-nano',
90
95
  messages: [{ role: 'user', content: 'Hello!' }],
91
96
  });
92
97
  ```
@@ -125,7 +130,7 @@ const handler = new PromptGuardCallbackHandler({
125
130
 
126
131
  // Attach to a single model
127
132
  const llm = new ChatOpenAI({
128
- model: 'gpt-4o',
133
+ model: 'gpt-5-nano',
129
134
  callbacks: [handler],
130
135
  });
131
136
 
@@ -146,7 +151,7 @@ import { wrapLanguageModel, generateText } from 'ai';
146
151
  import { promptGuardMiddleware } from 'promptguard-sdk/integrations/vercel-ai';
147
152
 
148
153
  const model = wrapLanguageModel({
149
- model: openai('gpt-4o'),
154
+ model: openai('gpt-5-nano'),
150
155
  middleware: promptGuardMiddleware({
151
156
  apiKey: 'pg_xxx',
152
157
  mode: 'enforce',
@@ -173,7 +178,7 @@ const guard = new GuardClient({ apiKey: 'pg_xxx' });
173
178
  const decision = await guard.scan(
174
179
  [{ role: 'user', content: userInput }],
175
180
  'input',
176
- 'gpt-4o',
181
+ 'gpt-5-nano',
177
182
  );
178
183
 
179
184
  if (decision.blocked) {
@@ -11,7 +11,7 @@
11
11
  * import { promptGuardMiddleware } from 'promptguard-sdk/integrations/vercel-ai';
12
12
  *
13
13
  * const model = wrapLanguageModel({
14
- * model: openai('gpt-4o'),
14
+ * model: openai('gpt-5-nano'),
15
15
  * middleware: promptGuardMiddleware({ apiKey: 'pg_xxx' }),
16
16
  * });
17
17
  *
@@ -12,7 +12,7 @@
12
12
  * import { promptGuardMiddleware } from 'promptguard-sdk/integrations/vercel-ai';
13
13
  *
14
14
  * const model = wrapLanguageModel({
15
- * model: openai('gpt-4o'),
15
+ * model: openai('gpt-5-nano'),
16
16
  * middleware: promptGuardMiddleware({ apiKey: 'pg_xxx' }),
17
17
  * });
18
18
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptguard-sdk",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Drop-in security for AI applications - AI Firewall SDK with auto-instrumentation",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",