The dogfood template hard-coded `dev.coder.com` for both AI provider
base URLs even though the active deployment is now `dogfood.cdr.dev`.
Derive the origin from `data.coder_workspace.me.access_url`, trimming a
trailing slash, while preserving the provider suffixes and session-token
wiring.
Current main registers `/api/v2/ai-gateway` as canonical and
`/api/v2/aibridge` as a legacy alias, so this keeps the canonical paths
documented for Anthropic and OpenAI clients. Only the two URL
assignments change.
**Validated:** repository pre-commit-light hooks, Terraform formatter,
`terraform fmt -check`, `terraform init -backend=false -input=false`,
`terraform validate`, and 12 Terraform-console URL checks covering both
providers, three origins, and optional trailing slashes. The original
main values reproduce the regression; session-token wiring and all other
template content are unchanged.
**Rollout:** publish the updated template through the normal release
process, then update and restart affected workspaces to pick up the
environment. No template deployment, Terraform apply, live
infrastructure, or Mux configuration changes were performed.
> Xum acted on behalf of Michael Suchacz (@ibetitsmike).