You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix discovery endpoint returning routes without /api/v1 prefix on Vercel
Root cause: all adapters registered discovery only at GET prefix (root),
not at GET prefix/discovery. When frontend fetched /api/v1/discovery, the
catch-all stripped the prefix and called dispatch('/discovery') which called
getDiscoveryInfo('') with empty prefix, returning /data instead of /api/v1/data.
Locally this was hidden because MSW mode doesn't register real services,
so the wrong routes were never used. On Vercel, all services are registered,
breaking the API console.
Fixes:
- http-dispatcher: add optional prefix param to dispatch() so discovery
handler uses the correct prefix instead of empty string
- hono adapter: add explicit GET prefix/discovery route (Vercel fix)
- fastify, nuxt adapters: add explicit GET prefix/discovery route
- sveltekit, nextjs adapters: handle 'discovery' segment before catch-all
- express adapter: pass prefix to dispatch() (already had explicit route)
- MSW plugin: add explicit baseUrl/discovery handler + pass baseUrl to dispatch()
- Revert wrong protocol.ts/rest-server.ts/spec changes from previous commit
- Update hono test assertions for new 6th prefix parameter
Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/ae9fa3e0-4bf7-45e8-b4ee-4816ad2f6917
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
0 commit comments