refactor: /v1/ canonical paths (sweep)

Per global rule: /v1/ only, never /api/. Internal API calls + handler
comments + route registrations updated. External vendor APIs (OpenRouter,
LangWatch, etc.) left as-is.

- Backend: APIRouter prefix dropped from "/api" — router_v1 (prefix=/v1)
  and router_v2 (prefix=/v2) now mount at the root, subdomain (api.*)
  already namespaces.
- API_V1_STR: "/api/v1" → "/v1"
- Frontend constants: BASE_URL_API "/api/v1/" → "/v1/" and BASE_URL_API_V2
  "/api/v2/" → "/v2/"; vite proxy + Traefik routing labels updated.
- Source files (mcp_utils, mcp_projects, mcp, folders, vertex_types,
  load/utils, mcp_sse, schema/workflow): all internal URL builders.
- Tests + e2e specs + API-code-generator templates + AWS CDK behaviors
  updated to match.
This commit is contained in:
2026-05-18 21:58:07 -07:00
parent 9094a0ae9e
commit 930ffbc5c5
91 changed files with 394 additions and 393 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ services:
labels:
- traefik.enable=true
- traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
- traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=PathPrefix(`/api/v1`) || PathPrefix(`/api/v2`) || PathPrefix(`/docs`) || PathPrefix(`/health`)
- traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=PathPrefix(`/v1`) || PathPrefix(`/v2`) || PathPrefix(`/docs`) || PathPrefix(`/health`)
- traefik.http.services.${STACK_NAME?Variable not set}-backend.loadbalancer.server.port=7860
frontend:
@@ -56,7 +56,7 @@ services:
labels:
- traefik.enable=true
- traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
- traefik.http.routers.${STACK_NAME?Variable not set}-celeryworker-http.rule=PathPrefix(`/api/v1`) || PathPrefix(`/api/v2`) || PathPrefix(`/docs`) || PathPrefix(`/health`)
- traefik.http.routers.${STACK_NAME?Variable not set}-celeryworker-http.rule=PathPrefix(`/v1`) || PathPrefix(`/v2`) || PathPrefix(`/docs`) || PathPrefix(`/health`)
- traefik.http.services.${STACK_NAME?Variable not set}-celeryworker.loadbalancer.server.port=7860
networks:
+1 -1
View File
@@ -80,7 +80,7 @@ services:
labels:
- traefik.enable=true
- traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
- traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=PathPrefix(`/api/v1`) || PathPrefix(`/api/v2`) || PathPrefix(`/docs`) || PathPrefix(`/health`)
- traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=PathPrefix(`/v1`) || PathPrefix(`/v2`) || PathPrefix(`/docs`) || PathPrefix(`/health`)
- traefik.http.services.${STACK_NAME?Variable not set}-backend.loadbalancer.server.port=7860
db: