Microsoft Foundry SDK for JavaScript 2.6

Last reviewed Sep 20, 2026

Export as PDF

Prompt Details

Prompt Composition

4prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. TypeScript 746 lines · 1.5K tokens
  4. 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 AIProjectClient with a server-owned HTTPS project endpoint and TokenCredential. Reject caller-supplied options.endpoint, which overrides the endpoint used by project operations, and keep credential scopes and apiVersion under trusted configuration; the default API version is KnownApiVersions.v1.
  • Prefer ManagedIdentityCredential or WorkloadIdentityCredential in production. If using DefaultAzureCredential, constrain AZURE_TOKEN_CREDENTIALS to the intended production credential or prod, and use requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"] to reject missing or invalid configuration.
  • Keep allowInsecureConnection disabled and do not expose transports, proxies, additionalPolicies, or per-operation requestOptions to callers. Custom headers can override generated headers, and requestOptions.skipUrlEncoding changes 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