Skip to content

Built-in AI assistant calls a nonexistent /chatgpt backend route #23

@tg12

Description

@tg12

Summary

The UI ships an AI-assistant workflow that calls /chatgpt, but neither backend entrypoint implements that route, so the feature path is dead on arrival.

Evidence

  • https://github.com/h9zdev/WireTapper/blob/main/templates/wifi-search.html#L2095-L2126 posts chat input to /chatgpt and expects { reply } in the response.
  • The same template presents the chat feature as an integrated workflow, not a disabled placeholder.
  • No /chatgpt route exists in app.py or app-env.py; the endpoint only appears in the frontend template.

Why this matters

  • The application advertises an AI capability that the backend does not provide.
  • Users are led into a dead path that fails only at request time.
  • This is the same structural problem seen elsewhere in these repos: capability theatre in the interface without a matching implementation contract.

Attack or failure scenario

A user opens the built-in assistant, submits a prompt, and the UI attempts to call /chatgpt. The route does not exist, so the feature collapses into a generic error state while the product still presents it as a working capability.

Root cause

Frontend feature scaffolding was shipped without a corresponding backend implementation or feature gating.

Recommended fix

  1. Remove or hide the assistant UI until a real backend route exists.
  2. If the feature is intended, implement the route and document its auth, rate, and provider boundaries.
  3. Add end-to-end route contract tests for all user-facing workflows.

Acceptance criteria

  • The UI no longer references nonexistent /chatgpt functionality.
  • Any assistant feature is behind a real backend contract or an explicit disabled state.
  • Contract tests catch frontend references to missing backend routes.

Suggested labels

  • bug
  • architecture
  • production-readiness
  • technical-debt

Priority

P1 (High)

Severity

High — a visible core feature path is entirely unimplemented behind the UI contract.

Confidence

Confirmed — the frontend posts to /chatgpt and no matching backend route exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions