Microsoft Foundry SDK for JavaScript 2.6
Last reviewed Sep 20, 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
- Microsoft Foundry SDK for JavaScript 2.6100 lines · 4.3K tokens
Total349 lines · 14.2K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 117
- 200
- 201
- 208
- 209
- 214
- 250
- 295
- 297
- 319
- 323
- 330
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 426
- 444
- 459
- 471
- 488
- 494
- 502
- 522
- 524
- 532
- 602
- 639
- 653
- 732
- 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 cover the @azure/ai-projects 2.6 line, its authenticated OpenAI client, project resources, agent tools and sessions, preview operations, publishing, and telemetry, and were checked against 2.6.0. The package requires Node.js 22 or later; use a supported LTS runtime. Its dependency ranges include @azure/identity ^4.13.0 and openai ^6.16.0; retain reviewed resolutions and recheck preview contracts when upgrading.
Client construction and identity
- Construct
AIProjectClientwith a server-owned HTTPS project endpoint andTokenCredential. Reject caller-suppliedoptions.endpoint, which overrides the endpoint used by project operations, and keep credential scopes andapiVersionunder trusted configuration; the default API version isKnownApiVersions.v1. - Prefer
ManagedIdentityCredentialorWorkloadIdentityCredentialin production. If usingDefaultAzureCredential, constrainAZURE_TOKEN_CREDENTIALSto the intended production credential orprod, and userequiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]to reject missing or invalid configuration. - Keep
allowInsecureConnectiondisabled and do not expose transports, proxies,additionalPolicies, or per-operationrequestOptionsto callers. Custom headers can override generated headers, andrequestOptions.skipUrlEncodingchanges path handling. - Separate project clients, credentials, and mutable option/header objects by tenant and trust boundary. A shared backend identity requires application authorization for each caller's project