Skip to content

chore(slm-frontend): replace remaining 2 hardcoded /api/ in AgentsView and InfrastructureWizard #3726

@mrveiss

Description

@mrveiss

Summary

Two SLM frontend files were missed by the getSlmApiBase() sweep (#3627). Both hardcode /api/ which breaks in co-located nginx deployments where the SLM API is at /slm/api/.

Files to Fix

File Line Code
autobot-slm-frontend/src/views/AgentsView.vue ~177 fetch(`/api/agents/${selectedAgent.value.agent_id}`, ...)
autobot-slm-frontend/src/components/InfrastructureWizard.vue ~223 `/api/infrastructure/executions/${currentExecution.value.execution_id}/cancel`

Fix

In each file:

  1. Add/extend import: import { getSlmApiBase } from '@/config/ssot-config'
  2. Replace `/api/agents/${...}``${getSlmApiBase()}/agents/${...}`
  3. Replace `/api/infrastructure/...``${getSlmApiBase()}/infrastructure/...`

Verification

cd autobot-slm-frontend
npx vue-tsc --noEmit 2>&1 | grep -v "baseUrl.*deprecated"
grep -rn "'/api/\|\`/api/" src --include="*.ts" --include="*.vue" \
  | grep -v "getSlmApiBase\|getBackendUrl\|ssot-config\|//"
# Should return 0 results

Discovered as gap during Phase 5 audit, 2026-04-07.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions