Summary
Every azd ai connection <command> invocation prints an internal diagnostic line
to the terminal:
projectctx: resolved endpoint=https://<...>.services.ai.azure.com/api/projects/<proj> source=flag
This is developer-facing noise that users should never see. It appears
unconditionally — there is no --debug flag required to trigger it.
Repro
- Install the
azure.ai.connections extension.
- Run any connection command against a Foundry project, e.g.:
azd ai connection list -p https://<your-project-endpoint>
Expected
No projectctx: diagnostic line in normal output.
Actual
The projectctx: resolved endpoint=... source=... line is printed on every run.
Root cause
resolveConnectionContext in
cli/azd/extensions/azure.ai.connections/internal/cmd/connection_context.go
calls log.Printf("projectctx: resolved endpoint=%s source=%s", ...). The
extension never silences Go's default logger, so the line goes straight to the
terminal.
Beyond the noise, this is also a layering issue: endpoint resolution is owned by
projectctx.Resolve. Any such diagnostic belongs inside the projectctx
package (where the resolution decision is made), not in the consuming caller.
Fix
Remove the log.Printf line (and the now-unused log import) from
connection_context.go.
Summary
Every
azd ai connection <command>invocation prints an internal diagnostic lineto the terminal:
This is developer-facing noise that users should never see. It appears
unconditionally — there is no
--debugflag required to trigger it.Repro
azure.ai.connectionsextension.Expected
No
projectctx:diagnostic line in normal output.Actual
The
projectctx: resolved endpoint=... source=...line is printed on every run.Root cause
resolveConnectionContextincli/azd/extensions/azure.ai.connections/internal/cmd/connection_context.gocalls
log.Printf("projectctx: resolved endpoint=%s source=%s", ...). Theextension never silences Go's default logger, so the line goes straight to the
terminal.
Beyond the noise, this is also a layering issue: endpoint resolution is owned by
projectctx.Resolve. Any such diagnostic belongs inside theprojectctxpackage (where the resolution decision is made), not in the consuming caller.
Fix
Remove the
log.Printfline (and the now-unusedlogimport) fromconnection_context.go.