microsoft-foundry / microsoft-foundry/foundry-samples

[Bug] TypeScript quickstart samples broken: outdated SDK, hardcoded values, incorrect module config

Open
#734 2 comments 0 reactions 5 assignees View on GitHub

@glharper is already working on this.

Since Jun 21, 2026.

bug
Dominant language
Bicep
Stars
445
Forks
494
Avg merge
11h 35m
Merged PRs (30d)
38

Description

Problem

The TypeScript quickstart samples (agent-service, chat-with-agent, create-agent, responses) have several
issues that prevent users from running them successfully:

  1. Outdated SDK version@azure/ai-projects is pinned to 1.0.0, but the code uses APIs (e.g.,
    agents.createVersion, responses.create) that require 2.x.

  2. Hardcoded placeholder values — Some samples use hardcoded strings like "your_project_endpoint" and
    "gpt-5-mini" instead of reading from environment variables, inconsistent with the .env-template provided.

  3. Missing dotenv/config importchat-with-agent, create-agent, and responses don't import
    dotenv/config, so .env-template values are never loaded.

  4. Verbose env var names.env-template uses AZURE_AI_PROJECT_ENDPOINT / AZURE_AI_FOUNDRY_AGENT_NAME /
    AZURE_AI_FOUNDRY_MODEL_DEPLOYMENT_NAME but the code references shorter names, causing a mismatch.

  5. Outdated tsconfig module resolution — Using "module": "ESNext" + "moduleResolution": "node" which doesn't
    align with modern Node.js ESM usage.

Expected Behavior

Users should be able to clone a quickstart, copy .env-template to .env, fill in their values, and run the sample
without additional troubleshooting.

PR link

https://github.com/microsoft-foundry/foundry-samples/pull/733

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.