Genkit for JavaScript 1.43
Last reviewed Oct 26, 2026
Prompt Details
Prompt Composition
4prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 746 lines · 1.5K tokens
- Genkit for JavaScript 1.4370 lines · 3.4K tokens
Total319 lines · 13.3K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 116
- 117
- 200
- 208
- 209
- 214
- 250
- 287
- 295
- 297
- 306
- 319
- 323
- 330
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 426
- 444
- 459
- 471
- 488
- 494
- 502
- 522
- 524
- 532
- 602
- 639
- 653
- 674
- 732
- 754
- 770
- 807
- 829
- 838
- 841
- 862
- 863
- 908
- 915
- 916
- 918
- 922
- 942
- 943
- 1004
- 1321
- 1333
- 1427
Prompt Preview
Apply the Node.js 24 and TypeScript 7 prompts first. These rules address Genkit flows, generation, beta agents, optional middleware, provider integrations, and serving surfaces.
Configure capabilities and providers
- Import stable APIs from
genkit; opt intogenkit/betaonly for features the application has reviewed. Keep Genkit core and plugins compatible in the lockfile. When using beta agents, sessions, or interrupts, constrain automatic updates to the selected minor and review migration notes and security tests before moving to another minor. - Build
genkit({ plugins, model }), model references, prompt names,tools,use, schemas, and provider settings from trusted application configuration. A request or model response must not choose its own capabilities. - Set model output tokens, application cost, concurrency, and total-work budgets explicitly. Check the effective provider request: compat-OAI adapters, Google GenAI's Interactions API route, and fallback models can map or reject options differently from the generic Genkit configuration. Do not treat a provider safety setting as authorization.
- Keep provider credentials and endpoints server controlled. Reject request-supplied
config.apiKey,baseUrl,apiVersion, model aliases, provider-native tools, and fallback destinations. If using a tenant-supplied Google AI key, disable the ambient-key fallback withgoogleAI({ apiKey: false })and authorize that tenant key before the call. - Treat
response.raw,custom, and provider-specific metadata as untrusted and version-sensitive. Validate only the