fix(admin): resolve vendor/model-shaped ids in the availability routes #42

Merged
alee merged 1 commits from fix/admin-model-id-slash-routing into main 2026-09-06 21:04:51 +00:00

1 Commits

Author SHA1 Message Date
adlee-was-taken
69fb382588 fix(admin): resolve vendor/model-shaped ids in the availability routes
Every OpenRouter model id contains a slash (google/lyria-3-pro-preview),
and the frontend already encodeURIComponent()s it before building the
request URL -- but Starlette decodes %2F back into a literal '/' before
matching a plain `str` path parameter, so the request splits into extra
path segments and 404s. Declaring model_id as `:path` on all three
routes (GET detail, POST/DELETE availability) fixes it the standard way.

Confirmed live: every availability-override click on an OpenRouter
model has been silently failing since #39 shipped, because nobody had
exercised these routes against a slash-containing id until now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VRQXz5SYZYVWscxS1QqF6U
2026-09-06 17:02:41 -04:00