microsoft-foundry / microsoft-foundry/foundry-samples
[Bug] TypeScript quickstart samples broken: outdated SDK, hardcoded values, incorrect module config
@glharper is already working on this.
Since Jun 21, 2026.
- 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:
-
Outdated SDK version —
@azure/ai-projectsis pinned to1.0.0, but the code uses APIs (e.g.,
agents.createVersion,responses.create) that require2.x. -
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-templateprovided. -
Missing
dotenv/configimport —chat-with-agent,create-agent, andresponsesdon't import
dotenv/config, so.env-templatevalues are never loaded. -
Verbose env var names —
.env-templateusesAZURE_AI_PROJECT_ENDPOINT/AZURE_AI_FOUNDRY_AGENT_NAME/
AZURE_AI_FOUNDRY_MODEL_DEPLOYMENT_NAMEbut the code references shorter names, causing a mismatch. -
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.