Skip to content

/settings/model-api returns 404 although the settings client routes it #3466

Done

Description

@Birfy

Summary

GET /settings/model-api returns 404 Not Found with the body Not found (9 bytes), although the settings client treats that URL as a real view, the shell already contains the panel, and five chat anchors link to it.

Measured on main at 0d18af72ce8f478be473b16533df4e807ee3222b.

Evidence

Server allow-list — flybot_workspace/settings_page.py:39-47 serves appearance, language, message-folding, privacy, shortcuts, channels, agent-access, connectors, skill-configuration. model-api is missing, while the removed section message-folding is still served for back-compat (tests/test_settings_page.py:360-364 asserts it is 200 and carries no data-settings-page="message-folding").

Everything else already assumes the route exists:

  • flybot_workspace/static/settings/app.mjs:114 — PATH_VIEWS maps '/settings/model-api' to the model-api view.
  • flybot_workspace/static/settings/index.html:361 — the shell has <div data-settings-page="model-api" hidden>, so serving the route needs no client change.
  • tests/settings_page.test.mjs:147 — asserts settingsViewFromLocation('/settings/model-api', '#video-api') === 'model-api'.
  • flybot_workspace/static/chat/index.html:529, 551, 579, 609, 641 — five anchors point at /settings/model-api (#image-api, #video-api, #music-api, #model3d-api). They are hidden today, but the URL they name is not served.

The allow-list test loop that would have caught this, tests/test_settings_page.py:347-353, enumerates the other eight subpages and omits model-api.

Steps to reproduce

  1. Start the workspace server with a fresh private data dir: python -m flybot_workspace.server --data-dir <fresh dir, chmod 700> --origin http://127.0.0.1:8794 --port 8794 --insecure-local --open-registration.
  2. Register and log in.
  3. GET /settings/model-api.

Expected

200 with the settings shell, like the other eight subpages.

Actual

404 Not Found, Content-Length: 9, body Not found — the handler's unknown-page branch (flybot_workspace/settings_page.py:369-377, :392).

Fix scope

One route entry in the settings_page.py allow-list, plus extending test_recorded_subpages_serve_the_same_settings_shell to /settings/model-api (or asserting every PATH_VIEWS URL is served, which also keeps client and server from drifting again). No client change, no docs/ contract to update.

Out of scope: the five hidden anchors in chat/index.html are leftovers of #405 and are not made visible by this fix.

Activity

  1. added
    agent-ready
    on Nov 30, 2026
  2. Birfy commented on Nov 30, 2026

    @Birfy
    CollaboratorAuthor

    Branch dev/3466-settings-model-api-route, cut from main at 0d18af72ce8f478be473b16533df4e807ee3222b.

    Slice: add the missing '/settings/model-api' entry to the settings allow-list in flybot_workspace/settings_page.py, and extend test_recorded_subpages_serve_the_same_settings_shell (tests/test_settings_page.py:347) to that path so client and server cannot drift again. Expected diff: 2 files, +2/-0. No client change; the shell's data-settings-page="model-api" panel is already there (static/settings/index.html:361).

    Acceptance: on a fresh private data dir, GET /settings/model-api returns 200 with the settings shell and data-settings-page="model-api"; tests.test_settings_page and tests.settings_page stay green; /settings/message-folding back-compat assertion untouched.

    Out of scope: the five hidden anchors in static/chat/index.html.

  3. added
    agent-working
    on Nov 30, 2026
  4. Birfy commented on Nov 30, 2026

    @Birfy
    CollaboratorAuthor

    Landed as 89e163ef4d8fc6a23aadd79655e81a40f6630c11 (squash of #3467, parent 2bae5d9fa1c0a524573eee7c09eefa41b5e3b4b8), tree aa1877aa69910e9d730e77233391376c6ce43f6e.

    • 2 files, +3/−1: flybot_workspace/settings_page.py (1/0), tests/test_settings_page.py (2/1) — nothing else in the diff against the pre-merge main.
    • Blob SHAs unchanged from the reviewed head 7b3f3272: 11954654 and 23eb5535.
    • Squash message carries Related #3466 and no closing keywords.

    GET /settings/model-api is now served by the settings shell, matching the route the client already declared. Closing as completed.

  5. removed
    agent-working
    agent-ready
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions