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-projects is pinned to 1.0.0, but the code uses APIs (e.g.,
agents.createVersion, responses.create) that require 2.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-template provided.
-
Missing dotenv/config import — chat-with-agent, create-agent, and responses don't import
dotenv/config, so .env-template values are never loaded.
-
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.
-
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
#733
Problem
The TypeScript quickstart samples (
agent-service,chat-with-agent,create-agent,responses) have severalissues 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 importdotenv/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'talign with modern Node.js ESM usage.
Expected Behavior
Users should be able to clone a quickstart, copy
.env-templateto.env, fill in their values, and run the samplewithout additional troubleshooting.
PR link
#733