UPDATE: changing services/admin-console/package.json dependencies ai version to "ai": "2.2.33", (around line 38-ish) fixed it for me.
Playground Generate SQL calls useApiFetcher.ts useCallback with url as an array instead of a string resulting in 404 and failure to display query results.
Steps to reproduce:
- Databases: choose database tables and scan them.
- Playground: enter a NL prompt in the query window and click Generate SQL
- The query is sent to the server and saved in the Queries section, but the page does not return the results of the query or display it.
Some autogenerated string is sent along with the url in an array which is converted to a string and becomes part of the request resulting in the 404
console error:
useApiFetcher.ts:59 GET http://localhost:3001/generations/prompts/sql-generations/stream,:r1: 404 (Not Found)
useApiFetcher.ts:59 GET http://localhost:3000/:r1:,loading 404 (Not Found)
useApiFetcher.ts:59 GET http://localhost:3000/:r1:,streamData 404 (Not Found)
It seems that this code is being called by playground/index.tsx at useCompletion.
The code for this component is a year old, which suggests the issue may be an incompatibility with a newer version of a dependency like the Vercel AI SDK (ai/react).